From 7d8d9bfc7b4c9819b5ab3f1521be31f132f31960 Mon Sep 17 00:00:00 2001 From: Kirill_Kuzmin Date: Wed, 11 Dec 2024 13:27:41 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index.html | 12 +- app/js/main.js | 73548 +++++++++++++++++----------------- app/js/main.js.map | 2 +- src/partials/accordion.html | 6 +- yarn.lock | 1235 +- 5 files changed, 37035 insertions(+), 37768 deletions(-) diff --git a/app/index.html b/app/index.html index 3204d39..d13a88a 100644 --- a/app/index.html +++ b/app/index.html @@ -1077,13 +1077,13 @@ Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург

- Беркут, Российская ул., 206А, Красондар + Беркут, Российская ул., 206А, Краснодар

- Техдок, Ялтинская ул., 18, Красондар + Техдок, Ялтинская ул., 18, Краснодар

- Триалл, Черкасская ул., 66/1, Красондар + Триалл, Черкасская ул., 66/1, Краснодар

БестВей, Коминтерна, 47А1, Нижний Новгород @@ -1275,13 +1275,13 @@ Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург

- Беркут, Российская ул., 206А, Красондар + Беркут, Российская ул., 206А, Краснодар

- Техдок, Ялтинская ул., 18, Красондар + Техдок, Ялтинская ул., 18, Краснодар

- Триалл, Черкасская ул., 66/1, Красондар + Триалл, Черкасская ул., 66/1, Краснодар

БестВей, Коминтерна, 47А1, Нижний Новгород diff --git a/app/js/main.js b/app/js/main.js index 3aa2fcb..72a91f2 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -20,10541 +20,8144 @@ const t=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object /***/ }), -/***/ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js": -/*!************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/byte-helpers.js ***! - \************************************************************/ +/***/ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***! + \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ENDIANNESS: () => (/* binding */ ENDIANNESS), -/* harmony export */ IS_BIG_ENDIAN: () => (/* binding */ IS_BIG_ENDIAN), -/* harmony export */ IS_LITTLE_ENDIAN: () => (/* binding */ IS_LITTLE_ENDIAN), -/* harmony export */ bytesMatch: () => (/* binding */ bytesMatch), -/* harmony export */ bytesToNumber: () => (/* binding */ bytesToNumber), -/* harmony export */ bytesToString: () => (/* binding */ bytesToString), -/* harmony export */ concatTypedArrays: () => (/* binding */ concatTypedArrays), -/* harmony export */ countBits: () => (/* binding */ countBits), -/* harmony export */ countBytes: () => (/* binding */ countBytes), -/* harmony export */ isArrayBufferView: () => (/* binding */ isArrayBufferView), -/* harmony export */ isTypedArray: () => (/* binding */ isTypedArray), -/* harmony export */ numberToBytes: () => (/* binding */ numberToBytes), -/* harmony export */ padStart: () => (/* binding */ padStart), -/* harmony export */ reverseBytes: () => (/* binding */ reverseBytes), -/* harmony export */ sliceBytes: () => (/* binding */ sliceBytes), -/* harmony export */ stringToBytes: () => (/* binding */ stringToBytes), -/* harmony export */ toBinaryString: () => (/* binding */ toBinaryString), -/* harmony export */ toHexString: () => (/* binding */ toHexString), -/* harmony export */ toUint8: () => (/* binding */ toUint8) +/* harmony export */ "default": () => (/* binding */ decodeB64ToUint8Array) /* harmony export */ }); /* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); /* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2)); - -var repeat = function repeat(str, len) { - var acc = ''; - - while (len--) { - acc += str; - } - return acc; -}; // count the number of bits it would take to represent a number -// we used to do this with log2 but BigInt does not support builtin math -// Math.ceil(log2(x)); +var atob = function atob(s) { + return (global_window__WEBPACK_IMPORTED_MODULE_0___default().atob) ? global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(s) : Buffer.from(s, 'base64').toString('binary'); +}; -var countBits = function countBits(x) { - return x.toString(2).length; -}; // count the number of whole bytes it would take to represent a number +function decodeB64ToUint8Array(b64Text) { + var decodedString = atob(b64Text); + var array = new Uint8Array(decodedString.length); -var countBytes = function countBytes(x) { - return Math.ceil(countBits(x) / 8); -}; -var padStart = function padStart(b, len, str) { - if (str === void 0) { - str = ' '; + for (var i = 0; i < decodedString.length; i++) { + array[i] = decodedString.charCodeAt(i); } - return (repeat(str, len) + b.toString()).slice(-len); -}; -var isArrayBufferView = function isArrayBufferView(obj) { - if (ArrayBuffer.isView === 'function') { - return ArrayBuffer.isView(obj); - } + return array; +} - return obj && obj.buffer instanceof ArrayBuffer; -}; -var isTypedArray = function isTypedArray(obj) { - return isArrayBufferView(obj); -}; -var toUint8 = function toUint8(bytes) { - if (bytes instanceof Uint8Array) { - return bytes; - } +/***/ }), - if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) { - // any non-number or NaN leads to empty uint8array - // eslint-disable-next-line - if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) { - bytes = 0; - } else { - bytes = [bytes]; - } - } +/***/ "./node_modules/@videojs/vhs-utils/es/media-groups.js": +/*!************************************************************!*\ + !*** ./node_modules/@videojs/vhs-utils/es/media-groups.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ forEachMediaGroup: () => (/* binding */ forEachMediaGroup) +/* harmony export */ }); +/** + * Loops through all supported media groups in master and calls the provided + * callback for each group + * + * @param {Object} master + * The parsed master manifest object + * @param {string[]} groups + * The media groups to call the callback for + * @param {Function} callback + * Callback to call for each media group + */ +var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) { + groups.forEach(function (mediaType) { + for (var groupKey in master.mediaGroups[mediaType]) { + for (var labelKey in master.mediaGroups[mediaType][groupKey]) { + var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey]; + callback(mediaProperties, mediaType, groupKey, labelKey); + } + } + }); }; -var toHexString = function toHexString(bytes) { - bytes = toUint8(bytes); - var str = ''; - for (var i = 0; i < bytes.length; i++) { - str += padStart(bytes[i].toString(16), 2, '0'); - } +/***/ }), - return str; -}; -var toBinaryString = function toBinaryString(bytes) { - bytes = toUint8(bytes); - var str = ''; +/***/ "./node_modules/@videojs/vhs-utils/es/resolve-url.js": +/*!***********************************************************!*\ + !*** ./node_modules/@videojs/vhs-utils/es/resolve-url.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - for (var i = 0; i < bytes.length; i++) { - str += padStart(bytes[i].toString(2), 8, '0'); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); +/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); - return str; -}; -var BigInt = (global_window__WEBPACK_IMPORTED_MODULE_0___default().BigInt) || Number; -var BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')]; -var ENDIANNESS = function () { - var a = new Uint16Array([0xFFCC]); - var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength); - if (b[0] === 0xFF) { - return 'big'; - } +var DEFAULT_LOCATION = 'http://example.com'; - if (b[0] === 0xCC) { - return 'little'; - } +var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { + // return early if we don't need to resolve + if (/^[a-z]+:/i.test(relativeUrl)) { + return relativeUrl; + } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location - return 'unknown'; -}(); -var IS_BIG_ENDIAN = ENDIANNESS === 'big'; -var IS_LITTLE_ENDIAN = ENDIANNESS === 'little'; -var bytesToNumber = function bytesToNumber(bytes, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$signed = _ref.signed, - signed = _ref$signed === void 0 ? false : _ref$signed, - _ref$le = _ref.le, - le = _ref$le === void 0 ? false : _ref$le; - bytes = toUint8(bytes); - var fn = le ? 'reduce' : 'reduceRight'; - var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn]; - var number = obj.call(bytes, function (total, byte, i) { - var exponent = le ? i : Math.abs(i + 1 - bytes.length); - return total + BigInt(byte) * BYTE_TABLE[exponent]; - }, BigInt(0)); + if (/^data:/.test(baseUrl)) { + baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; + } // IE11 supports URL but not the URL constructor + // feature detect the behavior we want - if (signed) { - var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1); - number = BigInt(number); - if (number > max) { - number -= max; - number -= max; - number -= BigInt(2); - } - } + var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; + var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) + // and if baseUrl isn't an absolute url - return Number(number); -}; -var numberToBytes = function numberToBytes(number, _temp2) { - var _ref2 = _temp2 === void 0 ? {} : _temp2, - _ref2$le = _ref2.le, - le = _ref2$le === void 0 ? false : _ref2$le; + var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location - // eslint-disable-next-line - if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) { - number = 0; + if (nativeURL) { + baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); + } else if (!/\/\//i.test(baseUrl)) { + baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); } - number = BigInt(number); - var byteCount = countBytes(number); - var bytes = new Uint8Array(new ArrayBuffer(byteCount)); - - for (var i = 0; i < byteCount; i++) { - var byteIndex = le ? i : Math.abs(i + 1 - bytes.length); - bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF)); + if (nativeURL) { + var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol + // and if we're location-less, remove the location + // otherwise, return the url unmodified - if (number < 0) { - bytes[byteIndex] = Math.abs(~bytes[byteIndex]); - bytes[byteIndex] -= i === 0 ? 1 : 2; + if (removeLocation) { + return newUrl.href.slice(DEFAULT_LOCATION.length); + } else if (protocolLess) { + return newUrl.href.slice(newUrl.protocol.length); } + + return newUrl.href; } - return bytes; + return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); }; -var bytesToString = function bytesToString(bytes) { - if (!bytes) { - return ''; - } // TODO: should toUint8 handle cases where we only have 8 bytes - // but report more since this is a Uint16+ Array? +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); - bytes = Array.prototype.slice.call(bytes); - var string = String.fromCharCode.apply(null, toUint8(bytes)); +/***/ }), - try { - return decodeURIComponent(escape(string)); - } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial - // or full non string data. Just return the potentially garbled string. - } +/***/ "./node_modules/@videojs/vhs-utils/es/stream.js": +/*!******************************************************!*\ + !*** ./node_modules/@videojs/vhs-utils/es/stream.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return string; -}; -var stringToBytes = function stringToBytes(string, stringIsBytes) { - if (typeof string !== 'string' && string && typeof string.toString === 'function') { - string = string.toString(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Stream) +/* harmony export */ }); +/** + * @file stream.js + */ + +/** + * A lightweight readable stream implemention that handles event dispatching. + * + * @class Stream + */ +var Stream = /*#__PURE__*/function () { + function Stream() { + this.listeners = {}; } + /** + * Add a listener for a specified event type. + * + * @param {string} type the event name + * @param {Function} listener the callback to be invoked when an event of + * the specified type occurs + */ - if (typeof string !== 'string') { - return new Uint8Array(); - } // If the string already is bytes, we don't have to do this - // otherwise we do this so that we split multi length characters - // into individual bytes + var _proto = Stream.prototype; - if (!stringIsBytes) { - string = unescape(encodeURIComponent(string)); + _proto.on = function on(type, listener) { + if (!this.listeners[type]) { + this.listeners[type] = []; + } + + this.listeners[type].push(listener); } + /** + * Remove a listener for a specified event type. + * + * @param {string} type the event name + * @param {Function} listener a function previously registered for this + * type of event through `on` + * @return {boolean} if we could turn it off or not + */ + ; - var view = new Uint8Array(string.length); + _proto.off = function off(type, listener) { + if (!this.listeners[type]) { + return false; + } - for (var i = 0; i < string.length; i++) { - view[i] = string.charCodeAt(i); - } + var index = this.listeners[type].indexOf(listener); // TODO: which is better? + // In Video.js we slice listener functions + // on trigger so that it does not mess up the order + // while we loop through. + // + // Here we slice on off so that the loop in trigger + // can continue using it's old reference to loop without + // messing up the order. - return view; -}; -var concatTypedArrays = function concatTypedArrays() { - for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) { - buffers[_key] = arguments[_key]; + this.listeners[type] = this.listeners[type].slice(0); + this.listeners[type].splice(index, 1); + return index > -1; } + /** + * Trigger an event of the specified type on this stream. Any additional + * arguments to this function are passed as parameters to event listeners. + * + * @param {string} type the event name + */ + ; - buffers = buffers.filter(function (b) { - return b && (b.byteLength || b.length) && typeof b !== 'string'; - }); + _proto.trigger = function trigger(type) { + var callbacks = this.listeners[type]; - if (buffers.length <= 1) { - // for 0 length we will return empty uint8 - // for 1 length we return the first uint8 - return toUint8(buffers[0]); - } + if (!callbacks) { + return; + } // Slicing the arguments on every invocation of this method + // can add a significant amount of overhead. Avoid the + // intermediate object creation for the common case of a + // single callback argument - var totalLen = buffers.reduce(function (total, buf, i) { - return total + (buf.byteLength || buf.length); - }, 0); - var tempBuffer = new Uint8Array(totalLen); - var offset = 0; - buffers.forEach(function (buf) { - buf = toUint8(buf); - tempBuffer.set(buf, offset); - offset += buf.byteLength; - }); - return tempBuffer; -}; -/** - * Check if the bytes "b" are contained within bytes "a". - * - * @param {Uint8Array|Array} a - * Bytes to check in - * - * @param {Uint8Array|Array} b - * Bytes to check for - * - * @param {Object} options - * options - * - * @param {Array|Uint8Array} [offset=0] - * offset to use when looking at bytes in a - * - * @param {Array|Uint8Array} [mask=[]] - * mask to use on bytes before comparison. - * - * @return {boolean} - * If all bytes in b are inside of a, taking into account - * bit masks. - */ -var bytesMatch = function bytesMatch(a, b, _temp3) { - var _ref3 = _temp3 === void 0 ? {} : _temp3, - _ref3$offset = _ref3.offset, - offset = _ref3$offset === void 0 ? 0 : _ref3$offset, - _ref3$mask = _ref3.mask, - mask = _ref3$mask === void 0 ? [] : _ref3$mask; + if (arguments.length === 2) { + var length = callbacks.length; - a = toUint8(a); - b = toUint8(b); // ie 11 does not support uint8 every + for (var i = 0; i < length; ++i) { + callbacks[i].call(this, arguments[1]); + } + } else { + var args = Array.prototype.slice.call(arguments, 1); + var _length = callbacks.length; - var fn = b.every ? b.every : Array.prototype.every; - return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8 - fn.call(b, function (bByte, i) { - var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i]; - return bByte === aByte; - }); -}; -var sliceBytes = function sliceBytes(src, start, end) { - if (Uint8Array.prototype.slice) { - return Uint8Array.prototype.slice.call(src, start, end); + for (var _i = 0; _i < _length; ++_i) { + callbacks[_i].apply(this, args); + } + } } + /** + * Destroys the stream and cleans up. + */ + ; - return new Uint8Array(Array.prototype.slice.call(src, start, end)); -}; -var reverseBytes = function reverseBytes(src) { - if (src.reverse) { - return src.reverse(); + _proto.dispose = function dispose() { + this.listeners = {}; } + /** + * Forwards all `data` events on this stream to the destination stream. The + * destination stream should provide a method `push` to receive the data + * events as they arrive. + * + * @param {Stream} destination the stream that will receive all `data` events + * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options + */ + ; + + _proto.pipe = function pipe(destination) { + this.on('data', function (data) { + destination.push(data); + }); + }; + + return Stream; +}(); + - return Array.prototype.reverse.call(src); -}; /***/ }), -/***/ "./node_modules/@videojs/vhs-utils/es/codec-helpers.js": -/*!*************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/codec-helpers.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/@videojs/xhr/lib/http-handler.js": +/*!*******************************************************!*\ + !*** ./node_modules/@videojs/xhr/lib/http-handler.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getAv1Codec: () => (/* binding */ getAv1Codec), -/* harmony export */ getAvcCodec: () => (/* binding */ getAvcCodec), -/* harmony export */ getHvcCodec: () => (/* binding */ getHvcCodec) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax -// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1 -var getAv1Codec = function getAv1Codec(bytes) { - var codec = ''; - var profile = bytes[1] >>> 3; - var level = bytes[1] & 0x1F; - var tier = bytes[2] >>> 7; - var highBitDepth = (bytes[2] & 0x40) >> 6; - var twelveBit = (bytes[2] & 0x20) >> 5; - var monochrome = (bytes[2] & 0x10) >> 4; - var chromaSubsamplingX = (bytes[2] & 0x08) >> 3; - var chromaSubsamplingY = (bytes[2] & 0x04) >> 2; - var chromaSamplePosition = bytes[2] & 0x03; - codec += profile + "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0'); - if (tier === 0) { - codec += 'M'; - } else if (tier === 1) { - codec += 'H'; +var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); + +var httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) { + if (decodeResponseBody === void 0) { + decodeResponseBody = false; } - var bitDepth; + return function (err, response, responseBody) { + // if the XHR failed, return that error + if (err) { + callback(err); + return; + } // if the HTTP status code is 4xx or 5xx, the request also failed - if (profile === 2 && highBitDepth) { - bitDepth = twelveBit ? 12 : 10; - } else { - bitDepth = highBitDepth ? 10 : 8; - } - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); // TODO: can we parse color range?? + if (response.statusCode >= 400 && response.statusCode <= 599) { + var cause = responseBody; - codec += "." + monochrome; - codec += "." + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition; - return codec; -}; -var getAvcCodec = function getAvcCodec(bytes) { - var profileId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[1]); - var constraintFlags = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[2] & 0xFC); - var levelId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[3]); - return "" + profileId + constraintFlags + levelId; -}; -var getHvcCodec = function getHvcCodec(bytes) { - var codec = ''; - var profileSpace = bytes[1] >> 6; - var profileId = bytes[1] & 0x1F; - var tierFlag = (bytes[1] & 0x20) >> 5; - var profileCompat = bytes.subarray(2, 6); - var constraintIds = bytes.subarray(6, 12); - var levelId = bytes[12]; + if (decodeResponseBody) { + if (window.TextDecoder) { + var charset = getCharset(response.headers && response.headers['content-type']); - if (profileSpace === 1) { - codec += 'A'; - } else if (profileSpace === 2) { - codec += 'B'; - } else if (profileSpace === 3) { - codec += 'C'; - } - - codec += profileId + "."; // ffmpeg does this in big endian + try { + cause = new TextDecoder(charset).decode(responseBody); + } catch (e) {} + } else { + cause = String.fromCharCode.apply(null, new Uint8Array(responseBody)); + } + } - var profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian... + callback({ + cause: cause + }); + return; + } // otherwise, request succeeded - if (profileCompatVal > 255) { - profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat), 2); - } - codec += profileCompatVal.toString(16) + "."; + callback(null, responseBody); + }; +}; - if (tierFlag === 0) { - codec += 'L'; - } else { - codec += 'H'; +function getCharset(contentTypeHeader) { + if (contentTypeHeader === void 0) { + contentTypeHeader = ''; } - codec += levelId; - var constraints = ''; - - for (var i = 0; i < constraintIds.length; i++) { - var v = constraintIds[i]; - - if (v) { - if (constraints) { - constraints += '.'; - } + return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) { + var _contentType$split = contentType.split('='), + type = _contentType$split[0], + value = _contentType$split[1]; - constraints += v.toString(16); + if (type.trim() === 'charset') { + return value.trim(); } - } - if (constraints) { - codec += "." + constraints; - } + return charset; + }, 'utf-8'); +} - return codec; -}; +module.exports = httpResponseHandler; /***/ }), -/***/ "./node_modules/@videojs/vhs-utils/es/codecs.js": -/*!******************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/codecs.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/@videojs/xhr/lib/index.js": +/*!************************************************!*\ + !*** ./node_modules/@videojs/xhr/lib/index.js ***! + \************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DEFAULT_AUDIO_CODEC: () => (/* binding */ DEFAULT_AUDIO_CODEC), -/* harmony export */ DEFAULT_VIDEO_CODEC: () => (/* binding */ DEFAULT_VIDEO_CODEC), -/* harmony export */ browserSupportsCodec: () => (/* binding */ browserSupportsCodec), -/* harmony export */ codecsFromDefault: () => (/* binding */ codecsFromDefault), -/* harmony export */ getMimeForCodec: () => (/* binding */ getMimeForCodec), -/* harmony export */ isAudioCodec: () => (/* binding */ isAudioCodec), -/* harmony export */ isTextCodec: () => (/* binding */ isTextCodec), -/* harmony export */ isVideoCodec: () => (/* binding */ isVideoCodec), -/* harmony export */ mapLegacyAvcCodecs: () => (/* binding */ mapLegacyAvcCodecs), -/* harmony export */ muxerSupportsCodec: () => (/* binding */ muxerSupportsCodec), -/* harmony export */ parseCodecs: () => (/* binding */ parseCodecs), -/* harmony export */ translateLegacyCodec: () => (/* binding */ translateLegacyCodec), -/* harmony export */ translateLegacyCodecs: () => (/* binding */ translateLegacyCodecs) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); -var regexs = { - // to determine mime types - mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/, - webm: /^(vp0?[89]|av0?1|opus|vorbis)/, - ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/, - // to determine if a codec is audio or video - video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/, - audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/, - text: /^(stpp.ttml.im1t)/, - // mux.js support regex - muxerVideo: /^(avc0?1)/, - muxerAudio: /^(mp4a)/, - // match nothing as muxer does not support text right now. - // there cannot never be a character before the start of a string - // so this matches nothing. - muxerText: /a^/ -}; -var mediaTypes = ['video', 'audio', 'text']; -var upperMediaTypes = ['Video', 'Audio', 'Text']; + +var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); + +var _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"); + +var isFunction = __webpack_require__(/*! is-function */ "./node_modules/is-function/index.js"); + +createXHR.httpHandler = __webpack_require__(/*! ./http-handler.js */ "./node_modules/@videojs/xhr/lib/http-handler.js"); /** - * Replace the old apple-style `avc1.

.
` codec string with the standard - * `avc1.` - * - * @param {string} codec - * Codec string to translate - * @return {string} - * The translated codec string + * @license + * slighly modified parse-headers 2.0.2 + * Copyright (c) 2014 David Björklund + * Available under the MIT license + * */ -var translateLegacyCodec = function translateLegacyCodec(codec) { - if (!codec) { - return codec; +var parseHeaders = function parseHeaders(headers) { + var result = {}; + + if (!headers) { + return result; } - return codec.replace(/avc1\.(\d+)\.(\d+)/i, function (orig, profile, avcLevel) { - var profileHex = ('00' + Number(profile).toString(16)).slice(-2); - var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2); - return 'avc1.' + profileHex + '00' + avcLevelHex; + headers.trim().split('\n').forEach(function (row) { + var index = row.indexOf(':'); + var key = row.slice(0, index).trim().toLowerCase(); + var value = row.slice(index + 1).trim(); + + if (typeof result[key] === 'undefined') { + result[key] = value; + } else if (Array.isArray(result[key])) { + result[key].push(value); + } else { + result[key] = [result[key], value]; + } }); + return result; }; -/** - * Replace the old apple-style `avc1.
.
` codec strings with the standard - * `avc1.` - * - * @param {string[]} codecs - * An array of codec strings to translate - * @return {string[]} - * The translated array of codec strings - */ -var translateLegacyCodecs = function translateLegacyCodecs(codecs) { - return codecs.map(translateLegacyCodec); -}; -/** - * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the - * standard `avc1.`. - * - * @param {string} codecString - * The codec string - * @return {string} - * The codec string with old apple-style codecs replaced - * - * @private - */ +module.exports = createXHR; // Allow use of default import syntax in TypeScript -var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) { - return codecString.replace(/avc1\.(\d+)\.(\d+)/i, function (match) { - return translateLegacyCodecs([match])[0]; - }); -}; -/** - * @typedef {Object} ParsedCodecInfo - * @property {number} codecCount - * Number of codecs parsed - * @property {string} [videoCodec] - * Parsed video codec (if found) - * @property {string} [videoObjectTypeIndicator] - * Video object type indicator (if found) - * @property {string|null} audioProfile - * Audio profile - */ +module.exports["default"] = createXHR; +createXHR.XMLHttpRequest = window.XMLHttpRequest || noop; +createXHR.XDomainRequest = "withCredentials" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest; +forEachArray(["get", "put", "post", "patch", "head", "delete"], function (method) { + createXHR[method === "delete" ? "del" : method] = function (uri, options, callback) { + options = initParams(uri, options, callback); + options.method = method.toUpperCase(); + return _createXHR(options); + }; +}); -/** - * Parses a codec string to retrieve the number of codecs specified, the video codec and - * object type indicator, and the audio profile. - * - * @param {string} [codecString] - * The codec string to parse - * @return {ParsedCodecInfo} - * Parsed codec info - */ +function forEachArray(array, iterator) { + for (var i = 0; i < array.length; i++) { + iterator(array[i]); + } +} -var parseCodecs = function parseCodecs(codecString) { - if (codecString === void 0) { - codecString = ''; +function isEmpty(obj) { + for (var i in obj) { + if (obj.hasOwnProperty(i)) return false; } - var codecs = codecString.split(','); - var result = []; - codecs.forEach(function (codec) { - codec = codec.trim(); - var codecType; - mediaTypes.forEach(function (name) { - var match = regexs[name].exec(codec.toLowerCase()); + return true; +} - if (!match || match.length <= 1) { - return; - } +function initParams(uri, options, callback) { + var params = uri; - codecType = name; // maintain codec case + if (isFunction(options)) { + callback = options; - var type = codec.substring(0, match[1].length); - var details = codec.replace(type, ''); - result.push({ - type: type, - details: details, - mediaType: name - }); + if (typeof uri === "string") { + params = { + uri: uri + }; + } + } else { + params = _extends({}, options, { + uri: uri }); + } - if (!codecType) { - result.push({ - type: codec, - details: '', - mediaType: 'unknown' - }); - } - }); - return result; -}; -/** - * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is - * a default alternate audio playlist for the provided audio group. - * - * @param {Object} master - * The master playlist - * @param {string} audioGroupId - * ID of the audio group for which to find the default codec info - * @return {ParsedCodecInfo} - * Parsed codec info - */ + params.callback = callback; + return params; +} -var codecsFromDefault = function codecsFromDefault(master, audioGroupId) { - if (!master.mediaGroups.AUDIO || !audioGroupId) { - return null; +function createXHR(uri, options, callback) { + options = initParams(uri, options, callback); + return _createXHR(options); +} + +function _createXHR(options) { + if (typeof options.callback === "undefined") { + throw new Error("callback argument missing"); } - var audioGroup = master.mediaGroups.AUDIO[audioGroupId]; + var called = false; - if (!audioGroup) { - return null; + var callback = function cbOnce(err, response, body) { + if (!called) { + called = true; + options.callback(err, response, body); + } + }; + + function readystatechange() { + if (xhr.readyState === 4) { + setTimeout(loadFunc, 0); + } } - for (var name in audioGroup) { - var audioType = audioGroup[name]; + function getBody() { + // Chrome with requestType=blob throws errors arround when even testing access to responseText + var body = undefined; - if (audioType.default && audioType.playlists) { - // codec should be the same for all playlists within the audio type - return parseCodecs(audioType.playlists[0].attributes.CODECS); + if (xhr.response) { + body = xhr.response; + } else { + body = xhr.responseText || getXml(xhr); } - } - return null; -}; -var isVideoCodec = function isVideoCodec(codec) { - if (codec === void 0) { - codec = ''; - } + if (isJson) { + try { + body = JSON.parse(body); + } catch (e) {} + } - return regexs.video.test(codec.trim().toLowerCase()); -}; -var isAudioCodec = function isAudioCodec(codec) { - if (codec === void 0) { - codec = ''; + return body; } - return regexs.audio.test(codec.trim().toLowerCase()); -}; -var isTextCodec = function isTextCodec(codec) { - if (codec === void 0) { - codec = ''; - } + function errorFunc(evt) { + clearTimeout(timeoutTimer); - return regexs.text.test(codec.trim().toLowerCase()); -}; -var getMimeForCodec = function getMimeForCodec(codecString) { - if (!codecString || typeof codecString !== 'string') { - return; - } + if (!(evt instanceof Error)) { + evt = new Error("" + (evt || "Unknown XMLHttpRequest Error")); + } - var codecs = codecString.toLowerCase().split(',').map(function (c) { - return translateLegacyCodec(c.trim()); - }); // default to video type + evt.statusCode = 0; + return callback(evt, failureResponse); + } // will load the data & process the response in a special response object - var type = 'video'; // only change to audio type if the only codec we have is - // audio - if (codecs.length === 1 && isAudioCodec(codecs[0])) { - type = 'audio'; - } else if (codecs.length === 1 && isTextCodec(codecs[0])) { - // text uses application/ for now - type = 'application'; - } // default the container to mp4 + function loadFunc() { + if (aborted) return; + var status; + clearTimeout(timeoutTimer); + if (options.useXDR && xhr.status === undefined) { + //IE8 CORS GET successful response doesn't have a status field, but body is fine + status = 200; + } else { + status = xhr.status === 1223 ? 204 : xhr.status; + } - var container = 'mp4'; // every codec must be able to go into the container - // for that container to be the correct one + var response = failureResponse; + var err = null; - if (codecs.every(function (c) { - return regexs.mp4.test(c); - })) { - container = 'mp4'; - } else if (codecs.every(function (c) { - return regexs.webm.test(c); - })) { - container = 'webm'; - } else if (codecs.every(function (c) { - return regexs.ogg.test(c); - })) { - container = 'ogg'; - } + if (status !== 0) { + response = { + body: getBody(), + statusCode: status, + method: method, + headers: {}, + url: uri, + rawRequest: xhr + }; - return type + "/" + container + ";codecs=\"" + codecString + "\""; -}; -var browserSupportsCodec = function browserSupportsCodec(codecString) { - if (codecString === void 0) { - codecString = ''; + if (xhr.getAllResponseHeaders) { + //remember xhr can in fact be XDR for CORS in IE + response.headers = parseHeaders(xhr.getAllResponseHeaders()); + } + } else { + err = new Error("Internal XMLHttpRequest Error"); + } + + return callback(err, response, response.body); } - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource) && (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource).isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false; -}; -var muxerSupportsCodec = function muxerSupportsCodec(codecString) { - if (codecString === void 0) { - codecString = ''; + var xhr = options.xhr || null; + + if (!xhr) { + if (options.cors || options.useXDR) { + xhr = new createXHR.XDomainRequest(); + } else { + xhr = new createXHR.XMLHttpRequest(); + } } - return codecString.toLowerCase().split(',').every(function (codec) { - codec = codec.trim(); // any match is supported. + var key; + var aborted; + var uri = xhr.url = options.uri || options.url; + var method = xhr.method = options.method || "GET"; + var body = options.body || options.data; + var headers = xhr.headers = options.headers || {}; + var sync = !!options.sync; + var isJson = false; + var timeoutTimer; + var failureResponse = { + body: undefined, + headers: {}, + statusCode: 0, + method: method, + url: uri, + rawRequest: xhr + }; - for (var i = 0; i < upperMediaTypes.length; i++) { - var type = upperMediaTypes[i]; + if ("json" in options && options.json !== false) { + isJson = true; + headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json"); //Don't override existing accept header declared by user - if (regexs["muxer" + type].test(codec)) { - return true; - } + if (method !== "GET" && method !== "HEAD") { + headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json"); //Don't override existing accept header declared by user + + body = JSON.stringify(options.json === true ? body : options.json); } + } - return false; - }); -}; -var DEFAULT_AUDIO_CODEC = 'mp4a.40.2'; -var DEFAULT_VIDEO_CODEC = 'avc1.4d400d'; + xhr.onreadystatechange = readystatechange; + xhr.onload = loadFunc; + xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function. -/***/ }), + xhr.onprogress = function () {// IE must die + }; -/***/ "./node_modules/@videojs/vhs-utils/es/containers.js": -/*!**********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/containers.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + xhr.onabort = function () { + aborted = true; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ detectContainerForBytes: () => (/* binding */ detectContainerForBytes), -/* harmony export */ isLikely: () => (/* binding */ isLikely), -/* harmony export */ isLikelyFmp4MediaSegment: () => (/* binding */ isLikelyFmp4MediaSegment) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mp4-helpers.js */ "./node_modules/@videojs/vhs-utils/es/mp4-helpers.js"); -/* harmony import */ var _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ebml-helpers.js */ "./node_modules/@videojs/vhs-utils/es/ebml-helpers.js"); -/* harmony import */ var _id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./id3-helpers.js */ "./node_modules/@videojs/vhs-utils/es/id3-helpers.js"); -/* harmony import */ var _nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nal-helpers.js */ "./node_modules/@videojs/vhs-utils/es/nal-helpers.js"); + xhr.ontimeout = errorFunc; + xhr.open(method, uri, !sync, options.username, options.password); //has to be after open + if (!sync) { + xhr.withCredentials = !!options.withCredentials; + } // Cannot set timeout with sync request + // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly + // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent + if (!sync && options.timeout > 0) { + timeoutTimer = setTimeout(function () { + if (aborted) return; + aborted = true; //IE9 may still call readystatechange + xhr.abort("timeout"); + var e = new Error("XMLHttpRequest timeout"); + e.code = "ETIMEDOUT"; + errorFunc(e); + }, options.timeout); + } -var CONSTANTS = { - // "webm" string literal in hex - 'webm': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x77, 0x65, 0x62, 0x6d]), - // "matroska" string literal in hex - 'matroska': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]), - // "fLaC" string literal in hex - 'flac': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x4c, 0x61, 0x43]), - // "OggS" string literal in hex - 'ogg': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x4f, 0x67, 0x67, 0x53]), - // ac-3 sync byte, also works for ec-3 as that is simply a codec - // of ac-3 - 'ac3': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x0b, 0x77]), - // "RIFF" string literal in hex used for wav and avi - 'riff': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x52, 0x49, 0x46, 0x46]), - // "AVI" string literal in hex - 'avi': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x41, 0x56, 0x49]), - // "WAVE" string literal in hex - 'wav': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x57, 0x41, 0x56, 0x45]), - // "ftyp3g" string literal in hex - '3gp': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]), - // "ftyp" string literal in hex - 'mp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70]), - // "styp" string literal in hex - 'fmp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x73, 0x74, 0x79, 0x70]), - // "ftypqt" string literal in hex - 'mov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]), - // moov string literal in hex - 'moov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x76]), - // moof string literal in hex - 'moof': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x66]) -}; -var _isLikely = { - aac: function aac(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x10], { - offset: offset, - mask: [0xFF, 0x16] - }); - }, - mp3: function mp3(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x02], { - offset: offset, - mask: [0xFF, 0x06] - }); - }, - webm: function webm(bytes) { - var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm - - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.webm); - }, - mkv: function mkv(bytes) { - var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska - - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.matroska); - }, - mp4: function mp4(bytes) { - // if this file is another base media file format, it is not mp4 - if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) { - return false; - } // if this file starts with a ftyp or styp box its mp4 - - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mp4, { - offset: 4 - }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.fmp4, { - offset: 4 - })) { - return true; - } // if this file starts with a moof/moov box its mp4 - - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moof, { - offset: 4 - }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moov, { - offset: 4 - })) { - return true; - } - }, - mov: function mov(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mov, { - offset: 4 - }); - }, - '3gp': function gp(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS['3gp'], { - offset: 4 - }); - }, - ac3: function ac3(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ac3, { - offset: offset - }); - }, - ts: function ts(bytes) { - if (bytes.length < 189 && bytes.length >= 1) { - return bytes[0] === 0x47; - } - - var i = 0; // check the first 376 bytes for two matching sync bytes - - while (i + 188 < bytes.length && i < 188) { - if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) { - return true; + if (xhr.setRequestHeader) { + for (key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); } - - i += 1; } - - return false; - }, - flac: function flac(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.flac, { - offset: offset - }); - }, - ogg: function ogg(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ogg); - }, - avi: function avi(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.avi, { - offset: 8 - }); - }, - wav: function wav(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.wav, { - offset: 8 - }); - }, - 'h264': function h264(bytes) { - // find seq_parameter_set_rbsp - return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH264Nal)(bytes, 7, 3).length; - }, - 'h265': function h265(bytes) { - // find video_parameter_set_rbsp or seq_parameter_set_rbsp - return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH265Nal)(bytes, [32, 33], 3).length; + } else if (options.headers && !isEmpty(options.headers)) { + throw new Error("Headers cannot be set on an XDomainRequest object"); } -}; // get all the isLikely functions -// but make sure 'ts' is above h264 and h265 -// but below everything else as it is the least specific -var isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265 -.filter(function (t) { - return t !== 'ts' && t !== 'h264' && t !== 'h265'; -}) // add it back to the bottom -.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data. + if ("responseType" in options) { + xhr.responseType = options.responseType; + } -isLikelyTypes.forEach(function (type) { - var isLikelyFn = _isLikely[type]; + if ("beforeSend" in options && typeof options.beforeSend === "function") { + options.beforeSend(xhr); + } // Microsoft Edge browser sends "undefined" when send is called with undefined value. + // XMLHttpRequest spec says to pass null as body to indicate no body + // See https://github.com/naugtur/xhr/issues/100. - _isLikely[type] = function (bytes) { - return isLikelyFn((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes)); - }; -}); // export after wrapping -var isLikely = _isLikely; // A useful list of file signatures can be found here -// https://en.wikipedia.org/wiki/List_of_file_signatures + xhr.send(body || null); + return xhr; +} -var detectContainerForBytes = function detectContainerForBytes(bytes) { - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); +function getXml(xhr) { + // xhr.responseXML will throw Exception "InvalidStateError" or "DOMException" + // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML. + try { + if (xhr.responseType === "document") { + return xhr.responseXML; + } - for (var i = 0; i < isLikelyTypes.length; i++) { - var type = isLikelyTypes[i]; + var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === "parsererror"; - if (isLikely[type](bytes)) { - return type; + if (xhr.responseType === "" && !firefoxBugTakenEffect) { + return xhr.responseXML; } - } + } catch (e) {} - return ''; -}; // fmp4 is not a container + return null; +} -var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) { - return (0,_mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__.findBox)(bytes, ['moof']).length > 0; -}; +function noop() {} /***/ }), -/***/ "./node_modules/@videojs/vhs-utils/es/ebml-helpers.js": -/*!************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/ebml-helpers.js ***! - \************************************************************/ +/***/ "./src/js/components/accordion.js": +/*!****************************************!*\ + !*** ./src/js/components/accordion.js ***! + \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ EBML_TAGS: () => (/* binding */ EBML_TAGS), -/* harmony export */ decodeBlock: () => (/* binding */ decodeBlock), -/* harmony export */ findEbml: () => (/* binding */ findEbml), -/* harmony export */ parseData: () => (/* binding */ parseData), -/* harmony export */ parseTracks: () => (/* binding */ parseTracks) +/* harmony export */ toggleAccordion: () => (/* binding */ toggleAccordion) /* harmony export */ }); -/* harmony import */ var _byte_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/@videojs/vhs-utils/es/codec-helpers.js"); - - // relevant specs for this parser: -// https://matroska-org.github.io/libebml/specs.html -// https://www.matroska.org/technical/elements.html -// https://www.webmproject.org/docs/container/ - -var EBML_TAGS = { - EBML: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1A, 0x45, 0xDF, 0xA3]), - DocType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x42, 0x82]), - Segment: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x18, 0x53, 0x80, 0x67]), - SegmentInfo: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x15, 0x49, 0xA9, 0x66]), - Tracks: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x16, 0x54, 0xAE, 0x6B]), - Track: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), - TrackNumber: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xd7]), - DefaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x23, 0xe3, 0x83]), - TrackEntry: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), - TrackType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x83]), - FlagDefault: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x88]), - CodecID: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x86]), - CodecPrivate: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x63, 0xA2]), - VideoTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe0]), - AudioTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe1]), - // Not used yet, but will be used for live webm/mkv - // see https://www.matroska.org/technical/basics.html#block-structure - // see https://www.matroska.org/technical/basics.html#simpleblock-structure - Cluster: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1F, 0x43, 0xB6, 0x75]), - Timestamp: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xE7]), - TimestampScale: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x2A, 0xD7, 0xB1]), - BlockGroup: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA0]), - BlockDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x9B]), - Block: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA1]), - SimpleBlock: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA3]) +let items = document.querySelectorAll('.accordion__item'); +let title = document.querySelectorAll('.accordion__title-wrapper'); +const toggleAccordion = () => { + title.forEach(question => question.addEventListener('click', function () { + let thisItem = this.parentNode; + items.forEach(item => { + if (thisItem == item) { + thisItem.classList.toggle('active'); + return; + } + item.classList.remove('active'); + }); + })); }; -/** - * This is a simple table to determine the length - * of things in ebml. The length is one based (starts at 1, - * rather than zero) and for every zero bit before a one bit - * we add one to length. We also need this table because in some - * case we have to xor all the length bits from another value. - */ -var LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1]; +/***/ }), -var getLength = function getLength(byte) { - var len = 1; +/***/ "./src/js/components/burger-menu.js": +/*!******************************************!*\ + !*** ./src/js/components/burger-menu.js ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - for (var i = 0; i < LENGTH_TABLE.length; i++) { - if (byte & LENGTH_TABLE[i]) { - break; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ changeMenu: () => (/* binding */ changeMenu) +/* harmony export */ }); +const burger = document.querySelector('.burger-js'); +const menu = document.querySelector('.menu-js'); +const menuLinks = document.querySelectorAll('.nav__link'); +const changeMenu = () => { + burger?.addEventListener('click', () => { + menu?.classList.toggle('active'); + burger?.classList.toggle('active'); + if (menu?.classList.contains('active')) { + document.body.style.overflowY = 'hidden'; + } else { + document.body.style.overflowY = 'auto'; } - - len++; - } - - return len; -}; // length in ebml is stored in the first 4 to 8 bits -// of the first byte. 4 for the id length and 8 for the -// data size length. Length is measured by converting the number to binary -// then 1 + the number of zeros before a 1 is encountered starting -// from the left. - - -var getvint = function getvint(bytes, offset, removeLength, signed) { - if (removeLength === void 0) { - removeLength = true; - } - - if (signed === void 0) { - signed = false; - } - - var length = getLength(bytes[offset]); - var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes - // as they will be modified below to remove the dataSizeLen bits and we do not - // want to modify the original data. normally we could just call slice on - // uint8array but ie 11 does not support that... - - if (removeLength) { - valueBytes = Array.prototype.slice.call(bytes, offset, offset + length); - valueBytes[0] ^= LENGTH_TABLE[length - 1]; - } - - return { - length: length, - value: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(valueBytes, { - signed: signed - }), - bytes: valueBytes - }; -}; - -var normalizePath = function normalizePath(path) { - if (typeof path === 'string') { - return path.match(/.{1,2}/g).map(function (p) { - return normalizePath(p); + }); + menuLinks.forEach(el => { + el.addEventListener('click', () => { + menu?.classList.remove('active'); + document.body.style.overflowY = 'auto'; + burger?.classList.remove('active'); }); - } - - if (typeof path === 'number') { - return (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.numberToBytes)(path); - } - - return path; -}; - -var normalizePaths = function normalizePaths(paths) { - if (!Array.isArray(paths)) { - return [normalizePath(paths)]; - } - - return paths.map(function (p) { - return normalizePath(p); }); }; -var getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) { - if (offset >= bytes.length) { - return bytes.length; - } - - var innerid = getvint(bytes, offset, false); - - if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(id.bytes, innerid.bytes)) { - return offset; - } - - var dataHeader = getvint(bytes, offset + innerid.length); - return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length); -}; -/** - * Notes on the EBLM format. - * - * EBLM uses "vints" tags. Every vint tag contains - * two parts - * - * 1. The length from the first byte. You get this by - * converting the byte to binary and counting the zeros - * before a 1. Then you add 1 to that. Examples - * 00011111 = length 4 because there are 3 zeros before a 1. - * 00100000 = length 3 because there are 2 zeros before a 1. - * 00000011 = length 7 because there are 6 zeros before a 1. - * - * 2. The bits used for length are removed from the first byte - * Then all the bytes are merged into a value. NOTE: this - * is not the case for id ebml tags as there id includes - * length bits. - * - */ - - -var findEbml = function findEbml(bytes, paths) { - paths = normalizePaths(paths); - bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - - if (!paths.length) { - return results; - } - - var i = 0; - - while (i < bytes.length) { - var id = getvint(bytes, i, false); - var dataHeader = getvint(bytes, i + id.length); - var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream - - if (dataHeader.value === 0x7f) { - dataHeader.value = getInfinityDataSize(id, bytes, dataStart); - - if (dataHeader.value !== bytes.length) { - dataHeader.value -= dataStart; - } - } +/***/ }), - var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value; - var data = bytes.subarray(dataStart, dataEnd); +/***/ "./src/js/components/paint-btn.js": +/*!****************************************!*\ + !*** ./src/js/components/paint-btn.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(paths[0], id.bytes)) { - if (paths.length === 1) { - // this is the end of the paths and we've found the tag we were - // looking for - results.push(data); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ paintBtn: () => (/* binding */ paintBtn) +/* harmony export */ }); +const btnNext = document.querySelector('.nav-history__next'); +const paintBtn = () => { + try { + const scrollToTop = () => { + const top = window.scrollY; + if (top >= 100) { + btnNext.classList.add('active'); } else { - // recursively search for the next tag inside of the data - // of this one - results = results.concat(findEbml(data, paths.slice(1))); + btnNext.classList.remove('active'); } - } - - var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it - - i += totalLength; + }; + scrollToTop(); + window.addEventListener('scroll', () => { + scrollToTop(); + }); + } catch (e) { + console.log(e); } +}; - return results; -}; // see https://www.matroska.org/technical/basics.html#block-structure +/***/ }), -var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) { - var duration; +/***/ "./src/js/components/scroll-smooth.js": +/*!********************************************!*\ + !*** ./src/js/components/scroll-smooth.js ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (type === 'group') { - duration = findEbml(block, [EBML_TAGS.BlockDuration])[0]; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ addSmoothScroll: () => (/* binding */ addSmoothScroll) +/* harmony export */ }); +/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/smooth-scroll/dist/smooth-scroll.js */ "./node_modules/smooth-scroll/dist/smooth-scroll.js"); +/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__); - if (duration) { - duration = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(duration); - duration = 1 / timestampScale * duration * timestampScale / 1000; +const header = document.querySelector('header'); +const btnUpWrapper = document.querySelector('.btn-up-wrapper'); +const addSmoothScroll = () => { + const scroll = new (_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default())('a[href*="#"]', { + header: '.header', + speed: 500 + }); + const scrollToTop = () => { + const top = window.scrollY; + if (top >= 100) { + header.classList.add('active'); + } else { + header.classList.remove('active'); } + if (top >= 300) { + btnUpWrapper.classList.add('active'); + } else { + btnUpWrapper.classList.remove('active'); + } + }; + scrollToTop(); + window.addEventListener('scroll', () => { + scrollToTop(); + }); +}; - block = findEbml(block, [EBML_TAGS.Block])[0]; - type = 'block'; // treat data as a block after this point - } +/***/ }), - var dv = new DataView(block.buffer, block.byteOffset, block.byteLength); - var trackNumber = getvint(block, 0); - var timestamp = dv.getInt16(trackNumber.length, false); - var flags = block[trackNumber.length + 2]; - var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds +/***/ "./src/js/components/sliders.js": +/*!**************************************!*\ + !*** ./src/js/components/sliders.js ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ initializationSliders: () => (/* binding */ initializationSliders) +/* harmony export */ }); +/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.esm.js"); - var parsed = { - duration: duration, - trackNumber: trackNumber.value, - keyframe: type === 'simple' && flags >> 7 === 1, - invisible: (flags & 0x08) >> 3 === 1, - lacing: (flags & 0x06) >> 1, - discardable: type === 'simple' && (flags & 0x01) === 1, - frames: [], - pts: ptsdts, - dts: ptsdts, - timestamp: timestamp - }; - - if (!parsed.lacing) { - parsed.frames.push(data); - return parsed; +swiper__WEBPACK_IMPORTED_MODULE_0__["default"].use([swiper__WEBPACK_IMPORTED_MODULE_0__.Navigation, swiper__WEBPACK_IMPORTED_MODULE_0__.Pagination, swiper__WEBPACK_IMPORTED_MODULE_0__.Autoplay]); +const initializationSliders = () => { + try { + const recomendationsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.recommendations__slider', { + slidesPerView: '1', + navigation: { + nextEl: '.recommendations__slider-navigation-next', + prevEl: '.recommendations__slider-navigation-prev' + }, + loop: true + }); + const goodsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.goods__slider', { + slidesPerView: 3, + loop: true, + navigation: { + nextEl: '.goods__slider-next', + prevEl: '.goods__slider-prev' + }, + pagination: { + clickable: true, + el: '.goods__slider-pagination', + clickable: true + }, + breakpoints: { + 940: { + slidesPerView: 4 + }, + 764: { + slidesPerView: 3 + }, + 600: { + slidesPerView: 2 + }, + 0: { + slidesPerView: 1 + } + } + }); + const professionalSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.professional__slider', { + navigation: { + nextEl: '.professional__slider-navigation-next', + prevEl: '.professional__slider-navigation-prev' + }, + paginationClickable: true, + // loop: true, + initialSlide: 1, + centeredSlides: true, + slidesPerView: 2, + speed: 1000, + zoom: { + maxRatio: 1.6 + }, + pagination: { + clickable: true, + el: '.professional__slider-pagination', + clickable: true + }, + breakpoints: { + 993: { + spaceBetween: -180 + }, + 860: { + spaceBetween: -260, + slidesPerView: 2 + }, + 768: { + spaceBetween: -200 + }, + 500: { + spaceBetween: -80 + }, + 320: { + slidesPerView: 1.6, + spaceBetween: -80 + } + }, + allowTouchMove: false + }); + const interviewSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.interview__slider', { + navigation: { + nextEl: '.interview__slider-navigation-next', + prevEl: '.interview__slider-navigation-prev' + }, + pagination: { + el: '.interview__slider-pagination', + clickable: true + }, + allowTouchMove: false, + paginationClickable: true, + centeredSlides: true, + loop: true, + speed: 1000 + }); + const partnersSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.partners__wrapper', { + freeMode: true, + grabCursor: true, + centeredSlides: true, + slidesPerView: 'auto', + loop: true, + speed: 2000, + autoplay: { + enabled: true, + delay: 1, + disableOnInteraction: true + }, + freeModeMomentum: true + }); + document.querySelector('.partners__wrapper').addEventListener('mouseover', function () { + partnersSlider.autoplay.stop(); + }); + document.querySelector('.partners__wrapper').addEventListener('mouseout', function () { + partnersSlider.autoplay.start(); + }); + window.addEventListener('scroll', () => { + if (!partnersSlider.autoplay.running) { + partnersSlider.autoplay.start(); + } + }); + } catch (e) { + console.error(e); } +}; - var numberOfFrames = data[0] + 1; - var frameSizes = []; - var offset = 1; // Fixed +/***/ }), - if (parsed.lacing === 2) { - var sizeOfFrame = (data.length - offset) / numberOfFrames; +/***/ "./src/js/components/video-player.js": +/*!*******************************************!*\ + !*** ./src/js/components/video-player.js ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - for (var i = 0; i < numberOfFrames; i++) { - frameSizes.push(sizeOfFrame); - } - } // xiph +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ addVideoPlayer: () => (/* binding */ addVideoPlayer) +/* harmony export */ }); +/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "./node_modules/video.js/dist/video.es.js"); +const playBtn = document.querySelector('.video__btn'); +const videoTitle = document.querySelector('.video__title'); +const videoText = document.querySelector('.video__text'); +const videoLink = document.querySelector('.video__link'); +const videoGradient = document.querySelector('.video__gradient'); +const videoIntro = document.querySelector('.video__intro'); +const videoMask = document.querySelector('.video__mask'); +const videoJsTech = document.querySelector('.vjs-tech'); +const addVideoPlayer = () => { + try { + let isPreviewVideo = true; + const videoPlayer = (0,video_js__WEBPACK_IMPORTED_MODULE_0__["default"])(document.getElementById('video__player'), { + autoplay: true, + loop: true, + muted: true, + controls: false, + playToggle: false + }); + const loadMainVideo = (desktopUrl, mobileUrl) => { + if (window.screen.width > 768) { + videoPlayer.src({ + type: 'video/mp4', + src: `./videos/${desktopUrl}` + }); + } else { + videoPlayer.src({ + type: 'video/mp4', + src: `./videos/${mobileUrl}` + }); + } + }; + loadMainVideo('preview.mp4', 'preview-mobile.mp4'); + videoPlayer.volume(0.7); + const changePlayerStatus = () => { + videoPlayer.play(); + videoPlayer.addClass('play'); + videoPlayer.muted(false); + videoPlayer.controls(true); + videoPlayer.loop(false); + playBtn.classList.add('hide'); + videoTitle.classList.add('hide'); + videoText.classList.add('hide'); + videoLink.classList.add('hide'); + }; + videoPlayer.on('play', () => { + if (!videoPlayer.played()) { + videoPlayer.addClass('play'); + videoPlayer.removeClass('play'); + playBtn?.classList.add('hide'); + } else if (videoPlayer.played() && videoPlayer.loop()) { + videoPlayer.removeClass('play'); + } else if (videoPlayer.played() && !videoPlayer.loop()) { + videoPlayer.removeClass('play'); + playBtn?.classList.add('hide'); + } + }); + videoPlayer.on('pause', () => { + playBtn?.classList.remove('hide'); + }); + videoPlayer.on('ended', () => { + playBtn?.classList.remove('hide'); + videoMask?.classList.remove('visible'); + }); + videoMask.addEventListener('click', () => { + playBtn?.classList.remove('hide'); + videoPlayer.pause(); + videoMask?.classList.remove('visible'); + }); + playBtn.addEventListener('click', () => { + if (isPreviewVideo === true) { + loadMainVideo('video.mp4', 'video-mobile.mp4'); + isPreviewVideo = false; + } + document.querySelector('.video__inner').classList.add('active'); + document.querySelector('.video-js').classList.add('active'); + document.querySelector('.vjs-poster').classList.add('active'); + videoPlayer.fluid(true); + videoGradient?.classList.add('hide'); + videoMask?.classList.add('visible'); + playBtn?.classList.add('center-position'); + document.querySelector('video').style.objectFit = 'contain'; + if (videoPlayer.muted()) { + videoPlayer.currentTime(0); + changePlayerStatus(); + } else { + changePlayerStatus(); + } + }); + } catch (e) { + console.log(e); + } +}; - if (parsed.lacing === 1) { - for (var _i = 0; _i < numberOfFrames - 1; _i++) { - var size = 0; +/***/ }), - do { - size += data[offset]; - offset++; - } while (data[offset - 1] === 0xFF); +/***/ "./node_modules/global/document.js": +/*!*****************************************!*\ + !*** ./node_modules/global/document.js ***! + \*****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - frameSizes.push(size); - } - } // ebml +var topLevel = typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : + typeof window !== 'undefined' ? window : {} +var minDoc = __webpack_require__(/*! min-document */ "?34aa"); +var doccy; - if (parsed.lacing === 3) { - // first vint is unsinged - // after that vints are singed and - // based on a compounding size - var _size = 0; +if (typeof document !== 'undefined') { + doccy = document; +} else { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) { - var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true); - _size += vint.value; - frameSizes.push(_size); - offset += vint.length; + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; } - } +} - frameSizes.forEach(function (size) { - parsed.frames.push(data.subarray(offset, offset + size)); - offset += size; - }); - return parsed; -}; // VP9 Codec Feature Metadata (CodecPrivate) -// https://www.webmproject.org/docs/container/ +module.exports = doccy; -var parseVp9Private = function parseVp9Private(bytes) { - var i = 0; - var params = {}; - while (i < bytes.length) { - var id = bytes[i] & 0x7f; - var len = bytes[i + 1]; - var val = void 0; +/***/ }), - if (len === 1) { - val = bytes[i + 2]; - } else { - val = bytes.subarray(i + 2, i + 2 + len); - } +/***/ "./node_modules/global/window.js": +/*!***************************************!*\ + !*** ./node_modules/global/window.js ***! + \***************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - if (id === 1) { - params.profile = val; - } else if (id === 2) { - params.level = val; - } else if (id === 3) { - params.bitDepth = val; - } else if (id === 4) { - params.chromaSubsampling = val; - } else { - params[id] = val; - } +var win; - i += 2 + len; - } +if (typeof window !== "undefined") { + win = window; +} else if (typeof __webpack_require__.g !== "undefined") { + win = __webpack_require__.g; +} else if (typeof self !== "undefined"){ + win = self; +} else { + win = {}; +} - return params; -}; +module.exports = win; -var parseTracks = function parseTracks(bytes) { - bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var decodedTracks = []; - var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]); - if (!tracks.length) { - tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]); - } +/***/ }), - if (!tracks.length) { - tracks = findEbml(bytes, [EBML_TAGS.Track]); - } +/***/ "./node_modules/is-function/index.js": +/*!*******************************************!*\ + !*** ./node_modules/is-function/index.js ***! + \*******************************************/ +/***/ ((module) => { - if (!tracks.length) { - return decodedTracks; +module.exports = isFunction + +var toString = Object.prototype.toString + +function isFunction (fn) { + if (!fn) { + return false } + var string = toString.call(fn) + return string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) +}; - tracks.forEach(function (track) { - var trackType = findEbml(track, EBML_TAGS.TrackType)[0]; - if (!trackType || !trackType.length) { - return; - } // 1 is video, 2 is audio, 17 is subtitle - // other values are unimportant in this context +/***/ }), +/***/ "./node_modules/keycode/index.js": +/*!***************************************!*\ + !*** ./node_modules/keycode/index.js ***! + \***************************************/ +/***/ ((module, exports) => { - if (trackType[0] === 1) { - trackType = 'video'; - } else if (trackType[0] === 2) { - trackType = 'audio'; - } else if (trackType[0] === 17) { - trackType = 'subtitle'; - } else { - return; - } // todo parse language +// Source: http://jsfiddle.net/vWx8V/ +// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes +/** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ - var decodedTrack = { - rawCodec: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(findEbml(track, [EBML_TAGS.CodecID])[0]), - type: trackType, - codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0], - number: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.TrackNumber])[0]), - defaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.DefaultDuration])[0]), - default: findEbml(track, [EBML_TAGS.FlagDefault])[0], - rawData: track - }; - var codec = ''; +function keyCode(searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode + if (hasKeyCode) searchInput = hasKeyCode + } - if (/V_MPEG4\/ISO\/AVC/.test(decodedTrack.rawCodec)) { - codec = "avc1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(decodedTrack.codecPrivate); - } else if (/V_MPEGH\/ISO\/HEVC/.test(decodedTrack.rawCodec)) { - codec = "hev1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(decodedTrack.codecPrivate); - } else if (/V_MPEG4\/ISO\/ASP/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString(); - } else { - codec = 'mp4v.20.9'; - } - } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) { - codec = 'theora'; - } else if (/^V_VP8/.test(decodedTrack.rawCodec)) { - codec = 'vp8'; - } else if (/^V_VP9/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate), - profile = _parseVp9Private.profile, - level = _parseVp9Private.level, - bitDepth = _parseVp9Private.bitDepth, - chromaSubsampling = _parseVp9Private.chromaSubsampling; + // Numbers + if ('number' === typeof searchInput) return names[searchInput] - codec = 'vp09.'; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0') + "."; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0') + "."; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0') + "."; - codec += "" + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name + // Everything else (cast to string) + var search = String(searchInput) - var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || []; - var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || []; - var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || []; - var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all. + // check codes + var foundNamedKey = codes[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey - if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) { - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag[0], 2, '0'); - } - } else { - codec = 'vp9'; - } - } else if (/^V_AV1/.test(decodedTrack.rawCodec)) { - codec = "av01." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(decodedTrack.codecPrivate); - } else if (/A_ALAC/.test(decodedTrack.rawCodec)) { - codec = 'alac'; - } else if (/A_MPEG\/L2/.test(decodedTrack.rawCodec)) { - codec = 'mp2'; - } else if (/A_MPEG\/L3/.test(decodedTrack.rawCodec)) { - codec = 'mp3'; - } else if (/^A_AAC/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString(); - } else { - codec = 'mp4a.40.2'; - } - } else if (/^A_AC3/.test(decodedTrack.rawCodec)) { - codec = 'ac-3'; - } else if (/^A_PCM/.test(decodedTrack.rawCodec)) { - codec = 'pcm'; - } else if (/^A_MS\/ACM/.test(decodedTrack.rawCodec)) { - codec = 'speex'; - } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) { - codec = 'ec-3'; - } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) { - codec = 'vorbis'; - } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) { - codec = 'flac'; - } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) { - codec = 'opus'; - } + // check aliases + var foundNamedKey = aliases[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey - decodedTrack.codec = codec; - decodedTracks.push(decodedTrack); - }); - return decodedTracks.sort(function (a, b) { - return a.number - b.number; - }); -}; -var parseData = function parseData(data, tracks) { - var allBlocks = []; - var segment = findEbml(data, [EBML_TAGS.Segment])[0]; - var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms + // weird character? + if (search.length === 1) return search.charCodeAt(0) - if (timestampScale && timestampScale.length) { - timestampScale = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestampScale); - } else { - timestampScale = 1000000; - } - - var clusters = findEbml(segment, [EBML_TAGS.Cluster]); + return undefined +} - if (!tracks) { - tracks = parseTracks(segment); +/** + * Compares a keyboard event with a given keyCode or keyName. + * + * @param {Event} event Keyboard event that should be tested + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Boolean} + * @api public + */ +keyCode.isEventKey = function isEventKey(event, nameOrCode) { + if (event && 'object' === typeof event) { + var keyCode = event.which || event.keyCode || event.charCode + if (keyCode === null || keyCode === undefined) { return false; } + if (typeof nameOrCode === 'string') { + // check codes + var foundNamedKey = codes[nameOrCode.toLowerCase()] + if (foundNamedKey) { return foundNamedKey === keyCode; } + + // check aliases + var foundNamedKey = aliases[nameOrCode.toLowerCase()] + if (foundNamedKey) { return foundNamedKey === keyCode; } + } else if (typeof nameOrCode === 'number') { + return nameOrCode === keyCode; + } + return false; } +} - clusters.forEach(function (cluster, ci) { - var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) { - return { - type: 'simple', - data: b - }; - }); - var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) { - return { - type: 'group', - data: b - }; - }); - var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0; +exports = module.exports = keyCode; - if (timestamp && timestamp.length) { - timestamp = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestamp); - } // get all blocks then sort them into the correct order +/** + * Get by name + * + * exports.code['enter'] // => 13 + */ +var codes = exports.code = exports.codes = { + 'backspace': 8, + 'tab': 9, + 'enter': 13, + 'shift': 16, + 'ctrl': 17, + 'alt': 18, + 'pause/break': 19, + 'caps lock': 20, + 'esc': 27, + 'space': 32, + 'page up': 33, + 'page down': 34, + 'end': 35, + 'home': 36, + 'left': 37, + 'up': 38, + 'right': 39, + 'down': 40, + 'insert': 45, + 'delete': 46, + 'command': 91, + 'left command': 91, + 'right command': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222 +} - var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) { - return a.data.byteOffset - b.data.byteOffset; - }); - blocks.forEach(function (block, bi) { - var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp); - allBlocks.push(decoded); - }); - }); - return { - tracks: tracks, - blocks: allBlocks - }; -}; +// Helper aliases -/***/ }), +var aliases = exports.aliases = { + 'windows': 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + 'ctl': 17, + 'control': 17, + 'option': 18, + 'pause': 19, + 'break': 19, + 'caps': 20, + 'return': 13, + 'escape': 27, + 'spc': 32, + 'spacebar': 32, + 'pgup': 33, + 'pgdn': 34, + 'ins': 45, + 'del': 46, + 'cmd': 91 +} -/***/ "./node_modules/@videojs/vhs-utils/es/id3-helpers.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/id3-helpers.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/*! + * Programatically add the following + */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getId3Offset: () => (/* binding */ getId3Offset), -/* harmony export */ getId3Size: () => (/* binding */ getId3Size) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); +// lower case chars +for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 -var ID3 = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x49, 0x44, 0x33]); -var getId3Size = function getId3Size(bytes, offset) { - if (offset === void 0) { - offset = 0; - } +// numbers +for (var i = 48; i < 58; i++) codes[i - 48] = i - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var flags = bytes[offset + 5]; - var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9]; - var footerPresent = (flags & 16) >> 4; +// function keys +for (i = 1; i < 13; i++) codes['f'+i] = i + 111 - if (footerPresent) { - return returnSize + 20; - } +// numpad keys +for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 - return returnSize + 10; -}; -var getId3Offset = function getId3Offset(bytes, offset) { - if (offset === void 0) { - offset = 0; - } +/** + * Get by code + * + * exports.name[13] // => 'Enter' + */ - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); +var names = exports.names = exports.title = {} // title for backward compat - if (bytes.length - offset < 10 || !(0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, ID3, { - offset: offset - })) { - return offset; - } +// Create reverse mapping +for (i in codes) names[codes[i]] = i - offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files - // have multiple ID3 tag sections even though - // they should not. +// Add aliases +for (var alias in aliases) { + codes[alias] = aliases[alias] +} - return getId3Offset(bytes, offset); -}; /***/ }), -/***/ "./node_modules/@videojs/vhs-utils/es/media-types.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/media-types.js ***! - \***********************************************************/ +/***/ "./node_modules/m3u8-parser/dist/m3u8-parser.es.js": +/*!*********************************************************!*\ + !*** ./node_modules/m3u8-parser/dist/m3u8-parser.es.js ***! + \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ simpleTypeFromSourceType: () => (/* binding */ simpleTypeFromSourceType) +/* harmony export */ LineStream: () => (/* binding */ LineStream), +/* harmony export */ ParseStream: () => (/* binding */ ParseStream), +/* harmony export */ Parser: () => (/* binding */ Parser) /* harmony export */ }); -var MPEGURL_REGEX = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i; -var DASH_REGEX = /^application\/dash\+xml/i; +/* harmony import */ var _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/stream.js */ "./node_modules/@videojs/vhs-utils/es/stream.js"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); +/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array.js */ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); +/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */ + + + + /** - * Returns a string that describes the type of source based on a video source object's - * media type. - * - * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type} + * @file m3u8/line-stream.js + */ +/** + * A stream that buffers string input and generates a `data` event for each + * line. * - * @param {string} type - * Video source object media type - * @return {('hls'|'dash'|'vhs-json'|null)} - * VHS source type string + * @class LineStream + * @extends Stream */ -var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) { - if (MPEGURL_REGEX.test(type)) { - return 'hls'; +class LineStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { + constructor() { + super(); + this.buffer = ''; } + /** + * Add new data to be parsed. + * + * @param {string} data the text to process + */ - if (DASH_REGEX.test(type)) { - return 'dash'; - } // Denotes the special case of a manifest object passed to http-streaming instead of a - // source URL. - // - // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types. - // - // In this case, vnd stands for vendor, video.js for the organization, VHS for this - // project, and the +json suffix identifies the structure of the media type. + push(data) { + let nextNewline; + this.buffer += data; + nextNewline = this.buffer.indexOf('\n'); - if (type === 'application/vnd.videojs.vhs+json') { - return 'vhs-json'; + for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\n')) { + this.trigger('data', this.buffer.substring(0, nextNewline)); + this.buffer = this.buffer.substring(nextNewline + 1); + } } - return null; -}; - -/***/ }), - -/***/ "./node_modules/@videojs/vhs-utils/es/mp4-helpers.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/mp4-helpers.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addSampleDescription: () => (/* binding */ addSampleDescription), -/* harmony export */ buildFrameTable: () => (/* binding */ buildFrameTable), -/* harmony export */ findBox: () => (/* binding */ findBox), -/* harmony export */ findNamedBox: () => (/* binding */ findNamedBox), -/* harmony export */ parseDescriptors: () => (/* binding */ parseDescriptors), -/* harmony export */ parseMediaInfo: () => (/* binding */ parseMediaInfo), -/* harmony export */ parseTracks: () => (/* binding */ parseTracks) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/@videojs/vhs-utils/es/codec-helpers.js"); -/* harmony import */ var _opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./opus-helpers.js */ "./node_modules/@videojs/vhs-utils/es/opus-helpers.js"); - +} +const TAB = String.fromCharCode(0x09); +const parseByterange = function (byterangeString) { + // optionally match and capture 0+ digits before `@` + // optionally match and capture 0+ digits after `@` + const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || ''); + const result = {}; -var normalizePath = function normalizePath(path) { - if (typeof path === 'string') { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.stringToBytes)(path); + if (match[1]) { + result.length = parseInt(match[1], 10); } - if (typeof path === 'number') { - return path; + if (match[2]) { + result.offset = parseInt(match[2], 10); } - return path; + return result; }; +/** + * "forgiving" attribute list psuedo-grammar: + * attributes -> keyvalue (',' keyvalue)* + * keyvalue -> key '=' value + * key -> [^=]* + * value -> '"' [^"]* '"' | [^,]* + */ -var normalizePaths = function normalizePaths(paths) { - if (!Array.isArray(paths)) { - return [normalizePath(paths)]; - } - return paths.map(function (p) { - return normalizePath(p); - }); +const attributeSeparator = function () { + const key = '[^=]*'; + const value = '"[^"]*"|[^,]*'; + const keyvalue = '(?:' + key + ')=(?:' + value + ')'; + return new RegExp('(?:^|,)(' + keyvalue + ')'); }; +/** + * Parse attributes from a line given the separator + * + * @param {string} attributes the attribute line to parse + */ -var DESCRIPTORS; -var parseDescriptors = function parseDescriptors(bytes) { - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - var i = 0; - while (bytes.length > i) { - var tag = bytes[i]; - var size = 0; - var headerSize = 0; // tag +const parseAttributes = function (attributes) { + const result = {}; - headerSize++; - var byte = bytes[headerSize]; // first byte + if (!attributes) { + return result; + } // split the string using attributes as the separator - headerSize++; - while (byte & 0x80) { - size = (byte & 0x7F) << 7; - byte = bytes[headerSize]; - headerSize++; - } + const attrs = attributes.split(attributeSeparator()); + let i = attrs.length; + let attr; - size += byte & 0x7F; + while (i--) { + // filter out unmatched portions of the string + if (attrs[i] === '') { + continue; + } // split the key and value - for (var z = 0; z < DESCRIPTORS.length; z++) { - var _DESCRIPTORS$z = DESCRIPTORS[z], - id = _DESCRIPTORS$z.id, - parser = _DESCRIPTORS$z.parser; - if (tag === id) { - results.push(parser(bytes.subarray(headerSize, headerSize + size))); - break; - } - } + attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value - i += size + headerSize; + attr[0] = attr[0].replace(/^\s+|\s+$/g, ''); + attr[1] = attr[1].replace(/^\s+|\s+$/g, ''); + attr[1] = attr[1].replace(/^['"](.*)['"]$/g, '$1'); + result[attr[0]] = attr[1]; } - return results; + return result; }; -DESCRIPTORS = [{ - id: 0x03, - parser: function parser(bytes) { - var desc = { - tag: 0x03, - id: bytes[0] << 8 | bytes[1], - flags: bytes[2], - size: 3, - dependsOnEsId: 0, - ocrEsId: 0, - descriptors: [], - url: '' - }; // depends on es id - - if (desc.flags & 0x80) { - desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; - desc.size += 2; - } // url - - - if (desc.flags & 0x40) { - var len = bytes[desc.size]; - desc.url = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(desc.size + 1, desc.size + 1 + len)); - desc.size += len; - } // ocr es id - - - if (desc.flags & 0x20) { - desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; - desc.size += 2; - } - - desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || []; - return desc; - } -}, { - id: 0x04, - parser: function parser(bytes) { - // DecoderConfigDescriptor - var desc = { - tag: 0x04, - oti: bytes[0], - streamType: bytes[1], - bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4], - maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8], - avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12], - descriptors: parseDescriptors(bytes.subarray(13)) - }; - return desc; - } -}, { - id: 0x05, - parser: function parser(bytes) { - // DecoderSpecificInfo - return { - tag: 0x05, - bytes: bytes - }; - } -}, { - id: 0x06, - parser: function parser(bytes) { - // SLConfigDescriptor - return { - tag: 0x06, - bytes: bytes - }; - } -}]; /** - * find any number of boxes by name given a path to it in an iso bmff - * such as mp4. - * - * @param {TypedArray} bytes - * bytes for the iso bmff to search for boxes in + * A line-level M3U8 parser event stream. It expects to receive input one + * line at a time and performs a context-free parse of its contents. A stream + * interpretation of a manifest can be useful if the manifest is expected to + * be too large to fit comfortably into memory or the entirety of the input + * is not immediately available. Otherwise, it's probably much easier to work + * with a regular `Parser` object. * - * @param {Uint8Array[]|string[]|string|Uint8Array} name - * An array of paths or a single path representing the name - * of boxes to search through in bytes. Paths may be - * uint8 (character codes) or strings. + * Produces `data` events with an object that captures the parser's + * interpretation of the input. That object has a property `tag` that is one + * of `uri`, `comment`, or `tag`. URIs only have a single additional + * property, `line`, which captures the entirety of the input without + * interpretation. Comments similarly have a single additional property + * `text` which is the input without the leading `#`. * - * @param {boolean} [complete=false] - * Should we search only for complete boxes on the final path. - * This is very useful when you do not want to get back partial boxes - * in the case of streaming files. + * Tags always have a property `tagType` which is the lower-cased version of + * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance, + * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized + * tags are given the tag type `unknown` and a single additional property + * `data` with the remainder of the input. * - * @return {Uint8Array[]} - * An array of the end paths that we found. + * @class ParseStream + * @extends Stream */ -var findBox = function findBox(bytes, paths, complete) { - if (complete === void 0) { - complete = false; - } - - paths = normalizePaths(paths); - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - if (!paths.length) { - // short-circuit the search for empty paths - return results; +class ParseStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { + constructor() { + super(); + this.customParsers = []; + this.tagMappers = []; } + /** + * Parses an additional line of input. + * + * @param {string} line a single line of an M3U8 file to parse + */ - var i = 0; - while (i < bytes.length) { - var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0; - var type = bytes.subarray(i + 4, i + 8); // invalid box format. + push(line) { + let match; + let event; // strip whitespace - if (size === 0) { - break; - } + line = line.trim(); - var end = i + size; - - if (end > bytes.length) { - // this box is bigger than the number of bytes we have - // and complete is set, we cannot find any more boxes. - if (complete) { - break; - } + if (line.length === 0) { + // ignore empty lines + return; + } // URIs - end = bytes.length; - } - var data = bytes.subarray(i + 8, end); + if (line[0] !== '#') { + this.trigger('data', { + type: 'uri', + uri: line + }); + return; + } // map tags - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(type, paths[0])) { - if (paths.length === 1) { - // this is the end of the path and we've found the box we were - // looking for - results.push(data); - } else { - // recursively search for the next box along the path - results.push.apply(results, findBox(data, paths.slice(1), complete)); - } - } - i = end; - } // we've finished searching all of bytes + const newLines = this.tagMappers.reduce((acc, mapper) => { + const mappedLine = mapper(line); // skip if unchanged + if (mappedLine === line) { + return acc; + } - return results; -}; -/** - * Search for a single matching box by name in an iso bmff format like - * mp4. This function is useful for finding codec boxes which - * can be placed arbitrarily in sample descriptions depending - * on the version of the file or file type. - * - * @param {TypedArray} bytes - * bytes for the iso bmff to search for boxes in - * - * @param {string|Uint8Array} name - * The name of the box to find. - * - * @return {Uint8Array[]} - * a subarray of bytes representing the name boxed we found. - */ + return acc.concat([mappedLine]); + }, [line]); + newLines.forEach(newLine => { + for (let i = 0; i < this.customParsers.length; i++) { + if (this.customParsers[i].call(this, newLine)) { + return; + } + } // Comments -var findNamedBox = function findNamedBox(bytes, name) { - name = normalizePath(name); - if (!name.length) { - // short-circuit the search for empty paths - return bytes.subarray(bytes.length); - } + if (newLine.indexOf('#EXT') !== 0) { + this.trigger('data', { + type: 'comment', + text: newLine.slice(1) + }); + return; + } // strip off any carriage returns here so the regex matching + // doesn't have to account for them. - var i = 0; - while (i < bytes.length) { - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + name.length), name)) { - var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0; - var end = size > 1 ? i + size : bytes.byteLength; - return bytes.subarray(i + 4, end); - } + newLine = newLine.replace('\r', ''); // Tags - i++; - } // we've finished searching all of bytes + match = /^#EXTM3U/.exec(newLine); + if (match) { + this.trigger('data', { + type: 'tag', + tagType: 'm3u' + }); + return; + } - return bytes.subarray(bytes.length); -}; + match = /^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(newLine); -var parseSamples = function parseSamples(data, entrySize, parseEntry) { - if (entrySize === void 0) { - entrySize = 4; - } + if (match) { + event = { + type: 'tag', + tagType: 'inf' + }; - if (parseEntry === void 0) { - parseEntry = function parseEntry(d) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(d); - }; - } + if (match[1]) { + event.duration = parseFloat(match[1]); + } - var entries = []; + if (match[2]) { + event.title = match[2]; + } - if (!data || !data.length) { - return entries; - } + this.trigger('data', event); + return; + } - var entryCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(data.subarray(4, 8)); + match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine); - for (var i = 8; entryCount; i += entrySize, entryCount--) { - entries.push(parseEntry(data.subarray(i, i + entrySize))); - } + if (match) { + event = { + type: 'tag', + tagType: 'targetduration' + }; - return entries; -}; + if (match[1]) { + event.duration = parseInt(match[1], 10); + } -var buildFrameTable = function buildFrameTable(stbl, timescale) { - var keySamples = parseSamples(findBox(stbl, ['stss'])[0]); - var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]); - var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) { - return { - sampleCount: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), - sampleDelta: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)) - }; - }); - var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) { - return { - firstChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), - samplesPerChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)), - sampleDescriptionIndex: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(8, 12)) - }; - }); - var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need + this.trigger('data', event); + return; + } - var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null); - var frames = []; + match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine); - for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) { - var samplesInChunk = void 0; + if (match) { + event = { + type: 'tag', + tagType: 'version' + }; - for (var i = 0; i < samplesToChunks.length; i++) { - var sampleToChunk = samplesToChunks[i]; - var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk); + if (match[1]) { + event.version = parseInt(match[1], 10); + } - if (isThisOne) { - samplesInChunk = sampleToChunk.samplesPerChunk; - break; + this.trigger('data', event); + return; } - } - var chunkOffset = chunkOffsets[chunkIndex]; + match = /^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); - for (var _i = 0; _i < samplesInChunk; _i++) { - var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe + if (match) { + event = { + type: 'tag', + tagType: 'media-sequence' + }; - var keyframe = !keySamples.length; + if (match[1]) { + event.number = parseInt(match[1], 10); + } - if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) { - keyframe = true; + this.trigger('data', event); + return; } - var frame = { - keyframe: keyframe, - start: chunkOffset, - end: chunkOffset + frameEnd - }; + match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); - for (var k = 0; k < timeToSamples.length; k++) { - var _timeToSamples$k = timeToSamples[k], - sampleCount = _timeToSamples$k.sampleCount, - sampleDelta = _timeToSamples$k.sampleDelta; + if (match) { + event = { + type: 'tag', + tagType: 'discontinuity-sequence' + }; - if (frames.length <= sampleCount) { - // ms to ns - var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0; - frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000; - frame.duration = sampleDelta; - break; + if (match[1]) { + event.number = parseInt(match[1], 10); } + + this.trigger('data', event); + return; } - frames.push(frame); - chunkOffset += frameEnd; - } - } + match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine); - return frames; -}; -var addSampleDescription = function addSampleDescription(track, bytes) { - var codec = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(0, 4)); + if (match) { + event = { + type: 'tag', + tagType: 'playlist-type' + }; - if (track.type === 'video') { - track.info = track.info || {}; - track.info.width = bytes[28] << 8 | bytes[29]; - track.info.height = bytes[30] << 8 | bytes[31]; - } else if (track.type === 'audio') { - track.info = track.info || {}; - track.info.channels = bytes[20] << 8 | bytes[21]; - track.info.bitDepth = bytes[22] << 8 | bytes[23]; - track.info.sampleRate = bytes[28] << 8 | bytes[29]; - } + if (match[1]) { + event.playlistType = match[1]; + } - if (codec === 'avc1') { - var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord + this.trigger('data', event); + return; + } - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(avcC); - track.info.avcC = avcC; // TODO: do we need to parse all this? + match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine); - /* { - configurationVersion: avcC[0], - profile: avcC[1], - profileCompatibility: avcC[2], - level: avcC[3], - lengthSizeMinusOne: avcC[4] & 0x3 - }; - let spsNalUnitCount = avcC[5] & 0x1F; - const spsNalUnits = track.info.avc.spsNalUnits = []; - // past spsNalUnitCount - let offset = 6; - while (spsNalUnitCount--) { - const nalLen = avcC[offset] << 8 | avcC[offset + 1]; - spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); - offset += nalLen + 2; - } - let ppsNalUnitCount = avcC[offset]; - const ppsNalUnits = track.info.avc.ppsNalUnits = []; - // past ppsNalUnitCount - offset += 1; - while (ppsNalUnitCount--) { - const nalLen = avcC[offset] << 8 | avcC[offset + 1]; - ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); - offset += nalLen + 2; - }*/ - // HEVCDecoderConfigurationRecord - } else if (codec === 'hvc1' || codec === 'hev1') { - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(findNamedBox(bytes, 'hvcC')); - } else if (codec === 'mp4a' || codec === 'mp4v') { - var esds = findNamedBox(bytes, 'esds'); - var esDescriptor = parseDescriptors(esds.subarray(4))[0]; - var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) { - var tag = _ref.tag; - return tag === 0x04; - })[0]; + if (match) { + event = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(parseByterange(match[1]), { + type: 'tag', + tagType: 'byterange' + }); + this.trigger('data', event); + return; + } - if (decoderConfig) { - // most codecs do not have a further '.' - // such as 0xa5 for ac-3 and 0xa6 for e-ac-3 - codec += '.' + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(decoderConfig.oti); + match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine); - if (decoderConfig.oti === 0x40) { - codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString(); - } else if (decoderConfig.oti === 0x20) { - codec += '.' + decoderConfig.descriptors[0].bytes[4].toString(); - } else if (decoderConfig.oti === 0xdd) { - codec = 'vorbis'; + if (match) { + event = { + type: 'tag', + tagType: 'allow-cache' + }; + + if (match[1]) { + event.allowed = !/NO/.test(match[1]); + } + + this.trigger('data', event); + return; } - } else if (track.type === 'audio') { - codec += '.40.2'; - } else { - codec += '.20.9'; - } - } else if (codec === 'av01') { - // AV1DecoderConfigurationRecord - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(findNamedBox(bytes, 'av1C')); - } else if (codec === 'vp09') { - // VPCodecConfigurationRecord - var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/ - var profile = vpcC[0]; - var level = vpcC[1]; - var bitDepth = vpcC[2] >> 4; - var chromaSubsampling = (vpcC[2] & 0x0F) >> 1; - var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3; - var colourPrimaries = vpcC[3]; - var transferCharacteristics = vpcC[4]; - var matrixCoefficients = vpcC[5]; - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag, 2, '0'); - } else if (codec === 'theo') { - codec = 'theora'; - } else if (codec === 'spex') { - codec = 'speex'; - } else if (codec === '.mp3') { - codec = 'mp4a.40.34'; - } else if (codec === 'msVo') { - codec = 'vorbis'; - } else if (codec === 'Opus') { - codec = 'opus'; - var dOps = findNamedBox(bytes, 'dOps'); - track.info.opus = (0,_opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__.parseOpusHead)(dOps); // TODO: should this go into the webm code?? - // Firefox requires a codecDelay for opus playback - // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238 + match = /^#EXT-X-MAP:(.*)$/.exec(newLine); - track.info.codecDelay = 6500000; - } else { - codec = codec.toLowerCase(); - } - /* eslint-enable */ - // flac, ac-3, ec-3, opus + if (match) { + event = { + type: 'tag', + tagType: 'map' + }; + if (match[1]) { + const attributes = parseAttributes(match[1]); - track.codec = codec; -}; -var parseTracks = function parseTracks(bytes, frameTable) { - if (frameTable === void 0) { - frameTable = true; - } + if (attributes.URI) { + event.uri = attributes.URI; + } - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var traks = findBox(bytes, ['moov', 'trak'], true); - var tracks = []; - traks.forEach(function (trak) { - var track = { - bytes: trak - }; - var mdia = findBox(trak, ['mdia'])[0]; - var hdlr = findBox(mdia, ['hdlr'])[0]; - var trakType = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(hdlr.subarray(8, 12)); + if (attributes.BYTERANGE) { + event.byterange = parseByterange(attributes.BYTERANGE); + } + } - if (trakType === 'soun') { - track.type = 'audio'; - } else if (trakType === 'vide') { - track.type = 'video'; - } else { - track.type = trakType; - } + this.trigger('data', event); + return; + } - var tkhd = findBox(trak, ['tkhd'])[0]; + match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine); - if (tkhd) { - var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength); - var tkhdVersion = view.getUint8(0); - track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20); - } + if (match) { + event = { + type: 'tag', + tagType: 'stream-inf' + }; - var mdhd = findBox(mdia, ['mdhd'])[0]; + if (match[1]) { + event.attributes = parseAttributes(match[1]); - if (mdhd) { - // mdhd is a FullBox, meaning it will have its own version as the first byte - var version = mdhd[0]; - var index = version === 0 ? 12 : 20; - track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0; - } + if (event.attributes.RESOLUTION) { + const split = event.attributes.RESOLUTION.split('x'); + const resolution = {}; - var stbl = findBox(mdia, ['minf', 'stbl'])[0]; - var stsd = findBox(stbl, ['stsd'])[0]; - var descriptionCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(4, 8)); - var offset = 8; // add codec and codec info + if (split[0]) { + resolution.width = parseInt(split[0], 10); + } - while (descriptionCount--) { - var len = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(offset, offset + 4)); - var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len); - addSampleDescription(track, sampleDescriptor); - offset += 4 + len; - } + if (split[1]) { + resolution.height = parseInt(split[1], 10); + } - if (frameTable) { - track.frameTable = buildFrameTable(stbl, track.timescale); - } // codec has no sub parameters + event.attributes.RESOLUTION = resolution; + } + if (event.attributes.BANDWIDTH) { + event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10); + } - tracks.push(track); - }); - return tracks; -}; -var parseMediaInfo = function parseMediaInfo(bytes) { - var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0]; + if (event.attributes['FRAME-RATE']) { + event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']); + } - if (!mvhd || !mvhd.length) { - return; - } + if (event.attributes['PROGRAM-ID']) { + event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10); + } + } - var info = {}; // ms to ns - // mvhd v1 has 8 byte duration and other fields too + this.trigger('data', event); + return; + } - if (mvhd[0] === 1) { - info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(20, 24)); - info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(24, 32)); - } else { - info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(12, 16)); - info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(16, 20)); - } + match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine); - info.bytes = mvhd; - return info; -}; + if (match) { + event = { + type: 'tag', + tagType: 'media' + }; -/***/ }), + if (match[1]) { + event.attributes = parseAttributes(match[1]); + } -/***/ "./node_modules/@videojs/vhs-utils/es/nal-helpers.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/nal-helpers.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + this.trigger('data', event); + return; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ EMULATION_PREVENTION: () => (/* binding */ EMULATION_PREVENTION), -/* harmony export */ NAL_TYPE_ONE: () => (/* binding */ NAL_TYPE_ONE), -/* harmony export */ NAL_TYPE_TWO: () => (/* binding */ NAL_TYPE_TWO), -/* harmony export */ discardEmulationPreventionBytes: () => (/* binding */ discardEmulationPreventionBytes), -/* harmony export */ findH264Nal: () => (/* binding */ findH264Nal), -/* harmony export */ findH265Nal: () => (/* binding */ findH265Nal), -/* harmony export */ findNal: () => (/* binding */ findNal) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - -var NAL_TYPE_ONE = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x00, 0x01]); -var NAL_TYPE_TWO = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x01]); -var EMULATION_PREVENTION = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x03]); -/** - * Expunge any "Emulation Prevention" bytes from a "Raw Byte - * Sequence Payload" - * - * @param data {Uint8Array} the bytes of a RBSP from a NAL - * unit - * @return {Uint8Array} the RBSP without any Emulation - * Prevention Bytes - */ - -var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) { - var positions = []; - var i = 1; // Find all `Emulation Prevention Bytes` + match = /^#EXT-X-ENDLIST/.exec(newLine); - while (i < bytes.length - 2) { - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) { - positions.push(i + 2); - i++; - } + if (match) { + this.trigger('data', { + type: 'tag', + tagType: 'endlist' + }); + return; + } - i++; - } // If no Emulation Prevention Bytes were found just return the original - // array + match = /^#EXT-X-DISCONTINUITY/.exec(newLine); + if (match) { + this.trigger('data', { + type: 'tag', + tagType: 'discontinuity' + }); + return; + } - if (positions.length === 0) { - return bytes; - } // Create a new array to hold the NAL unit data + match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine); + if (match) { + event = { + type: 'tag', + tagType: 'program-date-time' + }; - var newLength = bytes.length - positions.length; - var newData = new Uint8Array(newLength); - var sourceIndex = 0; + if (match[1]) { + event.dateTimeString = match[1]; + event.dateTimeObject = new Date(match[1]); + } - for (i = 0; i < newLength; sourceIndex++, i++) { - if (sourceIndex === positions[0]) { - // Skip this byte - sourceIndex++; // Remove this position index + this.trigger('data', event); + return; + } - positions.shift(); - } + match = /^#EXT-X-KEY:(.*)$/.exec(newLine); - newData[i] = bytes[sourceIndex]; - } + if (match) { + event = { + type: 'tag', + tagType: 'key' + }; - return newData; -}; -var findNal = function findNal(bytes, dataType, types, nalLimit) { - if (nalLimit === void 0) { - nalLimit = Infinity; - } + if (match[1]) { + event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - types = [].concat(types); - var i = 0; - var nalStart; - var nalsFound = 0; // keep searching until: - // we reach the end of bytes - // we reach the maximum number of nals they want to seach - // NOTE: that we disregard nalLimit when we have found the start - // of the nal we want so that we can find the end of the nal we want. + if (event.attributes.IV) { + if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') { + event.attributes.IV = event.attributes.IV.substring(2); + } - while (i < bytes.length && (nalsFound < nalLimit || nalStart)) { - var nalOffset = void 0; + event.attributes.IV = event.attributes.IV.match(/.{8}/g); + event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16); + event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16); + event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16); + event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16); + event.attributes.IV = new Uint32Array(event.attributes.IV); + } + } - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_ONE)) { - nalOffset = 4; - } else if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_TWO)) { - nalOffset = 3; - } // we are unsynced, - // find the next nal unit + this.trigger('data', event); + return; + } + match = /^#EXT-X-START:(.*)$/.exec(newLine); - if (!nalOffset) { - i++; - continue; - } + if (match) { + event = { + type: 'tag', + tagType: 'start' + }; - nalsFound++; + if (match[1]) { + event.attributes = parseAttributes(match[1]); + event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']); + event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE); + } - if (nalStart) { - return discardEmulationPreventionBytes(bytes.subarray(nalStart, i)); - } + this.trigger('data', event); + return; + } - var nalType = void 0; + match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine); - if (dataType === 'h264') { - nalType = bytes[i + nalOffset] & 0x1f; - } else if (dataType === 'h265') { - nalType = bytes[i + nalOffset] >> 1 & 0x3f; - } + if (match) { + event = { + type: 'tag', + tagType: 'cue-out-cont' + }; - if (types.indexOf(nalType) !== -1) { - nalStart = i + nalOffset; - } // nal header is 1 length for h264, and 2 for h265 + if (match[1]) { + event.data = match[1]; + } else { + event.data = ''; + } + this.trigger('data', event); + return; + } - i += nalOffset + (dataType === 'h264' ? 1 : 2); - } + match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine); - return bytes.subarray(0, 0); -}; -var findH264Nal = function findH264Nal(bytes, type, nalLimit) { - return findNal(bytes, 'h264', type, nalLimit); -}; -var findH265Nal = function findH265Nal(bytes, type, nalLimit) { - return findNal(bytes, 'h265', type, nalLimit); -}; + if (match) { + event = { + type: 'tag', + tagType: 'cue-out' + }; -/***/ }), + if (match[1]) { + event.data = match[1]; + } else { + event.data = ''; + } -/***/ "./node_modules/@videojs/vhs-utils/es/opus-helpers.js": -/*!************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/opus-helpers.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + this.trigger('data', event); + return; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPUS_HEAD: () => (/* binding */ OPUS_HEAD), -/* harmony export */ parseOpusHead: () => (/* binding */ parseOpusHead), -/* harmony export */ setOpusHead: () => (/* binding */ setOpusHead) -/* harmony export */ }); -var OPUS_HEAD = new Uint8Array([// O, p, u, s -0x4f, 0x70, 0x75, 0x73, // H, e, a, d -0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus -// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html -// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html + match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine); -var parseOpusHead = function parseOpusHead(bytes) { - var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); - var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian. + if (match) { + event = { + type: 'tag', + tagType: 'cue-in' + }; - var littleEndian = version !== 0; - var config = { - version: version, - channels: view.getUint8(1), - preSkip: view.getUint16(2, littleEndian), - sampleRate: view.getUint32(4, littleEndian), - outputGain: view.getUint16(8, littleEndian), - channelMappingFamily: view.getUint8(10) - }; + if (match[1]) { + event.data = match[1]; + } else { + event.data = ''; + } - if (config.channelMappingFamily > 0 && bytes.length > 10) { - config.streamCount = view.getUint8(11); - config.twoChannelStreamCount = view.getUint8(12); - config.channelMapping = []; + this.trigger('data', event); + return; + } - for (var c = 0; c < config.channels; c++) { - config.channelMapping.push(view.getUint8(13 + c)); - } - } + match = /^#EXT-X-SKIP:(.*)$/.exec(newLine); - return config; -}; -var setOpusHead = function setOpusHead(config) { - var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels; - var view = new DataView(new ArrayBuffer(size)); - var littleEndian = config.version !== 0; - view.setUint8(0, config.version); - view.setUint8(1, config.channels); - view.setUint16(2, config.preSkip, littleEndian); - view.setUint32(4, config.sampleRate, littleEndian); - view.setUint16(8, config.outputGain, littleEndian); - view.setUint8(10, config.channelMappingFamily); + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'skip' + }; + event.attributes = parseAttributes(match[1]); - if (config.channelMappingFamily > 0) { - view.setUint8(11, config.streamCount); - config.channelMapping.foreach(function (cm, i) { - view.setUint8(12 + i, cm); - }); - } + if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) { + event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10); + } - return new Uint8Array(view.buffer); -}; + if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) { + event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB); + } -/***/ }), + this.trigger('data', event); + return; + } -/***/ "./node_modules/@videojs/vhs-utils/es/resolve-url.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/resolve-url.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + match = /^#EXT-X-PART:(.*)$/.exec(newLine); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'part' + }; + event.attributes = parseAttributes(match[1]); + ['DURATION'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseFloat(event.attributes[key]); + } + }); + ['INDEPENDENT', 'GAP'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = /YES/.test(event.attributes[key]); + } + }); + if (event.attributes.hasOwnProperty('BYTERANGE')) { + event.attributes.byterange = parseByterange(event.attributes.BYTERANGE); + } -var DEFAULT_LOCATION = 'http://example.com'; + this.trigger('data', event); + return; + } -var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { - // return early if we don't need to resolve - if (/^[a-z]+:/i.test(relativeUrl)) { - return relativeUrl; - } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location + match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine); + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'server-control' + }; + event.attributes = parseAttributes(match[1]); + ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseFloat(event.attributes[key]); + } + }); + ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = /YES/.test(event.attributes[key]); + } + }); + this.trigger('data', event); + return; + } - if (/^data:/.test(baseUrl)) { - baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; - } // IE11 supports URL but not the URL constructor - // feature detect the behavior we want + match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine); + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'part-inf' + }; + event.attributes = parseAttributes(match[1]); + ['PART-TARGET'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseFloat(event.attributes[key]); + } + }); + this.trigger('data', event); + return; + } - var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; - var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) - // and if baseUrl isn't an absolute url + match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine); - var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'preload-hint' + }; + event.attributes = parseAttributes(match[1]); + ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseInt(event.attributes[key], 10); + const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset'; + event.attributes.byterange = event.attributes.byterange || {}; + event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object. - if (nativeURL) { - baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); - } else if (!/\/\//i.test(baseUrl)) { - baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); - } + delete event.attributes[key]; + } + }); + this.trigger('data', event); + return; + } - if (nativeURL) { - var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol - // and if we're location-less, remove the location - // otherwise, return the url unmodified + match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine); - if (removeLocation) { - return newUrl.href.slice(DEFAULT_LOCATION.length); - } else if (protocolLess) { - return newUrl.href.slice(newUrl.protocol.length); - } + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'rendition-report' + }; + event.attributes = parseAttributes(match[1]); + ['LAST-MSN', 'LAST-PART'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseInt(event.attributes[key], 10); + } + }); + this.trigger('data', event); + return; + } - return newUrl.href; - } + match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine); - return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); -}; + if (match && match[1]) { + event = { + type: 'tag', + tagType: 'daterange' + }; + event.attributes = parseAttributes(match[1]); + ['ID', 'CLASS'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = String(event.attributes[key]); + } + }); + ['START-DATE', 'END-DATE'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = new Date(event.attributes[key]); + } + }); + ['DURATION', 'PLANNED-DURATION'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = parseFloat(event.attributes[key]); + } + }); + ['END-ON-NEXT'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = /YES/i.test(event.attributes[key]); + } + }); + ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) { + if (event.attributes.hasOwnProperty(key)) { + event.attributes[key] = event.attributes[key].toString(16); + } + }); + const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); + for (const key in event.attributes) { + if (!clientAttributePattern.test(key)) { + continue; + } -/***/ }), + const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]); + const isDecimalFloating = /^\d+(\.\d+)?$/.test(event.attributes[key]); + event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]); + } -/***/ "./node_modules/@videojs/xhr/lib/http-handler.js": -/*!*******************************************************!*\ - !*** ./node_modules/@videojs/xhr/lib/http-handler.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + this.trigger('data', event); + return; + } -"use strict"; + match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine); + if (match) { + this.trigger('data', { + type: 'tag', + tagType: 'independent-segments' + }); + return; + } // unknown tag type -var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -var httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) { - if (decodeResponseBody === void 0) { - decodeResponseBody = false; + this.trigger('data', { + type: 'tag', + data: newLine.slice(4) + }); + }); } + /** + * Add a parser for custom headers + * + * @param {Object} options a map of options for the added parser + * @param {RegExp} options.expression a regular expression to match the custom header + * @param {string} options.customType the custom type to register to the output + * @param {Function} [options.dataParser] function to parse the line into an object + * @param {boolean} [options.segment] should tag data be attached to the segment object + */ - return function (err, response, responseBody) { - // if the XHR failed, return that error - if (err) { - callback(err); - return; - } // if the HTTP status code is 4xx or 5xx, the request also failed + addParser({ + expression, + customType, + dataParser, + segment + }) { + if (typeof dataParser !== 'function') { + dataParser = line => line; + } - if (response.statusCode >= 400 && response.statusCode <= 599) { - var cause = responseBody; - - if (decodeResponseBody) { - if (window.TextDecoder) { - var charset = getCharset(response.headers && response.headers['content-type']); + this.customParsers.push(line => { + const match = expression.exec(line); - try { - cause = new TextDecoder(charset).decode(responseBody); - } catch (e) {} - } else { - cause = String.fromCharCode.apply(null, new Uint8Array(responseBody)); - } + if (match) { + this.trigger('data', { + type: 'custom', + data: dataParser(line), + customType, + segment + }); + return true; } + }); + } + /** + * Add a custom header mapper + * + * @param {Object} options + * @param {RegExp} options.expression a regular expression to match the custom header + * @param {Function} options.map function to translate tag into a different tag + */ - callback({ - cause: cause - }); - return; - } // otherwise, request succeeded + addTagMapper({ + expression, + map + }) { + const mapFn = line => { + if (expression.test(line)) { + return map(line); + } - callback(null, responseBody); - }; -}; + return line; + }; -function getCharset(contentTypeHeader) { - if (contentTypeHeader === void 0) { - contentTypeHeader = ''; + this.tagMappers.push(mapFn); } - return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) { - var _contentType$split = contentType.split('='), - type = _contentType$split[0], - value = _contentType$split[1]; +} - if (type.trim() === 'charset') { - return value.trim(); - } +const camelCase = str => str.toLowerCase().replace(/-(\w)/g, a => a[1].toUpperCase()); - return charset; - }, 'utf-8'); -} +const camelCaseKeys = function (attributes) { + const result = {}; + Object.keys(attributes).forEach(function (key) { + result[camelCase(key)] = attributes[key]; + }); + return result; +}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration +// we need this helper because defaults are based upon targetDuration and +// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before +// target durations are set. -module.exports = httpResponseHandler; -/***/ }), +const setHoldBack = function (manifest) { + const { + serverControl, + targetDuration, + partTargetDuration + } = manifest; -/***/ "./node_modules/@videojs/xhr/lib/index.js": -/*!************************************************!*\ - !*** ./node_modules/@videojs/xhr/lib/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + if (!serverControl) { + return; + } -"use strict"; + const tag = '#EXT-X-SERVER-CONTROL'; + const hb = 'holdBack'; + const phb = 'partHoldBack'; + const minTargetDuration = targetDuration && targetDuration * 3; + const minPartDuration = partTargetDuration && partTargetDuration * 2; + + if (targetDuration && !serverControl.hasOwnProperty(hb)) { + serverControl[hb] = minTargetDuration; + this.trigger('info', { + message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).` + }); + } + if (minTargetDuration && serverControl[hb] < minTargetDuration) { + this.trigger('warn', { + message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})` + }); + serverControl[hb] = minTargetDuration; + } // default no part hold back to part target duration * 3 -var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -var _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"); + if (partTargetDuration && !serverControl.hasOwnProperty(phb)) { + serverControl[phb] = partTargetDuration * 3; + this.trigger('info', { + message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).` + }); + } // if part hold back is too small default it to part target duration * 2 -var isFunction = __webpack_require__(/*! is-function */ "./node_modules/is-function/index.js"); -createXHR.httpHandler = __webpack_require__(/*! ./http-handler.js */ "./node_modules/@videojs/xhr/lib/http-handler.js"); + if (partTargetDuration && serverControl[phb] < minPartDuration) { + this.trigger('warn', { + message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).` + }); + serverControl[phb] = minPartDuration; + } +}; /** - * @license - * slighly modified parse-headers 2.0.2 - * Copyright (c) 2014 David Björklund - * Available under the MIT license - * + * A parser for M3U8 files. The current interpretation of the input is + * exposed as a property `manifest` on parser objects. It's just two lines to + * create and parse a manifest once you have the contents available as a string: + * + * ```js + * var parser = new m3u8.Parser(); + * parser.push(xhr.responseText); + * ``` + * + * New input can later be applied to update the manifest object by calling + * `push` again. + * + * The parser attempts to create a usable manifest object even if the + * underlying input is somewhat nonsensical. It emits `info` and `warning` + * events during the parse if it encounters input that seems invalid or + * requires some property of the manifest object to be defaulted. + * + * @class Parser + * @extends Stream */ -var parseHeaders = function parseHeaders(headers) { - var result = {}; - - if (!headers) { - return result; - } - headers.trim().split('\n').forEach(function (row) { - var index = row.indexOf(':'); - var key = row.slice(0, index).trim().toLowerCase(); - var value = row.slice(index + 1).trim(); +class Parser extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { + constructor() { + super(); + this.lineStream = new LineStream(); + this.parseStream = new ParseStream(); + this.lineStream.pipe(this.parseStream); + /* eslint-disable consistent-this */ - if (typeof result[key] === 'undefined') { - result[key] = value; - } else if (Array.isArray(result[key])) { - result[key].push(value); - } else { - result[key] = [result[key], value]; - } - }); - return result; -}; + const self = this; + /* eslint-enable consistent-this */ -module.exports = createXHR; // Allow use of default import syntax in TypeScript + const uris = []; + let currentUri = {}; // if specified, the active EXT-X-MAP definition -module.exports["default"] = createXHR; -createXHR.XMLHttpRequest = window.XMLHttpRequest || noop; -createXHR.XDomainRequest = "withCredentials" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest; -forEachArray(["get", "put", "post", "patch", "head", "delete"], function (method) { - createXHR[method === "delete" ? "del" : method] = function (uri, options, callback) { - options = initParams(uri, options, callback); - options.method = method.toUpperCase(); - return _createXHR(options); - }; -}); + let currentMap; // if specified, the active decryption key -function forEachArray(array, iterator) { - for (var i = 0; i < array.length; i++) { - iterator(array[i]); - } -} + let key; + let hasParts = false; -function isEmpty(obj) { - for (var i in obj) { - if (obj.hasOwnProperty(i)) return false; - } + const noop = function () {}; - return true; -} + const defaultMediaGroups = { + 'AUDIO': {}, + 'VIDEO': {}, + 'CLOSED-CAPTIONS': {}, + 'SUBTITLES': {} + }; // This is the Widevine UUID from DASH IF IOP. The same exact string is + // used in MPDs with Widevine encrypted streams. -function initParams(uri, options, callback) { - var params = uri; + const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities - if (isFunction(options)) { - callback = options; + let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data - if (typeof uri === "string") { - params = { - uri: uri - }; - } - } else { - params = _extends({}, options, { - uri: uri - }); - } + this.manifest = { + allowCache: true, + discontinuityStarts: [], + segments: [] + }; // keep track of the last seen segment's byte range end, as segments are not required + // to provide the offset, in which case it defaults to the next byte after the + // previous segment - params.callback = callback; - return params; -} + let lastByterangeEnd = 0; // keep track of the last seen part's byte range end. -function createXHR(uri, options, callback) { - options = initParams(uri, options, callback); - return _createXHR(options); -} + let lastPartByterangeEnd = 0; + const daterangeTags = {}; + this.on('end', () => { + // only add preloadSegment if we don't yet have a uri for it. + // and we actually have parts/preloadHints + if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) { + return; + } -function _createXHR(options) { - if (typeof options.callback === "undefined") { - throw new Error("callback argument missing"); - } + if (!currentUri.map && currentMap) { + currentUri.map = currentMap; + } - var called = false; + if (!currentUri.key && key) { + currentUri.key = key; + } - var callback = function cbOnce(err, response, body) { - if (!called) { - called = true; - options.callback(err, response, body); - } - }; + if (!currentUri.timeline && typeof currentTimeline === 'number') { + currentUri.timeline = currentTimeline; + } - function readystatechange() { - if (xhr.readyState === 4) { - setTimeout(loadFunc, 0); - } - } + this.manifest.preloadSegment = currentUri; + }); // update the manifest with the m3u8 entry from the parse stream - function getBody() { - // Chrome with requestType=blob throws errors arround when even testing access to responseText - var body = undefined; + this.parseStream.on('data', function (entry) { + let mediaGroup; + let rendition; + ({ + tag() { + // switch based on the tag type + (({ + version() { + if (entry.version) { + this.manifest.version = entry.version; + } + }, - if (xhr.response) { - body = xhr.response; - } else { - body = xhr.responseText || getXml(xhr); - } + 'allow-cache'() { + this.manifest.allowCache = entry.allowed; - if (isJson) { - try { - body = JSON.parse(body); - } catch (e) {} - } + if (!('allowed' in entry)) { + this.trigger('info', { + message: 'defaulting allowCache to YES' + }); + this.manifest.allowCache = true; + } + }, - return body; - } + byterange() { + const byterange = {}; - function errorFunc(evt) { - clearTimeout(timeoutTimer); + if ('length' in entry) { + currentUri.byterange = byterange; + byterange.length = entry.length; - if (!(evt instanceof Error)) { - evt = new Error("" + (evt || "Unknown XMLHttpRequest Error")); - } + if (!('offset' in entry)) { + /* + * From the latest spec (as of this writing): + * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2 + * + * Same text since EXT-X-BYTERANGE's introduction in draft 7: + * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1) + * + * "If o [offset] is not present, the sub-range begins at the next byte + * following the sub-range of the previous media segment." + */ + entry.offset = lastByterangeEnd; + } + } - evt.statusCode = 0; - return callback(evt, failureResponse); - } // will load the data & process the response in a special response object + if ('offset' in entry) { + currentUri.byterange = byterange; + byterange.offset = entry.offset; + } + lastByterangeEnd = byterange.offset + byterange.length; + }, - function loadFunc() { - if (aborted) return; - var status; - clearTimeout(timeoutTimer); + endlist() { + this.manifest.endList = true; + }, - if (options.useXDR && xhr.status === undefined) { - //IE8 CORS GET successful response doesn't have a status field, but body is fine - status = 200; - } else { - status = xhr.status === 1223 ? 204 : xhr.status; - } + inf() { + if (!('mediaSequence' in this.manifest)) { + this.manifest.mediaSequence = 0; + this.trigger('info', { + message: 'defaulting media sequence to zero' + }); + } - var response = failureResponse; - var err = null; + if (!('discontinuitySequence' in this.manifest)) { + this.manifest.discontinuitySequence = 0; + this.trigger('info', { + message: 'defaulting discontinuity sequence to zero' + }); + } - if (status !== 0) { - response = { - body: getBody(), - statusCode: status, - method: method, - headers: {}, - url: uri, - rawRequest: xhr - }; + if (entry.duration > 0) { + currentUri.duration = entry.duration; + } - if (xhr.getAllResponseHeaders) { - //remember xhr can in fact be XDR for CORS in IE - response.headers = parseHeaders(xhr.getAllResponseHeaders()); - } - } else { - err = new Error("Internal XMLHttpRequest Error"); - } + if (entry.duration === 0) { + currentUri.duration = 0.01; + this.trigger('info', { + message: 'updating zero segment duration to a small value' + }); + } - return callback(err, response, response.body); - } + this.manifest.segments = uris; + }, - var xhr = options.xhr || null; + key() { + if (!entry.attributes) { + this.trigger('warn', { + message: 'ignoring key declaration without attribute list' + }); + return; + } // clear the active encryption key - if (!xhr) { - if (options.cors || options.useXDR) { - xhr = new createXHR.XDomainRequest(); - } else { - xhr = new createXHR.XMLHttpRequest(); - } - } - var key; - var aborted; - var uri = xhr.url = options.uri || options.url; - var method = xhr.method = options.method || "GET"; - var body = options.body || options.data; - var headers = xhr.headers = options.headers || {}; - var sync = !!options.sync; - var isJson = false; - var timeoutTimer; - var failureResponse = { - body: undefined, - headers: {}, - statusCode: 0, - method: method, - url: uri, - rawRequest: xhr - }; + if (entry.attributes.METHOD === 'NONE') { + key = null; + return; + } - if ("json" in options && options.json !== false) { - isJson = true; - headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json"); //Don't override existing accept header declared by user + if (!entry.attributes.URI) { + this.trigger('warn', { + message: 'ignoring key declaration without URI' + }); + return; + } - if (method !== "GET" && method !== "HEAD") { - headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json"); //Don't override existing accept header declared by user + if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') { + this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. - body = JSON.stringify(options.json === true ? body : options.json); - } - } + this.manifest.contentProtection['com.apple.fps.1_0'] = { + attributes: entry.attributes + }; + return; + } - xhr.onreadystatechange = readystatechange; - xhr.onload = loadFunc; - xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function. + if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') { + this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. - xhr.onprogress = function () {// IE must die - }; + this.manifest.contentProtection['com.microsoft.playready'] = { + uri: entry.attributes.URI + }; + return; + } // check if the content is encrypted for Widevine + // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf - xhr.onabort = function () { - aborted = true; - }; - xhr.ontimeout = errorFunc; - xhr.open(method, uri, !sync, options.username, options.password); //has to be after open + if (entry.attributes.KEYFORMAT === widevineUuid) { + const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC']; - if (!sync) { - xhr.withCredentials = !!options.withCredentials; - } // Cannot set timeout with sync request - // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly - // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent + if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) { + this.trigger('warn', { + message: 'invalid key method provided for Widevine' + }); + return; + } + if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') { + this.trigger('warn', { + message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead' + }); + } - if (!sync && options.timeout > 0) { - timeoutTimer = setTimeout(function () { - if (aborted) return; - aborted = true; //IE9 may still call readystatechange + if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') { + this.trigger('warn', { + message: 'invalid key URI provided for Widevine' + }); + return; + } - xhr.abort("timeout"); - var e = new Error("XMLHttpRequest timeout"); - e.code = "ETIMEDOUT"; - errorFunc(e); - }, options.timeout); - } + if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) { + this.trigger('warn', { + message: 'invalid key ID provided for Widevine' + }); + return; + } // if Widevine key attributes are valid, store them as `contentProtection` + // on the manifest to emulate Widevine tag structure in a DASH mpd - if (xhr.setRequestHeader) { - for (key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - } else if (options.headers && !isEmpty(options.headers)) { - throw new Error("Headers cannot be set on an XDomainRequest object"); - } - if ("responseType" in options) { - xhr.responseType = options.responseType; - } + this.manifest.contentProtection = this.manifest.contentProtection || {}; + this.manifest.contentProtection['com.widevine.alpha'] = { + attributes: { + schemeIdUri: entry.attributes.KEYFORMAT, + // remove '0x' from the key id string + keyId: entry.attributes.KEYID.substring(2) + }, + // decode the base64-encoded PSSH box + pssh: (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__["default"])(entry.attributes.URI.split(',')[1]) + }; + return; + } - if ("beforeSend" in options && typeof options.beforeSend === "function") { - options.beforeSend(xhr); - } // Microsoft Edge browser sends "undefined" when send is called with undefined value. - // XMLHttpRequest spec says to pass null as body to indicate no body - // See https://github.com/naugtur/xhr/issues/100. + if (!entry.attributes.METHOD) { + this.trigger('warn', { + message: 'defaulting key method to AES-128' + }); + } // setup an encryption key for upcoming segments - xhr.send(body || null); - return xhr; -} + key = { + method: entry.attributes.METHOD || 'AES-128', + uri: entry.attributes.URI + }; -function getXml(xhr) { - // xhr.responseXML will throw Exception "InvalidStateError" or "DOMException" - // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML. - try { - if (xhr.responseType === "document") { - return xhr.responseXML; - } + if (typeof entry.attributes.IV !== 'undefined') { + key.iv = entry.attributes.IV; + } + }, - var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === "parsererror"; + 'media-sequence'() { + if (!isFinite(entry.number)) { + this.trigger('warn', { + message: 'ignoring invalid media sequence: ' + entry.number + }); + return; + } - if (xhr.responseType === "" && !firefoxBugTakenEffect) { - return xhr.responseXML; - } - } catch (e) {} + this.manifest.mediaSequence = entry.number; + }, - return null; -} + 'discontinuity-sequence'() { + if (!isFinite(entry.number)) { + this.trigger('warn', { + message: 'ignoring invalid discontinuity sequence: ' + entry.number + }); + return; + } -function noop() {} + this.manifest.discontinuitySequence = entry.number; + currentTimeline = entry.number; + }, -/***/ }), + 'playlist-type'() { + if (!/VOD|EVENT/.test(entry.playlistType)) { + this.trigger('warn', { + message: 'ignoring unknown playlist type: ' + entry.playlist + }); + return; + } -/***/ "./src/js/components/accordion.js": -/*!****************************************!*\ - !*** ./src/js/components/accordion.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + this.manifest.playlistType = entry.playlistType; + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ toggleAccordion: () => (/* binding */ toggleAccordion) -/* harmony export */ }); -let items = document.querySelectorAll('.accordion__item'); -let title = document.querySelectorAll('.accordion__title-wrapper'); -const toggleAccordion = () => { - title.forEach(question => question.addEventListener('click', function () { - let thisItem = this.parentNode; - items.forEach(item => { - if (thisItem == item) { - thisItem.classList.toggle('active'); - return; - } - item.classList.remove('active'); - }); - })); -}; + map() { + currentMap = {}; -/***/ }), + if (entry.uri) { + currentMap.uri = entry.uri; + } -/***/ "./src/js/components/burger-menu.js": -/*!******************************************!*\ - !*** ./src/js/components/burger-menu.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + if (entry.byterange) { + currentMap.byterange = entry.byterange; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ changeMenu: () => (/* binding */ changeMenu) -/* harmony export */ }); -const burger = document.querySelector('.burger-js'); -const menu = document.querySelector('.menu-js'); -const menuLinks = document.querySelectorAll('.nav__link'); -const changeMenu = () => { - burger?.addEventListener('click', () => { - menu?.classList.toggle('active'); - burger?.classList.toggle('active'); - if (menu?.classList.contains('active')) { - document.body.style.overflowY = 'hidden'; - } else { - document.body.style.overflowY = 'auto'; - } - }); - menuLinks.forEach(el => { - el.addEventListener('click', () => { - menu?.classList.remove('active'); - document.body.style.overflowY = 'auto'; - burger?.classList.remove('active'); - }); - }); -}; + if (key) { + currentMap.key = key; + } + }, -/***/ }), + 'stream-inf'() { + this.manifest.playlists = uris; + this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; -/***/ "./src/js/components/paint-btn.js": -/*!****************************************!*\ - !*** ./src/js/components/paint-btn.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + if (!entry.attributes) { + this.trigger('warn', { + message: 'ignoring empty stream-inf attributes' + }); + return; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ paintBtn: () => (/* binding */ paintBtn) -/* harmony export */ }); -const btnNext = document.querySelector('.nav-history__next'); -const paintBtn = () => { - try { - const scrollToTop = () => { - const top = window.scrollY; - if (top >= 100) { - btnNext.classList.add('active'); - } else { - btnNext.classList.remove('active'); - } - }; - scrollToTop(); - window.addEventListener('scroll', () => { - scrollToTop(); - }); - } catch (e) { - console.log(e); - } -}; + if (!currentUri.attributes) { + currentUri.attributes = {}; + } -/***/ }), + (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(currentUri.attributes, entry.attributes); + }, -/***/ "./src/js/components/scroll-smooth.js": -/*!********************************************!*\ - !*** ./src/js/components/scroll-smooth.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + media() { + this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addSmoothScroll: () => (/* binding */ addSmoothScroll) -/* harmony export */ }); -/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/smooth-scroll/dist/smooth-scroll.js */ "./node_modules/smooth-scroll/dist/smooth-scroll.js"); -/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__); + if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) { + this.trigger('warn', { + message: 'ignoring incomplete or missing media group' + }); + return; + } // find the media group, creating defaults as necessary -const header = document.querySelector('header'); -const btnUpWrapper = document.querySelector('.btn-up-wrapper'); -const addSmoothScroll = () => { - const scroll = new (_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default())('a[href*="#"]', { - header: '.header', - speed: 500 - }); - const scrollToTop = () => { - const top = window.scrollY; - if (top >= 100) { - header.classList.add('active'); - } else { - header.classList.remove('active'); - } - if (top >= 300) { - btnUpWrapper.classList.add('active'); - } else { - btnUpWrapper.classList.remove('active'); - } - }; - scrollToTop(); - window.addEventListener('scroll', () => { - scrollToTop(); - }); -}; -/***/ }), + const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE]; + mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {}; + mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata -/***/ "./src/js/components/sliders.js": -/*!**************************************!*\ - !*** ./src/js/components/sliders.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + rendition = { + default: /yes/i.test(entry.attributes.DEFAULT) + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ initializationSliders: () => (/* binding */ initializationSliders) -/* harmony export */ }); -/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.esm.js"); + if (rendition.default) { + rendition.autoselect = true; + } else { + rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT); + } -swiper__WEBPACK_IMPORTED_MODULE_0__["default"].use([swiper__WEBPACK_IMPORTED_MODULE_0__.Navigation, swiper__WEBPACK_IMPORTED_MODULE_0__.Pagination, swiper__WEBPACK_IMPORTED_MODULE_0__.Autoplay]); -const initializationSliders = () => { - try { - const recomendationsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.recommendations__slider', { - slidesPerView: '1', - navigation: { - nextEl: '.recommendations__slider-navigation-next', - prevEl: '.recommendations__slider-navigation-prev' - }, - loop: true - }); - const goodsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.goods__slider', { - slidesPerView: 3, - loop: true, - navigation: { - nextEl: '.goods__slider-next', - prevEl: '.goods__slider-prev' - }, - pagination: { - clickable: true, - el: '.goods__slider-pagination', - clickable: true - }, - breakpoints: { - 940: { - slidesPerView: 4 - }, - 764: { - slidesPerView: 3 - }, - 600: { - slidesPerView: 2 - }, - 0: { - slidesPerView: 1 - } - } - }); - const professionalSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.professional__slider', { - navigation: { - nextEl: '.professional__slider-navigation-next', - prevEl: '.professional__slider-navigation-prev' - }, - paginationClickable: true, - // loop: true, - initialSlide: 1, - centeredSlides: true, - slidesPerView: 2, - speed: 1000, - zoom: { - maxRatio: 1.6 - }, - pagination: { - clickable: true, - el: '.professional__slider-pagination', - clickable: true - }, - breakpoints: { - 993: { - spaceBetween: -180 - }, - 860: { - spaceBetween: -260, - slidesPerView: 2 - }, - 768: { - spaceBetween: -200 - }, - 500: { - spaceBetween: -80 - }, - 320: { - slidesPerView: 1.6, - spaceBetween: -80 - } - }, - allowTouchMove: false - }); - const interviewSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.interview__slider', { - navigation: { - nextEl: '.interview__slider-navigation-next', - prevEl: '.interview__slider-navigation-prev' - }, - pagination: { - el: '.interview__slider-pagination', - clickable: true - }, - allowTouchMove: false, - paginationClickable: true, - centeredSlides: true, - loop: true, - speed: 1000 - }); - const partnersSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.partners__wrapper', { - freeMode: true, - grabCursor: true, - centeredSlides: true, - slidesPerView: 'auto', - loop: true, - speed: 2000, - autoplay: { - enabled: true, - delay: 1, - disableOnInteraction: true - }, - freeModeMomentum: true - }); - document.querySelector('.partners__wrapper').addEventListener('mouseover', function () { - partnersSlider.autoplay.stop(); - }); - document.querySelector('.partners__wrapper').addEventListener('mouseout', function () { - partnersSlider.autoplay.start(); - }); - window.addEventListener('scroll', () => { - if (!partnersSlider.autoplay.running) { - partnersSlider.autoplay.start(); - } - }); - } catch (e) { - console.error(e); - } -}; + if (entry.attributes.LANGUAGE) { + rendition.language = entry.attributes.LANGUAGE; + } -/***/ }), + if (entry.attributes.URI) { + rendition.uri = entry.attributes.URI; + } -/***/ "./src/js/components/video-player.js": -/*!*******************************************!*\ - !*** ./src/js/components/video-player.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + if (entry.attributes['INSTREAM-ID']) { + rendition.instreamId = entry.attributes['INSTREAM-ID']; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addVideoPlayer: () => (/* binding */ addVideoPlayer) -/* harmony export */ }); -/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "./node_modules/video.js/dist/video.es.js"); + if (entry.attributes.CHARACTERISTICS) { + rendition.characteristics = entry.attributes.CHARACTERISTICS; + } -const playBtn = document.querySelector('.video__btn'); -const videoTitle = document.querySelector('.video__title'); -const videoText = document.querySelector('.video__text'); -const videoLink = document.querySelector('.video__link'); -const videoGradient = document.querySelector('.video__gradient'); -const videoIntro = document.querySelector('.video__intro'); -const videoMask = document.querySelector('.video__mask'); -const videoJsTech = document.querySelector('.vjs-tech'); -const addVideoPlayer = () => { - try { - let isPreviewVideo = true; - const videoPlayer = (0,video_js__WEBPACK_IMPORTED_MODULE_0__["default"])(document.getElementById('video__player'), { - autoplay: true, - loop: true, - muted: true, - controls: false, - playToggle: false - }); - const loadMainVideo = (desktopUrl, mobileUrl) => { - if (window.screen.width > 768) { - videoPlayer.src({ - type: 'video/mp4', - src: `./videos/${desktopUrl}` - }); - } else { - videoPlayer.src({ - type: 'video/mp4', - src: `./videos/${mobileUrl}` - }); - } - }; - loadMainVideo('preview.mp4', 'preview-mobile.mp4'); - videoPlayer.volume(0.7); - const changePlayerStatus = () => { - videoPlayer.play(); - videoPlayer.addClass('play'); - videoPlayer.muted(false); - videoPlayer.controls(true); - videoPlayer.loop(false); - playBtn.classList.add('hide'); - videoTitle.classList.add('hide'); - videoText.classList.add('hide'); - videoLink.classList.add('hide'); - }; - videoPlayer.on('play', () => { - if (!videoPlayer.played()) { - videoPlayer.addClass('play'); - videoPlayer.removeClass('play'); - playBtn?.classList.add('hide'); - } else if (videoPlayer.played() && videoPlayer.loop()) { - videoPlayer.removeClass('play'); - } else if (videoPlayer.played() && !videoPlayer.loop()) { - videoPlayer.removeClass('play'); - playBtn?.classList.add('hide'); - } - }); - videoPlayer.on('pause', () => { - playBtn?.classList.remove('hide'); - }); - videoPlayer.on('ended', () => { - playBtn?.classList.remove('hide'); - videoMask?.classList.remove('visible'); - }); - videoMask.addEventListener('click', () => { - playBtn?.classList.remove('hide'); - videoPlayer.pause(); - videoMask?.classList.remove('visible'); - }); - playBtn.addEventListener('click', () => { - if (isPreviewVideo === true) { - loadMainVideo('video.mp4', 'video-mobile.mp4'); - isPreviewVideo = false; - } - document.querySelector('.video__inner').classList.add('active'); - document.querySelector('.video-js').classList.add('active'); - document.querySelector('.vjs-poster').classList.add('active'); - videoPlayer.fluid(true); - videoGradient?.classList.add('hide'); - videoMask?.classList.add('visible'); - playBtn?.classList.add('center-position'); - document.querySelector('video').style.objectFit = 'contain'; - if (videoPlayer.muted()) { - videoPlayer.currentTime(0); - changePlayerStatus(); - } else { - changePlayerStatus(); - } - }); - } catch (e) { - console.log(e); - } -}; + if (entry.attributes.FORCED) { + rendition.forced = /yes/i.test(entry.attributes.FORCED); + } // insert the new rendition -/***/ }), -/***/ "./node_modules/global/document.js": -/*!*****************************************!*\ - !*** ./node_modules/global/document.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + mediaGroup[entry.attributes.NAME] = rendition; + }, -var topLevel = typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : - typeof window !== 'undefined' ? window : {} -var minDoc = __webpack_require__(/*! min-document */ "?34aa"); + discontinuity() { + currentTimeline += 1; + currentUri.discontinuity = true; + this.manifest.discontinuityStarts.push(uris.length); + }, -var doccy; + 'program-date-time'() { + if (typeof this.manifest.dateTimeString === 'undefined') { + // PROGRAM-DATE-TIME is a media-segment tag, but for backwards + // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag + // to the manifest object + // TODO: Consider removing this in future major version + this.manifest.dateTimeString = entry.dateTimeString; + this.manifest.dateTimeObject = entry.dateTimeObject; + } -if (typeof document !== 'undefined') { - doccy = document; -} else { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + currentUri.dateTimeString = entry.dateTimeString; + currentUri.dateTimeObject = entry.dateTimeObject; + }, - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } -} + targetduration() { + if (!isFinite(entry.duration) || entry.duration < 0) { + this.trigger('warn', { + message: 'ignoring invalid target duration: ' + entry.duration + }); + return; + } -module.exports = doccy; + this.manifest.targetDuration = entry.duration; + setHoldBack.call(this, this.manifest); + }, + start() { + if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) { + this.trigger('warn', { + message: 'ignoring start declaration without appropriate attribute list' + }); + return; + } -/***/ }), + this.manifest.start = { + timeOffset: entry.attributes['TIME-OFFSET'], + precise: entry.attributes.PRECISE + }; + }, -/***/ "./node_modules/global/window.js": -/*!***************************************!*\ - !*** ./node_modules/global/window.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + 'cue-out'() { + currentUri.cueOut = entry.data; + }, -var win; + 'cue-out-cont'() { + currentUri.cueOutCont = entry.data; + }, -if (typeof window !== "undefined") { - win = window; -} else if (typeof __webpack_require__.g !== "undefined") { - win = __webpack_require__.g; -} else if (typeof self !== "undefined"){ - win = self; -} else { - win = {}; -} + 'cue-in'() { + currentUri.cueIn = entry.data; + }, -module.exports = win; + 'skip'() { + this.manifest.skip = camelCaseKeys(entry.attributes); + this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']); + }, + 'part'() { + hasParts = true; // parts are always specifed before a segment -/***/ }), + const segmentIndex = this.manifest.segments.length; + const part = camelCaseKeys(entry.attributes); + currentUri.parts = currentUri.parts || []; + currentUri.parts.push(part); -/***/ "./node_modules/is-function/index.js": -/*!*******************************************!*\ - !*** ./node_modules/is-function/index.js ***! - \*******************************************/ -/***/ ((module) => { + if (part.byterange) { + if (!part.byterange.hasOwnProperty('offset')) { + part.byterange.offset = lastPartByterangeEnd; + } -module.exports = isFunction + lastPartByterangeEnd = part.byterange.offset + part.byterange.length; + } -var toString = Object.prototype.toString + const partIndex = currentUri.parts.length - 1; + this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']); -function isFunction (fn) { - if (!fn) { - return false - } - var string = toString.call(fn) - return string === '[object Function]' || - (typeof fn === 'function' && string !== '[object RegExp]') || - (typeof window !== 'undefined' && - // IE8 and below - (fn === window.setTimeout || - fn === window.alert || - fn === window.confirm || - fn === window.prompt)) -}; + if (this.manifest.renditionReports) { + this.manifest.renditionReports.forEach((r, i) => { + if (!r.hasOwnProperty('lastPart')) { + this.trigger('warn', { + message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART` + }); + } + }); + } + }, + 'server-control'() { + const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes); -/***/ }), + if (!attrs.hasOwnProperty('canBlockReload')) { + attrs.canBlockReload = false; + this.trigger('info', { + message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false' + }); + } -/***/ "./node_modules/keycode/index.js": -/*!***************************************!*\ - !*** ./node_modules/keycode/index.js ***! - \***************************************/ -/***/ ((module, exports) => { + setHoldBack.call(this, this.manifest); -// Source: http://jsfiddle.net/vWx8V/ -// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) { + this.trigger('warn', { + message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set' + }); + } + }, -/** - * Conenience method returns corresponding value for given keyName or keyCode. - * - * @param {Mixed} keyCode {Number} or keyName {String} - * @return {Mixed} - * @api public - */ + 'preload-hint'() { + // parts are always specifed before a segment + const segmentIndex = this.manifest.segments.length; + const hint = camelCaseKeys(entry.attributes); + const isPart = hint.type && hint.type === 'PART'; + currentUri.preloadHints = currentUri.preloadHints || []; + currentUri.preloadHints.push(hint); -function keyCode(searchInput) { - // Keyboard Events - if (searchInput && 'object' === typeof searchInput) { - var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode - if (hasKeyCode) searchInput = hasKeyCode - } + if (hint.byterange) { + if (!hint.byterange.hasOwnProperty('offset')) { + // use last part byterange end or zero if not a part. + hint.byterange.offset = isPart ? lastPartByterangeEnd : 0; - // Numbers - if ('number' === typeof searchInput) return names[searchInput] + if (isPart) { + lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length; + } + } + } - // Everything else (cast to string) - var search = String(searchInput) + const index = currentUri.preloadHints.length - 1; + this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']); - // check codes - var foundNamedKey = codes[search.toLowerCase()] - if (foundNamedKey) return foundNamedKey + if (!hint.type) { + return; + } // search through all preload hints except for the current one for + // a duplicate type. - // check aliases - var foundNamedKey = aliases[search.toLowerCase()] - if (foundNamedKey) return foundNamedKey - // weird character? - if (search.length === 1) return search.charCodeAt(0) + for (let i = 0; i < currentUri.preloadHints.length - 1; i++) { + const otherHint = currentUri.preloadHints[i]; - return undefined -} + if (!otherHint.type) { + continue; + } -/** - * Compares a keyboard event with a given keyCode or keyName. - * - * @param {Event} event Keyboard event that should be tested - * @param {Mixed} keyCode {Number} or keyName {String} - * @return {Boolean} - * @api public - */ -keyCode.isEventKey = function isEventKey(event, nameOrCode) { - if (event && 'object' === typeof event) { - var keyCode = event.which || event.keyCode || event.charCode - if (keyCode === null || keyCode === undefined) { return false; } - if (typeof nameOrCode === 'string') { - // check codes - var foundNamedKey = codes[nameOrCode.toLowerCase()] - if (foundNamedKey) { return foundNamedKey === keyCode; } - - // check aliases - var foundNamedKey = aliases[nameOrCode.toLowerCase()] - if (foundNamedKey) { return foundNamedKey === keyCode; } - } else if (typeof nameOrCode === 'number') { - return nameOrCode === keyCode; - } - return false; - } -} + if (otherHint.type === hint.type) { + this.trigger('warn', { + message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}` + }); + } + } + }, -exports = module.exports = keyCode; + 'rendition-report'() { + const report = camelCaseKeys(entry.attributes); + this.manifest.renditionReports = this.manifest.renditionReports || []; + this.manifest.renditionReports.push(report); + const index = this.manifest.renditionReports.length - 1; + const required = ['LAST-MSN', 'URI']; -/** - * Get by name - * - * exports.code['enter'] // => 13 - */ + if (hasParts) { + required.push('LAST-PART'); + } -var codes = exports.code = exports.codes = { - 'backspace': 8, - 'tab': 9, - 'enter': 13, - 'shift': 16, - 'ctrl': 17, - 'alt': 18, - 'pause/break': 19, - 'caps lock': 20, - 'esc': 27, - 'space': 32, - 'page up': 33, - 'page down': 34, - 'end': 35, - 'home': 36, - 'left': 37, - 'up': 38, - 'right': 39, - 'down': 40, - 'insert': 45, - 'delete': 46, - 'command': 91, - 'left command': 91, - 'right command': 93, - 'numpad *': 106, - 'numpad +': 107, - 'numpad -': 109, - 'numpad .': 110, - 'numpad /': 111, - 'num lock': 144, - 'scroll lock': 145, - 'my computer': 182, - 'my calculator': 183, - ';': 186, - '=': 187, - ',': 188, - '-': 189, - '.': 190, - '/': 191, - '`': 192, - '[': 219, - '\\': 220, - ']': 221, - "'": 222 -} + this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required); + }, -// Helper aliases + 'part-inf'() { + this.manifest.partInf = camelCaseKeys(entry.attributes); + this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']); -var aliases = exports.aliases = { - 'windows': 91, - '⇧': 16, - '⌥': 18, - '⌃': 17, - '⌘': 91, - 'ctl': 17, - 'control': 17, - 'option': 18, - 'pause': 19, - 'break': 19, - 'caps': 20, - 'return': 13, - 'escape': 27, - 'spc': 32, - 'spacebar': 32, - 'pgup': 33, - 'pgdn': 34, - 'ins': 45, - 'del': 46, - 'cmd': 91 -} + if (this.manifest.partInf.partTarget) { + this.manifest.partTargetDuration = this.manifest.partInf.partTarget; + } -/*! - * Programatically add the following - */ + setHoldBack.call(this, this.manifest); + }, -// lower case chars -for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 + 'daterange'() { + this.manifest.daterange = this.manifest.daterange || []; + this.manifest.daterange.push(camelCaseKeys(entry.attributes)); + const index = this.manifest.daterange.length - 1; + this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']); + const daterange = this.manifest.daterange[index]; -// numbers -for (var i = 48; i < 58; i++) codes[i - 48] = i + if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE' + }); + } -// function keys -for (i = 1; i < 13; i++) codes['f'+i] = i + 111 + if (daterange.duration && daterange.duration < 0) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE DURATION must not be negative' + }); + } -// numpad keys -for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 + if (daterange.plannedDuration && daterange.plannedDuration < 0) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative' + }); + } -/** - * Get by code - * - * exports.name[13] // => 'Enter' - */ + const endOnNextYes = !!daterange.endOnNext; -var names = exports.names = exports.title = {} // title for backward compat + if (endOnNextYes && !daterange.class) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute' + }); + } -// Create reverse mapping -for (i in codes) names[codes[i]] = i + if (endOnNextYes && (daterange.duration || daterange.endDate)) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes' + }); + } -// Add aliases -for (var alias in aliases) { - codes[alias] = aliases[alias] -} + if (daterange.duration && daterange.endDate) { + const startDate = daterange.startDate; + const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration); + this.manifest.daterange[index].endDate = new Date(newDateInSeconds); + } + if (daterange && !this.manifest.dateTimeString) { + this.trigger('warn', { + message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag' + }); + } -/***/ }), + if (!daterangeTags[daterange.id]) { + daterangeTags[daterange.id] = daterange; + } else { + for (const attribute in daterangeTags[daterange.id]) { + if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) { + this.trigger('warn', { + message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values' + }); + break; + } + } + } + }, -/***/ "./node_modules/m3u8-parser/dist/m3u8-parser.es.js": -/*!*********************************************************!*\ - !*** ./node_modules/m3u8-parser/dist/m3u8-parser.es.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'independent-segments'() { + this.manifest.independentSegments = true; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ LineStream: () => (/* binding */ LineStream), -/* harmony export */ ParseStream: () => (/* binding */ ParseStream), -/* harmony export */ Parser: () => (/* binding */ Parser) -/* harmony export */ }); -/* harmony import */ var _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/stream.js */ "./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/stream.js"); -/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); -/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array.js */ "./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); -/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */ + })[entry.tagType] || noop).call(self); + }, + uri() { + currentUri.uri = entry.uri; + uris.push(currentUri); // if no explicit duration was declared, use the target duration + if (this.manifest.targetDuration && !('duration' in currentUri)) { + this.trigger('warn', { + message: 'defaulting segment duration to the target duration' + }); + currentUri.duration = this.manifest.targetDuration; + } // annotate with encryption information, if necessary -/** - * @file m3u8/line-stream.js - */ -/** - * A stream that buffers string input and generates a `data` event for each - * line. - * - * @class LineStream - * @extends Stream - */ + if (key) { + currentUri.key = key; + } -class LineStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.buffer = ''; - } - /** - * Add new data to be parsed. - * - * @param {string} data the text to process - */ + currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary + if (currentMap) { + currentUri.map = currentMap; + } // reset the last byterange end as it needs to be 0 between parts - push(data) { - let nextNewline; - this.buffer += data; - nextNewline = this.buffer.indexOf('\n'); - for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\n')) { - this.trigger('data', this.buffer.substring(0, nextNewline)); - this.buffer = this.buffer.substring(nextNewline + 1); - } - } + lastPartByterangeEnd = 0; // prepare for the next URI -} + currentUri = {}; + }, -const TAB = String.fromCharCode(0x09); + comment() {// comments are not important for playback + }, -const parseByterange = function (byterangeString) { - // optionally match and capture 0+ digits before `@` - // optionally match and capture 0+ digits after `@` - const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || ''); - const result = {}; + custom() { + // if this is segment-level data attach the output to the segment + if (entry.segment) { + currentUri.custom = currentUri.custom || {}; + currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object + } else { + this.manifest.custom = this.manifest.custom || {}; + this.manifest.custom[entry.customType] = entry.data; + } + } - if (match[1]) { - result.length = parseInt(match[1], 10); - } - - if (match[2]) { - result.offset = parseInt(match[2], 10); + })[entry.type].call(self); + }); } - return result; -}; -/** - * "forgiving" attribute list psuedo-grammar: - * attributes -> keyvalue (',' keyvalue)* - * keyvalue -> key '=' value - * key -> [^=]* - * value -> '"' [^"]* '"' | [^,]* - */ - - -const attributeSeparator = function () { - const key = '[^=]*'; - const value = '"[^"]*"|[^,]*'; - const keyvalue = '(?:' + key + ')=(?:' + value + ')'; - return new RegExp('(?:^|,)(' + keyvalue + ')'); -}; -/** - * Parse attributes from a line given the separator - * - * @param {string} attributes the attribute line to parse - */ - - -const parseAttributes = function (attributes) { - const result = {}; - - if (!attributes) { - return result; - } // split the string using attributes as the separator - - - const attrs = attributes.split(attributeSeparator()); - let i = attrs.length; - let attr; - - while (i--) { - // filter out unmatched portions of the string - if (attrs[i] === '') { - continue; - } // split the key and value + warnOnMissingAttributes_(identifier, attributes, required) { + const missing = []; + required.forEach(function (key) { + if (!attributes.hasOwnProperty(key)) { + missing.push(key); + } + }); + if (missing.length) { + this.trigger('warn', { + message: `${identifier} lacks required attribute(s): ${missing.join(', ')}` + }); + } + } + /** + * Parse the input string and update the manifest object. + * + * @param {string} chunk a potentially incomplete portion of the manifest + */ - attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value - attr[0] = attr[0].replace(/^\s+|\s+$/g, ''); - attr[1] = attr[1].replace(/^\s+|\s+$/g, ''); - attr[1] = attr[1].replace(/^['"](.*)['"]$/g, '$1'); - result[attr[0]] = attr[1]; + push(chunk) { + this.lineStream.push(chunk); } - - return result; -}; -/** - * A line-level M3U8 parser event stream. It expects to receive input one - * line at a time and performs a context-free parse of its contents. A stream - * interpretation of a manifest can be useful if the manifest is expected to - * be too large to fit comfortably into memory or the entirety of the input - * is not immediately available. Otherwise, it's probably much easier to work - * with a regular `Parser` object. - * - * Produces `data` events with an object that captures the parser's - * interpretation of the input. That object has a property `tag` that is one - * of `uri`, `comment`, or `tag`. URIs only have a single additional - * property, `line`, which captures the entirety of the input without - * interpretation. Comments similarly have a single additional property - * `text` which is the input without the leading `#`. - * - * Tags always have a property `tagType` which is the lower-cased version of - * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance, - * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized - * tags are given the tag type `unknown` and a single additional property - * `data` with the remainder of the input. - * - * @class ParseStream - * @extends Stream - */ + /** + * Flush any remaining input. This can be handy if the last line of an M3U8 + * manifest did not contain a trailing newline but the file has been + * completely received. + */ -class ParseStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.customParsers = []; - this.tagMappers = []; + end() { + // flush any buffered input + this.lineStream.push('\n'); + this.trigger('end'); } /** - * Parses an additional line of input. + * Add an additional parser for non-standard tags * - * @param {string} line a single line of an M3U8 file to parse + * @param {Object} options a map of options for the added parser + * @param {RegExp} options.expression a regular expression to match the custom header + * @param {string} options.type the type to register to the output + * @param {Function} [options.dataParser] function to parse the line into an object + * @param {boolean} [options.segment] should tag data be attached to the segment object */ - push(line) { - let match; - let event; // strip whitespace - - line = line.trim(); + addParser(options) { + this.parseStream.addParser(options); + } + /** + * Add a custom header mapper + * + * @param {Object} options + * @param {RegExp} options.expression a regular expression to match the custom header + * @param {Function} options.map function to translate tag into a different tag + */ - if (line.length === 0) { - // ignore empty lines - return; - } // URIs + addTagMapper(options) { + this.parseStream.addTagMapper(options); + } - if (line[0] !== '#') { - this.trigger('data', { - type: 'uri', - uri: line - }); - return; - } // map tags +} - const newLines = this.tagMappers.reduce((acc, mapper) => { - const mappedLine = mapper(line); // skip if unchanged - if (mappedLine === line) { - return acc; - } - return acc.concat([mappedLine]); - }, [line]); - newLines.forEach(newLine => { - for (let i = 0; i < this.customParsers.length; i++) { - if (this.customParsers[i].call(this, newLine)) { - return; - } - } // Comments +/***/ }), +/***/ "./node_modules/mpd-parser/dist/mpd-parser.es.js": +/*!*******************************************************!*\ + !*** ./node_modules/mpd-parser/dist/mpd-parser.es.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (newLine.indexOf('#EXT') !== 0) { - this.trigger('data', { - type: 'comment', - text: newLine.slice(1) - }); - return; - } // strip off any carriage returns here so the regex matching - // doesn't have to account for them. +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VERSION: () => (/* binding */ VERSION), +/* harmony export */ addSidxSegmentsToPlaylist: () => (/* binding */ addSidxSegmentsToPlaylist$1), +/* harmony export */ generateSidxKey: () => (/* binding */ generateSidxKey), +/* harmony export */ inheritAttributes: () => (/* binding */ inheritAttributes), +/* harmony export */ parse: () => (/* binding */ parse), +/* harmony export */ parseUTCTiming: () => (/* binding */ parseUTCTiming), +/* harmony export */ stringToMpdXml: () => (/* binding */ stringToMpdXml), +/* harmony export */ toM3u8: () => (/* binding */ toM3u8), +/* harmony export */ toPlaylists: () => (/* binding */ toPlaylists) +/* harmony export */ }); +/* harmony import */ var _videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url */ "./node_modules/@videojs/vhs-utils/es/resolve-url.js"); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-groups */ "./node_modules/@videojs/vhs-utils/es/media-groups.js"); +/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array */ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); +/* harmony import */ var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @xmldom/xmldom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js"); +/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */ - newLine = newLine.replace('\r', ''); // Tags - match = /^#EXTM3U/.exec(newLine); - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'm3u' - }); - return; - } - match = /^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(newLine); - if (match) { - event = { - type: 'tag', - tagType: 'inf' - }; +var version = "1.2.2"; - if (match[1]) { - event.duration = parseFloat(match[1]); - } +const isObject = obj => { + return !!obj && typeof obj === 'object'; +}; - if (match[2]) { - event.title = match[2]; - } +const merge = (...objects) => { + return objects.reduce((result, source) => { + if (typeof source !== 'object') { + return result; + } - this.trigger('data', event); - return; + Object.keys(source).forEach(key => { + if (Array.isArray(result[key]) && Array.isArray(source[key])) { + result[key] = result[key].concat(source[key]); + } else if (isObject(result[key]) && isObject(source[key])) { + result[key] = merge(result[key], source[key]); + } else { + result[key] = source[key]; } + }); + return result; + }, {}); +}; +const values = o => Object.keys(o).map(k => o[k]); - match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'targetduration' - }; +const range = (start, end) => { + const result = []; - if (match[1]) { - event.duration = parseInt(match[1], 10); - } + for (let i = start; i < end; i++) { + result.push(i); + } - this.trigger('data', event); - return; - } + return result; +}; +const flatten = lists => lists.reduce((x, y) => x.concat(y), []); +const from = list => { + if (!list.length) { + return []; + } - match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine); + const result = []; - if (match) { - event = { - type: 'tag', - tagType: 'version' - }; + for (let i = 0; i < list.length; i++) { + result.push(list[i]); + } - if (match[1]) { - event.version = parseInt(match[1], 10); - } + return result; +}; +const findIndexes = (l, key) => l.reduce((a, e, i) => { + if (e[key]) { + a.push(i); + } - this.trigger('data', event); - return; - } + return a; +}, []); +/** + * Returns a union of the included lists provided each element can be identified by a key. + * + * @param {Array} list - list of lists to get the union of + * @param {Function} keyFunction - the function to use as a key for each element + * + * @return {Array} the union of the arrays + */ - match = /^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); +const union = (lists, keyFunction) => { + return values(lists.reduce((acc, list) => { + list.forEach(el => { + acc[keyFunction(el)] = el; + }); + return acc; + }, {})); +}; - if (match) { - event = { - type: 'tag', - tagType: 'media-sequence' - }; +var errors = { + INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD', + INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING', + DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST', + DASH_INVALID_XML: 'DASH_INVALID_XML', + NO_BASE_URL: 'NO_BASE_URL', + MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION', + SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED', + UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME' +}; - if (match[1]) { - event.number = parseInt(match[1], 10); - } +/** + * @typedef {Object} SingleUri + * @property {string} uri - relative location of segment + * @property {string} resolvedUri - resolved location of segment + * @property {Object} byterange - Object containing information on how to make byte range + * requests following byte-range-spec per RFC2616. + * @property {String} byterange.length - length of range request + * @property {String} byterange.offset - byte offset of range request + * + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 + */ - this.trigger('data', event); - return; - } +/** + * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object + * that conforms to how m3u8-parser is structured + * + * @see https://github.com/videojs/m3u8-parser + * + * @param {string} baseUrl - baseUrl provided by nodes + * @param {string} source - source url for segment + * @param {string} range - optional range used for range calls, + * follows RFC 2616, Clause 14.35.1 + * @return {SingleUri} full segment information transformed into a format similar + * to m3u8-parser + */ - match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); +const urlTypeToSegment = ({ + baseUrl = '', + source = '', + range = '', + indexRange = '' +}) => { + const segment = { + uri: source, + resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(baseUrl || '', source) + }; - if (match) { - event = { - type: 'tag', - tagType: 'discontinuity-sequence' - }; + if (range || indexRange) { + const rangeStr = range ? range : indexRange; + const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible - if (match[1]) { - event.number = parseInt(match[1], 10); - } + let startRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[0]) : parseInt(ranges[0], 10); + let endRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER - this.trigger('data', event); - return; - } + if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') { + startRange = Number(startRange); + } - match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine); + if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') { + endRange = Number(endRange); + } - if (match) { - event = { - type: 'tag', - tagType: 'playlist-type' - }; + let length; - if (match[1]) { - event.playlistType = match[1]; - } + if (typeof endRange === 'bigint' || typeof startRange === 'bigint') { + length = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(endRange) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(startRange) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); + } else { + length = endRange - startRange + 1; + } - this.trigger('data', event); - return; - } + if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) { + length = Number(length); + } // byterange should be inclusive according to + // RFC 2616, Clause 14.35.1 - match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine); - if (match) { - event = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(parseByterange(match[1]), { - type: 'tag', - tagType: 'byterange' - }); - this.trigger('data', event); - return; - } + segment.byterange = { + length, + offset: startRange + }; + } - match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine); + return segment; +}; +const byteRangeToString = byterange => { + // `endRange` is one less than `offset + length` because the HTTP range + // header uses inclusive ranges + let endRange; - if (match) { - event = { - type: 'tag', - tagType: 'allow-cache' - }; + if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') { + endRange = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.offset) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.length) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); + } else { + endRange = byterange.offset + byterange.length - 1; + } - if (match[1]) { - event.allowed = !/NO/.test(match[1]); - } + return `${byterange.offset}-${endRange}`; +}; - this.trigger('data', event); - return; - } +/** + * parse the end number attribue that can be a string + * number, or undefined. + * + * @param {string|number|undefined} endNumber + * The end number attribute. + * + * @return {number|null} + * The result of parsing the end number. + */ - match = /^#EXT-X-MAP:(.*)$/.exec(newLine); +const parseEndNumber = endNumber => { + if (endNumber && typeof endNumber !== 'number') { + endNumber = parseInt(endNumber, 10); + } - if (match) { - event = { - type: 'tag', - tagType: 'map' - }; + if (isNaN(endNumber)) { + return null; + } - if (match[1]) { - const attributes = parseAttributes(match[1]); + return endNumber; +}; +/** + * Functions for calculating the range of available segments in static and dynamic + * manifests. + */ - if (attributes.URI) { - event.uri = attributes.URI; - } - if (attributes.BYTERANGE) { - event.byterange = parseByterange(attributes.BYTERANGE); - } - } +const segmentRange = { + /** + * Returns the entire range of available segments for a static MPD + * + * @param {Object} attributes + * Inheritied MPD attributes + * @return {{ start: number, end: number }} + * The start and end numbers for available segments + */ + static(attributes) { + const { + duration, + timescale = 1, + sourceDuration, + periodDuration + } = attributes; + const endNumber = parseEndNumber(attributes.endNumber); + const segmentDuration = duration / timescale; - this.trigger('data', event); - return; - } + if (typeof endNumber === 'number') { + return { + start: 0, + end: endNumber + }; + } - match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine); + if (typeof periodDuration === 'number') { + return { + start: 0, + end: periodDuration / segmentDuration + }; + } - if (match) { - event = { - type: 'tag', - tagType: 'stream-inf' - }; + return { + start: 0, + end: sourceDuration / segmentDuration + }; + }, - if (match[1]) { - event.attributes = parseAttributes(match[1]); + /** + * Returns the current live window range of available segments for a dynamic MPD + * + * @param {Object} attributes + * Inheritied MPD attributes + * @return {{ start: number, end: number }} + * The start and end numbers for available segments + */ + dynamic(attributes) { + const { + NOW, + clientOffset, + availabilityStartTime, + timescale = 1, + duration, + periodStart = 0, + minimumUpdatePeriod = 0, + timeShiftBufferDepth = Infinity + } = attributes; + const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated + // after retrieving UTC server time. - if (event.attributes.RESOLUTION) { - const split = event.attributes.RESOLUTION.split('x'); - const resolution = {}; + const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock. + // Convert the period start time to EPOCH. - if (split[0]) { - resolution.width = parseInt(split[0], 10); - } + const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update. - if (split[1]) { - resolution.height = parseInt(split[1], 10); - } + const periodEndWC = now + minimumUpdatePeriod; + const periodDuration = periodEndWC - periodStartWC; + const segmentCount = Math.ceil(periodDuration * timescale / duration); + const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration); + const availableEnd = Math.floor((now - periodStartWC) * timescale / duration); + return { + start: Math.max(0, availableStart), + end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd) + }; + } - event.attributes.RESOLUTION = resolution; - } +}; +/** + * Maps a range of numbers to objects with information needed to build the corresponding + * segment list + * + * @name toSegmentsCallback + * @function + * @param {number} number + * Number of the segment + * @param {number} index + * Index of the number in the range list + * @return {{ number: Number, duration: Number, timeline: Number, time: Number }} + * Object with segment timing and duration info + */ - if (event.attributes.BANDWIDTH) { - event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10); - } +/** + * Returns a callback for Array.prototype.map for mapping a range of numbers to + * information needed to build the segment list. + * + * @param {Object} attributes + * Inherited MPD attributes + * @return {toSegmentsCallback} + * Callback map function + */ - if (event.attributes['FRAME-RATE']) { - event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']); - } +const toSegments = attributes => number => { + const { + duration, + timescale = 1, + periodStart, + startNumber = 1 + } = attributes; + return { + number: startNumber + number, + duration: duration / timescale, + timeline: periodStart, + time: number * duration + }; +}; +/** + * Returns a list of objects containing segment timing and duration info used for + * building the list of segments. This uses the @duration attribute specified + * in the MPD manifest to derive the range of segments. + * + * @param {Object} attributes + * Inherited MPD attributes + * @return {{number: number, duration: number, time: number, timeline: number}[]} + * List of Objects with segment timing and duration info + */ - if (event.attributes['PROGRAM-ID']) { - event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10); - } - } +const parseByDuration = attributes => { + const { + type, + duration, + timescale = 1, + periodDuration, + sourceDuration + } = attributes; + const { + start, + end + } = segmentRange[type](attributes); + const segments = range(start, end).map(toSegments(attributes)); - this.trigger('data', event); - return; - } + if (type === 'static') { + const index = segments.length - 1; // section is either a period or the full source - match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine); + const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration - if (match) { - event = { - type: 'tag', - tagType: 'media' - }; + segments[index].duration = sectionDuration - duration / timescale * index; + } - if (match[1]) { - event.attributes = parseAttributes(match[1]); - } + return segments; +}; - this.trigger('data', event); - return; - } +/** + * Translates SegmentBase into a set of segments. + * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each + * node should be translated into segment. + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @return {Object.} list of segments + */ - match = /^#EXT-X-ENDLIST/.exec(newLine); +const segmentsFromBase = attributes => { + const { + baseUrl, + initialization = {}, + sourceDuration, + indexRange = '', + periodStart, + presentationTime, + number = 0, + duration + } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1) - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'endlist' - }); - return; - } + if (!baseUrl) { + throw new Error(errors.NO_BASE_URL); + } - match = /^#EXT-X-DISCONTINUITY/.exec(newLine); + const initSegment = urlTypeToSegment({ + baseUrl, + source: initialization.sourceURL, + range: initialization.range + }); + const segment = urlTypeToSegment({ + baseUrl, + source: baseUrl, + indexRange + }); + segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source + // (since SegmentBase is only for one total segment) - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'discontinuity' - }); - return; - } + if (duration) { + const segmentTimeInfo = parseByDuration(attributes); - match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine); + if (segmentTimeInfo.length) { + segment.duration = segmentTimeInfo[0].duration; + segment.timeline = segmentTimeInfo[0].timeline; + } + } else if (sourceDuration) { + segment.duration = sourceDuration; + segment.timeline = periodStart; + } // If presentation time is provided, these segments are being generated by SIDX + // references, and should use the time provided. For the general case of SegmentBase, + // there should only be one segment in the period, so its presentation time is the same + // as its period start. - if (match) { - event = { - type: 'tag', - tagType: 'program-date-time' - }; - if (match[1]) { - event.dateTimeString = match[1]; - event.dateTimeObject = new Date(match[1]); - } + segment.presentationTime = presentationTime || periodStart; + segment.number = number; + return [segment]; +}; +/** + * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist + * according to the sidx information given. + * + * playlist.sidx has metadadata about the sidx where-as the sidx param + * is the parsed sidx box itself. + * + * @param {Object} playlist the playlist to update the sidx information for + * @param {Object} sidx the parsed sidx box + * @return {Object} the playlist object with the updated sidx information + */ - this.trigger('data', event); - return; - } +const addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => { + // Retain init segment information + const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing - match = /^#EXT-X-KEY:(.*)$/.exec(newLine); + const sourceDuration = playlist.sidx.duration; // Retain source timeline - if (match) { - event = { - type: 'tag', - tagType: 'key' - }; + const timeline = playlist.timeline || 0; + const sidxByteRange = playlist.sidx.byterange; + const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx - if (match[1]) { - event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array + const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes - if (event.attributes.IV) { - if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') { - event.attributes.IV = event.attributes.IV.substring(2); - } + const mediaReferences = sidx.references.filter(r => r.referenceType !== 1); + const segments = []; + const type = playlist.endList ? 'static' : 'dynamic'; + const periodStart = playlist.sidx.timeline; + let presentationTime = periodStart; + let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box - event.attributes.IV = event.attributes.IV.match(/.{8}/g); - event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16); - event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16); - event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16); - event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16); - event.attributes.IV = new Uint32Array(event.attributes.IV); - } - } + let startIndex; // eslint-disable-next-line - this.trigger('data', event); - return; - } + if (typeof sidx.firstOffset === 'bigint') { + startIndex = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(sidxEnd) + sidx.firstOffset; + } else { + startIndex = sidxEnd + sidx.firstOffset; + } - match = /^#EXT-X-START:(.*)$/.exec(newLine); + for (let i = 0; i < mediaReferences.length; i++) { + const reference = sidx.references[i]; // size of the referenced (sub)segment - if (match) { - event = { - type: 'tag', - tagType: 'start' - }; + const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale + // this will be converted to seconds when generating segments - if (match[1]) { - event.attributes = parseAttributes(match[1]); - event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']); - event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE); - } + const duration = reference.subsegmentDuration; // should be an inclusive range - this.trigger('data', event); - return; - } + let endIndex; // eslint-disable-next-line - match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine); + if (typeof startIndex === 'bigint') { + endIndex = startIndex + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); + } else { + endIndex = startIndex + size - 1; + } - if (match) { - event = { - type: 'tag', - tagType: 'cue-out-cont' - }; + const indexRange = `${startIndex}-${endIndex}`; + const attributes = { + baseUrl, + timescale, + timeline, + periodStart, + presentationTime, + number, + duration, + sourceDuration, + indexRange, + type + }; + const segment = segmentsFromBase(attributes)[0]; - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } + if (initSegment) { + segment.map = initSegment; + } - this.trigger('data', event); - return; - } + segments.push(segment); - match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine); + if (typeof startIndex === 'bigint') { + startIndex += global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size); + } else { + startIndex += size; + } - if (match) { - event = { - type: 'tag', - tagType: 'cue-out' - }; + presentationTime += duration / timescale; + number++; + } - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } + playlist.segments = segments; + return playlist; +}; - this.trigger('data', event); - return; - } +const SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen) - match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine); +const TIME_FUDGE = 1 / 60; +/** + * Given a list of timelineStarts, combines, dedupes, and sorts them. + * + * @param {TimelineStart[]} timelineStarts - list of timeline starts + * + * @return {TimelineStart[]} the combined and deduped timeline starts + */ - if (match) { - event = { - type: 'tag', - tagType: 'cue-in' - }; +const getUniqueTimelineStarts = timelineStarts => { + return union(timelineStarts, ({ + timeline + }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1); +}; +/** + * Finds the playlist with the matching NAME attribute. + * + * @param {Array} playlists - playlists to search through + * @param {string} name - the NAME attribute to search for + * + * @return {Object|null} the matching playlist object, or null + */ - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } +const findPlaylistWithName = (playlists, name) => { + for (let i = 0; i < playlists.length; i++) { + if (playlists[i].attributes.NAME === name) { + return playlists[i]; + } + } - this.trigger('data', event); - return; - } + return null; +}; +/** + * Gets a flattened array of media group playlists. + * + * @param {Object} manifest - the main manifest object + * + * @return {Array} the media group playlists + */ - match = /^#EXT-X-SKIP:(.*)$/.exec(newLine); +const getMediaGroupPlaylists = manifest => { + let mediaGroupPlaylists = []; + (0,_videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__.forEachMediaGroup)(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => { + mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []); + }); + return mediaGroupPlaylists; +}; +/** + * Updates the playlist's media sequence numbers. + * + * @param {Object} config - options object + * @param {Object} config.playlist - the playlist to update + * @param {number} config.mediaSequence - the mediaSequence number to start with + */ - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'skip' - }; - event.attributes = parseAttributes(match[1]); +const updateMediaSequenceForPlaylist = ({ + playlist, + mediaSequence +}) => { + playlist.mediaSequence = mediaSequence; + playlist.segments.forEach((segment, index) => { + segment.number = playlist.mediaSequence + index; + }); +}; +/** + * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists + * and a complete list of timeline starts. + * + * If no matching playlist is found, only the discontinuity sequence number of the playlist + * will be updated. + * + * Since early available timelines are not supported, at least one segment must be present. + * + * @param {Object} config - options object + * @param {Object[]} oldPlaylists - the old playlists to use as a reference + * @param {Object[]} newPlaylists - the new playlists to update + * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point + */ - if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) { - event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10); - } +const updateSequenceNumbers = ({ + oldPlaylists, + newPlaylists, + timelineStarts +}) => { + newPlaylists.forEach(playlist => { + playlist.discontinuitySequence = timelineStarts.findIndex(function ({ + timeline + }) { + return timeline === playlist.timeline; + }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory + // (see ISO_23009-1-2012 5.3.5.2). + // + // If the same Representation existed in a prior Period, it will retain the same NAME. - if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) { - event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB); - } + const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME); - this.trigger('data', event); - return; - } + if (!oldPlaylist) { + // Since this is a new playlist, the media sequence values can start from 0 without + // consequence. + return; + } // TODO better support for live SIDX + // + // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD). + // This is evident by a playlist only having a single SIDX reference. In a multiperiod + // playlist there would need to be multiple SIDX references. In addition, live SIDX is + // not supported when the SIDX properties change on refreshes. + // + // In the future, if support needs to be added, the merging logic here can be called + // after SIDX references are resolved. For now, exit early to prevent exceptions being + // thrown due to undefined references. - match = /^#EXT-X-PART:(.*)$/.exec(newLine); - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'part' - }; - event.attributes = parseAttributes(match[1]); - ['DURATION'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['INDEPENDENT', 'GAP'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/.test(event.attributes[key]); - } - }); + if (playlist.sidx) { + return; + } // Since we don't yet support early available timelines, we don't need to support + // playlists with no segments. - if (event.attributes.hasOwnProperty('BYTERANGE')) { - event.attributes.byterange = parseByterange(event.attributes.BYTERANGE); - } - this.trigger('data', event); - return; - } + const firstNewSegment = playlist.segments[0]; + const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) { + return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE; + }); // No matching segment from the old playlist means the entire playlist was refreshed. + // In this case the media sequence should account for this update, and the new segments + // should be marked as discontinuous from the prior content, since the last prior + // timeline was removed. - match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine); + if (oldMatchingSegmentIndex === -1) { + updateMediaSequenceForPlaylist({ + playlist, + mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length + }); + playlist.segments[0].discontinuity = true; + playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content. + // + // If the new playlist's timeline is the same as the last seen segment's timeline, + // then a discontinuity can be added to identify that there's potentially missing + // content. If there's no missing content, the discontinuity should still be rather + // harmless. It's possible that if segment durations are accurate enough, that the + // existence of a gap can be determined using the presentation times and durations, + // but if the segment timing info is off, it may introduce more problems than simply + // adding the discontinuity. + // + // If the new playlist's timeline is different from the last seen segment's timeline, + // then a discontinuity can be added to identify that this is the first seen segment + // of a new timeline. However, the logic at the start of this function that + // determined the disconinuity sequence by timeline index is now off by one (the + // discontinuity of the newest timeline hasn't yet fallen off the manifest...since + // we added it), so the disconinuity sequence must be decremented. + // + // A period may also have a duration of zero, so the case of no segments is handled + // here even though we don't yet support early available periods. - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'server-control' - }; - event.attributes = parseAttributes(match[1]); - ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/.test(event.attributes[key]); - } - }); - this.trigger('data', event); - return; + if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) { + playlist.discontinuitySequence--; } - match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'part-inf' - }; - event.attributes = parseAttributes(match[1]); - ['PART-TARGET'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - this.trigger('data', event); - return; - } + return; + } // If the first segment matched with a prior segment on a discontinuity (it's matching + // on the first segment of a period), then the discontinuitySequence shouldn't be the + // timeline's matching one, but instead should be the one prior, and the first segment + // of the new manifest should be marked with a discontinuity. + // + // The reason for this special case is that discontinuity sequence shows how many + // discontinuities have fallen off of the playlist, and discontinuities are marked on + // the first segment of a new "timeline." Because of this, while DASH will retain that + // Period while the "timeline" exists, HLS keeps track of it via the discontinuity + // sequence, and that first segment is an indicator, but can be removed before that + // timeline is gone. - match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine); - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'preload-hint' - }; - event.attributes = parseAttributes(match[1]); - ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseInt(event.attributes[key], 10); - const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset'; - event.attributes.byterange = event.attributes.byterange || {}; - event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object. + const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex]; - delete event.attributes[key]; - } - }); - this.trigger('data', event); - return; - } + if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) { + firstNewSegment.discontinuity = true; + playlist.discontinuityStarts.unshift(0); + playlist.discontinuitySequence--; + } - match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine); + updateMediaSequenceForPlaylist({ + playlist, + mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number + }); + }); +}; +/** + * Given an old parsed manifest object and a new parsed manifest object, updates the + * sequence and timing values within the new manifest to ensure that it lines up with the + * old. + * + * @param {Array} oldManifest - the old main manifest object + * @param {Array} newManifest - the new main manifest object + * + * @return {Object} the updated new manifest object + */ - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'rendition-report' - }; - event.attributes = parseAttributes(match[1]); - ['LAST-MSN', 'LAST-PART'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseInt(event.attributes[key], 10); - } - }); - this.trigger('data', event); - return; - } +const positionManifestOnTimeline = ({ + oldManifest, + newManifest +}) => { + // Starting from v4.1.2 of the IOP, section 4.4.3.3 states: + // + // "MPD@availabilityStartTime and Period@start shall not be changed over MPD updates." + // + // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160 + // + // Because of this change, and the difficulty of supporting periods with changing start + // times, periods with changing start times are not supported. This makes the logic much + // simpler, since periods with the same start time can be considerred the same period + // across refreshes. + // + // To give an example as to the difficulty of handling periods where the start time may + // change, if a single period manifest is refreshed with another manifest with a single + // period, and both the start and end times are increased, then the only way to determine + // if it's a new period or an old one that has changed is to look through the segments of + // each playlist and determine the presentation time bounds to find a match. In addition, + // if the period start changed to exceed the old period end, then there would be no + // match, and it would not be possible to determine whether the refreshed period is a new + // one or the old one. + const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest)); + const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that + // there's a "memory leak" in that it will never stop growing, in reality, only a couple + // of properties are saved for each seen Period. Even long running live streams won't + // generate too many Periods, unless the stream is watched for decades. In the future, + // this can be optimized by mapping to discontinuity sequence numbers for each timeline, + // but it may not become an issue, and the additional info can be useful for debugging. - match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine); + newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]); + updateSequenceNumbers({ + oldPlaylists, + newPlaylists, + timelineStarts: newManifest.timelineStarts + }); + return newManifest; +}; - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'daterange' - }; - event.attributes = parseAttributes(match[1]); - ['ID', 'CLASS'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = String(event.attributes[key]); - } - }); - ['START-DATE', 'END-DATE'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = new Date(event.attributes[key]); - } - }); - ['DURATION', 'PLANNED-DURATION'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['END-ON-NEXT'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/i.test(event.attributes[key]); - } - }); - ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = event.attributes[key].toString(16); - } - }); - const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/; +const generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange); - for (const key in event.attributes) { - if (!clientAttributePattern.test(key)) { - continue; - } +const mergeDiscontiguousPlaylists = playlists => { + // Break out playlists into groups based on their baseUrl + const playlistsByBaseUrl = playlists.reduce(function (acc, cur) { + if (!acc[cur.attributes.baseUrl]) { + acc[cur.attributes.baseUrl] = []; + } - const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]); - const isDecimalFloating = /^\d+(\.\d+)?$/.test(event.attributes[key]); - event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]); - } + acc[cur.attributes.baseUrl].push(cur); + return acc; + }, {}); + let allPlaylists = []; + Object.values(playlistsByBaseUrl).forEach(playlistGroup => { + const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => { + // assuming playlist IDs are the same across periods + // TODO: handle multiperiod where representation sets are not the same + // across periods + const name = playlist.attributes.id + (playlist.attributes.lang || ''); - this.trigger('data', event); - return; - } + if (!acc[name]) { + // First Period + acc[name] = playlist; + acc[name].attributes.timelineStarts = []; + } else { + // Subsequent Periods + if (playlist.segments) { + // first segment of subsequent periods signal a discontinuity + if (playlist.segments[0]) { + playlist.segments[0].discontinuity = true; + } - match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine); + acc[name].segments.push(...playlist.segments); + } // bubble up contentProtection, this assumes all DRM content + // has the same contentProtection - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'independent-segments' - }); - return; - } // unknown tag type + if (playlist.attributes.contentProtection) { + acc[name].attributes.contentProtection = playlist.attributes.contentProtection; + } + } - this.trigger('data', { - type: 'tag', - data: newLine.slice(4) + acc[name].attributes.timelineStarts.push({ + // Although they represent the same number, it's important to have both to make it + // compatible with HLS potentially having a similar attribute. + start: playlist.attributes.periodStart, + timeline: playlist.attributes.periodStart }); - }); - } - /** - * Add a parser for custom headers - * - * @param {Object} options a map of options for the added parser - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {string} options.customType the custom type to register to the output - * @param {Function} [options.dataParser] function to parse the line into an object - * @param {boolean} [options.segment] should tag data be attached to the segment object - */ - + return acc; + }, {})); + allPlaylists = allPlaylists.concat(mergedPlaylists); + }); + return allPlaylists.map(playlist => { + playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity'); + return playlist; + }); +}; - addParser({ - expression, - customType, - dataParser, - segment - }) { - if (typeof dataParser !== 'function') { - dataParser = line => line; - } +const addSidxSegmentsToPlaylist = (playlist, sidxMapping) => { + const sidxKey = generateSidxKey(playlist.sidx); + const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx; - this.customParsers.push(line => { - const match = expression.exec(line); + if (sidxMatch) { + addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri); + } - if (match) { - this.trigger('data', { - type: 'custom', - data: dataParser(line), - customType, - segment - }); - return true; - } - }); + return playlist; +}; +const addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => { + if (!Object.keys(sidxMapping).length) { + return playlists; } - /** - * Add a custom header mapper - * - * @param {Object} options - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {Function} options.map function to translate tag into a different tag - */ + for (const i in playlists) { + playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping); + } - addTagMapper({ - expression, - map - }) { - const mapFn = line => { - if (expression.test(line)) { - return map(line); - } + return playlists; +}; +const formatAudioPlaylist = ({ + attributes, + segments, + sidx, + mediaSequence, + discontinuitySequence, + discontinuityStarts +}, isAudioOnly) => { + const playlist = { + attributes: { + NAME: attributes.id, + BANDWIDTH: attributes.bandwidth, + CODECS: attributes.codecs, + ['PROGRAM-ID']: 1 + }, + uri: '', + endList: attributes.type === 'static', + timeline: attributes.periodStart, + resolvedUri: attributes.baseUrl || '', + targetDuration: attributes.duration, + discontinuitySequence, + discontinuityStarts, + timelineStarts: attributes.timelineStarts, + mediaSequence, + segments + }; - return line; - }; + if (attributes.contentProtection) { + playlist.contentProtection = attributes.contentProtection; + } - this.tagMappers.push(mapFn); + if (attributes.serviceLocation) { + playlist.attributes.serviceLocation = attributes.serviceLocation; } -} + if (sidx) { + playlist.sidx = sidx; + } -const camelCase = str => str.toLowerCase().replace(/-(\w)/g, a => a[1].toUpperCase()); + if (isAudioOnly) { + playlist.attributes.AUDIO = 'audio'; + playlist.attributes.SUBTITLES = 'subs'; + } -const camelCaseKeys = function (attributes) { - const result = {}; - Object.keys(attributes).forEach(function (key) { - result[camelCase(key)] = attributes[key]; - }); - return result; -}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration -// we need this helper because defaults are based upon targetDuration and -// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before -// target durations are set. + return playlist; +}; +const formatVttPlaylist = ({ + attributes, + segments, + mediaSequence, + discontinuityStarts, + discontinuitySequence +}) => { + if (typeof segments === 'undefined') { + // vtt tracks may use single file in BaseURL + segments = [{ + uri: attributes.baseUrl, + timeline: attributes.periodStart, + resolvedUri: attributes.baseUrl || '', + duration: attributes.sourceDuration, + number: 0 + }]; // targetDuration should be the same duration as the only segment + attributes.duration = attributes.sourceDuration; + } -const setHoldBack = function (manifest) { - const { - serverControl, - targetDuration, - partTargetDuration - } = manifest; + const m3u8Attributes = { + NAME: attributes.id, + BANDWIDTH: attributes.bandwidth, + ['PROGRAM-ID']: 1 + }; - if (!serverControl) { - return; + if (attributes.codecs) { + m3u8Attributes.CODECS = attributes.codecs; } - const tag = '#EXT-X-SERVER-CONTROL'; - const hb = 'holdBack'; - const phb = 'partHoldBack'; - const minTargetDuration = targetDuration && targetDuration * 3; - const minPartDuration = partTargetDuration && partTargetDuration * 2; + const vttPlaylist = { + attributes: m3u8Attributes, + uri: '', + endList: attributes.type === 'static', + timeline: attributes.periodStart, + resolvedUri: attributes.baseUrl || '', + targetDuration: attributes.duration, + timelineStarts: attributes.timelineStarts, + discontinuityStarts, + discontinuitySequence, + mediaSequence, + segments + }; - if (targetDuration && !serverControl.hasOwnProperty(hb)) { - serverControl[hb] = minTargetDuration; - this.trigger('info', { - message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).` - }); + if (attributes.serviceLocation) { + vttPlaylist.attributes.serviceLocation = attributes.serviceLocation; } - if (minTargetDuration && serverControl[hb] < minTargetDuration) { - this.trigger('warn', { - message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})` - }); - serverControl[hb] = minTargetDuration; - } // default no part hold back to part target duration * 3 + return vttPlaylist; +}; +const organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => { + let mainPlaylist; + const formattedPlaylists = playlists.reduce((a, playlist) => { + const role = playlist.attributes.role && playlist.attributes.role.value || ''; + const language = playlist.attributes.lang || ''; + let label = playlist.attributes.label || 'main'; + if (language && !playlist.attributes.label) { + const roleLabel = role ? ` (${role})` : ''; + label = `${playlist.attributes.lang}${roleLabel}`; + } - if (partTargetDuration && !serverControl.hasOwnProperty(phb)) { - serverControl[phb] = partTargetDuration * 3; - this.trigger('info', { - message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).` - }); - } // if part hold back is too small default it to part target duration * 2 + if (!a[label]) { + a[label] = { + language, + autoselect: true, + default: role === 'main', + playlists: [], + uri: '' + }; + } + const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping); + a[label].playlists.push(formatted); - if (partTargetDuration && serverControl[phb] < minPartDuration) { - this.trigger('warn', { - message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).` - }); - serverControl[phb] = minPartDuration; - } -}; -/** - * A parser for M3U8 files. The current interpretation of the input is - * exposed as a property `manifest` on parser objects. It's just two lines to - * create and parse a manifest once you have the contents available as a string: - * - * ```js - * var parser = new m3u8.Parser(); - * parser.push(xhr.responseText); - * ``` - * - * New input can later be applied to update the manifest object by calling - * `push` again. - * - * The parser attempts to create a usable manifest object even if the - * underlying input is somewhat nonsensical. It emits `info` and `warning` - * events during the parse if it encounters input that seems invalid or - * requires some property of the manifest object to be defaulted. - * - * @class Parser - * @extends Stream - */ - + if (typeof mainPlaylist === 'undefined' && role === 'main') { + mainPlaylist = playlist; + mainPlaylist.default = true; + } -class Parser extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.lineStream = new LineStream(); - this.parseStream = new ParseStream(); - this.lineStream.pipe(this.parseStream); - /* eslint-disable consistent-this */ + return a; + }, {}); // if no playlists have role "main", mark the first as main - const self = this; - /* eslint-enable consistent-this */ + if (!mainPlaylist) { + const firstLabel = Object.keys(formattedPlaylists)[0]; + formattedPlaylists[firstLabel].default = true; + } - const uris = []; - let currentUri = {}; // if specified, the active EXT-X-MAP definition + return formattedPlaylists; +}; +const organizeVttPlaylists = (playlists, sidxMapping = {}) => { + return playlists.reduce((a, playlist) => { + const label = playlist.attributes.label || playlist.attributes.lang || 'text'; - let currentMap; // if specified, the active decryption key + if (!a[label]) { + a[label] = { + language: label, + default: false, + autoselect: false, + playlists: [], + uri: '' + }; + } - let key; - let hasParts = false; + a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping)); + return a; + }, {}); +}; - const noop = function () {}; +const organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => { + if (!svc) { + return svcObj; + } - const defaultMediaGroups = { - 'AUDIO': {}, - 'VIDEO': {}, - 'CLOSED-CAPTIONS': {}, - 'SUBTITLES': {} - }; // This is the Widevine UUID from DASH IF IOP. The same exact string is - // used in MPDs with Widevine encrypted streams. + svc.forEach(service => { + const { + channel, + language + } = service; + svcObj[language] = { + autoselect: false, + default: false, + instreamId: channel, + language + }; - const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities + if (service.hasOwnProperty('aspectRatio')) { + svcObj[language].aspectRatio = service.aspectRatio; + } - let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data + if (service.hasOwnProperty('easyReader')) { + svcObj[language].easyReader = service.easyReader; + } - this.manifest = { - allowCache: true, - discontinuityStarts: [], - segments: [] - }; // keep track of the last seen segment's byte range end, as segments are not required - // to provide the offset, in which case it defaults to the next byte after the - // previous segment + if (service.hasOwnProperty('3D')) { + svcObj[language]['3D'] = service['3D']; + } + }); + return svcObj; +}, {}); - let lastByterangeEnd = 0; // keep track of the last seen part's byte range end. +const formatVideoPlaylist = ({ + attributes, + segments, + sidx, + discontinuityStarts +}) => { + const playlist = { + attributes: { + NAME: attributes.id, + AUDIO: 'audio', + SUBTITLES: 'subs', + RESOLUTION: { + width: attributes.width, + height: attributes.height + }, + CODECS: attributes.codecs, + BANDWIDTH: attributes.bandwidth, + ['PROGRAM-ID']: 1 + }, + uri: '', + endList: attributes.type === 'static', + timeline: attributes.periodStart, + resolvedUri: attributes.baseUrl || '', + targetDuration: attributes.duration, + discontinuityStarts, + timelineStarts: attributes.timelineStarts, + segments + }; - let lastPartByterangeEnd = 0; - const daterangeTags = {}; - this.on('end', () => { - // only add preloadSegment if we don't yet have a uri for it. - // and we actually have parts/preloadHints - if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) { - return; - } + if (attributes.frameRate) { + playlist.attributes['FRAME-RATE'] = attributes.frameRate; + } - if (!currentUri.map && currentMap) { - currentUri.map = currentMap; - } + if (attributes.contentProtection) { + playlist.contentProtection = attributes.contentProtection; + } - if (!currentUri.key && key) { - currentUri.key = key; - } + if (attributes.serviceLocation) { + playlist.attributes.serviceLocation = attributes.serviceLocation; + } - if (!currentUri.timeline && typeof currentTimeline === 'number') { - currentUri.timeline = currentTimeline; - } + if (sidx) { + playlist.sidx = sidx; + } - this.manifest.preloadSegment = currentUri; - }); // update the manifest with the m3u8 entry from the parse stream + return playlist; +}; - this.parseStream.on('data', function (entry) { - let mediaGroup; - let rendition; - ({ - tag() { - // switch based on the tag type - (({ - version() { - if (entry.version) { - this.manifest.version = entry.version; - } - }, +const videoOnly = ({ + attributes +}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video'; - 'allow-cache'() { - this.manifest.allowCache = entry.allowed; +const audioOnly = ({ + attributes +}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio'; - if (!('allowed' in entry)) { - this.trigger('info', { - message: 'defaulting allowCache to YES' - }); - this.manifest.allowCache = true; - } - }, +const vttOnly = ({ + attributes +}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text'; +/** + * Contains start and timeline properties denoting a timeline start. For DASH, these will + * be the same number. + * + * @typedef {Object} TimelineStart + * @property {number} start - the start time of the timeline + * @property {number} timeline - the timeline number + */ - byterange() { - const byterange = {}; +/** + * Adds appropriate media and discontinuity sequence values to the segments and playlists. + * + * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a + * DASH specific attribute used in constructing segment URI's from templates. However, from + * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence` + * value, which should start at the original media sequence value (or 0) and increment by 1 + * for each segment thereafter. Since DASH's `startNumber` values are independent per + * period, it doesn't make sense to use it for `number`. Instead, assume everything starts + * from a 0 mediaSequence value and increment from there. + * + * Note that VHS currently doesn't use the `number` property, but it can be helpful for + * debugging and making sense of the manifest. + * + * For live playlists, to account for values increasing in manifests when periods are + * removed on refreshes, merging logic should be used to update the numbers to their + * appropriate values (to ensure they're sequential and increasing). + * + * @param {Object[]} playlists - the playlists to update + * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest + */ - if ('length' in entry) { - currentUri.byterange = byterange; - byterange.length = entry.length; - if (!('offset' in entry)) { - /* - * From the latest spec (as of this writing): - * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2 - * - * Same text since EXT-X-BYTERANGE's introduction in draft 7: - * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1) - * - * "If o [offset] is not present, the sub-range begins at the next byte - * following the sub-range of the previous media segment." - */ - entry.offset = lastByterangeEnd; - } - } +const addMediaSequenceValues = (playlists, timelineStarts) => { + // increment all segments sequentially + playlists.forEach(playlist => { + playlist.mediaSequence = 0; + playlist.discontinuitySequence = timelineStarts.findIndex(function ({ + timeline + }) { + return timeline === playlist.timeline; + }); - if ('offset' in entry) { - currentUri.byterange = byterange; - byterange.offset = entry.offset; - } + if (!playlist.segments) { + return; + } - lastByterangeEnd = byterange.offset + byterange.length; - }, + playlist.segments.forEach((segment, index) => { + segment.number = index; + }); + }); +}; +/** + * Given a media group object, flattens all playlists within the media group into a single + * array. + * + * @param {Object} mediaGroupObject - the media group object + * + * @return {Object[]} + * The media group playlists + */ - endlist() { - this.manifest.endList = true; - }, +const flattenMediaGroupPlaylists = mediaGroupObject => { + if (!mediaGroupObject) { + return []; + } - inf() { - if (!('mediaSequence' in this.manifest)) { - this.manifest.mediaSequence = 0; - this.trigger('info', { - message: 'defaulting media sequence to zero' - }); - } + return Object.keys(mediaGroupObject).reduce((acc, label) => { + const labelContents = mediaGroupObject[label]; + return acc.concat(labelContents.playlists); + }, []); +}; +const toM3u8 = ({ + dashPlaylists, + locations, + contentSteering, + sidxMapping = {}, + previousManifest, + eventStream +}) => { + if (!dashPlaylists.length) { + return {}; + } // grab all main manifest attributes - if (!('discontinuitySequence' in this.manifest)) { - this.manifest.discontinuitySequence = 0; - this.trigger('info', { - message: 'defaulting discontinuity sequence to zero' - }); - } - if (entry.duration > 0) { - currentUri.duration = entry.duration; - } + const { + sourceDuration: duration, + type, + suggestedPresentationDelay, + minimumUpdatePeriod + } = dashPlaylists[0].attributes; + const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist); + const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly)); + const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly)); + const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean); + const manifest = { + allowCache: true, + discontinuityStarts: [], + segments: [], + endList: true, + mediaGroups: { + AUDIO: {}, + VIDEO: {}, + ['CLOSED-CAPTIONS']: {}, + SUBTITLES: {} + }, + uri: '', + duration, + playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping) + }; - if (entry.duration === 0) { - currentUri.duration = 0.01; - this.trigger('info', { - message: 'updating zero segment duration to a small value' - }); - } + if (minimumUpdatePeriod >= 0) { + manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000; + } - this.manifest.segments = uris; - }, + if (locations) { + manifest.locations = locations; + } - key() { - if (!entry.attributes) { - this.trigger('warn', { - message: 'ignoring key declaration without attribute list' - }); - return; - } // clear the active encryption key + if (contentSteering) { + manifest.contentSteering = contentSteering; + } + if (type === 'dynamic') { + manifest.suggestedPresentationDelay = suggestedPresentationDelay; + } - if (entry.attributes.METHOD === 'NONE') { - key = null; - return; - } + if (eventStream && eventStream.length > 0) { + manifest.eventStream = eventStream; + } - if (!entry.attributes.URI) { - this.trigger('warn', { - message: 'ignoring key declaration without URI' - }); - return; - } + const isAudioOnly = manifest.playlists.length === 0; + const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null; + const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null; + const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup)); + const playlistTimelineStarts = formattedPlaylists.map(({ + timelineStarts + }) => timelineStarts); + manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts); + addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts); - if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') { - this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. + if (organizedAudioGroup) { + manifest.mediaGroups.AUDIO.audio = organizedAudioGroup; + } - this.manifest.contentProtection['com.apple.fps.1_0'] = { - attributes: entry.attributes - }; - return; - } + if (organizedVttGroup) { + manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup; + } - if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') { - this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. + if (captions.length) { + manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions); + } - this.manifest.contentProtection['com.microsoft.playready'] = { - uri: entry.attributes.URI - }; - return; - } // check if the content is encrypted for Widevine - // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf + if (previousManifest) { + return positionManifestOnTimeline({ + oldManifest: previousManifest, + newManifest: manifest + }); + } + return manifest; +}; - if (entry.attributes.KEYFORMAT === widevineUuid) { - const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC']; +/** + * Calculates the R (repetition) value for a live stream (for the final segment + * in a manifest where the r value is negative 1) + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {number} time + * current time (typically the total time up until the final segment) + * @param {number} duration + * duration property for the given + * + * @return {number} + * R value to reach the end of the given period + */ +const getLiveRValue = (attributes, time, duration) => { + const { + NOW, + clientOffset, + availabilityStartTime, + timescale = 1, + periodStart = 0, + minimumUpdatePeriod = 0 + } = attributes; + const now = (NOW + clientOffset) / 1000; + const periodStartWC = availabilityStartTime + periodStart; + const periodEndWC = now + minimumUpdatePeriod; + const periodDuration = periodEndWC - periodStartWC; + return Math.ceil((periodDuration * timescale - time) / duration); +}; +/** + * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment + * timing and duration + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {Object[]} segmentTimeline + * List of objects representing the attributes of each S element contained within + * + * @return {{number: number, duration: number, time: number, timeline: number}[]} + * List of Objects with segment timing and duration info + */ - if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) { - this.trigger('warn', { - message: 'invalid key method provided for Widevine' - }); - return; - } - if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') { - this.trigger('warn', { - message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead' - }); - } +const parseByTimeline = (attributes, segmentTimeline) => { + const { + type, + minimumUpdatePeriod = 0, + media = '', + sourceDuration, + timescale = 1, + startNumber = 1, + periodStart: timeline + } = attributes; + const segments = []; + let time = -1; - if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') { - this.trigger('warn', { - message: 'invalid key URI provided for Widevine' - }); - return; - } + for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) { + const S = segmentTimeline[sIndex]; + const duration = S.d; + const repeat = S.r || 0; + const segmentTime = S.t || 0; - if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) { - this.trigger('warn', { - message: 'invalid key ID provided for Widevine' - }); - return; - } // if Widevine key attributes are valid, store them as `contentProtection` - // on the manifest to emulate Widevine tag structure in a DASH mpd + if (time < 0) { + // first segment + time = segmentTime; + } + if (segmentTime && segmentTime > time) { + // discontinuity + // TODO: How to handle this type of discontinuity + // timeline++ here would treat it like HLS discontuity and content would + // get appended without gap + // E.G. + // + // + // + // + // would have $Time$ values of [0, 1, 2, 5] + // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY) + // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP) + // does the value of sourceDuration consider this when calculating arbitrary + // negative @r repeat value? + // E.G. Same elements as above with this added at the end + // + // with a sourceDuration of 10 + // Would the 2 gaps be included in the time duration calculations resulting in + // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments + // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ? + time = segmentTime; + } - this.manifest.contentProtection = this.manifest.contentProtection || {}; - this.manifest.contentProtection['com.widevine.alpha'] = { - attributes: { - schemeIdUri: entry.attributes.KEYFORMAT, - // remove '0x' from the key id string - keyId: entry.attributes.KEYID.substring(2) - }, - // decode the base64-encoded PSSH box - pssh: (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__["default"])(entry.attributes.URI.split(',')[1]) - }; - return; - } + let count; - if (!entry.attributes.METHOD) { - this.trigger('warn', { - message: 'defaulting key method to AES-128' - }); - } // setup an encryption key for upcoming segments + if (repeat < 0) { + const nextS = sIndex + 1; + if (nextS === segmentTimeline.length) { + // last segment + if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) { + count = getLiveRValue(attributes, time, duration); + } else { + // TODO: This may be incorrect depending on conclusion of TODO above + count = (sourceDuration * timescale - time) / duration; + } + } else { + count = (segmentTimeline[nextS].t - time) / duration; + } + } else { + count = repeat + 1; + } - key = { - method: entry.attributes.METHOD || 'AES-128', - uri: entry.attributes.URI - }; + const end = startNumber + segments.length + count; + let number = startNumber + segments.length; - if (typeof entry.attributes.IV !== 'undefined') { - key.iv = entry.attributes.IV; - } - }, + while (number < end) { + segments.push({ + number, + duration: duration / timescale, + time, + timeline + }); + time += duration; + number++; + } + } - 'media-sequence'() { - if (!isFinite(entry.number)) { - this.trigger('warn', { - message: 'ignoring invalid media sequence: ' + entry.number - }); - return; - } + return segments; +}; - this.manifest.mediaSequence = entry.number; - }, +const identifierPattern = /\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g; +/** + * Replaces template identifiers with corresponding values. To be used as the callback + * for String.prototype.replace + * + * @name replaceCallback + * @function + * @param {string} match + * Entire match of identifier + * @param {string} identifier + * Name of matched identifier + * @param {string} format + * Format tag string. Its presence indicates that padding is expected + * @param {string} width + * Desired length of the replaced value. Values less than this width shall be left + * zero padded + * @return {string} + * Replacement for the matched identifier + */ - 'discontinuity-sequence'() { - if (!isFinite(entry.number)) { - this.trigger('warn', { - message: 'ignoring invalid discontinuity sequence: ' + entry.number - }); - return; - } +/** + * Returns a function to be used as a callback for String.prototype.replace to replace + * template identifiers + * + * @param {Obect} values + * Object containing values that shall be used to replace known identifiers + * @param {number} values.RepresentationID + * Value of the Representation@id attribute + * @param {number} values.Number + * Number of the corresponding segment + * @param {number} values.Bandwidth + * Value of the Representation@bandwidth attribute. + * @param {number} values.Time + * Timestamp value of the corresponding segment + * @return {replaceCallback} + * Callback to be used with String.prototype.replace to replace identifiers + */ - this.manifest.discontinuitySequence = entry.number; - currentTimeline = entry.number; - }, +const identifierReplacement = values => (match, identifier, format, width) => { + if (match === '$$') { + // escape sequence + return '$'; + } - 'playlist-type'() { - if (!/VOD|EVENT/.test(entry.playlistType)) { - this.trigger('warn', { - message: 'ignoring unknown playlist type: ' + entry.playlist - }); - return; - } + if (typeof values[identifier] === 'undefined') { + return match; + } - this.manifest.playlistType = entry.playlistType; - }, + const value = '' + values[identifier]; - map() { - currentMap = {}; + if (identifier === 'RepresentationID') { + // Format tag shall not be present with RepresentationID + return value; + } - if (entry.uri) { - currentMap.uri = entry.uri; - } + if (!format) { + width = 1; + } else { + width = parseInt(width, 10); + } - if (entry.byterange) { - currentMap.byterange = entry.byterange; - } + if (value.length >= width) { + return value; + } - if (key) { - currentMap.key = key; - } - }, + return `${new Array(width - value.length + 1).join('0')}${value}`; +}; +/** + * Constructs a segment url from a template string + * + * @param {string} url + * Template string to construct url from + * @param {Obect} values + * Object containing values that shall be used to replace known identifiers + * @param {number} values.RepresentationID + * Value of the Representation@id attribute + * @param {number} values.Number + * Number of the corresponding segment + * @param {number} values.Bandwidth + * Value of the Representation@bandwidth attribute. + * @param {number} values.Time + * Timestamp value of the corresponding segment + * @return {string} + * Segment url with identifiers replaced + */ - 'stream-inf'() { - this.manifest.playlists = uris; - this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; +const constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values)); +/** + * Generates a list of objects containing timing and duration information about each + * segment needed to generate segment uris and the complete segment object + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {Object[]|undefined} segmentTimeline + * List of objects representing the attributes of each S element contained within + * the SegmentTimeline element + * @return {{number: number, duration: number, time: number, timeline: number}[]} + * List of Objects with segment timing and duration info + */ - if (!entry.attributes) { - this.trigger('warn', { - message: 'ignoring empty stream-inf attributes' - }); - return; - } +const parseTemplateInfo = (attributes, segmentTimeline) => { + if (!attributes.duration && !segmentTimeline) { + // if neither @duration or SegmentTimeline are present, then there shall be exactly + // one media segment + return [{ + number: attributes.startNumber || 1, + duration: attributes.sourceDuration, + time: 0, + timeline: attributes.periodStart + }]; + } - if (!currentUri.attributes) { - currentUri.attributes = {}; - } + if (attributes.duration) { + return parseByDuration(attributes); + } - (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(currentUri.attributes, entry.attributes); - }, + return parseByTimeline(attributes, segmentTimeline); +}; +/** + * Generates a list of segments using information provided by the SegmentTemplate element + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {Object[]|undefined} segmentTimeline + * List of objects representing the attributes of each S element contained within + * the SegmentTimeline element + * @return {Object[]} + * List of segment objects + */ - media() { - this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; +const segmentsFromTemplate = (attributes, segmentTimeline) => { + const templateValues = { + RepresentationID: attributes.id, + Bandwidth: attributes.bandwidth || 0 + }; + const { + initialization = { + sourceURL: '', + range: '' + } + } = attributes; + const mapSegment = urlTypeToSegment({ + baseUrl: attributes.baseUrl, + source: constructTemplateUrl(initialization.sourceURL, templateValues), + range: initialization.range + }); + const segments = parseTemplateInfo(attributes, segmentTimeline); + return segments.map(segment => { + templateValues.Number = segment.number; + templateValues.Time = segment.time; + const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2 + // - if timescale isn't present on any level, default to 1. - if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) { - this.trigger('warn', { - message: 'ignoring incomplete or missing media group' - }); - return; - } // find the media group, creating defaults as necessary + const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 + const presentationTimeOffset = attributes.presentationTimeOffset || 0; + const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is + // calculated in mpd-parser prior to this, so it's assumed to be available. + attributes.periodStart + (segment.time - presentationTimeOffset) / timescale; + const map = { + uri, + timeline: segment.timeline, + duration: segment.duration, + resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(attributes.baseUrl || '', uri), + map: mapSegment, + number: segment.number, + presentationTime + }; + return map; + }); +}; - const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE]; - mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {}; - mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata +/** + * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14) + * to an object that matches the output of a segment in videojs/mpd-parser + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {Object} segmentUrl + * node to translate into a segment object + * @return {Object} translated segment object + */ - rendition = { - default: /yes/i.test(entry.attributes.DEFAULT) - }; +const SegmentURLToSegmentObject = (attributes, segmentUrl) => { + const { + baseUrl, + initialization = {} + } = attributes; + const initSegment = urlTypeToSegment({ + baseUrl, + source: initialization.sourceURL, + range: initialization.range + }); + const segment = urlTypeToSegment({ + baseUrl, + source: segmentUrl.media, + range: segmentUrl.mediaRange + }); + segment.map = initSegment; + return segment; +}; +/** + * Generates a list of segments using information provided by the SegmentList element + * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each + * node should be translated into segment. + * + * @param {Object} attributes + * Object containing all inherited attributes from parent elements with attribute + * names as keys + * @param {Object[]|undefined} segmentTimeline + * List of objects representing the attributes of each S element contained within + * the SegmentTimeline element + * @return {Object.} list of segments + */ - if (rendition.default) { - rendition.autoselect = true; - } else { - rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT); - } - if (entry.attributes.LANGUAGE) { - rendition.language = entry.attributes.LANGUAGE; - } +const segmentsFromList = (attributes, segmentTimeline) => { + const { + duration, + segmentUrls = [], + periodStart + } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR + // if both SegmentTimeline and @duration are defined, it is outside of spec. - if (entry.attributes.URI) { - rendition.uri = entry.attributes.URI; - } + if (!duration && !segmentTimeline || duration && segmentTimeline) { + throw new Error(errors.SEGMENT_TIME_UNSPECIFIED); + } - if (entry.attributes['INSTREAM-ID']) { - rendition.instreamId = entry.attributes['INSTREAM-ID']; - } + const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject)); + let segmentTimeInfo; - if (entry.attributes.CHARACTERISTICS) { - rendition.characteristics = entry.attributes.CHARACTERISTICS; - } + if (duration) { + segmentTimeInfo = parseByDuration(attributes); + } - if (entry.attributes.FORCED) { - rendition.forced = /yes/i.test(entry.attributes.FORCED); - } // insert the new rendition + if (segmentTimeline) { + segmentTimeInfo = parseByTimeline(attributes, segmentTimeline); + } + const segments = segmentTimeInfo.map((segmentTime, index) => { + if (segmentUrlMap[index]) { + const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2 + // - if timescale isn't present on any level, default to 1. - mediaGroup[entry.attributes.NAME] = rendition; - }, + const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 - discontinuity() { - currentTimeline += 1; - currentUri.discontinuity = true; - this.manifest.discontinuityStarts.push(uris.length); - }, + const presentationTimeOffset = attributes.presentationTimeOffset || 0; + segment.timeline = segmentTime.timeline; + segment.duration = segmentTime.duration; + segment.number = segmentTime.number; + segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale; + return segment; + } // Since we're mapping we should get rid of any blank segments (in case + // the given SegmentTimeline is handling for more elements than we have + // SegmentURLs for). - 'program-date-time'() { - if (typeof this.manifest.dateTimeString === 'undefined') { - // PROGRAM-DATE-TIME is a media-segment tag, but for backwards - // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag - // to the manifest object - // TODO: Consider removing this in future major version - this.manifest.dateTimeString = entry.dateTimeString; - this.manifest.dateTimeObject = entry.dateTimeObject; - } + }).filter(segment => segment); + return segments; +}; - currentUri.dateTimeString = entry.dateTimeString; - currentUri.dateTimeObject = entry.dateTimeObject; - }, +const generateSegments = ({ + attributes, + segmentInfo +}) => { + let segmentAttributes; + let segmentsFn; - targetduration() { - if (!isFinite(entry.duration) || entry.duration < 0) { - this.trigger('warn', { - message: 'ignoring invalid target duration: ' + entry.duration - }); - return; - } + if (segmentInfo.template) { + segmentsFn = segmentsFromTemplate; + segmentAttributes = merge(attributes, segmentInfo.template); + } else if (segmentInfo.base) { + segmentsFn = segmentsFromBase; + segmentAttributes = merge(attributes, segmentInfo.base); + } else if (segmentInfo.list) { + segmentsFn = segmentsFromList; + segmentAttributes = merge(attributes, segmentInfo.list); + } - this.manifest.targetDuration = entry.duration; - setHoldBack.call(this, this.manifest); - }, + const segmentsInfo = { + attributes + }; - start() { - if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) { - this.trigger('warn', { - message: 'ignoring start declaration without appropriate attribute list' - }); - return; - } + if (!segmentsFn) { + return segmentsInfo; + } - this.manifest.start = { - timeOffset: entry.attributes['TIME-OFFSET'], - precise: entry.attributes.PRECISE - }; - }, + const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which + // must be in seconds. Since we've generated the segment list, we no longer need + // @duration to be in @timescale units, so we can convert it here. - 'cue-out'() { - currentUri.cueOut = entry.data; - }, + if (segmentAttributes.duration) { + const { + duration, + timescale = 1 + } = segmentAttributes; + segmentAttributes.duration = duration / timescale; + } else if (segments.length) { + // if there is no @duration attribute, use the largest segment duration as + // as target duration + segmentAttributes.duration = segments.reduce((max, segment) => { + return Math.max(max, Math.ceil(segment.duration)); + }, 0); + } else { + segmentAttributes.duration = 0; + } - 'cue-out-cont'() { - currentUri.cueOutCont = entry.data; - }, + segmentsInfo.attributes = segmentAttributes; + segmentsInfo.segments = segments; // This is a sidx box without actual segment information - 'cue-in'() { - currentUri.cueIn = entry.data; - }, + if (segmentInfo.base && segmentAttributes.indexRange) { + segmentsInfo.sidx = segments[0]; + segmentsInfo.segments = []; + } - 'skip'() { - this.manifest.skip = camelCaseKeys(entry.attributes); - this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']); - }, - - 'part'() { - hasParts = true; // parts are always specifed before a segment - - const segmentIndex = this.manifest.segments.length; - const part = camelCaseKeys(entry.attributes); - currentUri.parts = currentUri.parts || []; - currentUri.parts.push(part); - - if (part.byterange) { - if (!part.byterange.hasOwnProperty('offset')) { - part.byterange.offset = lastPartByterangeEnd; - } - - lastPartByterangeEnd = part.byterange.offset + part.byterange.length; - } - - const partIndex = currentUri.parts.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']); - - if (this.manifest.renditionReports) { - this.manifest.renditionReports.forEach((r, i) => { - if (!r.hasOwnProperty('lastPart')) { - this.trigger('warn', { - message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART` - }); - } - }); - } - }, - - 'server-control'() { - const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes); - - if (!attrs.hasOwnProperty('canBlockReload')) { - attrs.canBlockReload = false; - this.trigger('info', { - message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false' - }); - } - - setHoldBack.call(this, this.manifest); - - if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) { - this.trigger('warn', { - message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set' - }); - } - }, - - 'preload-hint'() { - // parts are always specifed before a segment - const segmentIndex = this.manifest.segments.length; - const hint = camelCaseKeys(entry.attributes); - const isPart = hint.type && hint.type === 'PART'; - currentUri.preloadHints = currentUri.preloadHints || []; - currentUri.preloadHints.push(hint); - - if (hint.byterange) { - if (!hint.byterange.hasOwnProperty('offset')) { - // use last part byterange end or zero if not a part. - hint.byterange.offset = isPart ? lastPartByterangeEnd : 0; - - if (isPart) { - lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length; - } - } - } - - const index = currentUri.preloadHints.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']); - - if (!hint.type) { - return; - } // search through all preload hints except for the current one for - // a duplicate type. - - - for (let i = 0; i < currentUri.preloadHints.length - 1; i++) { - const otherHint = currentUri.preloadHints[i]; - - if (!otherHint.type) { - continue; - } - - if (otherHint.type === hint.type) { - this.trigger('warn', { - message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}` - }); - } - } - }, - - 'rendition-report'() { - const report = camelCaseKeys(entry.attributes); - this.manifest.renditionReports = this.manifest.renditionReports || []; - this.manifest.renditionReports.push(report); - const index = this.manifest.renditionReports.length - 1; - const required = ['LAST-MSN', 'URI']; - - if (hasParts) { - required.push('LAST-PART'); - } - - this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required); - }, - - 'part-inf'() { - this.manifest.partInf = camelCaseKeys(entry.attributes); - this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']); - - if (this.manifest.partInf.partTarget) { - this.manifest.partTargetDuration = this.manifest.partInf.partTarget; - } - - setHoldBack.call(this, this.manifest); - }, - - 'daterange'() { - this.manifest.daterange = this.manifest.daterange || []; - this.manifest.daterange.push(camelCaseKeys(entry.attributes)); - const index = this.manifest.daterange.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']); - const daterange = this.manifest.daterange[index]; - - if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE' - }); - } - - if (daterange.duration && daterange.duration < 0) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE DURATION must not be negative' - }); - } - - if (daterange.plannedDuration && daterange.plannedDuration < 0) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative' - }); - } - - const endOnNextYes = !!daterange.endOnNext; - - if (endOnNextYes && !daterange.class) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute' - }); - } - - if (endOnNextYes && (daterange.duration || daterange.endDate)) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes' - }); - } - - if (daterange.duration && daterange.endDate) { - const startDate = daterange.startDate; - const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration); - this.manifest.daterange[index].endDate = new Date(newDateInSeconds); - } - - if (daterange && !this.manifest.dateTimeString) { - this.trigger('warn', { - message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag' - }); - } - - if (!daterangeTags[daterange.id]) { - daterangeTags[daterange.id] = daterange; - } else { - for (const attribute in daterangeTags[daterange.id]) { - if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values' - }); - break; - } - } - } - }, - - 'independent-segments'() { - this.manifest.independentSegments = true; - } - - })[entry.tagType] || noop).call(self); - }, - - uri() { - currentUri.uri = entry.uri; - uris.push(currentUri); // if no explicit duration was declared, use the target duration - - if (this.manifest.targetDuration && !('duration' in currentUri)) { - this.trigger('warn', { - message: 'defaulting segment duration to the target duration' - }); - currentUri.duration = this.manifest.targetDuration; - } // annotate with encryption information, if necessary - - - if (key) { - currentUri.key = key; - } - - currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary + return segmentsInfo; +}; +const toPlaylists = representations => representations.map(generateSegments); - if (currentMap) { - currentUri.map = currentMap; - } // reset the last byterange end as it needs to be 0 between parts +const findChildren = (element, name) => from(element.childNodes).filter(({ + tagName +}) => tagName === name); +const getContent = element => element.textContent.trim(); +/** + * Converts the provided string that may contain a division operation to a number. + * + * @param {string} value - the provided string value + * + * @return {number} the parsed string value + */ +const parseDivisionValue = value => { + return parseFloat(value.split('/').reduce((prev, current) => prev / current)); +}; - lastPartByterangeEnd = 0; // prepare for the next URI +const parseDuration = str => { + const SECONDS_IN_YEAR = 365 * 24 * 60 * 60; + const SECONDS_IN_MONTH = 30 * 24 * 60 * 60; + const SECONDS_IN_DAY = 24 * 60 * 60; + const SECONDS_IN_HOUR = 60 * 60; + const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S - currentUri = {}; - }, + const durationRegex = /P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/; + const match = durationRegex.exec(str); - comment() {// comments are not important for playback - }, + if (!match) { + return 0; + } - custom() { - // if this is segment-level data attach the output to the segment - if (entry.segment) { - currentUri.custom = currentUri.custom || {}; - currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object - } else { - this.manifest.custom = this.manifest.custom || {}; - this.manifest.custom[entry.customType] = entry.data; - } - } + const [year, month, day, hour, minute, second] = match.slice(1); + return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0); +}; +const parseDate = str => { + // Date format without timezone according to ISO 8601 + // YYY-MM-DDThh:mm:ss.ssssss + const dateRegex = /^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is + // expressed by ending with 'Z' - })[entry.type].call(self); - }); + if (dateRegex.test(str)) { + str += 'Z'; } - warnOnMissingAttributes_(identifier, attributes, required) { - const missing = []; - required.forEach(function (key) { - if (!attributes.hasOwnProperty(key)) { - missing.push(key); - } - }); + return Date.parse(str); +}; - if (missing.length) { - this.trigger('warn', { - message: `${identifier} lacks required attribute(s): ${missing.join(', ')}` - }); - } - } +const parsers = { /** - * Parse the input string and update the manifest object. + * Specifies the duration of the entire Media Presentation. Format is a duration string + * as specified in ISO 8601 * - * @param {string} chunk a potentially incomplete portion of the manifest + * @param {string} value + * value of attribute as a string + * @return {number} + * The duration in seconds */ + mediaPresentationDuration(value) { + return parseDuration(value); + }, - - push(chunk) { - this.lineStream.push(chunk); - } /** - * Flush any remaining input. This can be handy if the last line of an M3U8 - * manifest did not contain a trailing newline but the file has been - * completely received. + * Specifies the Segment availability start time for all Segments referred to in this + * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability + * time. Format is a date string as specified in ISO 8601 + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The date as seconds from unix epoch */ + availabilityStartTime(value) { + return parseDate(value) / 1000; + }, - - end() { - // flush any buffered input - this.lineStream.push('\n'); - this.trigger('end'); - } /** - * Add an additional parser for non-standard tags + * Specifies the smallest period between potential changes to the MPD. Format is a + * duration string as specified in ISO 8601 * - * @param {Object} options a map of options for the added parser - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {string} options.type the type to register to the output - * @param {Function} [options.dataParser] function to parse the line into an object - * @param {boolean} [options.segment] should tag data be attached to the segment object + * @param {string} value + * value of attribute as a string + * @return {number} + * The duration in seconds */ + minimumUpdatePeriod(value) { + return parseDuration(value); + }, - - addParser(options) { - this.parseStream.addParser(options); - } /** - * Add a custom header mapper + * Specifies the suggested presentation delay. Format is a + * duration string as specified in ISO 8601 * - * @param {Object} options - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {Function} options.map function to translate tag into a different tag + * @param {string} value + * value of attribute as a string + * @return {number} + * The duration in seconds */ + suggestedPresentationDelay(value) { + return parseDuration(value); + }, - - addTagMapper(options) { - this.parseStream.addTagMapper(options); - } - -} - - - - -/***/ }), - -/***/ "./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***! - \**************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ decodeB64ToUint8Array) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - - -var atob = function atob(s) { - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().atob) ? global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(s) : Buffer.from(s, 'base64').toString('binary'); -}; - -function decodeB64ToUint8Array(b64Text) { - var decodedString = atob(b64Text); - var array = new Uint8Array(decodedString.length); - - for (var i = 0; i < decodedString.length; i++) { - array[i] = decodedString.charCodeAt(i); - } - - return array; -} - -/***/ }), - -/***/ "./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/stream.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/stream.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Stream) -/* harmony export */ }); -/** - * @file stream.js - */ - -/** - * A lightweight readable stream implemention that handles event dispatching. - * - * @class Stream - */ -var Stream = /*#__PURE__*/function () { - function Stream() { - this.listeners = {}; - } /** - * Add a listener for a specified event type. + * specifices the type of mpd. Can be either "static" or "dynamic" * - * @param {string} type the event name - * @param {Function} listener the callback to be invoked when an event of - * the specified type occurs + * @param {string} value + * value of attribute as a string + * + * @return {string} + * The type as a string */ + type(value) { + return value; + }, + /** + * Specifies the duration of the smallest time shifting buffer for any Representation + * in the MPD. Format is a duration string as specified in ISO 8601 + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The duration in seconds + */ + timeShiftBufferDepth(value) { + return parseDuration(value); + }, - var _proto = Stream.prototype; - - _proto.on = function on(type, listener) { - if (!this.listeners[type]) { - this.listeners[type] = []; - } - - this.listeners[type].push(listener); - } /** - * Remove a listener for a specified event type. + * Specifies the PeriodStart time of the Period relative to the availabilityStarttime. + * Format is a duration string as specified in ISO 8601 * - * @param {string} type the event name - * @param {Function} listener a function previously registered for this - * type of event through `on` - * @return {boolean} if we could turn it off or not + * @param {string} value + * value of attribute as a string + * @return {number} + * The duration in seconds */ - ; + start(value) { + return parseDuration(value); + }, - _proto.off = function off(type, listener) { - if (!this.listeners[type]) { - return false; - } + /** + * Specifies the width of the visual presentation + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed width + */ + width(value) { + return parseInt(value, 10); + }, - var index = this.listeners[type].indexOf(listener); // TODO: which is better? - // In Video.js we slice listener functions - // on trigger so that it does not mess up the order - // while we loop through. - // - // Here we slice on off so that the loop in trigger - // can continue using it's old reference to loop without - // messing up the order. + /** + * Specifies the height of the visual presentation + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed height + */ + height(value) { + return parseInt(value, 10); + }, - this.listeners[type] = this.listeners[type].slice(0); - this.listeners[type].splice(index, 1); - return index > -1; - } /** - * Trigger an event of the specified type on this stream. Any additional - * arguments to this function are passed as parameters to event listeners. + * Specifies the bitrate of the representation * - * @param {string} type the event name + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed bandwidth */ - ; + bandwidth(value) { + return parseInt(value, 10); + }, - _proto.trigger = function trigger(type) { - var callbacks = this.listeners[type]; - - if (!callbacks) { - return; - } // Slicing the arguments on every invocation of this method - // can add a significant amount of overhead. Avoid the - // intermediate object creation for the common case of a - // single callback argument - - - if (arguments.length === 2) { - var length = callbacks.length; - - for (var i = 0; i < length; ++i) { - callbacks[i].call(this, arguments[1]); - } - } else { - var args = Array.prototype.slice.call(arguments, 1); - var _length = callbacks.length; - - for (var _i = 0; _i < _length; ++_i) { - callbacks[_i].apply(this, args); - } - } - } /** - * Destroys the stream and cleans up. + * Specifies the frame rate of the representation + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed frame rate */ - ; + frameRate(value) { + return parseDivisionValue(value); + }, - _proto.dispose = function dispose() { - this.listeners = {}; - } /** - * Forwards all `data` events on this stream to the destination stream. The - * destination stream should provide a method `push` to receive the data - * events as they arrive. + * Specifies the number of the first Media Segment in this Representation in the Period * - * @param {Stream} destination the stream that will receive all `data` events - * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed number */ - ; - - _proto.pipe = function pipe(destination) { - this.on('data', function (data) { - destination.push(data); - }); - }; - - return Stream; -}(); - + startNumber(value) { + return parseInt(value, 10); + }, + /** + * Specifies the timescale in units per seconds + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed timescale + */ + timescale(value) { + return parseInt(value, 10); + }, -/***/ }), + /** + * Specifies the presentationTimeOffset. + * + * @param {string} value + * value of the attribute as a string + * + * @return {number} + * The parsed presentationTimeOffset + */ + presentationTimeOffset(value) { + return parseInt(value, 10); + }, -/***/ "./node_modules/mpd-parser/dist/mpd-parser.es.js": -/*!*******************************************************!*\ - !*** ./node_modules/mpd-parser/dist/mpd-parser.es.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + /** + * Specifies the constant approximate Segment duration + * NOTE: The element also contains an @duration attribute. This duration + * specifies the duration of the Period. This attribute is currently not + * supported by the rest of the parser, however we still check for it to prevent + * errors. + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed duration + */ + duration(value) { + const parsedValue = parseInt(value, 10); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION), -/* harmony export */ addSidxSegmentsToPlaylist: () => (/* binding */ addSidxSegmentsToPlaylist$1), -/* harmony export */ generateSidxKey: () => (/* binding */ generateSidxKey), -/* harmony export */ inheritAttributes: () => (/* binding */ inheritAttributes), -/* harmony export */ parse: () => (/* binding */ parse), -/* harmony export */ parseUTCTiming: () => (/* binding */ parseUTCTiming), -/* harmony export */ stringToMpdXml: () => (/* binding */ stringToMpdXml), -/* harmony export */ toM3u8: () => (/* binding */ toM3u8), -/* harmony export */ toPlaylists: () => (/* binding */ toPlaylists) -/* harmony export */ }); -/* harmony import */ var _videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url */ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-groups */ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js"); -/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array */ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); -/* harmony import */ var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @xmldom/xmldom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js"); -/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */ + if (isNaN(parsedValue)) { + return parseDuration(value); + } + return parsedValue; + }, + /** + * Specifies the Segment duration, in units of the value of the @timescale. + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed duration + */ + d(value) { + return parseInt(value, 10); + }, + /** + * Specifies the MPD start time, in @timescale units, the first Segment in the series + * starts relative to the beginning of the Period + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed time + */ + t(value) { + return parseInt(value, 10); + }, + /** + * Specifies the repeat count of the number of following contiguous Segments with the + * same duration expressed by the value of @d + * + * @param {string} value + * value of attribute as a string + * @return {number} + * The parsed number + */ + r(value) { + return parseInt(value, 10); + }, + /** + * Specifies the presentationTime. + * + * @param {string} value + * value of the attribute as a string + * + * @return {number} + * The parsed presentationTime + */ + presentationTime(value) { + return parseInt(value, 10); + }, -var version = "1.2.2"; + /** + * Default parser for all other attributes. Acts as a no-op and just returns the value + * as a string + * + * @param {string} value + * value of attribute as a string + * @return {string} + * Unparsed value + */ + DEFAULT(value) { + return value; + } -const isObject = obj => { - return !!obj && typeof obj === 'object'; }; +/** + * Gets all the attributes and values of the provided node, parses attributes with known + * types, and returns an object with attribute names mapped to values. + * + * @param {Node} el + * The node to parse attributes from + * @return {Object} + * Object with all attributes of el parsed + */ -const merge = (...objects) => { - return objects.reduce((result, source) => { - if (typeof source !== 'object') { - return result; - } +const parseAttributes = el => { + if (!(el && el.attributes)) { + return {}; + } - Object.keys(source).forEach(key => { - if (Array.isArray(result[key]) && Array.isArray(source[key])) { - result[key] = result[key].concat(source[key]); - } else if (isObject(result[key]) && isObject(source[key])) { - result[key] = merge(result[key], source[key]); - } else { - result[key] = source[key]; - } - }); - return result; + return from(el.attributes).reduce((a, e) => { + const parseFn = parsers[e.name] || parsers.DEFAULT; + a[e.name] = parseFn(e.value); + return a; }, {}); }; -const values = o => Object.keys(o).map(k => o[k]); - -const range = (start, end) => { - const result = []; - - for (let i = start; i < end; i++) { - result.push(i); - } - return result; +const keySystemsMap = { + 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey', + 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha', + 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready', + 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime' }; -const flatten = lists => lists.reduce((x, y) => x.concat(y), []); -const from = list => { - if (!list.length) { - return []; +/** + * Builds a list of urls that is the product of the reference urls and BaseURL values + * + * @param {Object[]} references + * List of objects containing the reference URL as well as its attributes + * @param {Node[]} baseUrlElements + * List of BaseURL nodes from the mpd + * @return {Object[]} + * List of objects with resolved urls and attributes + */ + +const buildBaseUrls = (references, baseUrlElements) => { + if (!baseUrlElements.length) { + return references; } - const result = []; + return flatten(references.map(function (reference) { + return baseUrlElements.map(function (baseUrlElement) { + const initialBaseUrl = getContent(baseUrlElement); + const resolvedBaseUrl = (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(reference.baseUrl, initialBaseUrl); + const finalBaseUrl = merge(parseAttributes(baseUrlElement), { + baseUrl: resolvedBaseUrl + }); // If the URL is resolved, we want to get the serviceLocation from the reference + // assuming there is no serviceLocation on the initialBaseUrl - for (let i = 0; i < list.length; i++) { - result.push(list[i]); - } + if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) { + finalBaseUrl.serviceLocation = reference.serviceLocation; + } - return result; + return finalBaseUrl; + }); + })); }; -const findIndexes = (l, key) => l.reduce((a, e, i) => { - if (e[key]) { - a.push(i); - } - - return a; -}, []); /** - * Returns a union of the included lists provided each element can be identified by a key. + * Contains all Segment information for its containing AdaptationSet * - * @param {Array} list - list of lists to get the union of - * @param {Function} keyFunction - the function to use as a key for each element + * @typedef {Object} SegmentInformation + * @property {Object|undefined} template + * Contains the attributes for the SegmentTemplate node + * @property {Object[]|undefined} segmentTimeline + * Contains a list of atrributes for each S node within the SegmentTimeline node + * @property {Object|undefined} list + * Contains the attributes for the SegmentList node + * @property {Object|undefined} base + * Contains the attributes for the SegmentBase node + */ + +/** + * Returns all available Segment information contained within the AdaptationSet node * - * @return {Array} the union of the arrays + * @param {Node} adaptationSet + * The AdaptationSet node to get Segment information from + * @return {SegmentInformation} + * The Segment information contained within the provided AdaptationSet */ -const union = (lists, keyFunction) => { - return values(lists.reduce((acc, list) => { - list.forEach(el => { - acc[keyFunction(el)] = el; - }); - return acc; - }, {})); -}; +const getSegmentInformation = adaptationSet => { + const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0]; + const segmentList = findChildren(adaptationSet, 'SegmentList')[0]; + const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({ + tag: 'SegmentURL' + }, parseAttributes(s))); + const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0]; + const segmentTimelineParentNode = segmentList || segmentTemplate; + const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0]; + const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate; + const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both + // @initialization and an node. @initialization can be templated, + // while the node can have a url and range specified. If the has + // both @initialization and an subelement we opt to override with + // the node, as this interaction is not defined in the spec. -var errors = { - INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD', - INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING', - DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST', - DASH_INVALID_XML: 'DASH_INVALID_XML', - NO_BASE_URL: 'NO_BASE_URL', - MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION', - SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED', - UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME' -}; + const template = segmentTemplate && parseAttributes(segmentTemplate); + + if (template && segmentInitialization) { + template.initialization = segmentInitialization && parseAttributes(segmentInitialization); + } else if (template && template.initialization) { + // If it is @initialization we convert it to an object since this is the format that + // later functions will rely on for the initialization segment. This is only valid + // for + template.initialization = { + sourceURL: template.initialization + }; + } + const segmentInfo = { + template, + segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)), + list: segmentList && merge(parseAttributes(segmentList), { + segmentUrls, + initialization: parseAttributes(segmentInitialization) + }), + base: segmentBase && merge(parseAttributes(segmentBase), { + initialization: parseAttributes(segmentInitialization) + }) + }; + Object.keys(segmentInfo).forEach(key => { + if (!segmentInfo[key]) { + delete segmentInfo[key]; + } + }); + return segmentInfo; +}; /** - * @typedef {Object} SingleUri - * @property {string} uri - relative location of segment - * @property {string} resolvedUri - resolved location of segment - * @property {Object} byterange - Object containing information on how to make byte range - * requests following byte-range-spec per RFC2616. - * @property {String} byterange.length - length of range request - * @property {String} byterange.offset - byte offset of range request + * Contains Segment information and attributes needed to construct a Playlist object + * from a Representation * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 + * @typedef {Object} RepresentationInformation + * @property {SegmentInformation} segmentInfo + * Segment information for this Representation + * @property {Object} attributes + * Inherited attributes for this Representation */ /** - * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object - * that conforms to how m3u8-parser is structured - * - * @see https://github.com/videojs/m3u8-parser + * Maps a Representation node to an object containing Segment information and attributes * - * @param {string} baseUrl - baseUrl provided by nodes - * @param {string} source - source url for segment - * @param {string} range - optional range used for range calls, - * follows RFC 2616, Clause 14.35.1 - * @return {SingleUri} full segment information transformed into a format similar - * to m3u8-parser + * @name inheritBaseUrlsCallback + * @function + * @param {Node} representation + * Representation node from the mpd + * @return {RepresentationInformation} + * Representation information needed to construct a Playlist object */ -const urlTypeToSegment = ({ - baseUrl = '', - source = '', - range = '', - indexRange = '' -}) => { - const segment = { - uri: source, - resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(baseUrl || '', source) - }; +/** + * Returns a callback for Array.prototype.map for mapping Representation nodes to + * Segment information and attributes using inherited BaseURL nodes. + * + * @param {Object} adaptationSetAttributes + * Contains attributes inherited by the AdaptationSet + * @param {Object[]} adaptationSetBaseUrls + * List of objects containing resolved base URLs and attributes + * inherited by the AdaptationSet + * @param {SegmentInformation} adaptationSetSegmentInfo + * Contains Segment information for the AdaptationSet + * @return {inheritBaseUrlsCallback} + * Callback map function + */ - if (range || indexRange) { - const rangeStr = range ? range : indexRange; - const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible +const inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => { + const repBaseUrlElements = findChildren(representation, 'BaseURL'); + const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements); + const attributes = merge(adaptationSetAttributes, parseAttributes(representation)); + const representationSegmentInfo = getSegmentInformation(representation); + return repBaseUrls.map(baseUrl => { + return { + segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo), + attributes: merge(attributes, baseUrl) + }; + }); +}; +/** + * Tranforms a series of content protection nodes to + * an object containing pssh data by key system + * + * @param {Node[]} contentProtectionNodes + * Content protection nodes + * @return {Object} + * Object containing pssh data by key system + */ - let startRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[0]) : parseInt(ranges[0], 10); - let endRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER +const generateKeySystemInformation = contentProtectionNodes => { + return contentProtectionNodes.reduce((acc, node) => { + const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated + // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system + // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do + // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one). - if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') { - startRange = Number(startRange); + if (attributes.schemeIdUri) { + attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase(); } - if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') { - endRange = Number(endRange); - } + const keySystem = keySystemsMap[attributes.schemeIdUri]; - let length; + if (keySystem) { + acc[keySystem] = { + attributes + }; + const psshNode = findChildren(node, 'cenc:pssh')[0]; - if (typeof endRange === 'bigint' || typeof startRange === 'bigint') { - length = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(endRange) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(startRange) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - length = endRange - startRange + 1; + if (psshNode) { + const pssh = getContent(psshNode); + acc[keySystem].pssh = pssh && (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__["default"])(pssh); + } } - if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) { - length = Number(length); - } // byterange should be inclusive according to - // RFC 2616, Clause 14.35.1 + return acc; + }, {}); +}; // defined in ANSI_SCTE 214-1 2016 - segment.byterange = { - length, - offset: startRange - }; - } +const parseCaptionServiceMetadata = service => { + // 608 captions + if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') { + const values = typeof service.value !== 'string' ? [] : service.value.split(';'); + return values.map(value => { + let channel; + let language; // default language to value - return segment; -}; -const byteRangeToString = byterange => { - // `endRange` is one less than `offset + length` because the HTTP range - // header uses inclusive ranges - let endRange; + language = value; - if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') { - endRange = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.offset) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.length) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - endRange = byterange.offset + byterange.length - 1; - } + if (/^CC\d=/.test(value)) { + [channel, language] = value.split('='); + } else if (/^CC\d$/.test(value)) { + channel = value; + } - return `${byterange.offset}-${endRange}`; -}; + return { + channel, + language + }; + }); + } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') { + const values = typeof service.value !== 'string' ? [] : service.value.split(';'); + return values.map(value => { + const flags = { + // service or channel number 1-63 + 'channel': undefined, + // language is a 3ALPHA per ISO 639.2/B + // field is required + 'language': undefined, + // BIT 1/0 or ? + // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown + 'aspectRatio': 1, + // BIT 1/0 + // easy reader flag indicated the text is tailed to the needs of beginning readers + // default 0, or off + 'easyReader': 0, + // BIT 1/0 + // If 3d metadata is present (CEA-708.1) then 1 + // default 0 + '3D': 0 + }; -/** - * parse the end number attribue that can be a string - * number, or undefined. - * - * @param {string|number|undefined} endNumber - * The end number attribute. - * - * @return {number|null} - * The result of parsing the end number. - */ + if (/=/.test(value)) { + const [channel, opts = ''] = value.split('='); + flags.channel = channel; + flags.language = value; + opts.split(',').forEach(opt => { + const [name, val] = opt.split(':'); -const parseEndNumber = endNumber => { - if (endNumber && typeof endNumber !== 'number') { - endNumber = parseInt(endNumber, 10); - } + if (name === 'lang') { + flags.language = val; // er for easyReadery + } else if (name === 'er') { + flags.easyReader = Number(val); // war for wide aspect ratio + } else if (name === 'war') { + flags.aspectRatio = Number(val); + } else if (name === '3D') { + flags['3D'] = Number(val); + } + }); + } else { + flags.language = value; + } - if (isNaN(endNumber)) { - return null; - } + if (flags.channel) { + flags.channel = 'SERVICE' + flags.channel; + } - return endNumber; + return flags; + }); + } }; /** - * Functions for calculating the range of available segments in static and dynamic - * manifests. + * A map callback that will parse all event stream data for a collection of periods + * DASH ISO_IEC_23009 5.10.2.2 + * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing + * + * @param {PeriodInformation} period object containing necessary period information + * @return a collection of parsed eventstream event objects */ +const toEventStream = period => { + // get and flatten all EventStreams tags and parse attributes and children + return flatten(findChildren(period.node, 'EventStream').map(eventStream => { + const eventStreamAttributes = parseAttributes(eventStream); + const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects -const segmentRange = { - /** - * Returns the entire range of available segments for a static MPD - * - * @param {Object} attributes - * Inheritied MPD attributes - * @return {{ start: number, end: number }} - * The start and end numbers for available segments - */ - static(attributes) { - const { - duration, - timescale = 1, - sourceDuration, - periodDuration - } = attributes; - const endNumber = parseEndNumber(attributes.endNumber); - const segmentDuration = duration / timescale; - - if (typeof endNumber === 'number') { + return findChildren(eventStream, 'Event').map(event => { + const eventAttributes = parseAttributes(event); + const presentationTime = eventAttributes.presentationTime || 0; + const timescale = eventStreamAttributes.timescale || 1; + const duration = eventAttributes.duration || 0; + const start = presentationTime / timescale + period.attributes.start; return { - start: 0, - end: endNumber + schemeIdUri, + value: eventStreamAttributes.value, + id: eventAttributes.id, + start, + end: start + duration / timescale, + messageData: getContent(event) || eventAttributes.messageData, + contentEncoding: eventStreamAttributes.contentEncoding, + presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0 }; - } + }); + })); +}; +/** + * Maps an AdaptationSet node to a list of Representation information objects + * + * @name toRepresentationsCallback + * @function + * @param {Node} adaptationSet + * AdaptationSet node from the mpd + * @return {RepresentationInformation[]} + * List of objects containing Representaion information + */ - if (typeof periodDuration === 'number') { - return { - start: 0, - end: periodDuration / segmentDuration - }; - } +/** + * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of + * Representation information objects + * + * @param {Object} periodAttributes + * Contains attributes inherited by the Period + * @param {Object[]} periodBaseUrls + * Contains list of objects with resolved base urls and attributes + * inherited by the Period + * @param {string[]} periodSegmentInfo + * Contains Segment Information at the period level + * @return {toRepresentationsCallback} + * Callback map function + */ - return { - start: 0, - end: sourceDuration / segmentDuration - }; - }, +const toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => { + const adaptationSetAttributes = parseAttributes(adaptationSet); + const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL')); + const role = findChildren(adaptationSet, 'Role')[0]; + const roleAttributes = { + role: parseAttributes(role) + }; + let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes); + const accessibility = findChildren(adaptationSet, 'Accessibility')[0]; + const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility)); - /** - * Returns the current live window range of available segments for a dynamic MPD - * - * @param {Object} attributes - * Inheritied MPD attributes - * @return {{ start: number, end: number }} - * The start and end numbers for available segments - */ - dynamic(attributes) { - const { - NOW, - clientOffset, - availabilityStartTime, - timescale = 1, - duration, - periodStart = 0, - minimumUpdatePeriod = 0, - timeShiftBufferDepth = Infinity - } = attributes; - const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated - // after retrieving UTC server time. + if (captionServices) { + attrs = merge(attrs, { + captionServices + }); + } - const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock. - // Convert the period start time to EPOCH. + const label = findChildren(adaptationSet, 'Label')[0]; - const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update. + if (label && label.childNodes.length) { + const labelVal = label.childNodes[0].nodeValue.trim(); + attrs = merge(attrs, { + label: labelVal + }); + } - const periodEndWC = now + minimumUpdatePeriod; - const periodDuration = periodEndWC - periodStartWC; - const segmentCount = Math.ceil(periodDuration * timescale / duration); - const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration); - const availableEnd = Math.floor((now - periodStartWC) * timescale / duration); - return { - start: Math.max(0, availableStart), - end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd) - }; + const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection')); + + if (Object.keys(contentProtection).length) { + attrs = merge(attrs, { + contentProtection + }); } + const segmentInfo = getSegmentInformation(adaptationSet); + const representations = findChildren(adaptationSet, 'Representation'); + const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo); + return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo))); }; /** - * Maps a range of numbers to objects with information needed to build the corresponding - * segment list + * Contains all period information for mapping nodes onto adaptation sets. * - * @name toSegmentsCallback + * @typedef {Object} PeriodInformation + * @property {Node} period.node + * Period node from the mpd + * @property {Object} period.attributes + * Parsed period attributes from node plus any added + */ + +/** + * Maps a PeriodInformation object to a list of Representation information objects for all + * AdaptationSet nodes contained within the Period. + * + * @name toAdaptationSetsCallback * @function - * @param {number} number - * Number of the segment - * @param {number} index - * Index of the number in the range list - * @return {{ number: Number, duration: Number, timeline: Number, time: Number }} - * Object with segment timing and duration info + * @param {PeriodInformation} period + * Period object containing necessary period information + * @param {number} periodStart + * Start time of the Period within the mpd + * @return {RepresentationInformation[]} + * List of objects containing Representaion information */ /** - * Returns a callback for Array.prototype.map for mapping a range of numbers to - * information needed to build the segment list. + * Returns a callback for Array.prototype.map for mapping Period nodes to a list of + * Representation information objects * - * @param {Object} attributes - * Inherited MPD attributes - * @return {toSegmentsCallback} + * @param {Object} mpdAttributes + * Contains attributes inherited by the mpd + * @param {Object[]} mpdBaseUrls + * Contains list of objects with resolved base urls and attributes + * inherited by the mpd + * @return {toAdaptationSetsCallback} * Callback map function */ -const toSegments = attributes => number => { - const { - duration, - timescale = 1, - periodStart, - startNumber = 1 - } = attributes; - return { - number: startNumber + number, - duration: duration / timescale, - timeline: periodStart, - time: number * duration - }; +const toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => { + const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL')); + const periodAttributes = merge(mpdAttributes, { + periodStart: period.attributes.start + }); + + if (typeof period.attributes.duration === 'number') { + periodAttributes.periodDuration = period.attributes.duration; + } + + const adaptationSets = findChildren(period.node, 'AdaptationSet'); + const periodSegmentInfo = getSegmentInformation(period.node); + return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo))); }; /** - * Returns a list of objects containing segment timing and duration info used for - * building the list of segments. This uses the @duration attribute specified - * in the MPD manifest to derive the range of segments. + * Tranforms an array of content steering nodes into an object + * containing CDN content steering information from the MPD manifest. * - * @param {Object} attributes - * Inherited MPD attributes - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info + * For more information on the DASH spec for Content Steering parsing, see: + * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf + * + * @param {Node[]} contentSteeringNodes + * Content steering nodes + * @param {Function} eventHandler + * The event handler passed into the parser options to handle warnings + * @return {Object} + * Object containing content steering data */ -const parseByDuration = attributes => { - const { - type, - duration, - timescale = 1, - periodDuration, - sourceDuration - } = attributes; - const { - start, - end - } = segmentRange[type](attributes); - const segments = range(start, end).map(toSegments(attributes)); - - if (type === 'static') { - const index = segments.length - 1; // section is either a period or the full source +const generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => { + // If there are more than one ContentSteering tags, throw an error + if (contentSteeringNodes.length > 1) { + eventHandler({ + type: 'warn', + message: 'The MPD manifest should contain no more than one ContentSteering tag' + }); + } // Return a null value if there are no ContentSteering tags - const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration - segments[index].duration = sectionDuration - duration / timescale * index; + if (!contentSteeringNodes.length) { + return null; } - return segments; -}; + const infoFromContentSteeringTag = merge({ + serverURL: getContent(contentSteeringNodes[0]) + }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value + // to `false` if it doesn't exist + infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true'; + return infoFromContentSteeringTag; +}; /** - * Translates SegmentBase into a set of segments. - * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each - * node should be translated into segment. + * Gets Period@start property for a given period. * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @return {Object.} list of segments + * @param {Object} options + * Options object + * @param {Object} options.attributes + * Period attributes + * @param {Object} [options.priorPeriodAttributes] + * Prior period attributes (if prior period is available) + * @param {string} options.mpdType + * The MPD@type these periods came from + * @return {number|null} + * The period start, or null if it's an early available period or error */ -const segmentsFromBase = attributes => { - const { - baseUrl, - initialization = {}, - sourceDuration, - indexRange = '', - periodStart, - presentationTime, - number = 0, - duration - } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1) +const getPeriodStart = ({ + attributes, + priorPeriodAttributes, + mpdType +}) => { + // Summary of period start time calculation from DASH spec section 5.3.2.1 + // + // A period's start is the first period's start + time elapsed after playing all + // prior periods to this one. Periods continue one after the other in time (without + // gaps) until the end of the presentation. + // + // The value of Period@start should be: + // 1. if Period@start is present: value of Period@start + // 2. if previous period exists and it has @duration: previous Period@start + + // previous Period@duration + // 3. if this is first period and MPD@type is 'static': 0 + // 4. in all other cases, consider the period an "early available period" (note: not + // currently supported) + // (1) + if (typeof attributes.start === 'number') { + return attributes.start; + } // (2) - if (!baseUrl) { - throw new Error(errors.NO_BASE_URL); - } - const initSegment = urlTypeToSegment({ - baseUrl, - source: initialization.sourceURL, - range: initialization.range - }); - const segment = urlTypeToSegment({ - baseUrl, - source: baseUrl, - indexRange - }); - segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source - // (since SegmentBase is only for one total segment) + if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') { + return priorPeriodAttributes.start + priorPeriodAttributes.duration; + } // (3) - if (duration) { - const segmentTimeInfo = parseByDuration(attributes); - if (segmentTimeInfo.length) { - segment.duration = segmentTimeInfo[0].duration; - segment.timeline = segmentTimeInfo[0].timeline; - } - } else if (sourceDuration) { - segment.duration = sourceDuration; - segment.timeline = periodStart; - } // If presentation time is provided, these segments are being generated by SIDX - // references, and should use the time provided. For the general case of SegmentBase, - // there should only be one segment in the period, so its presentation time is the same - // as its period start. + if (!priorPeriodAttributes && mpdType === 'static') { + return 0; + } // (4) + // There is currently no logic for calculating the Period@start value if there is + // no Period@start or prior Period@start and Period@duration available. This is not made + // explicit by the DASH interop guidelines or the DASH spec, however, since there's + // nothing about any other resolution strategies, it's implied. Thus, this case should + // be considered an early available period, or error, and null should suffice for both + // of those cases. - segment.presentationTime = presentationTime || periodStart; - segment.number = number; - return [segment]; + return null; }; /** - * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist - * according to the sidx information given. - * - * playlist.sidx has metadadata about the sidx where-as the sidx param - * is the parsed sidx box itself. + * Traverses the mpd xml tree to generate a list of Representation information objects + * that have inherited attributes from parent nodes * - * @param {Object} playlist the playlist to update the sidx information for - * @param {Object} sidx the parsed sidx box - * @return {Object} the playlist object with the updated sidx information + * @param {Node} mpd + * The root node of the mpd + * @param {Object} options + * Available options for inheritAttributes + * @param {string} options.manifestUri + * The uri source of the mpd + * @param {number} options.NOW + * Current time per DASH IOP. Default is current time in ms since epoch + * @param {number} options.clientOffset + * Client time difference from NOW (in milliseconds) + * @return {RepresentationInformation[]} + * List of objects containing Representation information */ -const addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => { - // Retain init segment information - const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing - - const sourceDuration = playlist.sidx.duration; // Retain source timeline - - const timeline = playlist.timeline || 0; - const sidxByteRange = playlist.sidx.byterange; - const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx +const inheritAttributes = (mpd, options = {}) => { + const { + manifestUri = '', + NOW = Date.now(), + clientOffset = 0, + // TODO: For now, we are expecting an eventHandler callback function + // to be passed into the mpd parser as an option. + // In the future, we should enable stream parsing by using the Stream class from vhs-utils. + // This will support new features including a standardized event handler. + // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing. + // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9 + eventHandler = function () {} + } = options; + const periodNodes = findChildren(mpd, 'Period'); - const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes + if (!periodNodes.length) { + throw new Error(errors.INVALID_NUMBER_OF_PERIOD); + } - const mediaReferences = sidx.references.filter(r => r.referenceType !== 1); - const segments = []; - const type = playlist.endList ? 'static' : 'dynamic'; - const periodStart = playlist.sidx.timeline; - let presentationTime = periodStart; - let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box + const locations = findChildren(mpd, 'Location'); + const mpdAttributes = parseAttributes(mpd); + const mpdBaseUrls = buildBaseUrls([{ + baseUrl: manifestUri + }], findChildren(mpd, 'BaseURL')); + const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'. - let startIndex; // eslint-disable-next-line + mpdAttributes.type = mpdAttributes.type || 'static'; + mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0; + mpdAttributes.NOW = NOW; + mpdAttributes.clientOffset = clientOffset; - if (typeof sidx.firstOffset === 'bigint') { - startIndex = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(sidxEnd) + sidx.firstOffset; - } else { - startIndex = sidxEnd + sidx.firstOffset; + if (locations.length) { + mpdAttributes.locations = locations.map(getContent); } - for (let i = 0; i < mediaReferences.length; i++) { - const reference = sidx.references[i]; // size of the referenced (sub)segment + const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to + // adding properties that require looking at prior periods is to parse attributes and add + // missing ones before toAdaptationSets is called. If more such properties are added, it + // may be better to refactor toAdaptationSets. - const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale - // this will be converted to seconds when generating segments + periodNodes.forEach((node, index) => { + const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary + // for this period. - const duration = reference.subsegmentDuration; // should be an inclusive range + const priorPeriod = periods[index - 1]; + attributes.start = getPeriodStart({ + attributes, + priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null, + mpdType: mpdAttributes.type + }); + periods.push({ + node, + attributes + }); + }); + return { + locations: mpdAttributes.locations, + contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler), + // TODO: There are occurences where this `representationInfo` array contains undesired + // duplicates. This generally occurs when there are multiple BaseURL nodes that are + // direct children of the MPD node. When we attempt to resolve URLs from a combination of the + // parent BaseURL and a child BaseURL, and the value does not resolve, + // we end up returning the child BaseURL multiple times. + // We need to determine a way to remove these duplicates in a safe way. + // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527 + representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))), + eventStream: flatten(periods.map(toEventStream)) + }; +}; - let endIndex; // eslint-disable-next-line +const stringToMpdXml = manifestString => { + if (manifestString === '') { + throw new Error(errors.DASH_EMPTY_MANIFEST); + } - if (typeof startIndex === 'bigint') { - endIndex = startIndex + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - endIndex = startIndex + size - 1; - } + const parser = new _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__.DOMParser(); + let xml; + let mpd; - const indexRange = `${startIndex}-${endIndex}`; - const attributes = { - baseUrl, - timescale, - timeline, - periodStart, - presentationTime, - number, - duration, - sourceDuration, - indexRange, - type - }; - const segment = segmentsFromBase(attributes)[0]; + try { + xml = parser.parseFromString(manifestString, 'application/xml'); + mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null; + } catch (e) {// ie 11 throws on invalid xml + } - if (initSegment) { - segment.map = initSegment; - } + if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) { + throw new Error(errors.DASH_INVALID_XML); + } - segments.push(segment); + return mpd; +}; - if (typeof startIndex === 'bigint') { - startIndex += global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size); - } else { - startIndex += size; - } +/** + * Parses the manifest for a UTCTiming node, returning the nodes attributes if found + * + * @param {string} mpd + * XML string of the MPD manifest + * @return {Object|null} + * Attributes of UTCTiming node specified in the manifest. Null if none found + */ - presentationTime += duration / timescale; - number++; +const parseUTCTimingScheme = mpd => { + const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0]; + + if (!UTCTimingNode) { + return null; } - playlist.segments = segments; - return playlist; -}; + const attributes = parseAttributes(UTCTimingNode); -const SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen) + switch (attributes.schemeIdUri) { + case 'urn:mpeg:dash:utc:http-head:2014': + case 'urn:mpeg:dash:utc:http-head:2012': + attributes.method = 'HEAD'; + break; -const TIME_FUDGE = 1 / 60; -/** - * Given a list of timelineStarts, combines, dedupes, and sorts them. + case 'urn:mpeg:dash:utc:http-xsdate:2014': + case 'urn:mpeg:dash:utc:http-iso:2014': + case 'urn:mpeg:dash:utc:http-xsdate:2012': + case 'urn:mpeg:dash:utc:http-iso:2012': + attributes.method = 'GET'; + break; + + case 'urn:mpeg:dash:utc:direct:2014': + case 'urn:mpeg:dash:utc:direct:2012': + attributes.method = 'DIRECT'; + attributes.value = Date.parse(attributes.value); + break; + + case 'urn:mpeg:dash:utc:http-ntp:2014': + case 'urn:mpeg:dash:utc:ntp:2014': + case 'urn:mpeg:dash:utc:sntp:2014': + default: + throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME); + } + + return attributes; +}; + +const VERSION = version; +/* + * Given a DASH manifest string and options, parses the DASH manifest into an object in the + * form outputed by m3u8-parser and accepted by videojs/http-streaming. * - * @param {TimelineStart[]} timelineStarts - list of timeline starts + * For live DASH manifests, if `previousManifest` is provided in options, then the newly + * parsed DASH manifest will have its media sequence and discontinuity sequence values + * updated to reflect its position relative to the prior manifest. * - * @return {TimelineStart[]} the combined and deduped timeline starts + * @param {string} manifestString - the DASH manifest as a string + * @param {options} [options] - any options + * + * @return {Object} the manifest object */ -const getUniqueTimelineStarts = timelineStarts => { - return union(timelineStarts, ({ - timeline - }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1); +const parse = (manifestString, options = {}) => { + const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options); + const playlists = toPlaylists(parsedManifestInfo.representationInfo); + return toM3u8({ + dashPlaylists: playlists, + locations: parsedManifestInfo.locations, + contentSteering: parsedManifestInfo.contentSteeringInfo, + sidxMapping: options.sidxMapping, + previousManifest: options.previousManifest, + eventStream: parsedManifestInfo.eventStream + }); }; /** - * Finds the playlist with the matching NAME attribute. - * - * @param {Array} playlists - playlists to search through - * @param {string} name - the NAME attribute to search for + * Parses the manifest for a UTCTiming node, returning the nodes attributes if found * - * @return {Object|null} the matching playlist object, or null + * @param {string} manifestString + * XML string of the MPD manifest + * @return {Object|null} + * Attributes of UTCTiming node specified in the manifest. Null if none found */ -const findPlaylistWithName = (playlists, name) => { - for (let i = 0; i < playlists.length; i++) { - if (playlists[i].attributes.NAME === name) { - return playlists[i]; - } - } - return null; -}; +const parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString)); + + + + +/***/ }), + +/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js": +/*!********************************************************************************!*\ + !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + /** - * Gets a flattened array of media group playlists. + * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes. * - * @param {Object} manifest - the main manifest object + * Works with anything that has a `length` property and index access properties, including NodeList. * - * @return {Array} the media group playlists + * @template {unknown} T + * @param {Array | ({length:number, [number]: T})} list + * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate + * @param {Partial>?} ac `Array.prototype` by default, + * allows injecting a custom implementation in tests + * @returns {T | undefined} + * + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find + * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find */ +function find(list, predicate, ac) { + if (ac === undefined) { + ac = Array.prototype; + } + if (list && typeof ac.find === 'function') { + return ac.find.call(list, predicate); + } + for (var i = 0; i < list.length; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + var item = list[i]; + if (predicate.call(undefined, item, i, list)) { + return item; + } + } + } +} -const getMediaGroupPlaylists = manifest => { - let mediaGroupPlaylists = []; - (0,_videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__.forEachMediaGroup)(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => { - mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []); - }); - return mediaGroupPlaylists; -}; /** - * Updates the playlist's media sequence numbers. + * "Shallow freezes" an object to render it immutable. + * Uses `Object.freeze` if available, + * otherwise the immutability is only in the type. * - * @param {Object} config - options object - * @param {Object} config.playlist - the playlist to update - * @param {number} config.mediaSequence - the mediaSequence number to start with + * Is used to create "enum like" objects. + * + * @template T + * @param {T} object the object to freeze + * @param {Pick = Object} oc `Object` by default, + * allows to inject custom object constructor for tests + * @returns {Readonly} + * + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze */ +function freeze(object, oc) { + if (oc === undefined) { + oc = Object + } + return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object +} -const updateMediaSequenceForPlaylist = ({ - playlist, - mediaSequence -}) => { - playlist.mediaSequence = mediaSequence; - playlist.segments.forEach((segment, index) => { - segment.number = playlist.mediaSequence + index; - }); -}; /** - * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists - * and a complete list of timeline starts. + * Since we can not rely on `Object.assign` we provide a simplified version + * that is sufficient for our needs. * - * If no matching playlist is found, only the discontinuity sequence number of the playlist - * will be updated. + * @param {Object} target + * @param {Object | null | undefined} source * - * Since early available timelines are not supported, at least one segment must be present. + * @returns {Object} target + * @throws TypeError if target is not an object * - * @param {Object} config - options object - * @param {Object[]} oldPlaylists - the old playlists to use as a reference - * @param {Object[]} newPlaylists - the new playlists to update - * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign */ +function assign(target, source) { + if (target === null || typeof target !== 'object') { + throw new TypeError('target is not an object') + } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + return target +} -const updateSequenceNumbers = ({ - oldPlaylists, - newPlaylists, - timelineStarts -}) => { - newPlaylists.forEach(playlist => { - playlist.discontinuitySequence = timelineStarts.findIndex(function ({ - timeline - }) { - return timeline === playlist.timeline; - }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory - // (see ISO_23009-1-2012 5.3.5.2). - // - // If the same Representation existed in a prior Period, it will retain the same NAME. +/** + * All mime types that are allowed as input to `DOMParser.parseFromString` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec + * @see DOMParser.prototype.parseFromString + */ +var MIME_TYPE = freeze({ + /** + * `text/html`, the only mime type that triggers treating an XML document as HTML. + * + * @see DOMParser.SupportedType.isHTML + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec + */ + HTML: 'text/html', - const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME); + /** + * Helper method to check a mime type if it indicates an HTML document + * + * @param {string} [value] + * @returns {boolean} + * + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ + isHTML: function (value) { + return value === MIME_TYPE.HTML + }, - if (!oldPlaylist) { - // Since this is a new playlist, the media sequence values can start from 0 without - // consequence. - return; - } // TODO better support for live SIDX - // - // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD). - // This is evident by a playlist only having a single SIDX reference. In a multiperiod - // playlist there would need to be multiple SIDX references. In addition, live SIDX is - // not supported when the SIDX properties change on refreshes. - // - // In the future, if support needs to be added, the merging logic here can be called - // after SIDX references are resolved. For now, exit early to prevent exceptions being - // thrown due to undefined references. + /** + * `application/xml`, the standard mime type for XML documents. + * + * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration + * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_APPLICATION: 'application/xml', + /** + * `text/html`, an alias for `application/xml`. + * + * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 + * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_TEXT: 'text/xml', - if (playlist.sidx) { - return; - } // Since we don't yet support early available timelines, we don't need to support - // playlists with no segments. + /** + * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, + * but is parsed as an XML document. + * + * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec + * @see https://en.wikipedia.org/wiki/XHTML Wikipedia + */ + XML_XHTML_APPLICATION: 'application/xhtml+xml', + /** + * `image/svg+xml`, + * + * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration + * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 + * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia + */ + XML_SVG_IMAGE: 'image/svg+xml', +}) - const firstNewSegment = playlist.segments[0]; - const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) { - return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE; - }); // No matching segment from the old playlist means the entire playlist was refreshed. - // In this case the media sequence should account for this update, and the new segments - // should be marked as discontinuous from the prior content, since the last prior - // timeline was removed. +/** + * Namespaces that are used in this code base. + * + * @see http://www.w3.org/TR/REC-xml-names + */ +var NAMESPACE = freeze({ + /** + * The XHTML namespace. + * + * @see http://www.w3.org/1999/xhtml + */ + HTML: 'http://www.w3.org/1999/xhtml', - if (oldMatchingSegmentIndex === -1) { - updateMediaSequenceForPlaylist({ - playlist, - mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length - }); - playlist.segments[0].discontinuity = true; - playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content. - // - // If the new playlist's timeline is the same as the last seen segment's timeline, - // then a discontinuity can be added to identify that there's potentially missing - // content. If there's no missing content, the discontinuity should still be rather - // harmless. It's possible that if segment durations are accurate enough, that the - // existence of a gap can be determined using the presentation times and durations, - // but if the segment timing info is off, it may introduce more problems than simply - // adding the discontinuity. - // - // If the new playlist's timeline is different from the last seen segment's timeline, - // then a discontinuity can be added to identify that this is the first seen segment - // of a new timeline. However, the logic at the start of this function that - // determined the disconinuity sequence by timeline index is now off by one (the - // discontinuity of the newest timeline hasn't yet fallen off the manifest...since - // we added it), so the disconinuity sequence must be decremented. - // - // A period may also have a duration of zero, so the case of no segments is handled - // here even though we don't yet support early available periods. + /** + * Checks if `uri` equals `NAMESPACE.HTML`. + * + * @param {string} [uri] + * + * @see NAMESPACE.HTML + */ + isHTML: function (uri) { + return uri === NAMESPACE.HTML + }, - if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) { - playlist.discontinuitySequence--; - } + /** + * The SVG namespace. + * + * @see http://www.w3.org/2000/svg + */ + SVG: 'http://www.w3.org/2000/svg', - return; - } // If the first segment matched with a prior segment on a discontinuity (it's matching - // on the first segment of a period), then the discontinuitySequence shouldn't be the - // timeline's matching one, but instead should be the one prior, and the first segment - // of the new manifest should be marked with a discontinuity. - // - // The reason for this special case is that discontinuity sequence shows how many - // discontinuities have fallen off of the playlist, and discontinuities are marked on - // the first segment of a new "timeline." Because of this, while DASH will retain that - // Period while the "timeline" exists, HLS keeps track of it via the discontinuity - // sequence, and that first segment is an indicator, but can be removed before that - // timeline is gone. + /** + * The `xml:` namespace. + * + * @see http://www.w3.org/XML/1998/namespace + */ + XML: 'http://www.w3.org/XML/1998/namespace', + /** + * The `xmlns:` namespace + * + * @see https://www.w3.org/2000/xmlns/ + */ + XMLNS: 'http://www.w3.org/2000/xmlns/', +}) - const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex]; +exports.assign = assign; +exports.find = find; +exports.freeze = freeze; +exports.MIME_TYPE = MIME_TYPE; +exports.NAMESPACE = NAMESPACE; - if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) { - firstNewSegment.discontinuity = true; - playlist.discontinuityStarts.unshift(0); - playlist.discontinuitySequence--; - } - updateMediaSequenceForPlaylist({ - playlist, - mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number - }); - }); -}; -/** - * Given an old parsed manifest object and a new parsed manifest object, updates the - * sequence and timing values within the new manifest to ensure that it lines up with the - * old. - * - * @param {Array} oldManifest - the old main manifest object - * @param {Array} newManifest - the new main manifest object - * - * @return {Object} the updated new manifest object - */ +/***/ }), -const positionManifestOnTimeline = ({ - oldManifest, - newManifest -}) => { - // Starting from v4.1.2 of the IOP, section 4.4.3.3 states: - // - // "MPD@availabilityStartTime and Period@start shall not be changed over MPD updates." - // - // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160 - // - // Because of this change, and the difficulty of supporting periods with changing start - // times, periods with changing start times are not supported. This makes the logic much - // simpler, since periods with the same start time can be considerred the same period - // across refreshes. - // - // To give an example as to the difficulty of handling periods where the start time may - // change, if a single period manifest is refreshed with another manifest with a single - // period, and both the start and end times are increased, then the only way to determine - // if it's a new period or an old one that has changed is to look through the segments of - // each playlist and determine the presentation time bounds to find a match. In addition, - // if the period start changed to exceed the old period end, then there would be no - // match, and it would not be possible to determine whether the refreshed period is a new - // one or the old one. - const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest)); - const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that - // there's a "memory leak" in that it will never stop growing, in reality, only a couple - // of properties are saved for each seen Period. Even long running live streams won't - // generate too many Periods, unless the stream is watched for decades. In the future, - // this can be optimized by mapping to discontinuity sequence numbers for each timeline, - // but it may not become an issue, and the additional info can be useful for debugging. - - newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]); - updateSequenceNumbers({ - oldPlaylists, - newPlaylists, - timelineStarts: newManifest.timelineStarts - }); - return newManifest; -}; - -const generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange); - -const mergeDiscontiguousPlaylists = playlists => { - // Break out playlists into groups based on their baseUrl - const playlistsByBaseUrl = playlists.reduce(function (acc, cur) { - if (!acc[cur.attributes.baseUrl]) { - acc[cur.attributes.baseUrl] = []; - } +/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - acc[cur.attributes.baseUrl].push(cur); - return acc; - }, {}); - let allPlaylists = []; - Object.values(playlistsByBaseUrl).forEach(playlistGroup => { - const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => { - // assuming playlist IDs are the same across periods - // TODO: handle multiperiod where representation sets are not the same - // across periods - const name = playlist.attributes.id + (playlist.attributes.lang || ''); +var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); +var dom = __webpack_require__(/*! ./dom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js") +var entities = __webpack_require__(/*! ./entities */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js"); +var sax = __webpack_require__(/*! ./sax */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js"); - if (!acc[name]) { - // First Period - acc[name] = playlist; - acc[name].attributes.timelineStarts = []; - } else { - // Subsequent Periods - if (playlist.segments) { - // first segment of subsequent periods signal a discontinuity - if (playlist.segments[0]) { - playlist.segments[0].discontinuity = true; - } +var DOMImplementation = dom.DOMImplementation; - acc[name].segments.push(...playlist.segments); - } // bubble up contentProtection, this assumes all DRM content - // has the same contentProtection +var NAMESPACE = conventions.NAMESPACE; +var ParseError = sax.ParseError; +var XMLReader = sax.XMLReader; - if (playlist.attributes.contentProtection) { - acc[name].attributes.contentProtection = playlist.attributes.contentProtection; - } - } +/** + * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends: + * + * > XML parsed entities are often stored in computer files which, + * > for editing convenience, are organized into lines. + * > These lines are typically separated by some combination + * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA). + * > + * > To simplify the tasks of applications, the XML processor must behave + * > as if it normalized all line breaks in external parsed entities (including the document entity) + * > on input, before parsing, by translating all of the following to a single #xA character: + * > + * > 1. the two-character sequence #xD #xA + * > 2. the two-character sequence #xD #x85 + * > 3. the single character #x85 + * > 4. the single character #x2028 + * > 5. any #xD character that is not immediately followed by #xA or #x85. + * + * @param {string} input + * @returns {string} + */ +function normalizeLineEndings(input) { + return input + .replace(/\r[\n\u0085]/g, '\n') + .replace(/[\r\u0085\u2028]/g, '\n') +} - acc[name].attributes.timelineStarts.push({ - // Although they represent the same number, it's important to have both to make it - // compatible with HLS potentially having a similar attribute. - start: playlist.attributes.periodStart, - timeline: playlist.attributes.periodStart - }); - return acc; - }, {})); - allPlaylists = allPlaylists.concat(mergedPlaylists); - }); - return allPlaylists.map(playlist => { - playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity'); - return playlist; - }); -}; +/** + * @typedef Locator + * @property {number} [columnNumber] + * @property {number} [lineNumber] + */ -const addSidxSegmentsToPlaylist = (playlist, sidxMapping) => { - const sidxKey = generateSidxKey(playlist.sidx); - const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx; +/** + * @typedef DOMParserOptions + * @property {DOMHandler} [domBuilder] + * @property {Function} [errorHandler] + * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing + * defaults to `normalizeLineEndings` + * @property {Locator} [locator] + * @property {Record} [xmlns] + * + * @see normalizeLineEndings + */ - if (sidxMatch) { - addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri); - } +/** + * The DOMParser interface provides the ability to parse XML or HTML source code + * from a string into a DOM `Document`. + * + * _xmldom is different from the spec in that it allows an `options` parameter, + * to override the default behavior._ + * + * @param {DOMParserOptions} [options] + * @constructor + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization + */ +function DOMParser(options){ + this.options = options ||{locator:{}}; +} - return playlist; -}; -const addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => { - if (!Object.keys(sidxMapping).length) { - return playlists; - } +DOMParser.prototype.parseFromString = function(source,mimeType){ + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns||{}; + var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1; + var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; + if(locator){ + domBuilder.setDocumentLocator(locator) + } - for (const i in playlists) { - playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping); - } + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(isHTML){ + defaultNSMap[''] = NAMESPACE.HTML; + } + defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; + var normalize = options.normalizeLineEndings || normalizeLineEndings; + if (source && typeof source === 'string') { + sax.parse( + normalize(source), + defaultNSMap, + entityMap + ) + } else { + sax.errorHandler.error('invalid doc source') + } + return domBuilder.doc; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn && isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + } + errorHandler[key] = fn && function(msg){ + fn('[xmldom '+key+']\t'+msg+_locator(locator)); + }||function(){}; + } + build('warning'); + build('error'); + build('fatalError'); + return errorHandler; +} - return playlists; -}; -const formatAudioPlaylist = ({ - attributes, - segments, - sidx, - mediaSequence, - discontinuitySequence, - discontinuityStarts -}, isAudioOnly) => { - const playlist = { - attributes: { - NAME: attributes.id, - BANDWIDTH: attributes.bandwidth, - CODECS: attributes.codecs, - ['PROGRAM-ID']: 1 - }, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - discontinuitySequence, - discontinuityStarts, - timelineStarts: attributes.timelineStarts, - mediaSequence, - segments - }; +//console.log('#\n\n\n\n\n\n\n####') +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.doc = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.doc.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; - if (attributes.contentProtection) { - playlist.contentProtection = attributes.contentProtection; - } + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator &&position(attrs.getLocator(i),attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(chars){ + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if(this.currentElement){ + this.currentElement.appendChild(charNode); + }else if(/^\s*$/.test(chars)){ + this.doc.appendChild(charNode); + //process xml + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.doc.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.doc.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, - if (attributes.serviceLocation) { - playlist.attributes.serviceLocation = attributes.serviceLocation; - } + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, - if (sidx) { - playlist.sidx = sidx; - } + startDTD:function(name, publicId, systemId) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + this.doc.doctype = dt; + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn('[xmldom warning]\t'+error,_locator(this.locator)); + }, + error:function(error) { + console.error('[xmldom error]\t'+error,_locator(this.locator)); + }, + fatalError:function(error) { + throw new ParseError(error, this.locator); + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} - if (isAudioOnly) { - playlist.attributes.AUDIO = 'audio'; - playlist.attributes.SUBTITLES = 'subs'; - } +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) - return playlist; -}; -const formatVttPlaylist = ({ - attributes, - segments, - mediaSequence, - discontinuityStarts, - discontinuitySequence -}) => { - if (typeof segments === 'undefined') { - // vtt tracks may use single file in BaseURL - segments = [{ - uri: attributes.baseUrl, - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - duration: attributes.sourceDuration, - number: 0 - }]; // targetDuration should be the same duration as the only segment +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.doc.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key - attributes.duration = attributes.sourceDuration; - } +exports.__DOMHandler = DOMHandler; +exports.normalizeLineEndings = normalizeLineEndings; +exports.DOMParser = DOMParser; - const m3u8Attributes = { - NAME: attributes.id, - BANDWIDTH: attributes.bandwidth, - ['PROGRAM-ID']: 1 - }; - if (attributes.codecs) { - m3u8Attributes.CODECS = attributes.codecs; - } +/***/ }), - const vttPlaylist = { - attributes: m3u8Attributes, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - timelineStarts: attributes.timelineStarts, - discontinuityStarts, - discontinuitySequence, - mediaSequence, - segments - }; +/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js": +/*!************************************************************************!*\ + !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - if (attributes.serviceLocation) { - vttPlaylist.attributes.serviceLocation = attributes.serviceLocation; - } +var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); - return vttPlaylist; -}; -const organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => { - let mainPlaylist; - const formattedPlaylists = playlists.reduce((a, playlist) => { - const role = playlist.attributes.role && playlist.attributes.role.value || ''; - const language = playlist.attributes.lang || ''; - let label = playlist.attributes.label || 'main'; +var find = conventions.find; +var NAMESPACE = conventions.NAMESPACE; - if (language && !playlist.attributes.label) { - const roleLabel = role ? ` (${role})` : ''; - label = `${playlist.attributes.lang}${roleLabel}`; - } +/** + * A prerequisite for `[].filter`, to drop elements that are empty + * @param {string} input + * @returns {boolean} + */ +function notEmptyString (input) { + return input !== '' +} +/** + * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * + * @param {string} input + * @returns {string[]} (can be empty) + */ +function splitOnASCIIWhitespace(input) { + // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE + return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : [] +} - if (!a[label]) { - a[label] = { - language, - autoselect: true, - default: role === 'main', - playlists: [], - uri: '' - }; - } +/** + * Adds element as a key to current if it is not already present. + * + * @param {Record} current + * @param {string} element + * @returns {Record} + */ +function orderedSetReducer (current, element) { + if (!current.hasOwnProperty(element)) { + current[element] = true; + } + return current; +} - const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping); - a[label].playlists.push(formatted); +/** + * @see https://infra.spec.whatwg.org/#ordered-set + * @param {string} input + * @returns {string[]} + */ +function toOrderedSet(input) { + if (!input) return []; + var list = splitOnASCIIWhitespace(input); + return Object.keys(list.reduce(orderedSetReducer, {})) +} - if (typeof mainPlaylist === 'undefined' && role === 'main') { - mainPlaylist = playlist; - mainPlaylist.default = true; - } +/** + * Uses `list.indexOf` to implement something like `Array.prototype.includes`, + * which we can not rely on being available. + * + * @param {any[]} list + * @returns {function(any): boolean} + */ +function arrayIncludes (list) { + return function(element) { + return list && list.indexOf(element) !== -1; + } +} - return a; - }, {}); // if no playlists have role "main", mark the first as main +function copy(src,dest){ + for(var p in src){ + if (Object.prototype.hasOwnProperty.call(src, p)) { + dest[p] = src[p]; + } + } +} - if (!mainPlaylist) { - const firstLabel = Object.keys(formattedPlaylists)[0]; - formattedPlaylists[firstLabel].default = true; - } +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknown Class:"+Class) + } + pt.constructor = Class + } +} - return formattedPlaylists; -}; -const organizeVttPlaylists = (playlists, sidxMapping = {}) => { - return playlists.reduce((a, playlist) => { - const label = playlist.attributes.label || playlist.attributes.lang || 'text'; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - if (!a[label]) { - a[label] = { - language: label, - default: false, - autoselect: false, - playlists: [], - uri: '' - }; - } +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping)); - return a; - }, {}); +/** + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + */ +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; }; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) -const organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => { - if (!svc) { - return svcObj; - } - - svc.forEach(service => { - const { - channel, - language - } = service; - svcObj[language] = { - autoselect: false, - default: false, - instreamId: channel, - language - }; - - if (service.hasOwnProperty('aspectRatio')) { - svcObj[language].aspectRatio = service.aspectRatio; - } - - if (service.hasOwnProperty('easyReader')) { - svcObj[language].easyReader = service.easyReader; - } - - if (service.hasOwnProperty('3D')) { - svcObj[language]['3D'] = service['3D']; - } - }); - return svcObj; -}, {}); - -const formatVideoPlaylist = ({ - attributes, - segments, - sidx, - discontinuityStarts -}) => { - const playlist = { - attributes: { - NAME: attributes.id, - AUDIO: 'audio', - SUBTITLES: 'subs', - RESOLUTION: { - width: attributes.width, - height: attributes.height - }, - CODECS: attributes.codecs, - BANDWIDTH: attributes.bandwidth, - ['PROGRAM-ID']: 1 - }, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - discontinuityStarts, - timelineStarts: attributes.timelineStarts, - segments - }; - - if (attributes.frameRate) { - playlist.attributes['FRAME-RATE'] = attributes.frameRate; - } - - if (attributes.contentProtection) { - playlist.contentProtection = attributes.contentProtection; - } - - if (attributes.serviceLocation) { - playlist.attributes.serviceLocation = attributes.serviceLocation; - } - - if (sidx) { - playlist.sidx = sidx; - } - - return playlist; +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return index >= 0 && index < this.length ? this[index] : null; + }, + toString:function(isHTML,nodeFilter){ + for(var buf = [], i = 0;i attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video'; +function LiveNodeList(node,refresh){ + this._node = node; + this._refresh = refresh + _updateLiveList(this); +} +function _updateLiveList(list){ + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc !== inc) { + var ls = list._refresh(list._node); + __set__(list,'length',ls.length); + if (!list.$$length || ls.length < list.$$length) { + for (var i = ls.length; i in list; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + delete list[i]; + } + } + } + copy(ls,list); + list._inc = inc; + } +} +LiveNodeList.prototype.item = function(i){ + _updateLiveList(this); + return this[i] || null; +} -const audioOnly = ({ - attributes -}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio'; +_extends(LiveNodeList,NodeList); -const vttOnly = ({ - attributes -}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text'; /** - * Contains start and timeline properties denoting a timeline start. For DASH, these will - * be the same number. - * - * @typedef {Object} TimelineStart - * @property {number} start - the start time of the timeline - * @property {number} timeline - the timeline number + * Objects implementing the NamedNodeMap interface are used + * to represent collections of nodes that can be accessed by name. + * Note that NamedNodeMap does not inherit from NodeList; + * NamedNodeMaps are not maintained in any particular order. + * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, + * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, + * and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities */ +function NamedNodeMap() { +}; -/** - * Adds appropriate media and discontinuity sequence values to the segments and playlists. - * - * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a - * DASH specific attribute used in constructing segment URI's from templates. However, from - * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence` - * value, which should start at the original media sequence value (or 0) and increment by 1 - * for each segment thereafter. Since DASH's `startNumber` values are independent per - * period, it doesn't make sense to use it for `number`. Instead, assume everything starts - * from a 0 mediaSequence value and increment from there. - * - * Note that VHS currently doesn't use the `number` property, but it can be helpful for - * debugging and making sense of the manifest. - * - * For live playlists, to account for values increasing in manifests when periods are - * removed on refreshes, merging logic should be used to update the numbers to their - * appropriate values (to ensure they're sequential and increasing). - * - * @param {Object[]} playlists - the playlists to update - * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest - */ +function _findNodeIndex(list,node){ + var i = list.length; + while(i--){ + if(list[i] === node){return i} + } +} + +function _addNamedNode(el,list,newAttr,oldAttr){ + if(oldAttr){ + list[_findNodeIndex(list,oldAttr)] = newAttr; + }else{ + list[list.length++] = newAttr; + } + if(el){ + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if(doc){ + oldAttr && _onRemoveAttribute(doc,el,oldAttr); + _onAddAttribute(doc,el,newAttr); + } + } +} +function _removeNamedNode(el,list,attr){ + //console.log('remove attr:'+attr) + var i = _findNodeIndex(list,attr); + if(i>=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + //console.log() + var i = this.length; + while(i--){ + var attr = this[i]; + //console.log(attr.nodeName,key) + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; -const addMediaSequenceValues = (playlists, timelineStarts) => { - // increment all segments sequentially - playlists.forEach(playlist => { - playlist.mediaSequence = 0; - playlist.discontinuitySequence = timelineStarts.findIndex(function ({ - timeline - }) { - return timeline === playlist.timeline; - }); - if (!playlist.segments) { - return; - } + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - playlist.segments.forEach((segment, index) => { - segment.number = index; - }); - }); + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } }; + /** - * Given a media group object, flattens all playlists within the media group into a single - * array. + * The DOMImplementation interface represents an object providing methods + * which are not dependent on any particular document. + * Such an object is returned by the `Document.implementation` property. * - * @param {Object} mediaGroupObject - the media group object + * __The individual methods describe the differences compared to the specs.__ * - * @return {Object[]} - * The media group playlists + * @constructor + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial) + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core + * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard */ +function DOMImplementation() { +} -const flattenMediaGroupPlaylists = mediaGroupObject => { - if (!mediaGroupObject) { - return []; - } +DOMImplementation.prototype = { + /** + * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. + * The different implementations fairly diverged in what kind of features were reported. + * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. + * + * @deprecated It is deprecated and modern browsers return true in all cases. + * + * @param {string} feature + * @param {string} [version] + * @returns {boolean} always true + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard + */ + hasFeature: function(feature, version) { + return true; + }, + /** + * Creates an XML Document object of the specified type with its document element. + * + * __It behaves slightly different from the description in the living standard__: + * - There is no interface/class `XMLDocument`, it returns a `Document` instance. + * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string|null} namespaceURI + * @param {string} qualifiedName + * @param {DocumentType=null} doctype + * @returns {Document} + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocument: function(namespaceURI, qualifiedName, doctype){ + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype || null; + if (doctype){ + doc.appendChild(doctype); + } + if (qualifiedName){ + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + /** + * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. + * + * __This behavior is slightly different from the in the specs__: + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string} qualifiedName + * @param {string} [publicId] + * @param {string} [systemId] + * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation + * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocumentType: function(qualifiedName, publicId, systemId){ + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId || ''; + node.systemId = systemId || ''; - return Object.keys(mediaGroupObject).reduce((acc, label) => { - const labelContents = mediaGroupObject[label]; - return acc.concat(labelContents.playlists); - }, []); + return node; + } }; -const toM3u8 = ({ - dashPlaylists, - locations, - contentSteering, - sidxMapping = {}, - previousManifest, - eventStream -}) => { - if (!dashPlaylists.length) { - return {}; - } // grab all main manifest attributes - const { - sourceDuration: duration, - type, - suggestedPresentationDelay, - minimumUpdatePeriod - } = dashPlaylists[0].attributes; - const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist); - const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly)); - const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly)); - const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean); - const manifest = { - allowCache: true, - discontinuityStarts: [], - segments: [], - endList: true, - mediaGroups: { - AUDIO: {}, - VIDEO: {}, - ['CLOSED-CAPTIONS']: {}, - SUBTITLES: {} - }, - uri: '', - duration, - playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping) - }; +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ - if (minimumUpdatePeriod >= 0) { - manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000; - } +function Node() { +}; - if (locations) { - manifest.locations = locations; - } +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + _insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + /** + * Look up the prefix associated to the given namespace URI, starting from this node. + * **The default namespace declarations are ignored by this method.** + * See Namespace Prefix Lookup for details on the algorithm used by this method. + * + * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ + * + * @param {string | null} namespaceURI + * @returns {string | null} + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix + * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo + * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix + * @see https://github.com/xmldom/xmldom/issues/322 + */ + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) { + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(Object.prototype.hasOwnProperty.call(map, prefix)){ + return map[prefix] ; + } + } + el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; - if (contentSteering) { - manifest.contentSteering = contentSteering; - } - if (type === 'dynamic') { - manifest.suggestedPresentationDelay = suggestedPresentationDelay; - } +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} - if (eventStream && eventStream.length > 0) { - manifest.eventStream = eventStream; - } - const isAudioOnly = manifest.playlists.length === 0; - const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null; - const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null; - const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup)); - const playlistTimelineStarts = formattedPlaylists.map(({ - timelineStarts - }) => timelineStarts); - manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts); - addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts); +copy(NodeType,Node); +copy(NodeType,Node.prototype); - if (organizedAudioGroup) { - manifest.mediaGroups.AUDIO.audio = organizedAudioGroup; - } +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} - if (organizedVttGroup) { - manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup; - } - if (captions.length) { - manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions); - } - if (previousManifest) { - return positionManifestOnTimeline({ - oldManifest: previousManifest, - newManifest: manifest - }); - } +function Document(){ + this.ownerDocument = this; +} - return manifest; -}; +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns === NAMESPACE.XMLNS){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} + +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns === NAMESPACE.XMLNS){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} /** - * Calculates the R (repetition) value for a live stream (for the final segment - * in a manifest where the r value is negative 1) - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {number} time - * current time (typically the total time up until the final segment) - * @param {number} duration - * duration property for the given + * Updates `el.childNodes`, updating the indexed items and it's `length`. + * Passing `newChild` means it will be appended. + * Otherwise it's assumed that an item has been removed, + * and `el.firstNode` and it's `.nextSibling` are used + * to walk the current list of child nodes. * - * @return {number} - * R value to reach the end of the given period + * @param {Document} doc + * @param {Node} el + * @param {Node} [newChild] + * @private */ -const getLiveRValue = (attributes, time, duration) => { - const { - NOW, - clientOffset, - availabilityStartTime, - timescale = 1, - periodStart = 0, - minimumUpdatePeriod = 0 - } = attributes; - const now = (NOW + clientOffset) / 1000; - const periodStartWC = availabilityStartTime + periodStart; - const periodEndWC = now + minimumUpdatePeriod; - const periodDuration = periodEndWC - periodStartWC; - return Math.ceil((periodDuration * timescale - time) / duration); -}; +function _onUpdateChild (doc, el, newChild) { + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if (newChild) { + cs[cs.length++] = newChild; + } else { + var child = el.firstChild; + var i = 0; + while (child) { + cs[i++] = child; + child = child.nextSibling; + } + cs.length = i; + delete cs[cs.length]; + } + } +} + /** - * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment - * timing and duration + * Removes the connections between `parentNode` and `child` + * and any existing `child.previousSibling` or `child.nextSibling`. * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]} segmentTimeline - * List of objects representing the attributes of each S element contained within + * @see https://github.com/xmldom/xmldom/issues/135 + * @see https://github.com/xmldom/xmldom/issues/145 * - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info + * @param {Node} parentNode + * @param {Node} child + * @returns {Node} the child that was removed. + * @private */ +function _removeChild (parentNode, child) { + var previous = child.previousSibling; + var next = child.nextSibling; + if (previous) { + previous.nextSibling = next; + } else { + parentNode.firstChild = next; + } + if (next) { + next.previousSibling = previous; + } else { + parentNode.lastChild = previous; + } + child.parentNode = null; + child.previousSibling = null; + child.nextSibling = null; + _onUpdateChild(parentNode.ownerDocument, parentNode); + return child; +} +/** + * Returns `true` if `node` can be a parent for insertion. + * @param {Node} node + * @returns {boolean} + */ +function hasValidParentNodeType(node) { + return ( + node && + (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE) + ); +} -const parseByTimeline = (attributes, segmentTimeline) => { - const { - type, - minimumUpdatePeriod = 0, - media = '', - sourceDuration, - timescale = 1, - startNumber = 1, - periodStart: timeline - } = attributes; - const segments = []; - let time = -1; - - for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) { - const S = segmentTimeline[sIndex]; - const duration = S.d; - const repeat = S.r || 0; - const segmentTime = S.t || 0; - - if (time < 0) { - // first segment - time = segmentTime; - } +/** + * Returns `true` if `node` can be inserted according to it's `nodeType`. + * @param {Node} node + * @returns {boolean} + */ +function hasInsertableNodeType(node) { + return ( + node && + (isElementNode(node) || + isTextNode(node) || + isDocTypeNode(node) || + node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || + node.nodeType === Node.COMMENT_NODE || + node.nodeType === Node.PROCESSING_INSTRUCTION_NODE) + ); +} - if (segmentTime && segmentTime > time) { - // discontinuity - // TODO: How to handle this type of discontinuity - // timeline++ here would treat it like HLS discontuity and content would - // get appended without gap - // E.G. - // - // - // - // - // would have $Time$ values of [0, 1, 2, 5] - // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY) - // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP) - // does the value of sourceDuration consider this when calculating arbitrary - // negative @r repeat value? - // E.G. Same elements as above with this added at the end - // - // with a sourceDuration of 10 - // Would the 2 gaps be included in the time duration calculations resulting in - // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments - // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ? - time = segmentTime; - } +/** + * Returns true if `node` is a DOCTYPE node + * @param {Node} node + * @returns {boolean} + */ +function isDocTypeNode(node) { + return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; +} - let count; +/** + * Returns true if the node is an element + * @param {Node} node + * @returns {boolean} + */ +function isElementNode(node) { + return node && node.nodeType === Node.ELEMENT_NODE; +} +/** + * Returns true if `node` is a text node + * @param {Node} node + * @returns {boolean} + */ +function isTextNode(node) { + return node && node.nodeType === Node.TEXT_NODE; +} - if (repeat < 0) { - const nextS = sIndex + 1; - - if (nextS === segmentTimeline.length) { - // last segment - if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) { - count = getLiveRValue(attributes, time, duration); - } else { - // TODO: This may be incorrect depending on conclusion of TODO above - count = (sourceDuration * timescale - time) / duration; - } - } else { - count = (segmentTimeline[nextS].t - time) / duration; - } - } else { - count = repeat + 1; - } - - const end = startNumber + segments.length + count; - let number = startNumber + segments.length; - - while (number < end) { - segments.push({ - number, - duration: duration / timescale, - time, - timeline - }); - time += duration; - number++; - } - } - - return segments; -}; - -const identifierPattern = /\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g; /** - * Replaces template identifiers with corresponding values. To be used as the callback - * for String.prototype.replace + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. * - * @name replaceCallback - * @function - * @param {string} match - * Entire match of identifier - * @param {string} identifier - * Name of matched identifier - * @param {string} format - * Format tag string. Its presence indicates that padding is expected - * @param {string} width - * Desired length of the replaced value. Values less than this width shall be left - * zero padded - * @return {string} - * Replacement for the matched identifier + * @param {Document} doc The document node + * @param {Node} child the node that would become the nextSibling if the element would be inserted + * @returns {boolean} `true` if an element can be inserted before child + * @private + * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity */ +function isElementInsertionPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} /** - * Returns a function to be used as a callback for String.prototype.replace to replace - * template identifiers + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. * - * @param {Obect} values - * Object containing values that shall be used to replace known identifiers - * @param {number} values.RepresentationID - * Value of the Representation@id attribute - * @param {number} values.Number - * Number of the corresponding segment - * @param {number} values.Bandwidth - * Value of the Representation@bandwidth attribute. - * @param {number} values.Time - * Timestamp value of the corresponding segment - * @return {replaceCallback} - * Callback to be used with String.prototype.replace to replace identifiers + * @param {Node} doc The document node + * @param {Node} child the node that would become the nextSibling if the element would be inserted + * @returns {boolean} `true` if an element can be inserted before child + * @private + * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity */ +function isElementReplacementPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; -const identifierReplacement = values => (match, identifier, format, width) => { - if (match === '$$') { - // escape sequence - return '$'; - } - - if (typeof values[identifier] === 'undefined') { - return match; - } - - const value = '' + values[identifier]; - - if (identifier === 'RepresentationID') { - // Format tag shall not be present with RepresentationID - return value; - } - - if (!format) { - width = 1; - } else { - width = parseInt(width, 10); - } + function hasElementChildThatIsNotChild(node) { + return isElementNode(node) && node !== child; + } - if (value.length >= width) { - return value; - } + if (find(parentChildNodes, hasElementChildThatIsNotChild)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} - return `${new Array(width - value.length + 1).join('0')}${value}`; -}; /** - * Constructs a segment url from a template string + * @private + * Steps 1-5 of the checks before inserting and before replacing a child are the same. * - * @param {string} url - * Template string to construct url from - * @param {Obect} values - * Object containing values that shall be used to replace known identifiers - * @param {number} values.RepresentationID - * Value of the Representation@id attribute - * @param {number} values.Number - * Number of the corresponding segment - * @param {number} values.Bandwidth - * Value of the Representation@bandwidth attribute. - * @param {number} values.Time - * Timestamp value of the corresponding segment - * @return {string} - * Segment url with identifiers replaced + * @param {Node} parent the parent node to insert `node` into + * @param {Node} node the node to insert + * @param {Node=} child the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws DOMException for several node combinations that would create a DOM that is not well-formed. + * @throws DOMException if `child` is provided but is not a child of `parent`. + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace */ +function assertPreInsertionValidity1to5(parent, node, child) { + // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException. + if (!hasValidParentNodeType(parent)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType); + } + // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException. + // not implemented! + // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException. + if (child && child.parentNode !== parent) { + throw new DOMException(NOT_FOUND_ERR, 'child not in parent'); + } + if ( + // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. + !hasInsertableNodeType(node) || + // 5. If either `node` is a Text node and `parent` is a document, + // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 + // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) + // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. + (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) + ) { + throw new DOMException( + HIERARCHY_REQUEST_ERR, + 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType + ); + } +} -const constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values)); /** - * Generates a list of objects containing timing and duration information about each - * segment needed to generate segment uris and the complete segment object + * @private + * Step 6 of the checks before inserting and before replacing a child are different. * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info + * @param {Document} parent the parent node to insert `node` into + * @param {Node} node the node to insert + * @param {Node | undefined} child the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws DOMException for several node combinations that would create a DOM that is not well-formed. + * @throws DOMException if `child` is provided but is not a child of `parent`. + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace */ +function assertPreInsertionValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; -const parseTemplateInfo = (attributes, segmentTimeline) => { - if (!attributes.duration && !segmentTimeline) { - // if neither @duration or SegmentTimeline are present, then there shall be exactly - // one media segment - return [{ - number: attributes.startNumber || 1, - duration: attributes.sourceDuration, - time: 0, - timeline: attributes.periodStart - }]; - } - - if (attributes.duration) { - return parseByDuration(attributes); - } + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If node has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child, + // `child` is a doctype, or `child` is non-null and a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child, `child` is a doctype, + // or `child` is non-null and a doctype is following `child`. + if (!isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + // `parent` has a doctype child, + if (find(parentChildNodes, isDocTypeNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // `child` is non-null and an element is preceding `child`, + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + // or `child` is null and `parent` has an element child. + if (!child && parentElementChild) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present'); + } + } +} - return parseByTimeline(attributes, segmentTimeline); -}; /** - * Generates a list of segments using information provided by the SegmentTemplate element + * @private + * Step 6 of the checks before inserting and before replacing a child are different. * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {Object[]} - * List of segment objects + * @param {Document} parent the parent node to insert `node` into + * @param {Node} node the node to insert + * @param {Node | undefined} child the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws DOMException for several node combinations that would create a DOM that is not well-formed. + * @throws DOMException if `child` is provided but is not a child of `parent`. + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace */ +function assertPreReplacementValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; -const segmentsFromTemplate = (attributes, segmentTimeline) => { - const templateValues = { - RepresentationID: attributes.id, - Bandwidth: attributes.bandwidth || 0 - }; - const { - initialization = { - sourceURL: '', - range: '' - } - } = attributes; - const mapSegment = urlTypeToSegment({ - baseUrl: attributes.baseUrl, - source: constructTemplateUrl(initialization.sourceURL, templateValues), - range: initialization.range - }); - const segments = parseTemplateInfo(attributes, segmentTimeline); - return segments.map(segment => { - templateValues.Number = segment.number; - templateValues.Time = segment.time; - const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2 - // - if timescale isn't present on any level, default to 1. - - const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 - - const presentationTimeOffset = attributes.presentationTimeOffset || 0; - const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is - // calculated in mpd-parser prior to this, so it's assumed to be available. - attributes.periodStart + (segment.time - presentationTimeOffset) / timescale; - const map = { - uri, - timeline: segment.timeline, - duration: segment.duration, - resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(attributes.baseUrl || '', uri), - map: mapSegment, - number: segment.number, - presentationTime - }; - return map; - }); -}; + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If `node` has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child that is not `child` or a doctype is following `child`. + if (!isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + function hasDoctypeChildThatIsNotChild(node) { + return isDocTypeNode(node) && node !== child; + } -/** - * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14) - * to an object that matches the output of a segment in videojs/mpd-parser - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object} segmentUrl - * node to translate into a segment object - * @return {Object} translated segment object - */ + // `parent` has a doctype child that is not `child`, + if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // or an element is preceding `child`. + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + } +} -const SegmentURLToSegmentObject = (attributes, segmentUrl) => { - const { - baseUrl, - initialization = {} - } = attributes; - const initSegment = urlTypeToSegment({ - baseUrl, - source: initialization.sourceURL, - range: initialization.range - }); - const segment = urlTypeToSegment({ - baseUrl, - source: segmentUrl.media, - range: segmentUrl.mediaRange - }); - segment.map = initSegment; - return segment; -}; /** - * Generates a list of segments using information provided by the SegmentList element - * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each - * node should be translated into segment. - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {Object.} list of segments + * @private + * @param {Node} parent the parent node to insert `node` into + * @param {Node} node the node to insert + * @param {Node=} child the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws DOMException for several node combinations that would create a DOM that is not well-formed. + * @throws DOMException if `child` is provided but is not a child of `parent`. + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity */ +function _insertBefore(parent, node, child, _inDocumentAssertion) { + // To ensure pre-insertion validity of a node into a parent before a child, run these steps: + assertPreInsertionValidity1to5(parent, node, child); + // If parent is a document, and any of the statements below, switched on the interface node implements, + // are true, then throw a "HierarchyRequestError" DOMException. + if (parent.nodeType === Node.DOCUMENT_NODE) { + (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); + } -const segmentsFromList = (attributes, segmentTimeline) => { - const { - duration, - segmentUrls = [], - periodStart - } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR - // if both SegmentTimeline and @duration are defined, it is outside of spec. - - if (!duration && !segmentTimeline || duration && segmentTimeline) { - throw new Error(errors.SEGMENT_TIME_UNSPECIFIED); - } + var cp = node.parentNode; + if(cp){ + cp.removeChild(node);//remove and update + } + if(node.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = node.firstChild; + if (newFirst == null) { + return node; + } + var newLast = node.lastChild; + }else{ + newFirst = newLast = node; + } + var pre = child ? child.previousSibling : parent.lastChild; - const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject)); - let segmentTimeInfo; + newFirst.previousSibling = pre; + newLast.nextSibling = child; - if (duration) { - segmentTimeInfo = parseByDuration(attributes); - } - if (segmentTimeline) { - segmentTimeInfo = parseByTimeline(attributes, segmentTimeline); - } + if(pre){ + pre.nextSibling = newFirst; + }else{ + parent.firstChild = newFirst; + } + if(child == null){ + parent.lastChild = newLast; + }else{ + child.previousSibling = newLast; + } + do{ + newFirst.parentNode = parent; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parent.ownerDocument||parent, parent); + //console.log(parent.lastChild.nextSibling == null) + if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { + node.firstChild = node.lastChild = null; + } + return node; +} - const segments = segmentTimeInfo.map((segmentTime, index) => { - if (segmentUrlMap[index]) { - const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2 - // - if timescale isn't present on any level, default to 1. +/** + * Appends `newChild` to `parentNode`. + * If `newChild` is already connected to a `parentNode` it is first removed from it. + * + * @see https://github.com/xmldom/xmldom/issues/135 + * @see https://github.com/xmldom/xmldom/issues/145 + * @param {Node} parentNode + * @param {Node} newChild + * @returns {Node} + * @private + */ +function _appendSingleChild (parentNode, newChild) { + if (newChild.parentNode) { + newChild.parentNode.removeChild(newChild); + } + newChild.parentNode = parentNode; + newChild.previousSibling = parentNode.lastChild; + newChild.nextSibling = null; + if (newChild.previousSibling) { + newChild.previousSibling.nextSibling = newChild; + } else { + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); + return newChild; +} - const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + /** + * The DocumentType node of the document. + * + * @readonly + * @type DocumentType + */ + doctype : null, + documentElement : null, + _inc : 1, - const presentationTimeOffset = attributes.presentationTimeOffset || 0; - segment.timeline = segmentTime.timeline; - segment.duration = segmentTime.duration; - segment.number = segmentTime.number; - segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale; - return segment; - } // Since we're mapping we should get rid of any blank segments (in case - // the given SegmentTimeline is handling for more elements than we have - // SegmentURLs for). - - }).filter(segment => segment); - return segments; -}; + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + _insertBefore(this, newChild, refChild); + newChild.ownerDocument = this; + if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { + this.documentElement = newChild; + } -const generateSegments = ({ - attributes, - segmentInfo -}) => { - let segmentAttributes; - let segmentsFn; + return newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + replaceChild: function (newChild, oldChild) { + //raises + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + newChild.ownerDocument = this; + if (oldChild) { + this.removeChild(oldChild); + } + if (isElementNode(newChild)) { + this.documentElement = newChild; + } + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == ELEMENT_NODE){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, - if (segmentInfo.template) { - segmentsFn = segmentsFromTemplate; - segmentAttributes = merge(attributes, segmentInfo.template); - } else if (segmentInfo.base) { - segmentsFn = segmentsFromBase; - segmentAttributes = merge(attributes, segmentInfo.base); - } else if (segmentInfo.list) { - segmentsFn = segmentsFromList; - segmentAttributes = merge(attributes, segmentInfo.list); - } + /** + * The `getElementsByClassName` method of `Document` interface returns an array-like object + * of all child elements which have **all** of the given class name(s). + * + * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. + * + * + * Warning: This is a live LiveNodeList. + * Changes in the DOM will reflect in the array as the changes occur. + * If an element selected by this array no longer qualifies for the selector, + * it will automatically be removed. Be aware of this for iteration purposes. + * + * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName + * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname + */ + getElementsByClassName: function(classNames) { + var classNamesSet = toOrderedSet(classNames) + return new LiveNodeList(this, function(base) { + var ls = []; + if (classNamesSet.length > 0) { + _visitNode(base.documentElement, function(node) { + if(node !== base && node.nodeType === ELEMENT_NODE) { + var nodeClassNames = node.getAttribute('class') + // can be null if the attribute does not exist + if (nodeClassNames) { + // before splitting and iterating just compare them for the most common case + var matches = classNames === nodeClassNames; + if (!matches) { + var nodeClassNamesSet = toOrderedSet(nodeClassNames) + matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)) + } + if(matches) { + ls.push(node); + } + } + } + }); + } + return ls; + }); + }, - const segmentsInfo = { - attributes - }; + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.localName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.nodeName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); - if (!segmentsFn) { - return segmentsInfo; - } - const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which - // must be in seconds. Since we've generated the segment list, we no longer need - // @duration to be in @timescale units, so we can convert it here. +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, - if (segmentAttributes.duration) { - const { - duration, - timescale = 1 - } = segmentAttributes; - segmentAttributes.duration = duration / timescale; - } else if (segments.length) { - // if there is no @duration attribute, use the largest segment duration as - // as target duration - segmentAttributes.duration = segments.reduce((max, segment) => { - return Math.max(max, Math.ceil(segment.duration)); - }, 0); - } else { - segmentAttributes.duration = 0; - } + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + //console.log(this == oldAttr.ownerElement) + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, - segmentsInfo.attributes = segmentAttributes; - segmentsInfo.segments = segments; // This is a sidx box without actual segment information + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, - if (segmentInfo.base && segmentAttributes.indexRange) { - segmentsInfo.sidx = segments[0]; - segmentsInfo.segments = []; - } + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; - return segmentsInfo; + }); + } }; -const toPlaylists = representations => representations.map(generateSegments); +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; -const findChildren = (element, name) => from(element.childNodes).filter(({ - tagName -}) => tagName === name); -const getContent = element => element.textContent.trim(); -/** - * Converts the provided string that may contain a division operation to a number. - * - * @param {string} value - the provided string value - * - * @return {number} the parsed string value - */ -const parseDivisionValue = value => { - return parseFloat(value.split('/').reduce((prev, current) => prev / current)); +_extends(Element,Node); +function Attr() { }; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); -const parseDuration = str => { - const SECONDS_IN_YEAR = 365 * 24 * 60 * 60; - const SECONDS_IN_MONTH = 30 * 24 * 60 * 60; - const SECONDS_IN_DAY = 24 * 60 * 60; - const SECONDS_IN_HOUR = 60 * 60; - const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S - const durationRegex = /P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/; - const match = durationRegex.exec(str); +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); - if (!match) { - return 0; - } + }, + appendChild:function(newChild){ + throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); - const [year, month, day, hour, minute, second] = match.slice(1); - return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0); +function CDATASection() { }; -const parseDate = str => { - // Date format without timezone according to ISO 8601 - // YYY-MM-DDThh:mm:ss.ssssss - const dateRegex = /^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is - // expressed by ending with 'Z' +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); - if (dateRegex.test(str)) { - str += 'Z'; - } - return Date.parse(str); +function DocumentType() { }; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); -const parsers = { - /** - * Specifies the duration of the entire Media Presentation. Format is a duration string - * as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - mediaPresentationDuration(value) { - return parseDuration(value); - }, +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); - /** - * Specifies the Segment availability start time for all Segments referred to in this - * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability - * time. Format is a date string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The date as seconds from unix epoch - */ - availabilityStartTime(value) { - return parseDate(value) / 1000; - }, +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); - /** - * Specifies the smallest period between potential changes to the MPD. Format is a - * duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - minimumUpdatePeriod(value) { - return parseDuration(value); - }, +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); - /** - * Specifies the suggested presentation delay. Format is a - * duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - suggestedPresentationDelay(value) { - return parseDuration(value); - }, +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); - /** - * specifices the type of mpd. Can be either "static" or "dynamic" - * - * @param {string} value - * value of attribute as a string - * - * @return {string} - * The type as a string - */ - type(value) { - return value; - }, - - /** - * Specifies the duration of the smallest time shifting buffer for any Representation - * in the MPD. Format is a duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - timeShiftBufferDepth(value) { - return parseDuration(value); - }, - - /** - * Specifies the PeriodStart time of the Period relative to the availabilityStarttime. - * Format is a duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - start(value) { - return parseDuration(value); - }, - - /** - * Specifies the width of the visual presentation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed width - */ - width(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the height of the visual presentation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed height - */ - height(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the bitrate of the representation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed bandwidth - */ - bandwidth(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the frame rate of the representation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed frame rate - */ - frameRate(value) { - return parseDivisionValue(value); - }, - - /** - * Specifies the number of the first Media Segment in this Representation in the Period - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed number - */ - startNumber(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the timescale in units per seconds - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed timescale - */ - timescale(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the presentationTimeOffset. - * - * @param {string} value - * value of the attribute as a string - * - * @return {number} - * The parsed presentationTimeOffset - */ - presentationTimeOffset(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the constant approximate Segment duration - * NOTE: The element also contains an @duration attribute. This duration - * specifies the duration of the Period. This attribute is currently not - * supported by the rest of the parser, however we still check for it to prevent - * errors. - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed duration - */ - duration(value) { - const parsedValue = parseInt(value, 10); - - if (isNaN(parsedValue)) { - return parseDuration(value); - } - - return parsedValue; - }, - - /** - * Specifies the Segment duration, in units of the value of the @timescale. - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed duration - */ - d(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the MPD start time, in @timescale units, the first Segment in the series - * starts relative to the beginning of the Period - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed time - */ - t(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the repeat count of the number of following contiguous Segments with the - * same duration expressed by the value of @d - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed number - */ - r(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the presentationTime. - * - * @param {string} value - * value of the attribute as a string - * - * @return {number} - * The parsed presentationTime - */ - presentationTime(value) { - return parseInt(value, 10); - }, - - /** - * Default parser for all other attributes. Acts as a no-op and just returns the value - * as a string - * - * @param {string} value - * value of attribute as a string - * @return {string} - * Unparsed value - */ - DEFAULT(value) { - return value; - } -}; -/** - * Gets all the attributes and values of the provided node, parses attributes with known - * types, and returns an object with attribute names mapped to values. - * - * @param {Node} el - * The node to parse attributes from - * @return {Object} - * Object with all attributes of el parsed - */ +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){ + return nodeSerializeToString.call(node,isHtml,nodeFilter); +} +Node.prototype.toString = nodeSerializeToString; +function nodeSerializeToString(isHtml,nodeFilter){ + var buf = []; + var refNode = this.nodeType == 9 && this.documentElement || this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; -const parseAttributes = el => { - if (!(el && el.attributes)) { - return {}; - } + if(uri && prefix == null){ + //console.log(prefix) + var prefix = refNode.lookupPrefix(uri); + if(prefix == null){ + //isHTML = true; + var visibleNamespaces=[ + {namespace:uri,prefix:null} + //{namespace:uri,prefix:''} + ] + } + } + serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces); + //console.log('###',this.nodeType,uri,prefix,buf.join('')) + return buf.join(''); +} - return from(el.attributes).reduce((a, e) => { - const parseFn = parsers[e.name] || parsers.DEFAULT; - a[e.name] = parseFn(e.value); - return a; - }, {}); -}; +function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ''; + var uri = node.namespaceURI; + // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) , + // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl : + // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty. + // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using) + // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared : + // > [...] Furthermore, the attribute value [...] must not be an empty string. + // so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document. + if (!uri) { + return false; + } + if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { + return false; + } -const keySystemsMap = { - 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey', - 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha', - 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready', - 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime' -}; + var i = visibleNamespaces.length + while (i--) { + var ns = visibleNamespaces[i]; + // get namespace prefix + if (ns.prefix === prefix) { + return ns.namespace !== uri; + } + } + return true; +} /** - * Builds a list of urls that is the product of the reference urls and BaseURL values + * Well-formed constraint: No < in Attribute Values + * > The replacement text of any entity referred to directly or indirectly + * > in an attribute value must not contain a <. + * @see https://www.w3.org/TR/xml11/#CleanAttrVals + * @see https://www.w3.org/TR/xml11/#NT-AttValue * - * @param {Object[]} references - * List of objects containing the reference URL as well as its attributes - * @param {Node[]} baseUrlElements - * List of BaseURL nodes from the mpd - * @return {Object[]} - * List of objects with resolved urls and attributes + * Literal whitespace other than space that appear in attribute values + * are serialized as their entity references, so they will be preserved. + * (In contrast to whitespace literals in the input which are normalized to spaces) + * @see https://www.w3.org/TR/xml11/#AVNormalize + * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes */ +function addSerializedAttribute(buf, qualifiedName, value) { + buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"') +} -const buildBaseUrls = (references, baseUrlElements) => { - if (!baseUrlElements.length) { - return references; - } - - return flatten(references.map(function (reference) { - return baseUrlElements.map(function (baseUrlElement) { - const initialBaseUrl = getContent(baseUrlElement); - const resolvedBaseUrl = (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(reference.baseUrl, initialBaseUrl); - const finalBaseUrl = merge(parseAttributes(baseUrlElement), { - baseUrl: resolvedBaseUrl - }); // If the URL is resolved, we want to get the serviceLocation from the reference - // assuming there is no serviceLocation on the initialBaseUrl - - if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) { - finalBaseUrl.serviceLocation = reference.serviceLocation; - } +function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){ + if (!visibleNamespaces) { + visibleNamespaces = []; + } - return finalBaseUrl; - }); - })); -}; -/** - * Contains all Segment information for its containing AdaptationSet - * - * @typedef {Object} SegmentInformation - * @property {Object|undefined} template - * Contains the attributes for the SegmentTemplate node - * @property {Object[]|undefined} segmentTimeline - * Contains a list of atrributes for each S node within the SegmentTimeline node - * @property {Object|undefined} list - * Contains the attributes for the SegmentList node - * @property {Object|undefined} base - * Contains the attributes for the SegmentBase node - */ + if(nodeFilter){ + node = nodeFilter(node); + if(node){ + if(typeof node == 'string'){ + buf.push(node); + return; + } + }else{ + return; + } + //buf.sort.apply(attrs, attributeSorter); + } -/** - * Returns all available Segment information contained within the AdaptationSet node - * - * @param {Node} adaptationSet - * The AdaptationSet node to get Segment information from - * @return {SegmentInformation} - * The Segment information contained within the provided AdaptationSet - */ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; -const getSegmentInformation = adaptationSet => { - const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0]; - const segmentList = findChildren(adaptationSet, 'SegmentList')[0]; - const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({ - tag: 'SegmentURL' - }, parseAttributes(s))); - const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0]; - const segmentTimelineParentNode = segmentList || segmentTemplate; - const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0]; - const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate; - const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both - // @initialization and an node. @initialization can be templated, - // while the node can have a url and range specified. If the has - // both @initialization and an subelement we opt to override with - // the node, as this interaction is not defined in the spec. + isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML - const template = segmentTemplate && parseAttributes(segmentTemplate); + var prefixedNodeName = nodeName + if (!isHTML && !node.prefix && node.namespaceURI) { + var defaultNS + // lookup current default ns from `xmlns` attribute + for (var ai = 0; ai < attrs.length; ai++) { + if (attrs.item(ai).name === 'xmlns') { + defaultNS = attrs.item(ai).value + break + } + } + if (!defaultNS) { + // lookup current default ns in visibleNamespaces + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi] + if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) { + defaultNS = namespace.namespace + break + } + } + } + if (defaultNS !== node.namespaceURI) { + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi] + if (namespace.namespace === node.namespaceURI) { + if (namespace.prefix) { + prefixedNodeName = namespace.prefix + ':' + nodeName + } + break + } + } + } + } - if (template && segmentInitialization) { - template.initialization = segmentInitialization && parseAttributes(segmentInitialization); - } else if (template && template.initialization) { - // If it is @initialization we convert it to an object since this is the format that - // later functions will rely on for the initialization segment. This is only valid - // for - template.initialization = { - sourceURL: template.initialization - }; - } + buf.push('<', prefixedNodeName); - const segmentInfo = { - template, - segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)), - list: segmentList && merge(parseAttributes(segmentList), { - segmentUrls, - initialization: parseAttributes(segmentInitialization) - }), - base: segmentBase && merge(parseAttributes(segmentBase), { - initialization: parseAttributes(segmentInitialization) - }) - }; - Object.keys(segmentInfo).forEach(key => { - if (!segmentInfo[key]) { - delete segmentInfo[key]; - } - }); - return segmentInfo; -}; -/** - * Contains Segment information and attributes needed to construct a Playlist object - * from a Representation - * - * @typedef {Object} RepresentationInformation - * @property {SegmentInformation} segmentInfo - * Segment information for this Representation - * @property {Object} attributes - * Inherited attributes for this Representation - */ + for(var i=0;i representation => { - const repBaseUrlElements = findChildren(representation, 'BaseURL'); - const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements); - const attributes = merge(adaptationSetAttributes, parseAttributes(representation)); - const representationSegmentInfo = getSegmentInformation(representation); - return repBaseUrls.map(baseUrl => { - return { - segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo), - attributes: merge(attributes, baseUrl) - }; - }); -}; -/** - * Tranforms a series of content protection nodes to - * an object containing pssh data by key system - * - * @param {Node[]} contentProtectionNodes - * Content protection nodes - * @return {Object} - * Object containing pssh data by key system - */ - -const generateKeySystemInformation = contentProtectionNodes => { - return contentProtectionNodes.reduce((acc, node) => { - const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated - // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system - // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do - // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one). - - if (attributes.schemeIdUri) { - attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase(); - } - - const keySystem = keySystemsMap[attributes.schemeIdUri]; - - if (keySystem) { - acc[keySystem] = { - attributes - }; - const psshNode = findChildren(node, 'cenc:pssh')[0]; - - if (psshNode) { - const pssh = getContent(psshNode); - acc[keySystem].pssh = pssh && (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__["default"])(pssh); - } - } - - return acc; - }, {}); -}; // defined in ANSI_SCTE 214-1 2016 - - -const parseCaptionServiceMetadata = service => { - // 608 captions - if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') { - const values = typeof service.value !== 'string' ? [] : service.value.split(';'); - return values.map(value => { - let channel; - let language; // default language to value - - language = value; - - if (/^CC\d=/.test(value)) { - [channel, language] = value.split('='); - } else if (/^CC\d$/.test(value)) { - channel = value; - } - - return { - channel, - language - }; - }); - } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') { - const values = typeof service.value !== 'string' ? [] : service.value.split(';'); - return values.map(value => { - const flags = { - // service or channel number 1-63 - 'channel': undefined, - // language is a 3ALPHA per ISO 639.2/B - // field is required - 'language': undefined, - // BIT 1/0 or ? - // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown - 'aspectRatio': 1, - // BIT 1/0 - // easy reader flag indicated the text is tailed to the needs of beginning readers - // default 0, or off - 'easyReader': 0, - // BIT 1/0 - // If 3d metadata is present (CEA-708.1) then 1 - // default 0 - '3D': 0 - }; - - if (/=/.test(value)) { - const [channel, opts = ''] = value.split('='); - flags.channel = channel; - flags.language = value; - opts.split(',').forEach(opt => { - const [name, val] = opt.split(':'); + if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){ + buf.push('>'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + while(child){ + if(child.data){ + buf.push(child.data); + }else{ + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + } + child = child.nextSibling; + } + }else + { + while(child){ + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + // remove added visible namespaces + //visibleNamespaces.length = startVisibleNamespaces; + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return addSerializedAttribute(buf, node.name, node.value); + case TEXT_NODE: + /** + * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, + * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. + * If they are needed elsewhere, they must be escaped using either numeric character references or the strings + * `&` and `<` respectively. + * The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, + * be escaped using either `>` or a character reference when it appears in the string `]]>` in content, + * when that string is not marking the end of a CDATA section. + * + * In the content of elements, character data is any string of characters + * which does not contain the start-delimiter of any markup + * and does not include the CDATA-section-close delimiter, `]]>`. + * + * @see https://www.w3.org/TR/xml/#NT-CharData + * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node + */ + return buf.push(node.data + .replace(/[<&>]/g,_xmlEncoder) + ); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM ', sysid, '>'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i { - // get and flatten all EventStreams tags and parse attributes and children - return flatten(findChildren(period.node, 'EventStream').map(eventStream => { - const eventStreamAttributes = parseAttributes(eventStream); - const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + } + }) - return findChildren(eventStream, 'Event').map(event => { - const eventAttributes = parseAttributes(event); - const presentationTime = eventAttributes.presentationTime || 0; - const timescale = eventStreamAttributes.timescale || 1; - const duration = eventAttributes.duration || 0; - const start = presentationTime / timescale + period.attributes.start; - return { - schemeIdUri, - value: eventStreamAttributes.value, - id: eventAttributes.id, - start, - end: start + duration / timescale, - messageData: getContent(event) || eventAttributes.messageData, - contentEncoding: eventStreamAttributes.contentEncoding, - presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0 - }; - }); - })); -}; -/** - * Maps an AdaptationSet node to a list of Representation information objects - * - * @name toRepresentationsCallback - * @function - * @param {Node} adaptationSet - * AdaptationSet node from the mpd - * @return {RepresentationInformation[]} - * List of objects containing Representaion information - */ + function getTextContent(node){ + switch(node.nodeType){ + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var buf = []; + node = node.firstChild; + while(node){ + if(node.nodeType!==7 && node.nodeType !==8){ + buf.push(getTextContent(node)); + } + node = node.nextSibling; + } + return buf.join(''); + default: + return node.nodeValue; + } + } -/** - * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of - * Representation information objects - * - * @param {Object} periodAttributes - * Contains attributes inherited by the Period - * @param {Object[]} periodBaseUrls - * Contains list of objects with resolved base urls and attributes - * inherited by the Period - * @param {string[]} periodSegmentInfo - * Contains Segment Information at the period level - * @return {toRepresentationsCallback} - * Callback map function - */ + __set__ = function(object,key,value){ + //console.log(value) + object['$$'+key] = value + } + } +}catch(e){//ie8 +} -const toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => { - const adaptationSetAttributes = parseAttributes(adaptationSet); - const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL')); - const role = findChildren(adaptationSet, 'Role')[0]; - const roleAttributes = { - role: parseAttributes(role) - }; - let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes); - const accessibility = findChildren(adaptationSet, 'Accessibility')[0]; - const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility)); +//if(typeof require == 'function'){ + exports.DocumentType = DocumentType; + exports.DOMException = DOMException; + exports.DOMImplementation = DOMImplementation; + exports.Element = Element; + exports.Node = Node; + exports.NodeList = NodeList; + exports.XMLSerializer = XMLSerializer; +//} - if (captionServices) { - attrs = merge(attrs, { - captionServices - }); - } - const label = findChildren(adaptationSet, 'Label')[0]; +/***/ }), - if (label && label.childNodes.length) { - const labelVal = label.childNodes[0].nodeValue.trim(); - attrs = merge(attrs, { - label: labelVal - }); - } +/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection')); +"use strict"; - if (Object.keys(contentProtection).length) { - attrs = merge(attrs, { - contentProtection - }); - } - const segmentInfo = getSegmentInformation(adaptationSet); - const representations = findChildren(adaptationSet, 'Representation'); - const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo); - return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo))); -}; -/** - * Contains all period information for mapping nodes onto adaptation sets. - * - * @typedef {Object} PeriodInformation - * @property {Node} period.node - * Period node from the mpd - * @property {Object} period.attributes - * Parsed period attributes from node plus any added - */ +var freeze = (__webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js").freeze); /** - * Maps a PeriodInformation object to a list of Representation information objects for all - * AdaptationSet nodes contained within the Period. + * The entities that are predefined in every XML document. * - * @name toAdaptationSetsCallback - * @function - * @param {PeriodInformation} period - * Period object containing necessary period information - * @param {number} periodStart - * Start time of the Period within the mpd - * @return {RepresentationInformation[]} - * List of objects containing Representaion information + * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1 + * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0 + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia */ +exports.XML_ENTITIES = freeze({ + amp: '&', + apos: "'", + gt: '>', + lt: '<', + quot: '"', +}); /** - * Returns a callback for Array.prototype.map for mapping Period nodes to a list of - * Representation information objects + * A map of all entities that are detected in an HTML document. + * They contain all entries from `XML_ENTITIES`. * - * @param {Object} mpdAttributes - * Contains attributes inherited by the mpd - * @param {Object[]} mpdBaseUrls - * Contains list of objects with resolved base urls and attributes - * inherited by the mpd - * @return {toAdaptationSetsCallback} - * Callback map function - */ - -const toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => { - const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL')); - const periodAttributes = merge(mpdAttributes, { - periodStart: period.attributes.start - }); - - if (typeof period.attributes.duration === 'number') { - periodAttributes.periodDuration = period.attributes.duration; - } - - const adaptationSets = findChildren(period.node, 'AdaptationSet'); - const periodSegmentInfo = getSegmentInformation(period.node); - return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo))); -}; -/** - * Tranforms an array of content steering nodes into an object - * containing CDN content steering information from the MPD manifest. - * - * For more information on the DASH spec for Content Steering parsing, see: - * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf - * - * @param {Node[]} contentSteeringNodes - * Content steering nodes - * @param {Function} eventHandler - * The event handler passed into the parser options to handle warnings - * @return {Object} - * Object containing content steering data - */ - -const generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => { - // If there are more than one ContentSteering tags, throw an error - if (contentSteeringNodes.length > 1) { - eventHandler({ - type: 'warn', - message: 'The MPD manifest should contain no more than one ContentSteering tag' - }); - } // Return a null value if there are no ContentSteering tags - - - if (!contentSteeringNodes.length) { - return null; - } - - const infoFromContentSteeringTag = merge({ - serverURL: getContent(contentSteeringNodes[0]) - }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value - // to `false` if it doesn't exist - - infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true'; - return infoFromContentSteeringTag; -}; -/** - * Gets Period@start property for a given period. - * - * @param {Object} options - * Options object - * @param {Object} options.attributes - * Period attributes - * @param {Object} [options.priorPeriodAttributes] - * Prior period attributes (if prior period is available) - * @param {string} options.mpdType - * The MPD@type these periods came from - * @return {number|null} - * The period start, or null if it's an early available period or error - */ - -const getPeriodStart = ({ - attributes, - priorPeriodAttributes, - mpdType -}) => { - // Summary of period start time calculation from DASH spec section 5.3.2.1 - // - // A period's start is the first period's start + time elapsed after playing all - // prior periods to this one. Periods continue one after the other in time (without - // gaps) until the end of the presentation. - // - // The value of Period@start should be: - // 1. if Period@start is present: value of Period@start - // 2. if previous period exists and it has @duration: previous Period@start + - // previous Period@duration - // 3. if this is first period and MPD@type is 'static': 0 - // 4. in all other cases, consider the period an "early available period" (note: not - // currently supported) - // (1) - if (typeof attributes.start === 'number') { - return attributes.start; - } // (2) - - - if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') { - return priorPeriodAttributes.start + priorPeriodAttributes.duration; - } // (3) - - - if (!priorPeriodAttributes && mpdType === 'static') { - return 0; - } // (4) - // There is currently no logic for calculating the Period@start value if there is - // no Period@start or prior Period@start and Period@duration available. This is not made - // explicit by the DASH interop guidelines or the DASH spec, however, since there's - // nothing about any other resolution strategies, it's implied. Thus, this case should - // be considered an early available period, or error, and null should suffice for both - // of those cases. - - - return null; -}; -/** - * Traverses the mpd xml tree to generate a list of Representation information objects - * that have inherited attributes from parent nodes - * - * @param {Node} mpd - * The root node of the mpd - * @param {Object} options - * Available options for inheritAttributes - * @param {string} options.manifestUri - * The uri source of the mpd - * @param {number} options.NOW - * Current time per DASH IOP. Default is current time in ms since epoch - * @param {number} options.clientOffset - * Client time difference from NOW (in milliseconds) - * @return {RepresentationInformation[]} - * List of objects containing Representation information - */ - -const inheritAttributes = (mpd, options = {}) => { - const { - manifestUri = '', - NOW = Date.now(), - clientOffset = 0, - // TODO: For now, we are expecting an eventHandler callback function - // to be passed into the mpd parser as an option. - // In the future, we should enable stream parsing by using the Stream class from vhs-utils. - // This will support new features including a standardized event handler. - // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing. - // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9 - eventHandler = function () {} - } = options; - const periodNodes = findChildren(mpd, 'Period'); - - if (!periodNodes.length) { - throw new Error(errors.INVALID_NUMBER_OF_PERIOD); - } - - const locations = findChildren(mpd, 'Location'); - const mpdAttributes = parseAttributes(mpd); - const mpdBaseUrls = buildBaseUrls([{ - baseUrl: manifestUri - }], findChildren(mpd, 'BaseURL')); - const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'. - - mpdAttributes.type = mpdAttributes.type || 'static'; - mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0; - mpdAttributes.NOW = NOW; - mpdAttributes.clientOffset = clientOffset; - - if (locations.length) { - mpdAttributes.locations = locations.map(getContent); - } - - const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to - // adding properties that require looking at prior periods is to parse attributes and add - // missing ones before toAdaptationSets is called. If more such properties are added, it - // may be better to refactor toAdaptationSets. - - periodNodes.forEach((node, index) => { - const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary - // for this period. - - const priorPeriod = periods[index - 1]; - attributes.start = getPeriodStart({ - attributes, - priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null, - mpdType: mpdAttributes.type - }); - periods.push({ - node, - attributes - }); - }); - return { - locations: mpdAttributes.locations, - contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler), - // TODO: There are occurences where this `representationInfo` array contains undesired - // duplicates. This generally occurs when there are multiple BaseURL nodes that are - // direct children of the MPD node. When we attempt to resolve URLs from a combination of the - // parent BaseURL and a child BaseURL, and the value does not resolve, - // we end up returning the child BaseURL multiple times. - // We need to determine a way to remove these duplicates in a safe way. - // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527 - representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))), - eventStream: flatten(periods.map(toEventStream)) - }; -}; - -const stringToMpdXml = manifestString => { - if (manifestString === '') { - throw new Error(errors.DASH_EMPTY_MANIFEST); - } - - const parser = new _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__.DOMParser(); - let xml; - let mpd; - - try { - xml = parser.parseFromString(manifestString, 'application/xml'); - mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null; - } catch (e) {// ie 11 throws on invalid xml - } - - if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) { - throw new Error(errors.DASH_INVALID_XML); - } - - return mpd; -}; - -/** - * Parses the manifest for a UTCTiming node, returning the nodes attributes if found - * - * @param {string} mpd - * XML string of the MPD manifest - * @return {Object|null} - * Attributes of UTCTiming node specified in the manifest. Null if none found - */ - -const parseUTCTimingScheme = mpd => { - const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0]; - - if (!UTCTimingNode) { - return null; - } - - const attributes = parseAttributes(UTCTimingNode); - - switch (attributes.schemeIdUri) { - case 'urn:mpeg:dash:utc:http-head:2014': - case 'urn:mpeg:dash:utc:http-head:2012': - attributes.method = 'HEAD'; - break; - - case 'urn:mpeg:dash:utc:http-xsdate:2014': - case 'urn:mpeg:dash:utc:http-iso:2014': - case 'urn:mpeg:dash:utc:http-xsdate:2012': - case 'urn:mpeg:dash:utc:http-iso:2012': - attributes.method = 'GET'; - break; - - case 'urn:mpeg:dash:utc:direct:2014': - case 'urn:mpeg:dash:utc:direct:2012': - attributes.method = 'DIRECT'; - attributes.value = Date.parse(attributes.value); - break; - - case 'urn:mpeg:dash:utc:http-ntp:2014': - case 'urn:mpeg:dash:utc:ntp:2014': - case 'urn:mpeg:dash:utc:sntp:2014': - default: - throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME); - } - - return attributes; -}; - -const VERSION = version; -/* - * Given a DASH manifest string and options, parses the DASH manifest into an object in the - * form outputed by m3u8-parser and accepted by videojs/http-streaming. - * - * For live DASH manifests, if `previousManifest` is provided in options, then the newly - * parsed DASH manifest will have its media sequence and discontinuity sequence values - * updated to reflect its position relative to the prior manifest. - * - * @param {string} manifestString - the DASH manifest as a string - * @param {options} [options] - any options - * - * @return {Object} the manifest object - */ - -const parse = (manifestString, options = {}) => { - const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options); - const playlists = toPlaylists(parsedManifestInfo.representationInfo); - return toM3u8({ - dashPlaylists: playlists, - locations: parsedManifestInfo.locations, - contentSteering: parsedManifestInfo.contentSteeringInfo, - sidxMapping: options.sidxMapping, - previousManifest: options.previousManifest, - eventStream: parsedManifestInfo.eventStream - }); -}; -/** - * Parses the manifest for a UTCTiming node, returning the nodes attributes if found - * - * @param {string} manifestString - * XML string of the MPD manifest - * @return {Object|null} - * Attributes of UTCTiming node specified in the manifest. Null if none found - */ - - -const parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString)); - - - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***! - \*************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ decodeB64ToUint8Array) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - - -var atob = function atob(s) { - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().atob) ? global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(s) : Buffer.from(s, 'base64').toString('binary'); -}; - -function decodeB64ToUint8Array(b64Text) { - var decodedString = atob(b64Text); - var array = new Uint8Array(decodedString.length); - - for (var i = 0; i < decodedString.length; i++) { - array[i] = decodedString.charCodeAt(i); - } - - return array; -} - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js": -/*!************************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js ***! - \************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ forEachMediaGroup: () => (/* binding */ forEachMediaGroup) -/* harmony export */ }); -/** - * Loops through all supported media groups in master and calls the provided - * callback for each group - * - * @param {Object} master - * The parsed master manifest object - * @param {string[]} groups - * The media groups to call the callback for - * @param {Function} callback - * Callback to call for each media group - */ -var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) { - groups.forEach(function (mediaType) { - for (var groupKey in master.mediaGroups[mediaType]) { - for (var labelKey in master.mediaGroups[mediaType][groupKey]) { - var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey]; - callback(mediaProperties, mediaType, groupKey, labelKey); - } - } - }); -}; - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js ***! - \***********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); - - -var DEFAULT_LOCATION = 'http://example.com'; - -var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { - // return early if we don't need to resolve - if (/^[a-z]+:/i.test(relativeUrl)) { - return relativeUrl; - } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location - - - if (/^data:/.test(baseUrl)) { - baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; - } // IE11 supports URL but not the URL constructor - // feature detect the behavior we want - - - var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; - var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) - // and if baseUrl isn't an absolute url - - var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location - - if (nativeURL) { - baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); - } else if (!/\/\//i.test(baseUrl)) { - baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); - } - - if (nativeURL) { - var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol - // and if we're location-less, remove the location - // otherwise, return the url unmodified - - if (removeLocation) { - return newUrl.href.slice(DEFAULT_LOCATION.length); - } else if (protocolLess) { - return newUrl.href.slice(newUrl.protocol.length); - } - - return newUrl.href; - } - - return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js": -/*!********************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes. - * - * Works with anything that has a `length` property and index access properties, including NodeList. - * - * @template {unknown} T - * @param {Array | ({length:number, [number]: T})} list - * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate - * @param {Partial>?} ac `Array.prototype` by default, - * allows injecting a custom implementation in tests - * @returns {T | undefined} - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find - * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find - */ -function find(list, predicate, ac) { - if (ac === undefined) { - ac = Array.prototype; - } - if (list && typeof ac.find === 'function') { - return ac.find.call(list, predicate); - } - for (var i = 0; i < list.length; i++) { - if (Object.prototype.hasOwnProperty.call(list, i)) { - var item = list[i]; - if (predicate.call(undefined, item, i, list)) { - return item; - } - } - } -} - -/** - * "Shallow freezes" an object to render it immutable. - * Uses `Object.freeze` if available, - * otherwise the immutability is only in the type. - * - * Is used to create "enum like" objects. - * - * @template T - * @param {T} object the object to freeze - * @param {Pick = Object} oc `Object` by default, - * allows to inject custom object constructor for tests - * @returns {Readonly} - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze - */ -function freeze(object, oc) { - if (oc === undefined) { - oc = Object - } - return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object -} - -/** - * Since we can not rely on `Object.assign` we provide a simplified version - * that is sufficient for our needs. - * - * @param {Object} target - * @param {Object | null | undefined} source - * - * @returns {Object} target - * @throws TypeError if target is not an object - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign - */ -function assign(target, source) { - if (target === null || typeof target !== 'object') { - throw new TypeError('target is not an object') - } - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - return target -} - -/** - * All mime types that are allowed as input to `DOMParser.parseFromString` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec - * @see DOMParser.prototype.parseFromString - */ -var MIME_TYPE = freeze({ - /** - * `text/html`, the only mime type that triggers treating an XML document as HTML. - * - * @see DOMParser.SupportedType.isHTML - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec - */ - HTML: 'text/html', - - /** - * Helper method to check a mime type if it indicates an HTML document - * - * @param {string} [value] - * @returns {boolean} - * - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ - isHTML: function (value) { - return value === MIME_TYPE.HTML - }, - - /** - * `application/xml`, the standard mime type for XML documents. - * - * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration - * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_APPLICATION: 'application/xml', - - /** - * `text/html`, an alias for `application/xml`. - * - * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 - * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_TEXT: 'text/xml', - - /** - * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, - * but is parsed as an XML document. - * - * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec - * @see https://en.wikipedia.org/wiki/XHTML Wikipedia - */ - XML_XHTML_APPLICATION: 'application/xhtml+xml', - - /** - * `image/svg+xml`, - * - * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration - * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 - * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia - */ - XML_SVG_IMAGE: 'image/svg+xml', -}) - -/** - * Namespaces that are used in this code base. - * - * @see http://www.w3.org/TR/REC-xml-names - */ -var NAMESPACE = freeze({ - /** - * The XHTML namespace. - * - * @see http://www.w3.org/1999/xhtml - */ - HTML: 'http://www.w3.org/1999/xhtml', - - /** - * Checks if `uri` equals `NAMESPACE.HTML`. - * - * @param {string} [uri] - * - * @see NAMESPACE.HTML - */ - isHTML: function (uri) { - return uri === NAMESPACE.HTML - }, - - /** - * The SVG namespace. - * - * @see http://www.w3.org/2000/svg - */ - SVG: 'http://www.w3.org/2000/svg', - - /** - * The `xml:` namespace. - * - * @see http://www.w3.org/XML/1998/namespace - */ - XML: 'http://www.w3.org/XML/1998/namespace', - - /** - * The `xmlns:` namespace - * - * @see https://www.w3.org/2000/xmlns/ - */ - XMLNS: 'http://www.w3.org/2000/xmlns/', -}) - -exports.assign = assign; -exports.find = find; -exports.freeze = freeze; -exports.MIME_TYPE = MIME_TYPE; -exports.NAMESPACE = NAMESPACE; - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); -var dom = __webpack_require__(/*! ./dom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js") -var entities = __webpack_require__(/*! ./entities */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js"); -var sax = __webpack_require__(/*! ./sax */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js"); - -var DOMImplementation = dom.DOMImplementation; - -var NAMESPACE = conventions.NAMESPACE; - -var ParseError = sax.ParseError; -var XMLReader = sax.XMLReader; - -/** - * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends: - * - * > XML parsed entities are often stored in computer files which, - * > for editing convenience, are organized into lines. - * > These lines are typically separated by some combination - * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA). - * > - * > To simplify the tasks of applications, the XML processor must behave - * > as if it normalized all line breaks in external parsed entities (including the document entity) - * > on input, before parsing, by translating all of the following to a single #xA character: - * > - * > 1. the two-character sequence #xD #xA - * > 2. the two-character sequence #xD #x85 - * > 3. the single character #x85 - * > 4. the single character #x2028 - * > 5. any #xD character that is not immediately followed by #xA or #x85. - * - * @param {string} input - * @returns {string} - */ -function normalizeLineEndings(input) { - return input - .replace(/\r[\n\u0085]/g, '\n') - .replace(/[\r\u0085\u2028]/g, '\n') -} - -/** - * @typedef Locator - * @property {number} [columnNumber] - * @property {number} [lineNumber] - */ - -/** - * @typedef DOMParserOptions - * @property {DOMHandler} [domBuilder] - * @property {Function} [errorHandler] - * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing - * defaults to `normalizeLineEndings` - * @property {Locator} [locator] - * @property {Record} [xmlns] - * - * @see normalizeLineEndings - */ - -/** - * The DOMParser interface provides the ability to parse XML or HTML source code - * from a string into a DOM `Document`. - * - * _xmldom is different from the spec in that it allows an `options` parameter, - * to override the default behavior._ - * - * @param {DOMParserOptions} [options] - * @constructor - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization - */ -function DOMParser(options){ - this.options = options ||{locator:{}}; -} - -DOMParser.prototype.parseFromString = function(source,mimeType){ - var options = this.options; - var sax = new XMLReader(); - var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler - var errorHandler = options.errorHandler; - var locator = options.locator; - var defaultNSMap = options.xmlns||{}; - var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1; - var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; - if(locator){ - domBuilder.setDocumentLocator(locator) - } - - sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); - sax.domBuilder = options.domBuilder || domBuilder; - if(isHTML){ - defaultNSMap[''] = NAMESPACE.HTML; - } - defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; - var normalize = options.normalizeLineEndings || normalizeLineEndings; - if (source && typeof source === 'string') { - sax.parse( - normalize(source), - defaultNSMap, - entityMap - ) - } else { - sax.errorHandler.error('invalid doc source') - } - return domBuilder.doc; -} -function buildErrorHandler(errorImpl,domBuilder,locator){ - if(!errorImpl){ - if(domBuilder instanceof DOMHandler){ - return domBuilder; - } - errorImpl = domBuilder ; - } - var errorHandler = {} - var isCallback = errorImpl instanceof Function; - locator = locator||{} - function build(key){ - var fn = errorImpl[key]; - if(!fn && isCallback){ - fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; - } - errorHandler[key] = fn && function(msg){ - fn('[xmldom '+key+']\t'+msg+_locator(locator)); - }||function(){}; - } - build('warning'); - build('error'); - build('fatalError'); - return errorHandler; -} - -//console.log('#\n\n\n\n\n\n\n####') -/** - * +ContentHandler+ErrorHandler - * +LexicalHandler+EntityResolver2 - * -DeclHandler-DTDHandler - * - * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler - * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 - * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html - */ -function DOMHandler() { - this.cdata = false; -} -function position(locator,node){ - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; -} -/** - * @see org.xml.sax.ContentHandler#startDocument - * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html - */ -DOMHandler.prototype = { - startDocument : function() { - this.doc = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.doc.documentURI = this.locator.systemId; - } - }, - startElement:function(namespaceURI, localName, qName, attrs) { - var doc = this.doc; - var el = doc.createElementNS(namespaceURI, qName||localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - - this.locator && position(this.locator,el) - for (var i = 0 ; i < len; i++) { - var namespaceURI = attrs.getURI(i); - var value = attrs.getValue(i); - var qName = attrs.getQName(i); - var attr = doc.createAttributeNS(namespaceURI, qName); - this.locator &&position(attrs.getLocator(i),attr); - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr) - } - }, - endElement:function(namespaceURI, localName, qName) { - var current = this.currentElement - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping:function(prefix, uri) { - }, - endPrefixMapping:function(prefix) { - }, - processingInstruction:function(target, data) { - var ins = this.doc.createProcessingInstruction(target, data); - this.locator && position(this.locator,ins) - appendElement(this, ins); - }, - ignorableWhitespace:function(ch, start, length) { - }, - characters:function(chars, start, length) { - chars = _toString.apply(this,arguments) - //console.log(chars) - if(chars){ - if (this.cdata) { - var charNode = this.doc.createCDATASection(chars); - } else { - var charNode = this.doc.createTextNode(chars); - } - if(this.currentElement){ - this.currentElement.appendChild(charNode); - }else if(/^\s*$/.test(chars)){ - this.doc.appendChild(charNode); - //process xml - } - this.locator && position(this.locator,charNode) - } - }, - skippedEntity:function(name) { - }, - endDocument:function() { - this.doc.normalize(); - }, - setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ - locator.lineNumber = 0; - } - }, - //LexicalHandler - comment:function(chars, start, length) { - chars = _toString.apply(this,arguments) - var comm = this.doc.createComment(chars); - this.locator && position(this.locator,comm) - appendElement(this, comm); - }, - - startCDATA:function() { - //used in characters() methods - this.cdata = true; - }, - endCDATA:function() { - this.cdata = false; - }, - - startDTD:function(name, publicId, systemId) { - var impl = this.doc.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator,dt) - appendElement(this, dt); - this.doc.doctype = dt; - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning:function(error) { - console.warn('[xmldom warning]\t'+error,_locator(this.locator)); - }, - error:function(error) { - console.error('[xmldom error]\t'+error,_locator(this.locator)); - }, - fatalError:function(error) { - throw new ParseError(error, this.locator); - } -} -function _locator(l){ - if(l){ - return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' - } -} -function _toString(chars,start,length){ - if(typeof chars == 'string'){ - return chars.substr(start,length) - }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") - if(chars.length >= start+length || start){ - return new java.lang.String(chars,start,length)+''; - } - return chars; - } -} - -/* - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html - * used method of org.xml.sax.ext.LexicalHandler: - * #comment(chars, start, length) - * #startCDATA() - * #endCDATA() - * #startDTD(name, publicId, systemId) - * - * - * IGNORED method of org.xml.sax.ext.LexicalHandler: - * #endDTD() - * #startEntity(name) - * #endEntity(name) - * - * - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html - * IGNORED method of org.xml.sax.ext.DeclHandler - * #attributeDecl(eName, aName, type, mode, value) - * #elementDecl(name, model) - * #externalEntityDecl(name, publicId, systemId) - * #internalEntityDecl(name, value) - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html - * IGNORED method of org.xml.sax.EntityResolver2 - * #resolveEntity(String name,String publicId,String baseURI,String systemId) - * #resolveEntity(publicId, systemId) - * #getExternalSubset(name, baseURI) - * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html - * IGNORED method of org.xml.sax.DTDHandler - * #notationDecl(name, publicId, systemId) {}; - * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; - */ -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ - DOMHandler.prototype[key] = function(){return null} -}) - -/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ -function appendElement (hander,node) { - if (!hander.currentElement) { - hander.doc.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } -}//appendChild and setAttributeNS are preformance key - -exports.__DOMHandler = DOMHandler; -exports.normalizeLineEndings = normalizeLineEndings; -exports.DOMParser = DOMParser; - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js": -/*!************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); - -var find = conventions.find; -var NAMESPACE = conventions.NAMESPACE; - -/** - * A prerequisite for `[].filter`, to drop elements that are empty - * @param {string} input - * @returns {boolean} - */ -function notEmptyString (input) { - return input !== '' -} -/** - * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * - * @param {string} input - * @returns {string[]} (can be empty) - */ -function splitOnASCIIWhitespace(input) { - // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE - return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : [] -} - -/** - * Adds element as a key to current if it is not already present. - * - * @param {Record} current - * @param {string} element - * @returns {Record} - */ -function orderedSetReducer (current, element) { - if (!current.hasOwnProperty(element)) { - current[element] = true; - } - return current; -} - -/** - * @see https://infra.spec.whatwg.org/#ordered-set - * @param {string} input - * @returns {string[]} - */ -function toOrderedSet(input) { - if (!input) return []; - var list = splitOnASCIIWhitespace(input); - return Object.keys(list.reduce(orderedSetReducer, {})) -} - -/** - * Uses `list.indexOf` to implement something like `Array.prototype.includes`, - * which we can not rely on being available. - * - * @param {any[]} list - * @returns {function(any): boolean} - */ -function arrayIncludes (list) { - return function(element) { - return list && list.indexOf(element) !== -1; - } -} - -function copy(src,dest){ - for(var p in src){ - if (Object.prototype.hasOwnProperty.call(src, p)) { - dest[p] = src[p]; - } - } -} - -/** -^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? -^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? - */ -function _extends(Class,Super){ - var pt = Class.prototype; - if(!(pt instanceof Super)){ - function t(){}; - t.prototype = Super.prototype; - t = new t(); - copy(pt,t); - Class.prototype = pt = t; - } - if(pt.constructor != Class){ - if(typeof Class != 'function'){ - console.error("unknown Class:"+Class) - } - pt.constructor = Class - } -} - -// Node Types -var NodeType = {} -var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; -var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; -var TEXT_NODE = NodeType.TEXT_NODE = 3; -var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; -var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; -var ENTITY_NODE = NodeType.ENTITY_NODE = 6; -var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; -var COMMENT_NODE = NodeType.COMMENT_NODE = 8; -var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; -var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; -var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; -var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - -// ExceptionCode -var ExceptionCode = {} -var ExceptionMessage = {}; -var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); -var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); -var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); -var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); -var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); -var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); -var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); -var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); -var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); -var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); -//level2 -var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); -var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); -var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); -var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); -var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - -/** - * DOM Level 2 - * Object DOMException - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html - * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html - */ -function DOMException(code, message) { - if(message instanceof Error){ - var error = message; - }else{ - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); - } - error.code = code; - if(message) this.message = this.message + ": " + message; - return error; -}; -DOMException.prototype = Error.prototype; -copy(ExceptionCode,DOMException) - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 - * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. - * The items in the NodeList are accessible via an integral index, starting from 0. - */ -function NodeList() { -}; -NodeList.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length:0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(index) { - return index >= 0 && index < this.length ? this[index] : null; - }, - toString:function(isHTML,nodeFilter){ - for(var buf = [], i = 0;i=0){ - var lastIndex = list.length-1 - while(i0 || key == 'xmlns'){ -// return null; -// } - //console.log() - var i = this.length; - while(i--){ - var attr = this[i]; - //console.log(attr.nodeName,key) - if(attr.nodeName == key){ - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - /* returns Node */ - setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR - var el = attr.ownerElement, oldAttr; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - - /* returns Node */ - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - - - },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - - //for level2 - removeNamedItemNS:function(namespaceURI,localName){ - var attr = this.getNamedItemNS(namespaceURI,localName); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i = this.length; - while(i--){ - var node = this[i]; - if(node.localName == localName && node.namespaceURI == namespaceURI){ - return node; - } - } - return null; - } -}; - -/** - * The DOMImplementation interface represents an object providing methods - * which are not dependent on any particular document. - * Such an object is returned by the `Document.implementation` property. - * - * __The individual methods describe the differences compared to the specs.__ - * - * @constructor - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN - * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial) - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core - * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core - * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard - */ -function DOMImplementation() { -} - -DOMImplementation.prototype = { - /** - * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. - * The different implementations fairly diverged in what kind of features were reported. - * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. - * - * @deprecated It is deprecated and modern browsers return true in all cases. - * - * @param {string} feature - * @param {string} [version] - * @returns {boolean} always true - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN - * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard - */ - hasFeature: function(feature, version) { - return true; - }, - /** - * Creates an XML Document object of the specified type with its document element. - * - * __It behaves slightly different from the description in the living standard__: - * - There is no interface/class `XMLDocument`, it returns a `Document` instance. - * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string|null} namespaceURI - * @param {string} qualifiedName - * @param {DocumentType=null} doctype - * @returns {Document} - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocument: function(namespaceURI, qualifiedName, doctype){ - var doc = new Document(); - doc.implementation = this; - doc.childNodes = new NodeList(); - doc.doctype = doctype || null; - if (doctype){ - doc.appendChild(doctype); - } - if (qualifiedName){ - var root = doc.createElementNS(namespaceURI, qualifiedName); - doc.appendChild(root); - } - return doc; - }, - /** - * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. - * - * __This behavior is slightly different from the in the specs__: - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string} qualifiedName - * @param {string} [publicId] - * @param {string} [systemId] - * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation - * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocumentType: function(qualifiedName, publicId, systemId){ - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId || ''; - node.systemId = systemId || ''; - - return node; - } -}; - - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 - */ - -function Node() { -}; - -Node.prototype = { - firstChild : null, - lastChild : null, - previousSibling : null, - nextSibling : null, - attributes : null, - parentNode : null, - childNodes : null, - ownerDocument : null, - nodeValue : null, - namespaceURI : null, - prefix : null, - localName : null, - // Modified in DOM Level 2: - insertBefore:function(newChild, refChild){//raises - return _insertBefore(this,newChild,refChild); - }, - replaceChild:function(newChild, oldChild){//raises - _insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument); - if(oldChild){ - this.removeChild(oldChild); - } - }, - removeChild:function(oldChild){ - return _removeChild(this,oldChild); - }, - appendChild:function(newChild){ - return this.insertBefore(newChild,null); - }, - hasChildNodes:function(){ - return this.firstChild != null; - }, - cloneNode:function(deep){ - return cloneNode(this.ownerDocument||this,this,deep); - }, - // Modified in DOM Level 2: - normalize:function(){ - var child = this.firstChild; - while(child){ - var next = child.nextSibling; - if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ - this.removeChild(next); - child.appendData(next.data); - }else{ - child.normalize(); - child = next; - } - } - }, - // Introduced in DOM Level 2: - isSupported:function(feature, version){ - return this.ownerDocument.implementation.hasFeature(feature,version); - }, - // Introduced in DOM Level 2: - hasAttributes:function(){ - return this.attributes.length>0; - }, - /** - * Look up the prefix associated to the given namespace URI, starting from this node. - * **The default namespace declarations are ignored by this method.** - * See Namespace Prefix Lookup for details on the algorithm used by this method. - * - * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ - * - * @param {string | null} namespaceURI - * @returns {string | null} - * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix - * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo - * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix - * @see https://github.com/xmldom/xmldom/issues/322 - */ - lookupPrefix:function(namespaceURI){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - for(var n in map){ - if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) { - return n; - } - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI:function(prefix){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - if(Object.prototype.hasOwnProperty.call(map, prefix)){ - return map[prefix] ; - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace:function(namespaceURI){ - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; - } -}; - - -function _xmlEncoder(c){ - return c == '<' && '<' || - c == '>' && '>' || - c == '&' && '&' || - c == '"' && '"' || - '&#'+c.charCodeAt()+';' -} - - -copy(NodeType,Node); -copy(NodeType,Node.prototype); - -/** - * @param callback return true for continue,false for break - * @return boolean true: break visit; - */ -function _visitNode(node,callback){ - if(callback(node)){ - return true; - } - if(node = node.firstChild){ - do{ - if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } -} - - - -function Document(){ - this.ownerDocument = this; -} - -function _onAddAttribute(doc,el,newAttr){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns === NAMESPACE.XMLNS){ - //update namespace - el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value - } -} - -function _onRemoveAttribute(doc,el,newAttr,remove){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns === NAMESPACE.XMLNS){ - //update namespace - delete el._nsMap[newAttr.prefix?newAttr.localName:''] - } -} - -/** - * Updates `el.childNodes`, updating the indexed items and it's `length`. - * Passing `newChild` means it will be appended. - * Otherwise it's assumed that an item has been removed, - * and `el.firstNode` and it's `.nextSibling` are used - * to walk the current list of child nodes. - * - * @param {Document} doc - * @param {Node} el - * @param {Node} [newChild] - * @private - */ -function _onUpdateChild (doc, el, newChild) { - if(doc && doc._inc){ - doc._inc++; - //update childNodes - var cs = el.childNodes; - if (newChild) { - cs[cs.length++] = newChild; - } else { - var child = el.firstChild; - var i = 0; - while (child) { - cs[i++] = child; - child = child.nextSibling; - } - cs.length = i; - delete cs[cs.length]; - } - } -} - -/** - * Removes the connections between `parentNode` and `child` - * and any existing `child.previousSibling` or `child.nextSibling`. - * - * @see https://github.com/xmldom/xmldom/issues/135 - * @see https://github.com/xmldom/xmldom/issues/145 - * - * @param {Node} parentNode - * @param {Node} child - * @returns {Node} the child that was removed. - * @private - */ -function _removeChild (parentNode, child) { - var previous = child.previousSibling; - var next = child.nextSibling; - if (previous) { - previous.nextSibling = next; - } else { - parentNode.firstChild = next; - } - if (next) { - next.previousSibling = previous; - } else { - parentNode.lastChild = previous; - } - child.parentNode = null; - child.previousSibling = null; - child.nextSibling = null; - _onUpdateChild(parentNode.ownerDocument, parentNode); - return child; -} - -/** - * Returns `true` if `node` can be a parent for insertion. - * @param {Node} node - * @returns {boolean} - */ -function hasValidParentNodeType(node) { - return ( - node && - (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE) - ); -} - -/** - * Returns `true` if `node` can be inserted according to it's `nodeType`. - * @param {Node} node - * @returns {boolean} - */ -function hasInsertableNodeType(node) { - return ( - node && - (isElementNode(node) || - isTextNode(node) || - isDocTypeNode(node) || - node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || - node.nodeType === Node.COMMENT_NODE || - node.nodeType === Node.PROCESSING_INSTRUCTION_NODE) - ); -} - -/** - * Returns true if `node` is a DOCTYPE node - * @param {Node} node - * @returns {boolean} - */ -function isDocTypeNode(node) { - return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; -} - -/** - * Returns true if the node is an element - * @param {Node} node - * @returns {boolean} - */ -function isElementNode(node) { - return node && node.nodeType === Node.ELEMENT_NODE; -} -/** - * Returns true if `node` is a text node - * @param {Node} node - * @returns {boolean} - */ -function isTextNode(node) { - return node && node.nodeType === Node.TEXT_NODE; -} - -/** - * Check if en element node can be inserted before `child`, or at the end if child is falsy, - * according to the presence and position of a doctype node on the same level. - * - * @param {Document} doc The document node - * @param {Node} child the node that would become the nextSibling if the element would be inserted - * @returns {boolean} `true` if an element can be inserted before child - * @private - * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function isElementInsertionPossible(doc, child) { - var parentChildNodes = doc.childNodes || []; - if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { - return false; - } - var docTypeNode = find(parentChildNodes, isDocTypeNode); - return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); -} - -/** - * Check if en element node can be inserted before `child`, or at the end if child is falsy, - * according to the presence and position of a doctype node on the same level. - * - * @param {Node} doc The document node - * @param {Node} child the node that would become the nextSibling if the element would be inserted - * @returns {boolean} `true` if an element can be inserted before child - * @private - * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function isElementReplacementPossible(doc, child) { - var parentChildNodes = doc.childNodes || []; - - function hasElementChildThatIsNotChild(node) { - return isElementNode(node) && node !== child; - } - - if (find(parentChildNodes, hasElementChildThatIsNotChild)) { - return false; - } - var docTypeNode = find(parentChildNodes, isDocTypeNode); - return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); -} - -/** - * @private - * Steps 1-5 of the checks before inserting and before replacing a child are the same. - * - * @param {Node} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node=} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreInsertionValidity1to5(parent, node, child) { - // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException. - if (!hasValidParentNodeType(parent)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType); - } - // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException. - // not implemented! - // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException. - if (child && child.parentNode !== parent) { - throw new DOMException(NOT_FOUND_ERR, 'child not in parent'); - } - if ( - // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. - !hasInsertableNodeType(node) || - // 5. If either `node` is a Text node and `parent` is a document, - // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 - // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) - // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. - (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) - ) { - throw new DOMException( - HIERARCHY_REQUEST_ERR, - 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType - ); - } -} - -/** - * @private - * Step 6 of the checks before inserting and before replacing a child are different. - * - * @param {Document} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node | undefined} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreInsertionValidityInDocument(parent, node, child) { - var parentChildNodes = parent.childNodes || []; - var nodeChildNodes = node.childNodes || []; - - // DocumentFragment - if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - var nodeChildElements = nodeChildNodes.filter(isElementNode); - // If node has more than one element child or has a Text node child. - if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); - } - // Otherwise, if `node` has one element child and either `parent` has an element child, - // `child` is a doctype, or `child` is non-null and a doctype is following `child`. - if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); - } - } - // Element - if (isElementNode(node)) { - // `parent` has an element child, `child` is a doctype, - // or `child` is non-null and a doctype is following `child`. - if (!isElementInsertionPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); - } - } - // DocumentType - if (isDocTypeNode(node)) { - // `parent` has a doctype child, - if (find(parentChildNodes, isDocTypeNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); - } - var parentElementChild = find(parentChildNodes, isElementNode); - // `child` is non-null and an element is preceding `child`, - if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); - } - // or `child` is null and `parent` has an element child. - if (!child && parentElementChild) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present'); - } - } -} - -/** - * @private - * Step 6 of the checks before inserting and before replacing a child are different. - * - * @param {Document} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node | undefined} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreReplacementValidityInDocument(parent, node, child) { - var parentChildNodes = parent.childNodes || []; - var nodeChildNodes = node.childNodes || []; - - // DocumentFragment - if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - var nodeChildElements = nodeChildNodes.filter(isElementNode); - // If `node` has more than one element child or has a Text node child. - if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); - } - // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`. - if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); - } - } - // Element - if (isElementNode(node)) { - // `parent` has an element child that is not `child` or a doctype is following `child`. - if (!isElementReplacementPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); - } - } - // DocumentType - if (isDocTypeNode(node)) { - function hasDoctypeChildThatIsNotChild(node) { - return isDocTypeNode(node) && node !== child; - } - - // `parent` has a doctype child that is not `child`, - if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); - } - var parentElementChild = find(parentChildNodes, isElementNode); - // or an element is preceding `child`. - if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); - } - } -} - -/** - * @private - * @param {Node} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node=} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function _insertBefore(parent, node, child, _inDocumentAssertion) { - // To ensure pre-insertion validity of a node into a parent before a child, run these steps: - assertPreInsertionValidity1to5(parent, node, child); - - // If parent is a document, and any of the statements below, switched on the interface node implements, - // are true, then throw a "HierarchyRequestError" DOMException. - if (parent.nodeType === Node.DOCUMENT_NODE) { - (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); - } - - var cp = node.parentNode; - if(cp){ - cp.removeChild(node);//remove and update - } - if(node.nodeType === DOCUMENT_FRAGMENT_NODE){ - var newFirst = node.firstChild; - if (newFirst == null) { - return node; - } - var newLast = node.lastChild; - }else{ - newFirst = newLast = node; - } - var pre = child ? child.previousSibling : parent.lastChild; - - newFirst.previousSibling = pre; - newLast.nextSibling = child; - - - if(pre){ - pre.nextSibling = newFirst; - }else{ - parent.firstChild = newFirst; - } - if(child == null){ - parent.lastChild = newLast; - }else{ - child.previousSibling = newLast; - } - do{ - newFirst.parentNode = parent; - }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) - _onUpdateChild(parent.ownerDocument||parent, parent); - //console.log(parent.lastChild.nextSibling == null) - if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { - node.firstChild = node.lastChild = null; - } - return node; -} - -/** - * Appends `newChild` to `parentNode`. - * If `newChild` is already connected to a `parentNode` it is first removed from it. - * - * @see https://github.com/xmldom/xmldom/issues/135 - * @see https://github.com/xmldom/xmldom/issues/145 - * @param {Node} parentNode - * @param {Node} newChild - * @returns {Node} - * @private - */ -function _appendSingleChild (parentNode, newChild) { - if (newChild.parentNode) { - newChild.parentNode.removeChild(newChild); - } - newChild.parentNode = parentNode; - newChild.previousSibling = parentNode.lastChild; - newChild.nextSibling = null; - if (newChild.previousSibling) { - newChild.previousSibling.nextSibling = newChild; - } else { - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); - return newChild; -} - -Document.prototype = { - //implementation : null, - nodeName : '#document', - nodeType : DOCUMENT_NODE, - /** - * The DocumentType node of the document. - * - * @readonly - * @type DocumentType - */ - doctype : null, - documentElement : null, - _inc : 1, - - insertBefore : function(newChild, refChild){//raises - if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ - var child = newChild.firstChild; - while(child){ - var next = child.nextSibling; - this.insertBefore(child,refChild); - child = next; - } - return newChild; - } - _insertBefore(this, newChild, refChild); - newChild.ownerDocument = this; - if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { - this.documentElement = newChild; - } - - return newChild; - }, - removeChild : function(oldChild){ - if(this.documentElement == oldChild){ - this.documentElement = null; - } - return _removeChild(this,oldChild); - }, - replaceChild: function (newChild, oldChild) { - //raises - _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); - newChild.ownerDocument = this; - if (oldChild) { - this.removeChild(oldChild); - } - if (isElementNode(newChild)) { - this.documentElement = newChild; - } - }, - // Introduced in DOM Level 2: - importNode : function(importedNode,deep){ - return importNode(this,importedNode,deep); - }, - // Introduced in DOM Level 2: - getElementById : function(id){ - var rtv = null; - _visitNode(this.documentElement,function(node){ - if(node.nodeType == ELEMENT_NODE){ - if(node.getAttribute('id') == id){ - rtv = node; - return true; - } - } - }) - return rtv; - }, - - /** - * The `getElementsByClassName` method of `Document` interface returns an array-like object - * of all child elements which have **all** of the given class name(s). - * - * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. - * - * - * Warning: This is a live LiveNodeList. - * Changes in the DOM will reflect in the array as the changes occur. - * If an element selected by this array no longer qualifies for the selector, - * it will automatically be removed. Be aware of this for iteration purposes. - * - * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName - * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname - */ - getElementsByClassName: function(classNames) { - var classNamesSet = toOrderedSet(classNames) - return new LiveNodeList(this, function(base) { - var ls = []; - if (classNamesSet.length > 0) { - _visitNode(base.documentElement, function(node) { - if(node !== base && node.nodeType === ELEMENT_NODE) { - var nodeClassNames = node.getAttribute('class') - // can be null if the attribute does not exist - if (nodeClassNames) { - // before splitting and iterating just compare them for the most common case - var matches = classNames === nodeClassNames; - if (!matches) { - var nodeClassNamesSet = toOrderedSet(nodeClassNames) - matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)) - } - if(matches) { - ls.push(node); - } - } - } - }); - } - return ls; - }); - }, - - //document factory method: - createElement : function(tagName){ - var node = new Element(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.localName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment : function(){ - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode : function(data){ - var node = new Text(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createComment : function(data){ - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createCDATASection : function(data){ - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createProcessingInstruction : function(target,data){ - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.nodeName = node.target = target; - node.nodeValue = node.data = data; - return node; - }, - createAttribute : function(name){ - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference : function(name){ - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - // Introduced in DOM Level 2: - createElementNS : function(namespaceURI,qualifiedName){ - var node = new Element(); - var pl = qualifiedName.split(':'); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - // Introduced in DOM Level 2: - createAttributeNS : function(namespaceURI,qualifiedName){ - var node = new Attr(); - var pl = qualifiedName.split(':'); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - return node; - } -}; -_extends(Document,Node); - - -function Element() { - this._nsMap = {}; -}; -Element.prototype = { - nodeType : ELEMENT_NODE, - hasAttribute : function(name){ - return this.getAttributeNode(name)!=null; - }, - getAttribute : function(name){ - var attr = this.getAttributeNode(name); - return attr && attr.value || ''; - }, - getAttributeNode : function(name){ - return this.attributes.getNamedItem(name); - }, - setAttribute : function(name, value){ - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - removeAttribute : function(name){ - var attr = this.getAttributeNode(name) - attr && this.removeAttributeNode(attr); - }, - - //four real opeartion method - appendChild:function(newChild){ - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - return this.insertBefore(newChild,null); - }else{ - return _appendSingleChild(this,newChild); - } - }, - setAttributeNode : function(newAttr){ - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS : function(newAttr){ - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode : function(oldAttr){ - //console.log(this == oldAttr.ownerElement) - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS : function(namespaceURI, localName){ - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - - hasAttributeNS : function(namespaceURI, localName){ - return this.getAttributeNodeNS(namespaceURI, localName)!=null; - }, - getAttributeNS : function(namespaceURI, localName){ - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ''; - }, - setAttributeNS : function(namespaceURI, qualifiedName, value){ - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - getAttributeNodeNS : function(namespaceURI, localName){ - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - - getElementsByTagName : function(tagName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS : function(namespaceURI, localName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ - ls.push(node); - } - }); - return ls; - - }); - } -}; -Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; -Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; - - -_extends(Element,Node); -function Attr() { -}; -Attr.prototype.nodeType = ATTRIBUTE_NODE; -_extends(Attr,Node); - - -function CharacterData() { -}; -CharacterData.prototype = { - data : '', - substringData : function(offset, count) { - return this.data.substring(offset, offset+count); - }, - appendData: function(text) { - text = this.data+text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset,text) { - this.replaceData(offset,0,text); - - }, - appendChild:function(newChild){ - throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]) - }, - deleteData: function(offset, count) { - this.replaceData(offset,count,""); - }, - replaceData: function(offset, count, text) { - var start = this.data.substring(0,offset); - var end = this.data.substring(offset+count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } -} -_extends(CharacterData,Node); -function Text() { -}; -Text.prototype = { - nodeName : "#text", - nodeType : TEXT_NODE, - splitText : function(offset) { - var text = this.data; - var newText = text.substring(offset); - text = text.substring(0, offset); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if(this.parentNode){ - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; - } -} -_extends(Text,CharacterData); -function Comment() { -}; -Comment.prototype = { - nodeName : "#comment", - nodeType : COMMENT_NODE -} -_extends(Comment,CharacterData); - -function CDATASection() { -}; -CDATASection.prototype = { - nodeName : "#cdata-section", - nodeType : CDATA_SECTION_NODE -} -_extends(CDATASection,CharacterData); - - -function DocumentType() { -}; -DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; -_extends(DocumentType,Node); - -function Notation() { -}; -Notation.prototype.nodeType = NOTATION_NODE; -_extends(Notation,Node); - -function Entity() { -}; -Entity.prototype.nodeType = ENTITY_NODE; -_extends(Entity,Node); - -function EntityReference() { -}; -EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; -_extends(EntityReference,Node); - -function DocumentFragment() { -}; -DocumentFragment.prototype.nodeName = "#document-fragment"; -DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; -_extends(DocumentFragment,Node); - - -function ProcessingInstruction() { -} -ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; -_extends(ProcessingInstruction,Node); -function XMLSerializer(){} -XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){ - return nodeSerializeToString.call(node,isHtml,nodeFilter); -} -Node.prototype.toString = nodeSerializeToString; -function nodeSerializeToString(isHtml,nodeFilter){ - var buf = []; - var refNode = this.nodeType == 9 && this.documentElement || this; - var prefix = refNode.prefix; - var uri = refNode.namespaceURI; - - if(uri && prefix == null){ - //console.log(prefix) - var prefix = refNode.lookupPrefix(uri); - if(prefix == null){ - //isHTML = true; - var visibleNamespaces=[ - {namespace:uri,prefix:null} - //{namespace:uri,prefix:''} - ] - } - } - serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces); - //console.log('###',this.nodeType,uri,prefix,buf.join('')) - return buf.join(''); -} - -function needNamespaceDefine(node, isHTML, visibleNamespaces) { - var prefix = node.prefix || ''; - var uri = node.namespaceURI; - // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) , - // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl : - // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty. - // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using) - // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared : - // > [...] Furthermore, the attribute value [...] must not be an empty string. - // so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document. - if (!uri) { - return false; - } - if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { - return false; - } - - var i = visibleNamespaces.length - while (i--) { - var ns = visibleNamespaces[i]; - // get namespace prefix - if (ns.prefix === prefix) { - return ns.namespace !== uri; - } - } - return true; -} -/** - * Well-formed constraint: No < in Attribute Values - * > The replacement text of any entity referred to directly or indirectly - * > in an attribute value must not contain a <. - * @see https://www.w3.org/TR/xml11/#CleanAttrVals - * @see https://www.w3.org/TR/xml11/#NT-AttValue - * - * Literal whitespace other than space that appear in attribute values - * are serialized as their entity references, so they will be preserved. - * (In contrast to whitespace literals in the input which are normalized to spaces) - * @see https://www.w3.org/TR/xml11/#AVNormalize - * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes - */ -function addSerializedAttribute(buf, qualifiedName, value) { - buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"') -} - -function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){ - if (!visibleNamespaces) { - visibleNamespaces = []; - } - - if(nodeFilter){ - node = nodeFilter(node); - if(node){ - if(typeof node == 'string'){ - buf.push(node); - return; - } - }else{ - return; - } - //buf.sort.apply(attrs, attributeSorter); - } - - switch(node.nodeType){ - case ELEMENT_NODE: - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - - isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML - - var prefixedNodeName = nodeName - if (!isHTML && !node.prefix && node.namespaceURI) { - var defaultNS - // lookup current default ns from `xmlns` attribute - for (var ai = 0; ai < attrs.length; ai++) { - if (attrs.item(ai).name === 'xmlns') { - defaultNS = attrs.item(ai).value - break - } - } - if (!defaultNS) { - // lookup current default ns in visibleNamespaces - for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { - var namespace = visibleNamespaces[nsi] - if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) { - defaultNS = namespace.namespace - break - } - } - } - if (defaultNS !== node.namespaceURI) { - for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { - var namespace = visibleNamespaces[nsi] - if (namespace.namespace === node.namespaceURI) { - if (namespace.prefix) { - prefixedNodeName = namespace.prefix + ':' + nodeName - } - break - } - } - } - } - - buf.push('<', prefixedNodeName); - - for(var i=0;i'); - //if is cdata child node - if(isHTML && /^script$/i.test(nodeName)){ - while(child){ - if(child.data){ - buf.push(child.data); - }else{ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - } - child = child.nextSibling; - } - }else - { - while(child){ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - child = child.nextSibling; - } - } - buf.push(''); - }else{ - buf.push('/>'); - } - // remove added visible namespaces - //visibleNamespaces.length = startVisibleNamespaces; - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while(child){ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return addSerializedAttribute(buf, node.name, node.value); - case TEXT_NODE: - /** - * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, - * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. - * If they are needed elsewhere, they must be escaped using either numeric character references or the strings - * `&` and `<` respectively. - * The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, - * be escaped using either `>` or a character reference when it appears in the string `]]>` in content, - * when that string is not marking the end of a CDATA section. - * - * In the content of elements, character data is any string of characters - * which does not contain the start-delimiter of any markup - * and does not include the CDATA-section-close delimiter, `]]>`. - * - * @see https://www.w3.org/TR/xml/#NT-CharData - * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node - */ - return buf.push(node.data - .replace(/[<&>]/g,_xmlEncoder) - ); - case CDATA_SECTION_NODE: - return buf.push( ''); - case COMMENT_NODE: - return buf.push( ""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push(''); - }else if(sysid && sysid!='.'){ - buf.push(' SYSTEM ', sysid, '>'); - }else{ - var sub = node.internalSubset; - if(sub){ - buf.push(" [",sub,"]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push( ""); - case ENTITY_REFERENCE_NODE: - return buf.push( '&',node.nodeName,';'); - //case ENTITY_NODE: - //case NOTATION_NODE: - default: - buf.push('??',node.nodeName); - } -} -function importNode(doc,node,deep){ - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - //var attrs = node2.attributes; - //var len = attrs.length; - //for(var i=0;i { - -"use strict"; - - -var freeze = (__webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js").freeze); - -/** - * The entities that are predefined in every XML document. - * - * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1 - * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0 - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia - */ -exports.XML_ENTITIES = freeze({ - amp: '&', - apos: "'", - gt: '>', - lt: '<', - quot: '"', -}); - -/** - * A map of all entities that are detected in an HTML document. - * They contain all entries from `XML_ENTITIES`. - * - * @see XML_ENTITIES - * @see DOMParser.parseFromString - * @see DOMImplementation.prototype.createHTMLDocument - * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec - * @see https://html.spec.whatwg.org/entities.json JSON - * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names - * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML) - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML) + * @see XML_ENTITIES + * @see DOMParser.parseFromString + * @see DOMImplementation.prototype.createHTMLDocument + * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec + * @see https://html.spec.whatwg.org/entities.json JSON + * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names + * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML) + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML) */ exports.HTML_ENTITIES = freeze({ Aacute: '\u00C1', @@ -14419,17 +12022,17 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! videojs-vtt.js */ "./node_modules/videojs-vtt.js/lib/browser-index.js"); /* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url.js */ "./node_modules/@videojs/vhs-utils/es/resolve-url.js"); +/* harmony import */ var _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js"); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var m3u8_parser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! m3u8-parser */ "./node_modules/m3u8-parser/dist/m3u8-parser.es.js"); -/* harmony import */ var _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @videojs/vhs-utils/es/codecs.js */ "./node_modules/@videojs/vhs-utils/es/codecs.js"); -/* harmony import */ var _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-types.js */ "./node_modules/@videojs/vhs-utils/es/media-types.js"); -/* harmony import */ var _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @videojs/vhs-utils/es/byte-helpers */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js"); +/* harmony import */ var _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @videojs/vhs-utils/es/codecs.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js"); +/* harmony import */ var _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-types.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js"); +/* harmony import */ var _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @videojs/vhs-utils/es/byte-helpers */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); /* harmony import */ var mpd_parser__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! mpd-parser */ "./node_modules/mpd-parser/dist/mpd-parser.es.js"); /* harmony import */ var mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! mux.js/lib/tools/parse-sidx */ "./node_modules/mux.js/lib/tools/parse-sidx.js"); /* harmony import */ var mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @videojs/vhs-utils/es/id3-helpers */ "./node_modules/@videojs/vhs-utils/es/id3-helpers.js"); -/* harmony import */ var _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @videojs/vhs-utils/es/containers */ "./node_modules/@videojs/vhs-utils/es/containers.js"); +/* harmony import */ var _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @videojs/vhs-utils/es/id3-helpers */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js"); +/* harmony import */ var _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @videojs/vhs-utils/es/containers */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js"); /* harmony import */ var mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mux.js/lib/utils/clock */ "./node_modules/mux.js/lib/utils/clock.js"); /* harmony import */ var mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__); /** @@ -34097,11591 +31700,13865 @@ Html5.resetMediaElement = function (el) { * The value of `networkState` from the media element. This will be a number * from the list in the description. * - * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate} + * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate} + */ +'networkState', +/** + * Get the value of `readyState` from the media element. `readyState` indicates + * the current state of the media element. It returns an enumeration from the + * following list: + * - 0: HAVE_NOTHING + * - 1: HAVE_METADATA + * - 2: HAVE_CURRENT_DATA + * - 3: HAVE_FUTURE_DATA + * - 4: HAVE_ENOUGH_DATA + * + * @method Html5#readyState + * @return {number} + * The value of `readyState` from the media element. This will be a number + * from the list in the description. + * + * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states} + */ +'readyState', +/** + * Get the value of `videoWidth` from the video element. `videoWidth` indicates + * the current width of the video in css pixels. + * + * @method Html5#videoWidth + * @return {number} + * The value of `videoWidth` from the video element. This will be a number + * in css pixels. + * + * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth} + */ +'videoWidth', +/** + * Get the value of `videoHeight` from the video element. `videoHeight` indicates + * the current height of the video in css pixels. + * + * @method Html5#videoHeight + * @return {number} + * The value of `videoHeight` from the video element. This will be a number + * in css pixels. + * + * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth} + */ +'videoHeight', +/** + * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates + * to the browser that should sent the cookies along with the requests for the + * different assets/playlists + * + * @method Html5#crossOrigin + * @return {string} + * - anonymous indicates that the media should not sent cookies. + * - use-credentials indicates that the media should sent cookies along the requests. + * + * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin} + */ +'crossOrigin'].forEach(function (prop) { + Html5.prototype[prop] = function () { + return this.el_[prop]; + }; +}); + +// Wrap native properties with a setter in this format: +// set + toTitleCase(name) +// The list is as follows: +// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate, +// setDisablePictureInPicture, setCrossOrigin +[ +/** + * Set the value of `volume` on the media element. `volume` indicates the current + * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and + * so on. + * + * @method Html5#setVolume + * @param {number} percentAsDecimal + * The volume percent as a decimal. Valid range is from 0-1. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume} + */ +'volume', +/** + * Set the value of `src` on the media element. `src` indicates the current + * {@link Tech~SourceObject} for the media. + * + * @method Html5#setSrc + * @param {Tech~SourceObject} src + * The source object to set as the current source. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src} + */ +'src', +/** + * Set the value of `poster` on the media element. `poster` is the url to + * an image file that can/will be shown when no media data is available. + * + * @method Html5#setPoster + * @param {string} poster + * The url to an image that should be used as the `poster` for the media + * element. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster} + */ +'poster', +/** + * Set the value of `preload` on the media element. `preload` indicates + * what should download before the media is interacted with. It can have the following + * values: + * - none: nothing should be downloaded + * - metadata: poster and the first few frames of the media may be downloaded to get + * media dimensions and other metadata + * - auto: allow the media and metadata for the media to be downloaded before + * interaction + * + * @method Html5#setPreload + * @param {string} preload + * The value of `preload` to set on the media element. Must be 'none', 'metadata', + * or 'auto'. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload} + */ +'preload', +/** + * Set the value of `playbackRate` on the media element. `playbackRate` indicates + * the rate at which the media should play back. Examples: + * - if playbackRate is set to 2, media will play twice as fast. + * - if playbackRate is set to 0.5, media will play half as fast. + * + * @method Html5#setPlaybackRate + * @return {number} + * The value of `playbackRate` from the media element. A number indicating + * the current playback speed of the media, where 1 is normal speed. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate} + */ +'playbackRate', +/** + * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates + * the rate at which the media should play back upon initial startup. Changing this value + * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}. + * + * Example Values: + * - if playbackRate is set to 2, media will play twice as fast. + * - if playbackRate is set to 0.5, media will play half as fast. + * + * @method Html5.prototype.setDefaultPlaybackRate + * @return {number} + * The value of `defaultPlaybackRate` from the media element. A number indicating + * the current playback speed of the media, where 1 is normal speed. + * + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate} + */ +'defaultPlaybackRate', +/** + * Prevents the browser from suggesting a Picture-in-Picture context menu + * or to request Picture-in-Picture automatically in some cases. + * + * @method Html5#setDisablePictureInPicture + * @param {boolean} value + * The true value will disable Picture-in-Picture mode. + * + * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip} + */ +'disablePictureInPicture', +/** + * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates + * to the browser that should sent the cookies along with the requests for the + * different assets/playlists + * + * @method Html5#setCrossOrigin + * @param {string} crossOrigin + * - anonymous indicates that the media should not sent cookies. + * - use-credentials indicates that the media should sent cookies along the requests. + * + * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin} + */ +'crossOrigin'].forEach(function (prop) { + Html5.prototype['set' + toTitleCase$1(prop)] = function (v) { + this.el_[prop] = v; + }; +}); + +// wrap native functions with a function +// The list is as follows: +// pause, load, play +[ +/** + * A wrapper around the media elements `pause` function. This will call the `HTML5` + * media elements `pause` function. + * + * @method Html5#pause + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause} + */ +'pause', +/** + * A wrapper around the media elements `load` function. This will call the `HTML5`s + * media element `load` function. + * + * @method Html5#load + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load} + */ +'load', +/** + * A wrapper around the media elements `play` function. This will call the `HTML5`s + * media element `play` function. + * + * @method Html5#play + * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play} + */ +'play'].forEach(function (prop) { + Html5.prototype[prop] = function () { + return this.el_[prop](); + }; +}); +Tech.withSourceHandlers(Html5); + +/** + * Native source handler for Html5, simply passes the source to the media element. + * + * @property {Tech~SourceObject} source + * The source object + * + * @property {Html5} tech + * The instance of the HTML5 tech. + */ +Html5.nativeSourceHandler = {}; + +/** + * Check if the media element can play the given mime type. + * + * @param {string} type + * The mimetype to check + * + * @return {string} + * 'probably', 'maybe', or '' (empty string) + */ +Html5.nativeSourceHandler.canPlayType = function (type) { + // IE without MediaPlayer throws an error (#519) + try { + return Html5.TEST_VID.canPlayType(type); + } catch (e) { + return ''; + } +}; + +/** + * Check if the media element can handle a source natively. + * + * @param {Tech~SourceObject} source + * The source object + * + * @param {Object} [options] + * Options to be passed to the tech. + * + * @return {string} + * 'probably', 'maybe', or '' (empty string). + */ +Html5.nativeSourceHandler.canHandleSource = function (source, options) { + // If a type was provided we should rely on that + if (source.type) { + return Html5.nativeSourceHandler.canPlayType(source.type); + + // If no type, fall back to checking 'video/[EXTENSION]' + } else if (source.src) { + const ext = getFileExtension(source.src); + return Html5.nativeSourceHandler.canPlayType(`video/${ext}`); + } + return ''; +}; + +/** + * Pass the source to the native media element. + * + * @param {Tech~SourceObject} source + * The source object + * + * @param {Html5} tech + * The instance of the Html5 tech + * + * @param {Object} [options] + * The options to pass to the source + */ +Html5.nativeSourceHandler.handleSource = function (source, tech, options) { + tech.setSrc(source.src); +}; + +/** + * A noop for the native dispose function, as cleanup is not needed. + */ +Html5.nativeSourceHandler.dispose = function () {}; + +// Register the native source handler +Html5.registerSourceHandler(Html5.nativeSourceHandler); +Tech.registerTech('Html5', Html5); + +/** + * @file player.js + */ + +// The following tech events are simply re-triggered +// on the player when they happen +const TECH_EVENTS_RETRIGGER = [ +/** + * Fired while the user agent is downloading media data. + * + * @event Player#progress + * @type {Event} + */ +/** + * Retrigger the `progress` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechProgress_ + * @fires Player#progress + * @listens Tech#progress + */ +'progress', +/** + * Fires when the loading of an audio/video is aborted. + * + * @event Player#abort + * @type {Event} + */ +/** + * Retrigger the `abort` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechAbort_ + * @fires Player#abort + * @listens Tech#abort + */ +'abort', +/** + * Fires when the browser is intentionally not getting media data. + * + * @event Player#suspend + * @type {Event} + */ +/** + * Retrigger the `suspend` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechSuspend_ + * @fires Player#suspend + * @listens Tech#suspend + */ +'suspend', +/** + * Fires when the current playlist is empty. + * + * @event Player#emptied + * @type {Event} + */ +/** + * Retrigger the `emptied` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechEmptied_ + * @fires Player#emptied + * @listens Tech#emptied + */ +'emptied', +/** + * Fires when the browser is trying to get media data, but data is not available. + * + * @event Player#stalled + * @type {Event} + */ +/** + * Retrigger the `stalled` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechStalled_ + * @fires Player#stalled + * @listens Tech#stalled + */ +'stalled', +/** + * Fires when the browser has loaded meta data for the audio/video. + * + * @event Player#loadedmetadata + * @type {Event} + */ +/** + * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechLoadedmetadata_ + * @fires Player#loadedmetadata + * @listens Tech#loadedmetadata + */ +'loadedmetadata', +/** + * Fires when the browser has loaded the current frame of the audio/video. + * + * @event Player#loadeddata + * @type {event} + */ +/** + * Retrigger the `loadeddata` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechLoaddeddata_ + * @fires Player#loadeddata + * @listens Tech#loadeddata + */ +'loadeddata', +/** + * Fires when the current playback position has changed. + * + * @event Player#timeupdate + * @type {event} + */ +/** + * Retrigger the `timeupdate` event that was triggered by the {@link Tech}. + * + * @private + * @method Player#handleTechTimeUpdate_ + * @fires Player#timeupdate + * @listens Tech#timeupdate */ -'networkState', +'timeupdate', /** - * Get the value of `readyState` from the media element. `readyState` indicates - * the current state of the media element. It returns an enumeration from the - * following list: - * - 0: HAVE_NOTHING - * - 1: HAVE_METADATA - * - 2: HAVE_CURRENT_DATA - * - 3: HAVE_FUTURE_DATA - * - 4: HAVE_ENOUGH_DATA + * Fires when the video's intrinsic dimensions change * - * @method Html5#readyState - * @return {number} - * The value of `readyState` from the media element. This will be a number - * from the list in the description. + * @event Player#resize + * @type {event} + */ +/** + * Retrigger the `resize` event that was triggered by the {@link Tech}. * - * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states} + * @private + * @method Player#handleTechResize_ + * @fires Player#resize + * @listens Tech#resize */ -'readyState', +'resize', /** - * Get the value of `videoWidth` from the video element. `videoWidth` indicates - * the current width of the video in css pixels. + * Fires when the volume has been changed * - * @method Html5#videoWidth - * @return {number} - * The value of `videoWidth` from the video element. This will be a number - * in css pixels. + * @event Player#volumechange + * @type {event} + */ +/** + * Retrigger the `volumechange` event that was triggered by the {@link Tech}. * - * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth} + * @private + * @method Player#handleTechVolumechange_ + * @fires Player#volumechange + * @listens Tech#volumechange */ -'videoWidth', +'volumechange', /** - * Get the value of `videoHeight` from the video element. `videoHeight` indicates - * the current height of the video in css pixels. + * Fires when the text track has been changed * - * @method Html5#videoHeight - * @return {number} - * The value of `videoHeight` from the video element. This will be a number - * in css pixels. + * @event Player#texttrackchange + * @type {event} + */ +/** + * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}. * - * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth} + * @private + * @method Player#handleTechTexttrackchange_ + * @fires Player#texttrackchange + * @listens Tech#texttrackchange */ -'videoHeight', +'texttrackchange']; + +// events to queue when playback rate is zero +// this is a hash for the sole purpose of mapping non-camel-cased event names +// to camel-cased function names +const TECH_EVENTS_QUEUE = { + canplay: 'CanPlay', + canplaythrough: 'CanPlayThrough', + playing: 'Playing', + seeked: 'Seeked' +}; +const BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge']; +const BREAKPOINT_CLASSES = {}; + +// grep: vjs-layout-tiny +// grep: vjs-layout-x-small +// grep: vjs-layout-small +// grep: vjs-layout-medium +// grep: vjs-layout-large +// grep: vjs-layout-x-large +// grep: vjs-layout-huge +BREAKPOINT_ORDER.forEach(k => { + const v = k.charAt(0) === 'x' ? `x-${k.substring(1)}` : k; + BREAKPOINT_CLASSES[k] = `vjs-layout-${v}`; +}); +const DEFAULT_BREAKPOINTS = { + tiny: 210, + xsmall: 320, + small: 425, + medium: 768, + large: 1440, + xlarge: 2560, + huge: Infinity +}; + /** - * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates - * to the browser that should sent the cookies along with the requests for the - * different assets/playlists + * An instance of the `Player` class is created when any of the Video.js setup methods + * are used to initialize a video. * - * @method Html5#crossOrigin - * @return {string} - * - anonymous indicates that the media should not sent cookies. - * - use-credentials indicates that the media should sent cookies along the requests. + * After an instance has been created it can be accessed globally in three ways: + * 1. By calling `videojs.getPlayer('example_video_1');` + * 2. By calling `videojs('example_video_1');` (not recommended) + * 2. By using it directly via `videojs.players.example_video_1;` * - * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin} + * @extends Component + * @global */ -'crossOrigin'].forEach(function (prop) { - Html5.prototype[prop] = function () { - return this.el_[prop]; - }; -}); +class Player extends Component$1 { + /** + * Create an instance of this class. + * + * @param {Element} tag + * The original video DOM element used for configuring options. + * + * @param {Object} [options] + * Object of option names and values. + * + * @param {Function} [ready] + * Ready callback function. + */ + constructor(tag, options, ready) { + // Make sure tag ID exists + // also here.. probably better + tag.id = tag.id || options.id || `vjs_video_${newGUID()}`; + + // Set Options + // The options argument overrides options set in the video tag + // which overrides globally set options. + // This latter part coincides with the load order + // (tag must exist before Player) + options = Object.assign(Player.getTagSettings(tag), options); + + // Delay the initialization of children because we need to set up + // player properties first, and can't use `this` before `super()` + options.initChildren = false; + + // Same with creating the element + options.createEl = false; + + // don't auto mixin the evented mixin + options.evented = false; + + // we don't want the player to report touch activity on itself + // see enableTouchActivity in Component + options.reportTouchActivity = false; + + // If language is not set, get the closest lang attribute + if (!options.language) { + const closest = tag.closest('[lang]'); + if (closest) { + options.language = closest.getAttribute('lang'); + } + } + + // Run base component initializing with new options + super(null, options, ready); + + // Create bound methods for document listeners. + this.boundDocumentFullscreenChange_ = e => this.documentFullscreenChange_(e); + this.boundFullWindowOnEscKey_ = e => this.fullWindowOnEscKey(e); + this.boundUpdateStyleEl_ = e => this.updateStyleEl_(e); + this.boundApplyInitTime_ = e => this.applyInitTime_(e); + this.boundUpdateCurrentBreakpoint_ = e => this.updateCurrentBreakpoint_(e); + this.boundHandleTechClick_ = e => this.handleTechClick_(e); + this.boundHandleTechDoubleClick_ = e => this.handleTechDoubleClick_(e); + this.boundHandleTechTouchStart_ = e => this.handleTechTouchStart_(e); + this.boundHandleTechTouchMove_ = e => this.handleTechTouchMove_(e); + this.boundHandleTechTouchEnd_ = e => this.handleTechTouchEnd_(e); + this.boundHandleTechTap_ = e => this.handleTechTap_(e); + + // default isFullscreen_ to false + this.isFullscreen_ = false; + + // create logger + this.log = createLogger(this.id_); + + // Hold our own reference to fullscreen api so it can be mocked in tests + this.fsApi_ = FullscreenApi; + + // Tracks when a tech changes the poster + this.isPosterFromTech_ = false; + + // Holds callback info that gets queued when playback rate is zero + // and a seek is happening + this.queuedCallbacks_ = []; + + // Turn off API access because we're loading a new tech that might load asynchronously + this.isReady_ = false; + + // Init state hasStarted_ + this.hasStarted_ = false; + + // Init state userActive_ + this.userActive_ = false; + + // Init debugEnabled_ + this.debugEnabled_ = false; + + // Init state audioOnlyMode_ + this.audioOnlyMode_ = false; + + // Init state audioPosterMode_ + this.audioPosterMode_ = false; + + // Init state audioOnlyCache_ + this.audioOnlyCache_ = { + playerHeight: null, + hiddenChildren: [] + }; + + // if the global option object was accidentally blown away by + // someone, bail early with an informative error + if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) { + throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?'); + } + + // Store the original tag used to set options + this.tag = tag; + + // Store the tag attributes used to restore html5 element + this.tagAttributes = tag && getAttributes(tag); + + // Update current language + this.language(this.options_.language); + + // Update Supported Languages + if (options.languages) { + // Normalise player option languages to lowercase + const languagesToLower = {}; + Object.getOwnPropertyNames(options.languages).forEach(function (name) { + languagesToLower[name.toLowerCase()] = options.languages[name]; + }); + this.languages_ = languagesToLower; + } else { + this.languages_ = Player.prototype.options_.languages; + } + this.resetCache_(); + + // Set poster + /** @type string */ + this.poster_ = options.poster || ''; + + // Set controls + /** @type {boolean} */ + this.controls_ = !!options.controls; + + // Original tag settings stored in options + // now remove immediately so native controls don't flash. + // May be turned back on by HTML5 tech if nativeControlsForTouch is true + tag.controls = false; + tag.removeAttribute('controls'); + this.changingSrc_ = false; + this.playCallbacks_ = []; + this.playTerminatedQueue_ = []; + + // the attribute overrides the option + if (tag.hasAttribute('autoplay')) { + this.autoplay(true); + } else { + // otherwise use the setter to validate and + // set the correct value. + this.autoplay(this.options_.autoplay); + } + + // check plugins + if (options.plugins) { + Object.keys(options.plugins).forEach(name => { + if (typeof this[name] !== 'function') { + throw new Error(`plugin "${name}" does not exist`); + } + }); + } + + /* + * Store the internal state of scrubbing + * + * @private + * @return {Boolean} True if the user is scrubbing + */ + this.scrubbing_ = false; + this.el_ = this.createEl(); + + // Make this an evented object and use `el_` as its event bus. + evented(this, { + eventBusKey: 'el_' + }); + + // listen to document and player fullscreenchange handlers so we receive those events + // before a user can receive them so we can update isFullscreen appropriately. + // make sure that we listen to fullscreenchange events before everything else to make sure that + // our isFullscreen method is updated properly for internal components as well as external. + if (this.fsApi_.requestFullscreen) { + on((global_document__WEBPACK_IMPORTED_MODULE_1___default()), this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_); + this.on(this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_); + } + if (this.fluid_) { + this.on(['playerreset', 'resize'], this.boundUpdateStyleEl_); + } + // We also want to pass the original player options to each component and plugin + // as well so they don't need to reach back into the player for options later. + // We also need to do another copy of this.options_ so we don't end up with + // an infinite loop. + const playerOptionsCopy = merge$1(this.options_); + + // Load plugins + if (options.plugins) { + Object.keys(options.plugins).forEach(name => { + this[name](options.plugins[name]); + }); + } + + // Enable debug mode to fire debugon event for all plugins. + if (options.debug) { + this.debug(true); + } + this.options_.playerOptions = playerOptionsCopy; + this.middleware_ = []; + this.playbackRates(options.playbackRates); + if (options.experimentalSvgIcons) { + // Add SVG Sprite to the DOM + const parser = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().DOMParser)(); + const parsedSVG = parser.parseFromString(icons, 'image/svg+xml'); + const errorNode = parsedSVG.querySelector('parsererror'); + if (errorNode) { + log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.'); + this.options_.experimentalSvgIcons = null; + } else { + const sprite = parsedSVG.documentElement; + sprite.style.display = 'none'; + this.el_.appendChild(sprite); + this.addClass('vjs-svg-icons-enabled'); + } + } + this.initChildren(); + + // Set isAudio based on whether or not an audio tag was used + this.isAudio(tag.nodeName.toLowerCase() === 'audio'); + + // Update controls className. Can't do this when the controls are initially + // set because the element doesn't exist yet. + if (this.controls()) { + this.addClass('vjs-controls-enabled'); + } else { + this.addClass('vjs-controls-disabled'); + } + + // Set ARIA label and region role depending on player type + this.el_.setAttribute('role', 'region'); + if (this.isAudio()) { + this.el_.setAttribute('aria-label', this.localize('Audio Player')); + } else { + this.el_.setAttribute('aria-label', this.localize('Video Player')); + } + if (this.isAudio()) { + this.addClass('vjs-audio'); + } + + // TODO: Make this smarter. Toggle user state between touching/mousing + // using events, since devices can have both touch and mouse events. + // TODO: Make this check be performed again when the window switches between monitors + // (See https://github.com/videojs/video.js/issues/5683) + if (TOUCH_ENABLED) { + this.addClass('vjs-touch-enabled'); + } + + // iOS Safari has broken hover handling + if (!IS_IOS) { + this.addClass('vjs-workinghover'); + } + + // Make player easily findable by ID + Player.players[this.id_] = this; + + // Add a major version class to aid css in plugins + const majorVersion = version$6.split('.')[0]; + this.addClass(`vjs-v${majorVersion}`); + + // When the player is first initialized, trigger activity so components + // like the control bar show themselves if needed + this.userActive(true); + this.reportUserActivity(); + this.one('play', e => this.listenForUserActivity_(e)); + this.on('keydown', e => this.handleKeyDown(e)); + this.on('languagechange', e => this.handleLanguagechange(e)); + this.breakpoints(this.options_.breakpoints); + this.responsive(this.options_.responsive); + + // Calling both the audio mode methods after the player is fully + // setup to be able to listen to the events triggered by them + this.on('ready', () => { + // Calling the audioPosterMode method first so that + // the audioOnlyMode can take precedence when both options are set to true + this.audioPosterMode(this.options_.audioPosterMode); + this.audioOnlyMode(this.options_.audioOnlyMode); + }); + } + + /** + * Destroys the video player and does any necessary cleanup. + * + * This is especially helpful if you are dynamically adding and removing videos + * to/from the DOM. + * + * @fires Player#dispose + */ + dispose() { + /** + * Called when the player is being disposed of. + * + * @event Player#dispose + * @type {Event} + */ + this.trigger('dispose'); + // prevent dispose from being called twice + this.off('dispose'); + + // Make sure all player-specific document listeners are unbound. This is + off((global_document__WEBPACK_IMPORTED_MODULE_1___default()), this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_); + off((global_document__WEBPACK_IMPORTED_MODULE_1___default()), 'keydown', this.boundFullWindowOnEscKey_); + if (this.styleEl_ && this.styleEl_.parentNode) { + this.styleEl_.parentNode.removeChild(this.styleEl_); + this.styleEl_ = null; + } + + // Kill reference to this player + Player.players[this.id_] = null; + if (this.tag && this.tag.player) { + this.tag.player = null; + } + if (this.el_ && this.el_.player) { + this.el_.player = null; + } + if (this.tech_) { + this.tech_.dispose(); + this.isPosterFromTech_ = false; + this.poster_ = ''; + } + if (this.playerElIngest_) { + this.playerElIngest_ = null; + } + if (this.tag) { + this.tag = null; + } + clearCacheForPlayer(this); + + // remove all event handlers for track lists + // all tracks and track listeners are removed on + // tech dispose + ALL.names.forEach(name => { + const props = ALL[name]; + const list = this[props.getterName](); + + // if it is not a native list + // we have to manually remove event listeners + if (list && list.off) { + list.off(); + } + }); + + // the actual .el_ is removed here, or replaced if + super.dispose({ + restoreEl: this.options_.restoreEl + }); + } + + /** + * Create the `Player`'s DOM element. + * + * @return {Element} + * The DOM element that gets created. + */ + createEl() { + let tag = this.tag; + let el; + let playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player'); + const divEmbed = this.tag.tagName.toLowerCase() === 'video-js'; + if (playerElIngest) { + el = this.el_ = tag.parentNode; + } else if (!divEmbed) { + el = this.el_ = super.createEl('div'); + } + + // Copy over all the attributes from the tag, including ID and class + // ID will now reference player box, not the video tag + const attrs = getAttributes(tag); + if (divEmbed) { + el = this.el_ = tag; + tag = this.tag = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement('video'); + while (el.children.length) { + tag.appendChild(el.firstChild); + } + if (!hasClass(el, 'video-js')) { + addClass(el, 'video-js'); + } + el.appendChild(tag); + playerElIngest = this.playerElIngest_ = el; + // move properties over from our custom `video-js` element + // to our new `video` element. This will move things like + // `src` or `controls` that were set via js before the player + // was initialized. + Object.keys(el).forEach(k => { + try { + tag[k] = el[k]; + } catch (e) { + // we got a a property like outerHTML which we can't actually copy, ignore it + } + }); + } -// Wrap native properties with a setter in this format: -// set + toTitleCase(name) -// The list is as follows: -// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate, -// setDisablePictureInPicture, setCrossOrigin -[ -/** - * Set the value of `volume` on the media element. `volume` indicates the current - * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and - * so on. - * - * @method Html5#setVolume - * @param {number} percentAsDecimal - * The volume percent as a decimal. Valid range is from 0-1. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume} - */ -'volume', -/** - * Set the value of `src` on the media element. `src` indicates the current - * {@link Tech~SourceObject} for the media. - * - * @method Html5#setSrc - * @param {Tech~SourceObject} src - * The source object to set as the current source. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src} - */ -'src', -/** - * Set the value of `poster` on the media element. `poster` is the url to - * an image file that can/will be shown when no media data is available. - * - * @method Html5#setPoster - * @param {string} poster - * The url to an image that should be used as the `poster` for the media - * element. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster} - */ -'poster', -/** - * Set the value of `preload` on the media element. `preload` indicates - * what should download before the media is interacted with. It can have the following - * values: - * - none: nothing should be downloaded - * - metadata: poster and the first few frames of the media may be downloaded to get - * media dimensions and other metadata - * - auto: allow the media and metadata for the media to be downloaded before - * interaction - * - * @method Html5#setPreload - * @param {string} preload - * The value of `preload` to set on the media element. Must be 'none', 'metadata', - * or 'auto'. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload} - */ -'preload', -/** - * Set the value of `playbackRate` on the media element. `playbackRate` indicates - * the rate at which the media should play back. Examples: - * - if playbackRate is set to 2, media will play twice as fast. - * - if playbackRate is set to 0.5, media will play half as fast. - * - * @method Html5#setPlaybackRate - * @return {number} - * The value of `playbackRate` from the media element. A number indicating - * the current playback speed of the media, where 1 is normal speed. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate} - */ -'playbackRate', -/** - * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates - * the rate at which the media should play back upon initial startup. Changing this value - * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}. - * - * Example Values: - * - if playbackRate is set to 2, media will play twice as fast. - * - if playbackRate is set to 0.5, media will play half as fast. - * - * @method Html5.prototype.setDefaultPlaybackRate - * @return {number} - * The value of `defaultPlaybackRate` from the media element. A number indicating - * the current playback speed of the media, where 1 is normal speed. - * - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate} - */ -'defaultPlaybackRate', -/** - * Prevents the browser from suggesting a Picture-in-Picture context menu - * or to request Picture-in-Picture automatically in some cases. - * - * @method Html5#setDisablePictureInPicture - * @param {boolean} value - * The true value will disable Picture-in-Picture mode. - * - * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip} - */ -'disablePictureInPicture', -/** - * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates - * to the browser that should sent the cookies along with the requests for the - * different assets/playlists - * - * @method Html5#setCrossOrigin - * @param {string} crossOrigin - * - anonymous indicates that the media should not sent cookies. - * - use-credentials indicates that the media should sent cookies along the requests. - * - * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin} - */ -'crossOrigin'].forEach(function (prop) { - Html5.prototype['set' + toTitleCase$1(prop)] = function (v) { - this.el_[prop] = v; - }; -}); + // set tabindex to -1 to remove the video element from the focus order + tag.setAttribute('tabindex', '-1'); + attrs.tabindex = '-1'; -// wrap native functions with a function -// The list is as follows: -// pause, load, play -[ -/** - * A wrapper around the media elements `pause` function. This will call the `HTML5` - * media elements `pause` function. - * - * @method Html5#pause - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause} - */ -'pause', -/** - * A wrapper around the media elements `load` function. This will call the `HTML5`s - * media element `load` function. - * - * @method Html5#load - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load} - */ -'load', -/** - * A wrapper around the media elements `play` function. This will call the `HTML5`s - * media element `play` function. - * - * @method Html5#play - * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play} - */ -'play'].forEach(function (prop) { - Html5.prototype[prop] = function () { - return this.el_[prop](); - }; -}); -Tech.withSourceHandlers(Html5); + // Workaround for #4583 on Chrome (on Windows) with JAWS. + // See https://github.com/FreedomScientific/VFO-standards-support/issues/78 + // Note that we can't detect if JAWS is being used, but this ARIA attribute + // doesn't change behavior of Chrome if JAWS is not being used + if (IS_CHROME && IS_WINDOWS) { + tag.setAttribute('role', 'application'); + attrs.role = 'application'; + } -/** - * Native source handler for Html5, simply passes the source to the media element. - * - * @property {Tech~SourceObject} source - * The source object - * - * @property {Html5} tech - * The instance of the HTML5 tech. - */ -Html5.nativeSourceHandler = {}; + // Remove width/height attrs from tag so CSS can make it 100% width/height + tag.removeAttribute('width'); + tag.removeAttribute('height'); + if ('width' in attrs) { + delete attrs.width; + } + if ('height' in attrs) { + delete attrs.height; + } + Object.getOwnPropertyNames(attrs).forEach(function (attr) { + // don't copy over the class attribute to the player element when we're in a div embed + // the class is already set up properly in the divEmbed case + // and we want to make sure that the `video-js` class doesn't get lost + if (!(divEmbed && attr === 'class')) { + el.setAttribute(attr, attrs[attr]); + } + if (divEmbed) { + tag.setAttribute(attr, attrs[attr]); + } + }); -/** - * Check if the media element can play the given mime type. - * - * @param {string} type - * The mimetype to check - * - * @return {string} - * 'probably', 'maybe', or '' (empty string) - */ -Html5.nativeSourceHandler.canPlayType = function (type) { - // IE without MediaPlayer throws an error (#519) - try { - return Html5.TEST_VID.canPlayType(type); - } catch (e) { - return ''; + // Update tag id/class for use as HTML5 playback tech + // Might think we should do this after embedding in container so .vjs-tech class + // doesn't flash 100% width/height, but class only applies with .video-js parent + tag.playerId = tag.id; + tag.id += '_html5_api'; + tag.className = 'vjs-tech'; + + // Make player findable on elements + tag.player = el.player = this; + // Default state of video is paused + this.addClass('vjs-paused'); + + // Add a style element in the player that we'll use to set the width/height + // of the player in a way that's still overridable by CSS, just like the + // video element + if ((global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE) !== true) { + this.styleEl_ = createStyleElement('vjs-styles-dimensions'); + const defaultsStyleEl = $('.vjs-styles-defaults'); + const head = $('head'); + head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild); + } + this.fill_ = false; + this.fluid_ = false; + + // Pass in the width/height/aspectRatio options which will update the style el + this.width(this.options_.width); + this.height(this.options_.height); + this.fill(this.options_.fill); + this.fluid(this.options_.fluid); + this.aspectRatio(this.options_.aspectRatio); + // support both crossOrigin and crossorigin to reduce confusion and issues around the name + this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin); + + // Hide any links within the video/audio tag, + // because IE doesn't hide them completely from screen readers. + const links = tag.getElementsByTagName('a'); + for (let i = 0; i < links.length; i++) { + const linkEl = links.item(i); + addClass(linkEl, 'vjs-hidden'); + linkEl.setAttribute('hidden', 'hidden'); + } + + // insertElFirst seems to cause the networkState to flicker from 3 to 2, so + // keep track of the original for later so we can know if the source originally failed + tag.initNetworkState_ = tag.networkState; + + // Wrap video tag in div (el/box) container + if (tag.parentNode && !playerElIngest) { + tag.parentNode.insertBefore(el, tag); + } + + // insert the tag as the first child of the player element + // then manually add it to the children array so that this.addChild + // will work properly for other components + // + // Breaks iPhone, fixed in HTML5 setup. + prependTo(tag, el); + this.children_.unshift(tag); + + // Set lang attr on player to ensure CSS :lang() in consistent with player + // if it's been set to something different to the doc + this.el_.setAttribute('lang', this.language_); + this.el_.setAttribute('translate', 'no'); + this.el_ = el; + return el; } -}; -/** - * Check if the media element can handle a source natively. - * - * @param {Tech~SourceObject} source - * The source object - * - * @param {Object} [options] - * Options to be passed to the tech. - * - * @return {string} - * 'probably', 'maybe', or '' (empty string). - */ -Html5.nativeSourceHandler.canHandleSource = function (source, options) { - // If a type was provided we should rely on that - if (source.type) { - return Html5.nativeSourceHandler.canPlayType(source.type); + /** + * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this + * sets the `crossOrigin` property on the `
.
` codec string with the standard + * `avc1.` + * + * @param {string} codec + * Codec string to translate + * @return {string} + * The translated codec string + */ - this.load(); +var translateLegacyCodec = function translateLegacyCodec(codec) { + if (!codec) { + return codec; } - /** - * get the current duration - * - * @return {TimeRange} the duration - */ - duration() { - if (!this.mainPlaylistLoader_) { - return 0; - } - const media = this.mainPlaylistLoader_.media(); - if (!media) { - // no playlists loaded yet, so can't determine a duration - return 0; - } // Don't rely on the media source for duration in the case of a live playlist since - // setting the native MediaSource's duration to infinity ends up with consequences to - // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details. - // - // This is resolved in the spec by https://github.com/w3c/media-source/pull/92, - // however, few browsers have support for setLiveSeekableRange() - // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange - // - // Until a time when the duration of the media source can be set to infinity, and a - // seekable range specified across browsers, just return Infinity. + return codec.replace(/avc1\.(\d+)\.(\d+)/i, function (orig, profile, avcLevel) { + var profileHex = ('00' + Number(profile).toString(16)).slice(-2); + var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2); + return 'avc1.' + profileHex + '00' + avcLevelHex; + }); +}; +/** + * Replace the old apple-style `avc1.
.
` codec strings with the standard + * `avc1.` + * + * @param {string[]} codecs + * An array of codec strings to translate + * @return {string[]} + * The translated array of codec strings + */ - if (!media.endList) { - return Infinity; - } // Since this is a VOD video, it is safe to rely on the media source's duration (if - // available). If it's not available, fall back to a playlist-calculated estimate. +var translateLegacyCodecs = function translateLegacyCodecs(codecs) { + return codecs.map(translateLegacyCodec); +}; +/** + * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the + * standard `avc1.`. + * + * @param {string} codecString + * The codec string + * @return {string} + * The codec string with old apple-style codecs replaced + * + * @private + */ - if (this.mediaSource) { - return this.mediaSource.duration; - } - return Vhs$1.Playlist.duration(media); - } - /** - * check the seekable range - * - * @return {TimeRange} the seekable range - */ +var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) { + return codecString.replace(/avc1\.(\d+)\.(\d+)/i, function (match) { + return translateLegacyCodecs([match])[0]; + }); +}; +/** + * @typedef {Object} ParsedCodecInfo + * @property {number} codecCount + * Number of codecs parsed + * @property {string} [videoCodec] + * Parsed video codec (if found) + * @property {string} [videoObjectTypeIndicator] + * Video object type indicator (if found) + * @property {string|null} audioProfile + * Audio profile + */ - seekable() { - return this.seekable_; +/** + * Parses a codec string to retrieve the number of codecs specified, the video codec and + * object type indicator, and the audio profile. + * + * @param {string} [codecString] + * The codec string to parse + * @return {ParsedCodecInfo} + * Parsed codec info + */ + +var parseCodecs = function parseCodecs(codecString) { + if (codecString === void 0) { + codecString = ''; } - onSyncInfoUpdate_() { - let audioSeekable; // TODO check for creation of both source buffers before updating seekable - // - // A fix was made to this function where a check for - // this.sourceUpdater_.hasCreatedSourceBuffers - // was added to ensure that both source buffers were created before seekable was - // updated. However, it originally had a bug where it was checking for a true and - // returning early instead of checking for false. Setting it to check for false to - // return early though created other issues. A call to play() would check for seekable - // end without verifying that a seekable range was present. In addition, even checking - // for that didn't solve some issues, as handleFirstPlay is sometimes worked around - // due to a media update calling load on the segment loaders, skipping a seek to live, - // thereby starting live streams at the beginning of the stream rather than at the end. - // - // This conditional should be fixed to wait for the creation of two source buffers at - // the same time as the other sections of code are fixed to properly seek to live and - // not throw an error due to checking for a seekable end when no seekable range exists. - // - // For now, fall back to the older behavior, with the understanding that the seekable - // range may not be completely correct, leading to a suboptimal initial live point. - if (!this.mainPlaylistLoader_) { - return; - } - let media = this.mainPlaylistLoader_.media(); - if (!media) { - return; - } - let expired = this.syncController_.getExpiredTime(media, this.duration()); - if (expired === null) { - // not enough information to update seekable - return; - } - const main = this.mainPlaylistLoader_.main; - const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media)); - if (mainSeekable.length === 0) { - return; - } - if (this.mediaTypes_.AUDIO.activePlaylistLoader) { - media = this.mediaTypes_.AUDIO.activePlaylistLoader.media(); - expired = this.syncController_.getExpiredTime(media, this.duration()); - if (expired === null) { - return; - } - audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media)); - if (audioSeekable.length === 0) { - return; - } - } - let oldEnd; - let oldStart; - if (this.seekable_ && this.seekable_.length) { - oldEnd = this.seekable_.end(0); - oldStart = this.seekable_.start(0); - } - if (!audioSeekable) { - // seekable has been calculated based on buffering video data so it - // can be returned directly - this.seekable_ = mainSeekable; - } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) { - // seekables are pretty far off, rely on main - this.seekable_ = mainSeekable; - } else { - this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]); - } // seekable is the same as last time + var codecs = codecString.split(','); + var result = []; + codecs.forEach(function (codec) { + codec = codec.trim(); + var codecType; + mediaTypes.forEach(function (name) { + var match = regexs[name].exec(codec.toLowerCase()); - if (this.seekable_ && this.seekable_.length) { - if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) { + if (!match || match.length <= 1) { return; } - } - this.logger_(`seekable updated [${printableRange(this.seekable_)}]`); - this.tech_.trigger('seekablechanged'); - } - /** - * Update the player duration - */ - - updateDuration(isLive) { - if (this.updateDuration_) { - this.mediaSource.removeEventListener('sourceopen', this.updateDuration_); - this.updateDuration_ = null; - } - if (this.mediaSource.readyState !== 'open') { - this.updateDuration_ = this.updateDuration.bind(this, isLive); - this.mediaSource.addEventListener('sourceopen', this.updateDuration_); - return; - } - if (isLive) { - const seekable = this.seekable(); - if (!seekable.length) { - return; - } // Even in the case of a live playlist, the native MediaSource's duration should not - // be set to Infinity (even though this would be expected for a live playlist), since - // setting the native MediaSource's duration to infinity ends up with consequences to - // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details. - // - // This is resolved in the spec by https://github.com/w3c/media-source/pull/92, - // however, few browsers have support for setLiveSeekableRange() - // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange - // - // Until a time when the duration of the media source can be set to infinity, and a - // seekable range specified across browsers, the duration should be greater than or - // equal to the last possible seekable value. - // MediaSource duration starts as NaN - // It is possible (and probable) that this case will never be reached for many - // sources, since the MediaSource reports duration as the highest value without - // accounting for timestamp offset. For example, if the timestamp offset is -100 and - // we buffered times 0 to 100 with real times of 100 to 200, even though current - // time will be between 0 and 100, the native media source may report the duration - // as 200. However, since we report duration separate from the media source (as - // Infinity), and as long as the native media source duration value is greater than - // our reported seekable range, seeks will work as expected. The large number as - // duration for live is actually a strategy used by some players to work around the - // issue of live seekable ranges cited above. - if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) { - this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1)); - } - return; - } - const buffered = this.tech_.buffered(); - let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media()); - if (buffered.length > 0) { - duration = Math.max(duration, buffered.end(buffered.length - 1)); - } - if (this.mediaSource.duration !== duration) { - this.sourceUpdater_.setDuration(duration); - } - } - /** - * dispose of the PlaylistController and everything - * that it controls - */ + codecType = name; // maintain codec case - dispose() { - this.trigger('dispose'); - this.decrypter_.terminate(); - this.mainPlaylistLoader_.dispose(); - this.mainSegmentLoader_.dispose(); - this.contentSteeringController_.dispose(); - if (this.loadOnPlay_) { - this.tech_.off('play', this.loadOnPlay_); - } - ['AUDIO', 'SUBTITLES'].forEach(type => { - const groups = this.mediaTypes_[type].groups; - for (const id in groups) { - groups[id].forEach(group => { - if (group.playlistLoader) { - group.playlistLoader.dispose(); - } - }); - } + var type = codec.substring(0, match[1].length); + var details = codec.replace(type, ''); + result.push({ + type: type, + details: details, + mediaType: name + }); }); - this.audioSegmentLoader_.dispose(); - this.subtitleSegmentLoader_.dispose(); - this.sourceUpdater_.dispose(); - this.timelineChangeController_.dispose(); - this.stopABRTimer_(); - if (this.updateDuration_) { - this.mediaSource.removeEventListener('sourceopen', this.updateDuration_); + + if (!codecType) { + result.push({ + type: codec, + details: '', + mediaType: 'unknown' + }); } - this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player + }); + return result; +}; +/** + * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is + * a default alternate audio playlist for the provided audio group. + * + * @param {Object} master + * The master playlist + * @param {string} audioGroupId + * ID of the audio group for which to find the default codec info + * @return {ParsedCodecInfo} + * Parsed codec info + */ - this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_); - this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_); - this.off(); +var codecsFromDefault = function codecsFromDefault(master, audioGroupId) { + if (!master.mediaGroups.AUDIO || !audioGroupId) { + return null; } - /** - * return the main playlist object if we have one - * - * @return {Object} the main playlist object that we parsed - */ - main() { - return this.mainPlaylistLoader_.main; - } - /** - * return the currently selected playlist - * - * @return {Object} the currently selected playlist object that we parsed - */ + var audioGroup = master.mediaGroups.AUDIO[audioGroupId]; - media() { - // playlist loader will not return media if it has not been fully loaded - return this.mainPlaylistLoader_.media() || this.initialMedia_; + if (!audioGroup) { + return null; } - areMediaTypesKnown_() { - const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader; - const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info - // otherwise check on the segment loader. - const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs + for (var name in audioGroup) { + var audioType = audioGroup[name]; - if (!hasMainMediaInfo || !hasAudioMediaInfo) { - return false; + if (audioType.default && audioType.playlists) { + // codec should be the same for all playlists within the audio type + return parseCodecs(audioType.playlists[0].attributes.CODECS); } - return true; } - getCodecsOrExclude_() { - const media = { - main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {}, - audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {} - }; - const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set "main" media equal to video - media.video = media.main; - const playlistCodecs = codecsForPlaylist(this.main(), playlist); - const codecs = {}; - const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader; - if (media.main.hasVideo) { - codecs.video = playlistCodecs.video || media.main.videoCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_VIDEO_CODEC; - } - if (media.main.isMuxed) { - codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_AUDIO_CODEC}`; - } - if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) { - codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct "supports" function below + return null; +}; +var isVideoCodec = function isVideoCodec(codec) { + if (codec === void 0) { + codec = ''; + } - media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4; - } // no codecs, no playback. + return regexs.video.test(codec.trim().toLowerCase()); +}; +var isAudioCodec = function isAudioCodec(codec) { + if (codec === void 0) { + codec = ''; + } - if (!codecs.audio && !codecs.video) { - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - message: 'Could not determine codecs for playlist.' - }, - playlistExclusionDuration: Infinity - }); - return; - } // fmp4 relies on browser support, while ts relies on muxer support + return regexs.audio.test(codec.trim().toLowerCase()); +}; +var isTextCodec = function isTextCodec(codec) { + if (codec === void 0) { + codec = ''; + } - const supportFunction = (isFmp4, codec) => isFmp4 ? (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codec) : (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codec); - const unsupportedCodecs = {}; - let unsupportedAudio; - ['video', 'audio'].forEach(function (type) { - if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) { - const supporter = media[type].isFmp4 ? 'browser' : 'muxer'; - unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || []; - unsupportedCodecs[supporter].push(codecs[type]); - if (type === 'audio') { - unsupportedAudio = supporter; - } - } - }); - if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) { - const audioGroup = playlist.attributes.AUDIO; - this.main().playlists.forEach(variant => { - const variantAudioGroup = variant.attributes && variant.attributes.AUDIO; - if (variantAudioGroup === audioGroup && variant !== playlist) { - variant.excludeUntil = Infinity; - } - }); - this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): "${codecs.audio}"`); - } // if we have any unsupported codecs exclude this playlist. + return regexs.text.test(codec.trim().toLowerCase()); +}; +var getMimeForCodec = function getMimeForCodec(codecString) { + if (!codecString || typeof codecString !== 'string') { + return; + } - if (Object.keys(unsupportedCodecs).length) { - const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => { - if (acc) { - acc += ', '; - } - acc += `${supporter} does not support codec(s): "${unsupportedCodecs[supporter].join(',')}"`; - return acc; - }, '') + '.'; - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - internal: true, - message - }, - playlistExclusionDuration: Infinity - }); - return; - } // check if codec switching is happening + var codecs = codecString.toLowerCase().split(',').map(function (c) { + return translateLegacyCodec(c.trim()); + }); // default to video type - if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) { - const switchMessages = []; - ['video', 'audio'].forEach(type => { - const newCodec = ((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(this.sourceUpdater_.codecs[type] || '')[0] || {}).type; - const oldCodec = ((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs[type] || '')[0] || {}).type; - if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) { - switchMessages.push(`"${this.sourceUpdater_.codecs[type]}" -> "${codecs[type]}"`); - } - }); - if (switchMessages.length) { - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - message: `Codec switching not supported: ${switchMessages.join(', ')}.`, - internal: true - }, - playlistExclusionDuration: Infinity - }); - return; - } - } // TODO: when using the muxer shouldn't we just return - // the codecs that the muxer outputs? + var type = 'video'; // only change to audio type if the only codec we have is + // audio - return codecs; + if (codecs.length === 1 && isAudioCodec(codecs[0])) { + type = 'audio'; + } else if (codecs.length === 1 && isTextCodec(codecs[0])) { + // text uses application/ for now + type = 'application'; + } // default the container to mp4 + + + var container = 'mp4'; // every codec must be able to go into the container + // for that container to be the correct one + + if (codecs.every(function (c) { + return regexs.mp4.test(c); + })) { + container = 'mp4'; + } else if (codecs.every(function (c) { + return regexs.webm.test(c); + })) { + container = 'webm'; + } else if (codecs.every(function (c) { + return regexs.ogg.test(c); + })) { + container = 'ogg'; } - /** - * Create source buffers and exlude any incompatible renditions. - * - * @private - */ - tryToCreateSourceBuffers_() { - // media source is not ready yet or sourceBuffers are already - // created. - if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) { - return; - } - if (!this.areMediaTypesKnown_()) { - return; - } - const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded + return type + "/" + container + ";codecs=\"" + codecString + "\""; +}; +var browserSupportsCodec = function browserSupportsCodec(codecString) { + if (codecString === void 0) { + codecString = ''; + } - if (!codecs) { - return; - } - this.sourceUpdater_.createSourceBuffers(codecs); - const codecString = [codecs.video, codecs.audio].filter(Boolean).join(','); - this.excludeIncompatibleVariants_(codecString); + return (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource) && (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource).isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false; +}; +var muxerSupportsCodec = function muxerSupportsCodec(codecString) { + if (codecString === void 0) { + codecString = ''; } - /** - * Excludes playlists with codecs that are unsupported by the muxer and browser. - */ - excludeUnsupportedVariants_() { - const playlists = this.main().playlists; - const ids = []; // TODO: why don't we have a property to loop through all - // playlist? Why did we ever mix indexes and keys? + return codecString.toLowerCase().split(',').every(function (codec) { + codec = codec.trim(); // any match is supported. - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; // check if we already processed this playlist. + for (var i = 0; i < upperMediaTypes.length; i++) { + var type = upperMediaTypes[i]; - if (ids.indexOf(variant.id) !== -1) { - return; - } - ids.push(variant.id); - const codecs = codecsForPlaylist(this.main, variant); - const unsupported = []; - if (codecs.audio && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codecs.audio) && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codecs.audio)) { - unsupported.push(`audio codec ${codecs.audio}`); - } - if (codecs.video && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codecs.video) && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codecs.video)) { - unsupported.push(`video codec ${codecs.video}`); - } - if (codecs.text && codecs.text === 'stpp.ttml.im1t') { - unsupported.push(`text codec ${codecs.text}`); - } - if (unsupported.length) { - variant.excludeUntil = Infinity; - this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`); + if (regexs["muxer" + type].test(codec)) { + return true; } - }); - } - /** - * Exclude playlists that are known to be codec or - * stream-incompatible with the SourceBuffer configuration. For - * instance, Media Source Extensions would cause the video element to - * stall waiting for video data if you switched from a variant with - * video and audio to an audio-only one. - * - * @param {Object} media a media playlist compatible with the current - * set of SourceBuffers. Variants in the current main playlist that - * do not appear to have compatible codec or stream configurations - * will be excluded from the default playlist selection algorithm - * indefinitely. - * @private - */ + } - excludeIncompatibleVariants_(codecString) { - const ids = []; - const playlists = this.main().playlists; - const codecs = unwrapCodecList((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecString)); - const codecCount_ = codecCount(codecs); - const videoDetails = codecs.video && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs.video)[0] || null; - const audioDetails = codecs.audio && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs.audio)[0] || null; - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; // check if we already processed this playlist. - // or it if it is already excluded forever. + return false; + }); +}; +var DEFAULT_AUDIO_CODEC = 'mp4a.40.2'; +var DEFAULT_VIDEO_CODEC = 'avc1.4d400d'; - if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) { - return; - } - ids.push(variant.id); - const exclusionReasons = []; // get codecs from the playlist for this variant +/***/ }), - const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant); - const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this - // variant is incompatible. Wait for mux.js to probe +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js": +/*!********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (!variantCodecs.audio && !variantCodecs.video) { - return; - } // TODO: we can support this by removing the - // old media source and creating a new one, but it will take some work. - // The number of streams cannot change +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ detectContainerForBytes: () => (/* binding */ detectContainerForBytes), +/* harmony export */ isLikely: () => (/* binding */ isLikely), +/* harmony export */ isLikelyFmp4MediaSegment: () => (/* binding */ isLikelyFmp4MediaSegment) +/* harmony export */ }); +/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); +/* harmony import */ var _mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mp4-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js"); +/* harmony import */ var _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ebml-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js"); +/* harmony import */ var _id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./id3-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js"); +/* harmony import */ var _nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nal-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js"); - if (variantCodecCount !== codecCount_) { - exclusionReasons.push(`codec count "${variantCodecCount}" !== "${codecCount_}"`); - } // only exclude playlists by codec change, if codecs cannot switch - // during playback. - if (!this.sourceUpdater_.canChangeType()) { - const variantVideoDetails = variantCodecs.video && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(variantCodecs.video)[0] || null; - const variantAudioDetails = variantCodecs.audio && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(variantCodecs.audio)[0] || null; // the video codec cannot change - if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) { - exclusionReasons.push(`video codec "${variantVideoDetails.type}" !== "${videoDetails.type}"`); - } // the audio codec cannot change - if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) { - exclusionReasons.push(`audio codec "${variantAudioDetails.type}" !== "${audioDetails.type}"`); - } - } - if (exclusionReasons.length) { - variant.excludeUntil = Infinity; - this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`); - } + +var CONSTANTS = { + // "webm" string literal in hex + 'webm': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x77, 0x65, 0x62, 0x6d]), + // "matroska" string literal in hex + 'matroska': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]), + // "fLaC" string literal in hex + 'flac': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x4c, 0x61, 0x43]), + // "OggS" string literal in hex + 'ogg': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x4f, 0x67, 0x67, 0x53]), + // ac-3 sync byte, also works for ec-3 as that is simply a codec + // of ac-3 + 'ac3': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x0b, 0x77]), + // "RIFF" string literal in hex used for wav and avi + 'riff': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x52, 0x49, 0x46, 0x46]), + // "AVI" string literal in hex + 'avi': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x41, 0x56, 0x49]), + // "WAVE" string literal in hex + 'wav': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x57, 0x41, 0x56, 0x45]), + // "ftyp3g" string literal in hex + '3gp': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]), + // "ftyp" string literal in hex + 'mp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70]), + // "styp" string literal in hex + 'fmp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x73, 0x74, 0x79, 0x70]), + // "ftypqt" string literal in hex + 'mov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]), + // moov string literal in hex + 'moov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x76]), + // moof string literal in hex + 'moof': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x66]) +}; +var _isLikely = { + aac: function aac(bytes) { + var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x10], { + offset: offset, + mask: [0xFF, 0x16] }); - } - updateAdCues_(media) { - let offset = 0; - const seekable = this.seekable(); - if (seekable.length) { - offset = seekable.start(0); - } - updateAdCues(media, this.cueTagsTrack_, offset); - } - /** - * Calculates the desired forward buffer length based on current time - * - * @return {number} Desired forward buffer length in seconds - */ + }, + mp3: function mp3(bytes) { + var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x02], { + offset: offset, + mask: [0xFF, 0x06] + }); + }, + webm: function webm(bytes) { + var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm - goalBufferLength() { - const currentTime = this.tech_.currentTime(); - const initial = Config.GOAL_BUFFER_LENGTH; - const rate = Config.GOAL_BUFFER_LENGTH_RATE; - const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH); - return Math.min(initial + currentTime * rate, max); - } - /** - * Calculates the desired buffer low water line based on current time - * - * @return {number} Desired buffer low water line in seconds - */ + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.webm); + }, + mkv: function mkv(bytes) { + var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska - bufferLowWaterLine() { - const currentTime = this.tech_.currentTime(); - const initial = Config.BUFFER_LOW_WATER_LINE; - const rate = Config.BUFFER_LOW_WATER_LINE_RATE; - const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE); - const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE); - return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max); - } - bufferHighWaterLine() { - return Config.BUFFER_HIGH_WATER_LINE; - } - addDateRangesToTextTrack_(dateRanges) { - createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_); - addDateRangeMetadata({ - inbandTextTracks: this.inbandTextTracks_, - dateRanges + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.matroska); + }, + mp4: function mp4(bytes) { + // if this file is another base media file format, it is not mp4 + if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) { + return false; + } // if this file starts with a ftyp or styp box its mp4 + + + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mp4, { + offset: 4 + }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.fmp4, { + offset: 4 + })) { + return true; + } // if this file starts with a moof/moov box its mp4 + + + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moof, { + offset: 4 + }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moov, { + offset: 4 + })) { + return true; + } + }, + mov: function mov(bytes) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mov, { + offset: 4 }); - } - addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) { - const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed - // audio/video source with a metadata track, and an alt audio with a metadata track. - // However, this probably won't happen, and if it does it can be handled then. + }, + '3gp': function gp(bytes) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS['3gp'], { + offset: 4 + }); + }, + ac3: function ac3(bytes) { + var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ac3, { + offset: offset + }); + }, + ts: function ts(bytes) { + if (bytes.length < 189 && bytes.length >= 1) { + return bytes[0] === 0x47; + } - createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_); - addMetadata({ - inbandTextTracks: this.inbandTextTracks_, - metadataArray, - timestampOffset, - videoDuration + var i = 0; // check the first 376 bytes for two matching sync bytes + + while (i + 188 < bytes.length && i < 188) { + if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) { + return true; + } + + i += 1; + } + + return false; + }, + flac: function flac(bytes) { + var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.flac, { + offset: offset }); + }, + ogg: function ogg(bytes) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ogg); + }, + avi: function avi(bytes) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.avi, { + offset: 8 + }); + }, + wav: function wav(bytes) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.wav, { + offset: 8 + }); + }, + 'h264': function h264(bytes) { + // find seq_parameter_set_rbsp + return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH264Nal)(bytes, 7, 3).length; + }, + 'h265': function h265(bytes) { + // find video_parameter_set_rbsp or seq_parameter_set_rbsp + return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH265Nal)(bytes, [32, 33], 3).length; } - pathwayAttribute_(playlist) { - return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation; - } - /** - * Initialize content steering listeners and apply the tag properties. - */ +}; // get all the isLikely functions +// but make sure 'ts' is above h264 and h265 +// but below everything else as it is the least specific - initContentSteeringController_() { - const initialMain = this.main(); - if (!initialMain.contentSteering) { - return; - } - const updateSteeringValues = main => { - for (const playlist of main.playlists) { - this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist)); - } - this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); - }; - updateSteeringValues(initialMain); - this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new - // manifest is loaded in live DASH with content steering. +var isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265 +.filter(function (t) { + return t !== 'ts' && t !== 'h264' && t !== 'h265'; +}) // add it back to the bottom +.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data. - if (this.sourceType_ === 'dash') { - this.mainPlaylistLoader_.on('mediaupdatetimeout', () => { - this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id); // clear past values +isLikelyTypes.forEach(function (type) { + var isLikelyFn = _isLikely[type]; - this.contentSteeringController_.abort(); - this.contentSteeringController_.clearTTLTimeout_(); - this.contentSteeringController_.clearAvailablePathways(); - updateSteeringValues(this.main()); - }); - } // Do this at startup only, after that the steering requests are managed by the Content Steering class. - // DASH queryBeforeStart scenarios will be handled by the Content Steering class. + _isLikely[type] = function (bytes) { + return isLikelyFn((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes)); + }; +}); // export after wrapping - if (!this.contentSteeringController_.queryBeforeStart) { - this.tech_.one('canplay', () => { - this.contentSteeringController_.requestSteeringManifest(); - }); - } - } - /** - * Simple exclude and change playlist logic for content steering. - */ +var isLikely = _isLikely; // A useful list of file signatures can be found here +// https://en.wikipedia.org/wiki/List_of_file_signatures - excludeThenChangePathway_() { - const currentPathway = this.contentSteeringController_.getPathway(); - if (!currentPathway) { - return; - } - const main = this.main(); - const playlists = main.playlists; - const ids = new Set(); - let didEnablePlaylists = false; - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; - const pathwayId = this.pathwayAttribute_(variant); - const differentPathwayId = pathwayId && currentPathway !== pathwayId; - const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering'; - if (steeringExclusion && !differentPathwayId) { - delete variant.excludeUntil; - delete variant.lastExcludeReason_; - didEnablePlaylists = true; - } - const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity; - const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil; - if (!shouldExclude) { - return; - } - ids.add(variant.id); - variant.excludeUntil = Infinity; - variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this. +var detectContainerForBytes = function detectContainerForBytes(bytes) { + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`); - }); - if (this.contentSteeringController_.manifestType_ === 'DASH') { - Object.keys(this.mediaTypes_).forEach(key => { - const type = this.mediaTypes_[key]; - if (type.activePlaylistLoader) { - const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN + for (var i = 0; i < isLikelyTypes.length; i++) { + var type = isLikelyTypes[i]; - if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) { - didEnablePlaylists = true; - } - } - }); - } - if (didEnablePlaylists) { - this.changeSegmentPathway_(); + if (isLikely[type](bytes)) { + return type; } } - /** - * Changes the current playlists for audio, video and subtitles after a new pathway - * is chosen from content steering. - */ - changeSegmentPathway_() { - const nextPlaylist = this.selectPlaylist(); - this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH + return ''; +}; // fmp4 is not a container - if (this.contentSteeringController_.manifestType_ === 'DASH') { - this.switchMediaForDASHContentSteering_(); - } - this.switchMedia_(nextPlaylist, 'content-steering'); - } -} +var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) { + return (0,_mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__.findBox)(bytes, ['moof']).length > 0; +}; -/** - * Returns a function that acts as the Enable/disable playlist function. - * - * @param {PlaylistLoader} loader - The main playlist loader - * @param {string} playlistID - id of the playlist - * @param {Function} changePlaylistFn - A function to be called after a - * playlist's enabled-state has been changed. Will NOT be called if a - * playlist's enabled-state is unchanged - * @param {boolean=} enable - Value to set the playlist enabled-state to - * or if undefined returns the current enabled-state for the playlist - * @return {Function} Function for setting/getting enabled - */ +/***/ }), -const enableFunction = (loader, playlistID, changePlaylistFn) => enable => { - const playlist = loader.main.playlists[playlistID]; - const incompatible = isIncompatible(playlist); - const currentlyEnabled = isEnabled(playlist); - if (typeof enable === 'undefined') { - return currentlyEnabled; - } - if (enable) { - delete playlist.disabled; - } else { - playlist.disabled = true; - } - if (enable !== currentlyEnabled && !incompatible) { - // Ensure the outside world knows about our changes - changePlaylistFn(); - if (enable) { - loader.trigger('renditionenabled'); - } else { - loader.trigger('renditiondisabled'); - } - } - return enable; +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EBML_TAGS: () => (/* binding */ EBML_TAGS), +/* harmony export */ decodeBlock: () => (/* binding */ decodeBlock), +/* harmony export */ findEbml: () => (/* binding */ findEbml), +/* harmony export */ parseData: () => (/* binding */ parseData), +/* harmony export */ parseTracks: () => (/* binding */ parseTracks) +/* harmony export */ }); +/* harmony import */ var _byte_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); +/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js"); + + // relevant specs for this parser: +// https://matroska-org.github.io/libebml/specs.html +// https://www.matroska.org/technical/elements.html +// https://www.webmproject.org/docs/container/ + +var EBML_TAGS = { + EBML: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1A, 0x45, 0xDF, 0xA3]), + DocType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x42, 0x82]), + Segment: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x18, 0x53, 0x80, 0x67]), + SegmentInfo: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x15, 0x49, 0xA9, 0x66]), + Tracks: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x16, 0x54, 0xAE, 0x6B]), + Track: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), + TrackNumber: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xd7]), + DefaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x23, 0xe3, 0x83]), + TrackEntry: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), + TrackType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x83]), + FlagDefault: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x88]), + CodecID: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x86]), + CodecPrivate: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x63, 0xA2]), + VideoTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe0]), + AudioTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe1]), + // Not used yet, but will be used for live webm/mkv + // see https://www.matroska.org/technical/basics.html#block-structure + // see https://www.matroska.org/technical/basics.html#simpleblock-structure + Cluster: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1F, 0x43, 0xB6, 0x75]), + Timestamp: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xE7]), + TimestampScale: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x2A, 0xD7, 0xB1]), + BlockGroup: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA0]), + BlockDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x9B]), + Block: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA1]), + SimpleBlock: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA3]) }; /** - * The representation object encapsulates the publicly visible information - * in a media playlist along with a setter/getter-type function (enabled) - * for changing the enabled-state of a particular playlist entry - * - * @class Representation + * This is a simple table to determine the length + * of things in ebml. The length is one based (starts at 1, + * rather than zero) and for every zero bit before a one bit + * we add one to length. We also need this table because in some + * case we have to xor all the length bits from another value. */ -class Representation { - constructor(vhsHandler, playlist, id) { - const { - playlistController_: pc - } = vhsHandler; - const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional +var LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1]; - if (playlist.attributes) { - const resolution = playlist.attributes.RESOLUTION; - this.width = resolution && resolution.width; - this.height = resolution && resolution.height; - this.bandwidth = playlist.attributes.BANDWIDTH; - this.frameRate = playlist.attributes['FRAME-RATE']; +var getLength = function getLength(byte) { + var len = 1; + + for (var i = 0; i < LENGTH_TABLE.length; i++) { + if (byte & LENGTH_TABLE[i]) { + break; } - this.codecs = codecsForPlaylist(pc.main(), playlist); - this.playlist = playlist; // The id is simply the ordinality of the media playlist - // within the main playlist - this.id = id; // Partially-apply the enableFunction to create a playlist- - // specific variant + len++; + } - this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction); + return len; +}; // length in ebml is stored in the first 4 to 8 bits +// of the first byte. 4 for the id length and 8 for the +// data size length. Length is measured by converting the number to binary +// then 1 + the number of zeros before a 1 is encountered starting +// from the left. + + +var getvint = function getvint(bytes, offset, removeLength, signed) { + if (removeLength === void 0) { + removeLength = true; } -} -/** - * A mixin function that adds the `representations` api to an instance - * of the VhsHandler class - * - * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the - * representation API into - */ -const renditionSelectionMixin = function (vhsHandler) { - // Add a single API-specific function to the VhsHandler instance - vhsHandler.representations = () => { - const main = vhsHandler.playlistController_.main(); - const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists; - if (!playlists) { - return []; - } - return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id)); + if (signed === void 0) { + signed = false; + } + + var length = getLength(bytes[offset]); + var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes + // as they will be modified below to remove the dataSizeLen bits and we do not + // want to modify the original data. normally we could just call slice on + // uint8array but ie 11 does not support that... + + if (removeLength) { + valueBytes = Array.prototype.slice.call(bytes, offset, offset + length); + valueBytes[0] ^= LENGTH_TABLE[length - 1]; + } + + return { + length: length, + value: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(valueBytes, { + signed: signed + }), + bytes: valueBytes }; }; -/** - * @file playback-watcher.js - * - * Playback starts, and now my watch begins. It shall not end until my death. I shall - * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns - * and win no glory. I shall live and die at my post. I am the corrector of the underflow. - * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge - * my life and honor to the Playback Watch, for this Player and all the Players to come. - */ +var normalizePath = function normalizePath(path) { + if (typeof path === 'string') { + return path.match(/.{1,2}/g).map(function (p) { + return normalizePath(p); + }); + } -const timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error']; -/** - * @class PlaybackWatcher - */ + if (typeof path === 'number') { + return (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.numberToBytes)(path); + } -class PlaybackWatcher { - /** - * Represents an PlaybackWatcher object. - * - * @class - * @param {Object} options an object that includes the tech and settings - */ - constructor(options) { - this.playlistController_ = options.playlistController; - this.tech_ = options.tech; - this.seekable = options.seekable; - this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow; - this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta; - this.media = options.media; - this.consecutiveUpdates = 0; - this.lastRecordedTime = null; - this.checkCurrentTimeTimeout_ = null; - this.logger_ = logger('PlaybackWatcher'); - this.logger_('initialize'); - const playHandler = () => this.monitorCurrentTime_(); - const canPlayHandler = () => this.monitorCurrentTime_(); - const waitingHandler = () => this.techWaiting_(); - const cancelTimerHandler = () => this.resetTimeUpdate_(); - const pc = this.playlistController_; - const loaderTypes = ['main', 'subtitle', 'audio']; - const loaderChecks = {}; - loaderTypes.forEach(type => { - loaderChecks[type] = { - reset: () => this.resetSegmentDownloads_(type), - updateend: () => this.checkSegmentDownloads_(type) - }; - pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer - // isn't changing we want to reset. We cannot assume that the new rendition - // will also be stalled, until after new appends. + return path; +}; - pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking. - // This prevents one segment playlists (single vtt or single segment content) - // from being detected as stalling. As the buffer will not change in those cases, since - // the buffer is the entire video duration. +var normalizePaths = function normalizePaths(paths) { + if (!Array.isArray(paths)) { + return [normalizePath(paths)]; + } - this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset); - }); - /** - * We check if a seek was into a gap through the following steps: - * 1. We get a seeking event and we do not get a seeked event. This means that - * a seek was attempted but not completed. - * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already - * removed everything from our buffer and appended a segment, and should be ready - * to check for gaps. - */ + return paths.map(function (p) { + return normalizePath(p); + }); +}; - const setSeekingHandlers = fn => { - ['main', 'audio'].forEach(type => { - pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_); - }); - }; - this.seekingAppendCheck_ = () => { - if (this.fixesBadSeeks_()) { - this.consecutiveUpdates = 0; - this.lastRecordedTime = this.tech_.currentTime(); - setSeekingHandlers('off'); - } - }; - this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off'); - this.watchForBadSeeking_ = () => { - this.clearSeekingAppendCheck_(); - setSeekingHandlers('on'); - }; - this.tech_.on('seeked', this.clearSeekingAppendCheck_); - this.tech_.on('seeking', this.watchForBadSeeking_); - this.tech_.on('waiting', waitingHandler); - this.tech_.on(timerCancelEvents, cancelTimerHandler); - this.tech_.on('canplay', canPlayHandler); - /* - An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case - is surfaced in one of two ways: - 1) The `waiting` event is fired before the player has buffered content, making it impossible - to find or skip the gap. The `waiting` event is followed by a `play` event. On first play - we can check if playback is stalled due to a gap, and skip the gap if necessary. - 2) A source with a gap at the beginning of the stream is loaded programatically while the player - is in a playing state. To catch this case, it's important that our one-time play listener is setup - even if the player is in a playing state - */ +var getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) { + if (offset >= bytes.length) { + return bytes.length; + } - this.tech_.one('play', playHandler); // Define the dispose function to clean up our events + var innerid = getvint(bytes, offset, false); - this.dispose = () => { - this.clearSeekingAppendCheck_(); - this.logger_('dispose'); - this.tech_.off('waiting', waitingHandler); - this.tech_.off(timerCancelEvents, cancelTimerHandler); - this.tech_.off('canplay', canPlayHandler); - this.tech_.off('play', playHandler); - this.tech_.off('seeking', this.watchForBadSeeking_); - this.tech_.off('seeked', this.clearSeekingAppendCheck_); - loaderTypes.forEach(type => { - pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend); - pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset); - this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset); - }); - if (this.checkCurrentTimeTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkCurrentTimeTimeout_); - } - this.resetTimeUpdate_(); - }; + if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(id.bytes, innerid.bytes)) { + return offset; } - /** - * Periodically check current time to see if playback stopped - * - * @private - */ - monitorCurrentTime_() { - this.checkCurrentTime_(); - if (this.checkCurrentTimeTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkCurrentTimeTimeout_); - } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 + var dataHeader = getvint(bytes, offset + innerid.length); + return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length); +}; +/** + * Notes on the EBLM format. + * + * EBLM uses "vints" tags. Every vint tag contains + * two parts + * + * 1. The length from the first byte. You get this by + * converting the byte to binary and counting the zeros + * before a 1. Then you add 1 to that. Examples + * 00011111 = length 4 because there are 3 zeros before a 1. + * 00100000 = length 3 because there are 2 zeros before a 1. + * 00000011 = length 7 because there are 6 zeros before a 1. + * + * 2. The bits used for length are removed from the first byte + * Then all the bytes are merged into a value. NOTE: this + * is not the case for id ebml tags as there id includes + * length bits. + * + */ - this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorCurrentTime_.bind(this), 250); - } - /** - * Reset stalled download stats for a specific type of loader - * - * @param {string} type - * The segment loader type to check. - * - * @listens SegmentLoader#playlistupdate - * @listens Tech#seeking - * @listens Tech#seeked - */ - resetSegmentDownloads_(type) { - const loader = this.playlistController_[`${type}SegmentLoader_`]; - if (this[`${type}StalledDownloads_`] > 0) { - this.logger_(`resetting possible stalled download count for ${type} loader`); - } - this[`${type}StalledDownloads_`] = 0; - this[`${type}Buffered_`] = loader.buffered_(); +var findEbml = function findEbml(bytes, paths) { + paths = normalizePaths(paths); + bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var results = []; + + if (!paths.length) { + return results; } - /** - * Checks on every segment `appendsdone` to see - * if segment appends are making progress. If they are not - * and we are still downloading bytes. We exclude the playlist. - * - * @param {string} type - * The segment loader type to check. - * - * @listens SegmentLoader#appendsdone - */ - checkSegmentDownloads_(type) { - const pc = this.playlistController_; - const loader = pc[`${type}SegmentLoader_`]; - const buffered = loader.buffered_(); - const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered); - this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or - // the buffered value for this loader changed - // appends are working + var i = 0; - if (isBufferedDifferent) { - this.resetSegmentDownloads_(type); - return; + while (i < bytes.length) { + var id = getvint(bytes, i, false); + var dataHeader = getvint(bytes, i + id.length); + var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream + + if (dataHeader.value === 0x7f) { + dataHeader.value = getInfinityDataSize(id, bytes, dataStart); + + if (dataHeader.value !== bytes.length) { + dataHeader.value -= dataStart; + } } - this[`${type}StalledDownloads_`]++; - this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, { - playlistId: loader.playlist_ && loader.playlist_.id, - buffered: timeRangesToArray(buffered) - }); // after 10 possibly stalled appends with no reset, exclude - if (this[`${type}StalledDownloads_`] < 10) { - return; + var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value; + var data = bytes.subarray(dataStart, dataEnd); + + if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(paths[0], id.bytes)) { + if (paths.length === 1) { + // this is the end of the paths and we've found the tag we were + // looking for + results.push(data); + } else { + // recursively search for the next tag inside of the data + // of this one + results = results.concat(findEbml(data, paths.slice(1))); + } } - this.logger_(`${type} loader stalled download exclusion`); - this.resetSegmentDownloads_(type); - this.tech_.trigger({ - type: 'usage', - name: `vhs-${type}-download-exclusion` - }); - if (type === 'subtitle') { - return; - } // TODO: should we exclude audio tracks rather than main tracks - // when type is audio? - pc.excludePlaylist({ - error: { - message: `Excessive ${type} segment downloading detected.` - }, - playlistExclusionDuration: Infinity - }); + var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it + + i += totalLength; } - /** - * The purpose of this function is to emulate the "waiting" event on - * browsers that do not emit it when they are waiting for more - * data to continue playback - * - * @private - */ - checkCurrentTime_() { - if (this.tech_.paused() || this.tech_.seeking()) { - return; - } - const currentTime = this.tech_.currentTime(); - const buffered = this.tech_.buffered(); - if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) { - // If current time is at the end of the final buffered region, then any playback - // stall is most likely caused by buffering in a low bandwidth environment. The tech - // should fire a `waiting` event in this scenario, but due to browser and tech - // inconsistencies. Calling `techWaiting_` here allows us to simulate - // responding to a native `waiting` event when the tech fails to emit one. - return this.techWaiting_(); - } - if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) { - this.consecutiveUpdates++; - this.waiting_(); - } else if (currentTime === this.lastRecordedTime) { - this.consecutiveUpdates++; - } else { - this.consecutiveUpdates = 0; - this.lastRecordedTime = currentTime; + return results; +}; // see https://www.matroska.org/technical/basics.html#block-structure + +var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) { + var duration; + + if (type === 'group') { + duration = findEbml(block, [EBML_TAGS.BlockDuration])[0]; + + if (duration) { + duration = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(duration); + duration = 1 / timestampScale * duration * timestampScale / 1000; } + + block = findEbml(block, [EBML_TAGS.Block])[0]; + type = 'block'; // treat data as a block after this point } - /** - * Resets the 'timeupdate' mechanism designed to detect that we are stalled - * - * @private - */ - resetTimeUpdate_() { - this.consecutiveUpdates = 0; + var dv = new DataView(block.buffer, block.byteOffset, block.byteLength); + var trackNumber = getvint(block, 0); + var timestamp = dv.getInt16(trackNumber.length, false); + var flags = block[trackNumber.length + 2]; + var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds + + var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame + + var parsed = { + duration: duration, + trackNumber: trackNumber.value, + keyframe: type === 'simple' && flags >> 7 === 1, + invisible: (flags & 0x08) >> 3 === 1, + lacing: (flags & 0x06) >> 1, + discardable: type === 'simple' && (flags & 0x01) === 1, + frames: [], + pts: ptsdts, + dts: ptsdts, + timestamp: timestamp + }; + + if (!parsed.lacing) { + parsed.frames.push(data); + return parsed; } - /** - * Fixes situations where there's a bad seek - * - * @return {boolean} whether an action was taken to fix the seek - * @private - */ - fixesBadSeeks_() { - const seeking = this.tech_.seeking(); - if (!seeking) { - return false; - } // TODO: It's possible that these seekable checks should be moved out of this function - // and into a function that runs on seekablechange. It's also possible that we only need - // afterSeekableWindow as the buffered check at the bottom is good enough to handle before - // seekable range. + var numberOfFrames = data[0] + 1; + var frameSizes = []; + var offset = 1; // Fixed - const seekable = this.seekable(); - const currentTime = this.tech_.currentTime(); - const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow); - let seekTo; - if (isAfterSeekableRange) { - const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting) + if (parsed.lacing === 2) { + var sizeOfFrame = (data.length - offset) / numberOfFrames; - seekTo = seekableEnd; + for (var i = 0; i < numberOfFrames; i++) { + frameSizes.push(sizeOfFrame); } - if (this.beforeSeekableWindow_(seekable, currentTime)) { - const seekableStart = seekable.start(0); // sync to the beginning of the live window - // provide a buffer of .1 seconds to handle rounding/imprecise numbers + } // xiph - seekTo = seekableStart + ( - // if the playlist is too short and the seekable range is an exact time (can - // happen in live with a 3 segment playlist), then don't use a time delta - seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA); - } - if (typeof seekTo !== 'undefined') { - this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`); - this.tech_.setCurrentTime(seekTo); - return true; - } - const sourceUpdater = this.playlistController_.sourceUpdater_; - const buffered = this.tech_.buffered(); - const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null; - const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null; - const media = this.media(); // verify that at least two segment durations or one part duration have been - // appended before checking for a gap. - const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been - // appended before checking for a gap. + if (parsed.lacing === 1) { + for (var _i = 0; _i < numberOfFrames - 1; _i++) { + var size = 0; - const bufferedToCheck = [audioBuffered, videoBuffered]; - for (let i = 0; i < bufferedToCheck.length; i++) { - // skip null buffered - if (!bufferedToCheck[i]) { - continue; - } - const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part - // duration behind we haven't appended enough to call this a bad seek. + do { + size += data[offset]; + offset++; + } while (data[offset - 1] === 0xFF); - if (timeAhead < minAppendedDuration) { - return false; - } + frameSizes.push(size); } - const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered - // to seek over the gap + } // ebml - if (nextRange.length === 0) { - return false; + + if (parsed.lacing === 3) { + // first vint is unsinged + // after that vints are singed and + // based on a compounding size + var _size = 0; + + for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) { + var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true); + _size += vint.value; + frameSizes.push(_size); + offset += vint.length; } - seekTo = nextRange.start(0) + SAFE_TIME_DELTA; - this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`); - this.tech_.setCurrentTime(seekTo); - return true; } - /** - * Handler for situations when we determine the player is waiting. - * - * @private - */ - waiting_() { - if (this.techWaiting_()) { - return; - } // All tech waiting checks failed. Use last resort correction + frameSizes.forEach(function (size) { + parsed.frames.push(data.subarray(offset, offset + size)); + offset += size; + }); + return parsed; +}; // VP9 Codec Feature Metadata (CodecPrivate) +// https://www.webmproject.org/docs/container/ - const currentTime = this.tech_.currentTime(); - const buffered = this.tech_.buffered(); - const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered - // region with no indication that anything is amiss (seen in Firefox). Seeking to - // currentTime is usually enough to kickstart the player. This checks that the player - // is currently within a buffered region before attempting a corrective seek. - // Chrome does not appear to continue `timeupdate` events after a `waiting` event - // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also - // make sure there is ~3 seconds of forward buffer before taking any corrective action - // to avoid triggering an `unknownwaiting` event when the network is slow. +var parseVp9Private = function parseVp9Private(bytes) { + var i = 0; + var params = {}; - if (currentRange.length && currentTime + 3 <= currentRange.end(0)) { - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(currentTime); - this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS + while (i < bytes.length) { + var id = bytes[i] & 0x7f; + var len = bytes[i + 1]; + var val = void 0; - this.tech_.trigger({ - type: 'usage', - name: 'vhs-unknown-waiting' - }); - return; + if (len === 1) { + val = bytes[i + 2]; + } else { + val = bytes.subarray(i + 2, i + 2 + len); } - } - /** - * Handler for situations when the tech fires a `waiting` event - * - * @return {boolean} - * True if an action (or none) was needed to correct the waiting. False if no - * checks passed - * @private - */ - techWaiting_() { - const seekable = this.seekable(); - const currentTime = this.tech_.currentTime(); - if (this.tech_.seeking()) { - // Tech is seeking or already waiting on another action, no action needed - return true; + if (id === 1) { + params.profile = val; + } else if (id === 2) { + params.level = val; + } else if (id === 3) { + params.bitDepth = val; + } else if (id === 4) { + params.chromaSubsampling = val; + } else { + params[id] = val; } - if (this.beforeSeekableWindow_(seekable, currentTime)) { - const livePoint = seekable.end(seekable.length - 1); - this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`); - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS - this.tech_.trigger({ - type: 'usage', - name: 'vhs-live-resync' - }); - return true; - } - const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_; - const buffered = this.tech_.buffered(); - const videoUnderflow = this.videoUnderflow_({ - audioBuffered: sourceUpdater.audioBuffered(), - videoBuffered: sourceUpdater.videoBuffered(), - currentTime - }); - if (videoUnderflow) { - // Even though the video underflowed and was stuck in a gap, the audio overplayed - // the gap, leading currentTime into a buffered range. Seeking to currentTime - // allows the video to catch up to the audio position without losing any audio - // (only suffering ~3 seconds of frozen video and a pause in audio playback). - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS + i += 2 + len; + } - this.tech_.trigger({ - type: 'usage', - name: 'vhs-video-underflow' - }); - return true; - } - const nextRange = findNextRange(buffered, currentTime); // check for gap + return params; +}; - if (nextRange.length > 0) { - this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`); - this.resetTimeUpdate_(); - this.skipTheGap_(currentTime); - return true; - } // All checks failed. Returning false to indicate failure to correct waiting +var parseTracks = function parseTracks(bytes) { + bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var decodedTracks = []; + var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]); - return false; + if (!tracks.length) { + tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]); } - afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) { - if (!seekable.length) { - // we can't make a solid case if there's no seekable, default to false - return false; - } - let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA; - const isLive = !playlist.endList; - const isLLHLS = typeof playlist.partTargetDuration === 'number'; - if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) { - allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3; - } - if (currentTime > allowedEnd) { - return true; - } - return false; + + if (!tracks.length) { + tracks = findEbml(bytes, [EBML_TAGS.Track]); } - beforeSeekableWindow_(seekable, currentTime) { - if (seekable.length && - // can't fall before 0 and 0 seekable start identifies VOD stream - seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) { - return true; - } - return false; + + if (!tracks.length) { + return decodedTracks; } - videoUnderflow_({ - videoBuffered, - audioBuffered, - currentTime - }) { - // audio only content will not have video underflow :) - if (!videoBuffered) { + + tracks.forEach(function (track) { + var trackType = findEbml(track, EBML_TAGS.TrackType)[0]; + + if (!trackType || !trackType.length) { return; + } // 1 is video, 2 is audio, 17 is subtitle + // other values are unimportant in this context + + + if (trackType[0] === 1) { + trackType = 'video'; + } else if (trackType[0] === 2) { + trackType = 'audio'; + } else if (trackType[0] === 17) { + trackType = 'subtitle'; + } else { + return; + } // todo parse language + + + var decodedTrack = { + rawCodec: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(findEbml(track, [EBML_TAGS.CodecID])[0]), + type: trackType, + codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0], + number: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.TrackNumber])[0]), + defaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.DefaultDuration])[0]), + default: findEbml(track, [EBML_TAGS.FlagDefault])[0], + rawData: track + }; + var codec = ''; + + if (/V_MPEG4\/ISO\/AVC/.test(decodedTrack.rawCodec)) { + codec = "avc1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(decodedTrack.codecPrivate); + } else if (/V_MPEGH\/ISO\/HEVC/.test(decodedTrack.rawCodec)) { + codec = "hev1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(decodedTrack.codecPrivate); + } else if (/V_MPEG4\/ISO\/ASP/.test(decodedTrack.rawCodec)) { + if (decodedTrack.codecPrivate) { + codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString(); + } else { + codec = 'mp4v.20.9'; + } + } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) { + codec = 'theora'; + } else if (/^V_VP8/.test(decodedTrack.rawCodec)) { + codec = 'vp8'; + } else if (/^V_VP9/.test(decodedTrack.rawCodec)) { + if (decodedTrack.codecPrivate) { + var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate), + profile = _parseVp9Private.profile, + level = _parseVp9Private.level, + bitDepth = _parseVp9Private.bitDepth, + chromaSubsampling = _parseVp9Private.chromaSubsampling; + + codec = 'vp09.'; + codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0') + "."; + codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0') + "."; + codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0') + "."; + codec += "" + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name + + var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || []; + var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || []; + var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || []; + var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all. + + if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) { + codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries[0], 2, '0'); + codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics[0], 2, '0'); + codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients[0], 2, '0'); + codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag[0], 2, '0'); + } + } else { + codec = 'vp9'; + } + } else if (/^V_AV1/.test(decodedTrack.rawCodec)) { + codec = "av01." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(decodedTrack.codecPrivate); + } else if (/A_ALAC/.test(decodedTrack.rawCodec)) { + codec = 'alac'; + } else if (/A_MPEG\/L2/.test(decodedTrack.rawCodec)) { + codec = 'mp2'; + } else if (/A_MPEG\/L3/.test(decodedTrack.rawCodec)) { + codec = 'mp3'; + } else if (/^A_AAC/.test(decodedTrack.rawCodec)) { + if (decodedTrack.codecPrivate) { + codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString(); + } else { + codec = 'mp4a.40.2'; + } + } else if (/^A_AC3/.test(decodedTrack.rawCodec)) { + codec = 'ac-3'; + } else if (/^A_PCM/.test(decodedTrack.rawCodec)) { + codec = 'pcm'; + } else if (/^A_MS\/ACM/.test(decodedTrack.rawCodec)) { + codec = 'speex'; + } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) { + codec = 'ec-3'; + } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) { + codec = 'vorbis'; + } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) { + codec = 'flac'; + } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) { + codec = 'opus'; } - let gap; // find a gap in demuxed content. - if (videoBuffered.length && audioBuffered.length) { - // in Chrome audio will continue to play for ~3s when we run out of video - // so we have to check that the video buffer did have some buffer in the - // past. - const lastVideoRange = findRange(videoBuffered, currentTime - 3); - const videoRange = findRange(videoBuffered, currentTime); - const audioRange = findRange(audioBuffered, currentTime); - if (audioRange.length && !videoRange.length && lastVideoRange.length) { - gap = { - start: lastVideoRange.end(0), - end: audioRange.end(0) - }; - } // find a gap in muxed content. - } else { - const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are - // stuck in a gap due to video underflow. + decodedTrack.codec = codec; + decodedTracks.push(decodedTrack); + }); + return decodedTracks.sort(function (a, b) { + return a.number - b.number; + }); +}; +var parseData = function parseData(data, tracks) { + var allBlocks = []; + var segment = findEbml(data, [EBML_TAGS.Segment])[0]; + var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms + + if (timestampScale && timestampScale.length) { + timestampScale = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestampScale); + } else { + timestampScale = 1000000; + } + + var clusters = findEbml(segment, [EBML_TAGS.Cluster]); + + if (!tracks) { + tracks = parseTracks(segment); + } + + clusters.forEach(function (cluster, ci) { + var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) { + return { + type: 'simple', + data: b + }; + }); + var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) { + return { + type: 'group', + data: b + }; + }); + var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0; + + if (timestamp && timestamp.length) { + timestamp = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestamp); + } // get all blocks then sort them into the correct order + + + var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) { + return a.data.byteOffset - b.data.byteOffset; + }); + blocks.forEach(function (block, bi) { + var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp); + allBlocks.push(decoded); + }); + }); + return { + tracks: tracks, + blocks: allBlocks + }; +}; + +/***/ }), - if (!nextRange.length) { - gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime); - } - } - if (gap) { - this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`); - return true; - } - return false; +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getId3Offset: () => (/* binding */ getId3Offset), +/* harmony export */ getId3Size: () => (/* binding */ getId3Size) +/* harmony export */ }); +/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); + +var ID3 = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x49, 0x44, 0x33]); +var getId3Size = function getId3Size(bytes, offset) { + if (offset === void 0) { + offset = 0; } - /** - * Timer callback. If playback still has not proceeded, then we seek - * to the start of the next buffered region. - * - * @private - */ - skipTheGap_(scheduledCurrentTime) { - const buffered = this.tech_.buffered(); - const currentTime = this.tech_.currentTime(); - const nextRange = findNextRange(buffered, currentTime); - this.resetTimeUpdate_(); - if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) { - return; - } - this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var flags = bytes[offset + 5]; + var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9]; + var footerPresent = (flags & 16) >> 4; - this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR); - this.tech_.trigger({ - type: 'usage', - name: 'vhs-gap-skip' - }); + if (footerPresent) { + return returnSize + 20; } - gapFromVideoUnderflow_(buffered, currentTime) { - // At least in Chrome, if there is a gap in the video buffer, the audio will continue - // playing for ~3 seconds after the video gap starts. This is done to account for - // video buffer underflow/underrun (note that this is not done when there is audio - // buffer underflow/underrun -- in that case the video will stop as soon as it - // encounters the gap, as audio stalls are more noticeable/jarring to a user than - // video stalls). The player's time will reflect the playthrough of audio, so the - // time will appear as if we are in a buffered region, even if we are stuck in a - // "gap." - // - // Example: - // video buffer: 0 => 10.1, 10.2 => 20 - // audio buffer: 0 => 20 - // overall buffer: 0 => 10.1, 10.2 => 20 - // current time: 13 - // - // Chrome's video froze at 10 seconds, where the video buffer encountered the gap, - // however, the audio continued playing until it reached ~3 seconds past the gap - // (13 seconds), at which point it stops as well. Since current time is past the - // gap, findNextRange will return no ranges. - // - // To check for this issue, we see if there is a gap that starts somewhere within - // a 3 second range (3 seconds +/- 1 second) back from our current time. - const gaps = findGaps(buffered); - for (let i = 0; i < gaps.length; i++) { - const start = gaps.start(i); - const end = gaps.end(i); // gap is starts no more than 4 seconds back - if (currentTime - start < 4 && currentTime - start > 2) { - return { - start, - end - }; - } - } - return null; + return returnSize + 10; +}; +var getId3Offset = function getId3Offset(bytes, offset) { + if (offset === void 0) { + offset = 0; } -} -const defaultOptions = { - errorInterval: 30, - getSource(next) { - const tech = this.tech({ - IWillNotUseThisInPlugins: true - }); - const sourceObj = tech.currentSource_ || this.currentSource(); - return next(sourceObj); + + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + + if (bytes.length - offset < 10 || !(0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, ID3, { + offset: offset + })) { + return offset; } + + offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files + // have multiple ID3 tag sections even though + // they should not. + + return getId3Offset(bytes, offset); }; + +/***/ }), + +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ simpleTypeFromSourceType: () => (/* binding */ simpleTypeFromSourceType) +/* harmony export */ }); +var MPEGURL_REGEX = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i; +var DASH_REGEX = /^application\/dash\+xml/i; /** - * Main entry point for the plugin + * Returns a string that describes the type of source based on a video source object's + * media type. * - * @param {Player} player a reference to a videojs Player instance - * @param {Object} [options] an object with plugin options - * @private + * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type} + * + * @param {string} type + * Video source object media type + * @return {('hls'|'dash'|'vhs-json'|null)} + * VHS source type string */ -const initPlugin = function (player, options) { - let lastCalled = 0; - let seekTo = 0; - const localOptions = merge(defaultOptions, options); - player.ready(() => { - player.trigger({ - type: 'usage', - name: 'vhs-error-reload-initialized' - }); - }); - /** - * Player modifications to perform that must wait until `loadedmetadata` - * has been triggered - * - * @private - */ +var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) { + if (MPEGURL_REGEX.test(type)) { + return 'hls'; + } - const loadedMetadataHandler = function () { - if (seekTo) { - player.currentTime(seekTo); - } - }; - /** - * Set the source on the player element, play, and seek if necessary - * - * @param {Object} sourceObj An object specifying the source url and mime-type to play - * @private - */ + if (DASH_REGEX.test(type)) { + return 'dash'; + } // Denotes the special case of a manifest object passed to http-streaming instead of a + // source URL. + // + // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types. + // + // In this case, vnd stands for vendor, video.js for the organization, VHS for this + // project, and the +json suffix identifies the structure of the media type. - const setSource = function (sourceObj) { - if (sourceObj === null || sourceObj === undefined) { - return; - } - seekTo = player.duration() !== Infinity && player.currentTime() || 0; - player.one('loadedmetadata', loadedMetadataHandler); - player.src(sourceObj); - player.trigger({ - type: 'usage', - name: 'vhs-error-reload' - }); - player.play(); - }; - /** - * Attempt to get a source from either the built-in getSource function - * or a custom function provided via the options - * - * @private - */ - const errorHandler = function () { - // Do not attempt to reload the source if a source-reload occurred before - // 'errorInterval' time has elapsed since the last source-reload - if (Date.now() - lastCalled < localOptions.errorInterval * 1000) { - player.trigger({ - type: 'usage', - name: 'vhs-error-reload-canceled' - }); - return; - } - if (!localOptions.getSource || typeof localOptions.getSource !== 'function') { - videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!'); - return; - } - lastCalled = Date.now(); - return localOptions.getSource.call(player, setSource); - }; - /** - * Unbind any event handlers that were bound by the plugin - * - * @private - */ + if (type === 'application/vnd.videojs.vhs+json') { + return 'vhs-json'; + } - const cleanupEvents = function () { - player.off('loadedmetadata', loadedMetadataHandler); - player.off('error', errorHandler); - player.off('dispose', cleanupEvents); - }; - /** - * Cleanup before re-initializing the plugin - * - * @param {Object} [newOptions] an object with plugin options - * @private - */ + return null; +}; - const reinitPlugin = function (newOptions) { - cleanupEvents(); - initPlugin(player, newOptions); - }; - player.on('error', errorHandler); - player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before - // initializing the plugin +/***/ }), - player.reloadSourceOnError = reinitPlugin; +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ addSampleDescription: () => (/* binding */ addSampleDescription), +/* harmony export */ buildFrameTable: () => (/* binding */ buildFrameTable), +/* harmony export */ findBox: () => (/* binding */ findBox), +/* harmony export */ findNamedBox: () => (/* binding */ findNamedBox), +/* harmony export */ parseDescriptors: () => (/* binding */ parseDescriptors), +/* harmony export */ parseMediaInfo: () => (/* binding */ parseMediaInfo), +/* harmony export */ parseTracks: () => (/* binding */ parseTracks) +/* harmony export */ }); +/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); +/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js"); +/* harmony import */ var _opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./opus-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js"); + + + + +var normalizePath = function normalizePath(path) { + if (typeof path === 'string') { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.stringToBytes)(path); + } + + if (typeof path === 'number') { + return path; + } + + return path; }; -/** - * Reload the source when an error is detected as long as there - * wasn't an error previously within the last 30 seconds - * - * @param {Object} [options] an object with plugin options - */ -const reloadSourceOnError = function (options) { - initPlugin(this, options); +var normalizePaths = function normalizePaths(paths) { + if (!Array.isArray(paths)) { + return [normalizePath(paths)]; + } + + return paths.map(function (p) { + return normalizePath(p); + }); }; -var version$4 = "3.7.0"; -var version$3 = "7.0.1"; -var version$2 = "1.2.2"; -var version$1 = "7.1.0"; -var version = "4.0.1"; -/** - * @file videojs-http-streaming.js - * - * The main file for the VHS project. - * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE - */ -const Vhs = { - PlaylistLoader, - Playlist, - utils, - STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector, - INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector, - lastBandwidthSelector, - movingAverageBandwidthSelector, - comparePlaylistBandwidth, - comparePlaylistResolution, - xhr: xhrFactory() -}; // Define getter/setters for config properties +var DESCRIPTORS; +var parseDescriptors = function parseDescriptors(bytes) { + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var results = []; + var i = 0; -Object.keys(Config).forEach(prop => { - Object.defineProperty(Vhs, prop, { - get() { - videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`); - return Config[prop]; - }, - set(value) { - videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`); - if (typeof value !== 'number' || value < 0) { - videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`); - return; - } - Config[prop] = value; + while (bytes.length > i) { + var tag = bytes[i]; + var size = 0; + var headerSize = 0; // tag + + headerSize++; + var byte = bytes[headerSize]; // first byte + + headerSize++; + + while (byte & 0x80) { + size = (byte & 0x7F) << 7; + byte = bytes[headerSize]; + headerSize++; } - }); -}); -const LOCAL_STORAGE_KEY = 'videojs-vhs'; -/** - * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs. - * - * @param {QualityLevelList} qualityLevels The QualityLevelList to update. - * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info. - * @function handleVhsMediaChange - */ -const handleVhsMediaChange = function (qualityLevels, playlistLoader) { - const newPlaylist = playlistLoader.media(); - let selectedIndex = -1; - for (let i = 0; i < qualityLevels.length; i++) { - if (qualityLevels[i].id === newPlaylist.id) { - selectedIndex = i; - break; + size += byte & 0x7F; + + for (var z = 0; z < DESCRIPTORS.length; z++) { + var _DESCRIPTORS$z = DESCRIPTORS[z], + id = _DESCRIPTORS$z.id, + parser = _DESCRIPTORS$z.parser; + + if (tag === id) { + results.push(parser(bytes.subarray(headerSize, headerSize + size))); + break; + } } + + i += size + headerSize; } - qualityLevels.selectedIndex_ = selectedIndex; - qualityLevels.trigger({ - selectedIndex, - type: 'change' - }); + + return results; }; -/** - * Adds quality levels to list once playlist metadata is available - * - * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to. - * @param {Object} vhs Vhs object to listen to for media events. - * @function handleVhsLoadedMetadata - */ +DESCRIPTORS = [{ + id: 0x03, + parser: function parser(bytes) { + var desc = { + tag: 0x03, + id: bytes[0] << 8 | bytes[1], + flags: bytes[2], + size: 3, + dependsOnEsId: 0, + ocrEsId: 0, + descriptors: [], + url: '' + }; // depends on es id -const handleVhsLoadedMetadata = function (qualityLevels, vhs) { - vhs.representations().forEach(rep => { - qualityLevels.addQualityLevel(rep); - }); - handleVhsMediaChange(qualityLevels, vhs.playlists); -}; // VHS is a source handler, not a tech. Make sure attempts to use it -// as one do not cause exceptions. + if (desc.flags & 0x80) { + desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; + desc.size += 2; + } // url -Vhs.canPlaySource = function () { - return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\'s techOrder.'); -}; -const emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => { - if (!keySystemOptions) { - return keySystemOptions; - } - let codecs = {}; - if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) { - codecs = unwrapCodecList((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(mainPlaylist.attributes.CODECS)); - } - if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) { - codecs.audio = audioPlaylist.attributes.CODECS; - } - const videoContentType = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codecs.video); - const audioContentType = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codecs.audio); // upsert the content types based on the selected playlist - const keySystemContentTypes = {}; - for (const keySystem in keySystemOptions) { - keySystemContentTypes[keySystem] = {}; - if (audioContentType) { - keySystemContentTypes[keySystem].audioContentType = audioContentType; - } - if (videoContentType) { - keySystemContentTypes[keySystem].videoContentType = videoContentType; - } // Default to using the video playlist's PSSH even though they may be different, as - // videojs-contrib-eme will only accept one in the options. - // - // This shouldn't be an issue for most cases as early intialization will handle all - // unique PSSH values, and if they aren't, then encrypted events should have the - // specific information needed for the unique license. + if (desc.flags & 0x40) { + var len = bytes[desc.size]; + desc.url = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(desc.size + 1, desc.size + 1 + len)); + desc.size += len; + } // ocr es id - if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) { - keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh; - } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url' - // so we need to prevent overwriting the URL entirely - if (typeof keySystemOptions[keySystem] === 'string') { - keySystemContentTypes[keySystem].url = keySystemOptions[keySystem]; + if (desc.flags & 0x20) { + desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; + desc.size += 2; } + + desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || []; + return desc; + } +}, { + id: 0x04, + parser: function parser(bytes) { + // DecoderConfigDescriptor + var desc = { + tag: 0x04, + oti: bytes[0], + streamType: bytes[1], + bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4], + maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8], + avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12], + descriptors: parseDescriptors(bytes.subarray(13)) + }; + return desc; + } +}, { + id: 0x05, + parser: function parser(bytes) { + // DecoderSpecificInfo + return { + tag: 0x05, + bytes: bytes + }; + } +}, { + id: 0x06, + parser: function parser(bytes) { + // SLConfigDescriptor + return { + tag: 0x06, + bytes: bytes + }; } - return merge(keySystemOptions, keySystemContentTypes); -}; +}]; /** - * @typedef {Object} KeySystems + * find any number of boxes by name given a path to it in an iso bmff + * such as mp4. * - * keySystems configuration for https://github.com/videojs/videojs-contrib-eme - * Note: not all options are listed here. + * @param {TypedArray} bytes + * bytes for the iso bmff to search for boxes in * - * @property {Uint8Array} [pssh] - * Protection System Specific Header - */ - -/** - * Goes through all the playlists and collects an array of KeySystems options objects - * containing each playlist's keySystems and their pssh values, if available. + * @param {Uint8Array[]|string[]|string|Uint8Array} name + * An array of paths or a single path representing the name + * of boxes to search through in bytes. Paths may be + * uint8 (character codes) or strings. * - * @param {Object[]} playlists - * The playlists to look through - * @param {string[]} keySystems - * The keySystems to collect pssh values for + * @param {boolean} [complete=false] + * Should we search only for complete boxes on the final path. + * This is very useful when you do not want to get back partial boxes + * in the case of streaming files. * - * @return {KeySystems[]} - * An array of KeySystems objects containing available key systems and their - * pssh values + * @return {Uint8Array[]} + * An array of the end paths that we found. */ -const getAllPsshKeySystemsOptions = (playlists, keySystems) => { - return playlists.reduce((keySystemsArr, playlist) => { - if (!playlist.contentProtection) { - return keySystemsArr; +var findBox = function findBox(bytes, paths, complete) { + if (complete === void 0) { + complete = false; + } + + paths = normalizePaths(paths); + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var results = []; + + if (!paths.length) { + // short-circuit the search for empty paths + return results; + } + + var i = 0; + + while (i < bytes.length) { + var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0; + var type = bytes.subarray(i + 4, i + 8); // invalid box format. + + if (size === 0) { + break; } - const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => { - const keySystemOptions = playlist.contentProtection[keySystem]; - if (keySystemOptions && keySystemOptions.pssh) { - keySystemsObj[keySystem] = { - pssh: keySystemOptions.pssh - }; + + var end = i + size; + + if (end > bytes.length) { + // this box is bigger than the number of bytes we have + // and complete is set, we cannot find any more boxes. + if (complete) { + break; } - return keySystemsObj; - }, {}); - if (Object.keys(keySystemsOptions).length) { - keySystemsArr.push(keySystemsOptions); + + end = bytes.length; } - return keySystemsArr; - }, []); -}; -/** - * Returns a promise that waits for the - * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session. - * - * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11 - * browsers. - * - * As per the above ticket, this is particularly important for Chrome, where, if - * unencrypted content is appended before encrypted content and the key session has not - * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached - * during playback. - * - * @param {Object} player - * The player instance - * @param {Object[]} sourceKeySystems - * The key systems options from the player source - * @param {Object} [audioMedia] - * The active audio media playlist (optional) - * @param {Object[]} mainPlaylists - * The playlists found on the main playlist object - * - * @return {Object} - * Promise that resolves when the key session has been created - */ -const waitForKeySessionCreation = ({ - player, - sourceKeySystems, - audioMedia, - mainPlaylists -}) => { - if (!player.eme.initializeMediaKeys) { - return Promise.resolve(); - } // TODO should all audio PSSH values be initialized for DRM? - // - // All unique video rendition pssh values are initialized for DRM, but here only - // the initial audio playlist license is initialized. In theory, an encrypted - // event should be fired if the user switches to an alternative audio playlist - // where a license is required, but this case hasn't yet been tested. In addition, there - // may be many alternate audio playlists unlikely to be used (e.g., multiple different - // languages). + var data = bytes.subarray(i + 8, end); - const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists; - const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems)); - const initializationFinishedPromises = []; - const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The - // only place where it should not be deduped is for ms-prefixed APIs, but - // the existence of modern EME APIs in addition to - // ms-prefixed APIs on Edge should prevent this from being a concern. - // initializeMediaKeys also won't use the webkit-prefixed APIs. + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(type, paths[0])) { + if (paths.length === 1) { + // this is the end of the path and we've found the box we were + // looking for + results.push(data); + } else { + // recursively search for the next box along the path + results.push.apply(results, findBox(data, paths.slice(1), complete)); + } + } - keySystemsOptionsArr.forEach(keySystemsOptions => { - keySessionCreatedPromises.push(new Promise((resolve, reject) => { - player.tech_.one('keysessioncreated', resolve); - })); - initializationFinishedPromises.push(new Promise((resolve, reject) => { - player.eme.initializeMediaKeys({ - keySystems: keySystemsOptions - }, err => { - if (err) { - reject(err); - return; - } - resolve(); - }); - })); - }); // The reasons Promise.race is chosen over Promise.any: - // - // * Promise.any is only available in Safari 14+. - // * None of these promises are expected to reject. If they do reject, it might be - // better here for the race to surface the rejection, rather than mask it by using - // Promise.any. + i = end; + } // we've finished searching all of bytes - return Promise.race([ - // If a session was previously created, these will all finish resolving without - // creating a new session, otherwise it will take until the end of all license - // requests, which is why the key session check is used (to make setup much faster). - Promise.all(initializationFinishedPromises), - // Once a single session is created, the browser knows DRM will be used. - Promise.race(keySessionCreatedPromises)]); + + return results; }; /** - * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and - * there are keySystems on the source, sets up source options to prepare the source for - * eme. + * Search for a single matching box by name in an iso bmff format like + * mp4. This function is useful for finding codec boxes which + * can be placed arbitrarily in sample descriptions depending + * on the version of the file or file type. * - * @param {Object} player - * The player instance - * @param {Object[]} sourceKeySystems - * The key systems options from the player source - * @param {Object} media - * The active media playlist - * @param {Object} [audioMedia] - * The active audio media playlist (optional) + * @param {TypedArray} bytes + * bytes for the iso bmff to search for boxes in * - * @return {boolean} - * Whether or not options were configured and EME is available + * @param {string|Uint8Array} name + * The name of the box to find. + * + * @return {Uint8Array[]} + * a subarray of bytes representing the name boxed we found. */ -const setupEmeOptions = ({ - player, - sourceKeySystems, - media, - audioMedia -}) => { - const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia); - if (!sourceOptions) { - return false; - } - player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing - // do nothing. +var findNamedBox = function findNamedBox(bytes, name) { + name = normalizePath(name); - if (sourceOptions && !player.eme) { - videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin'); - return false; - } - return true; -}; -const getVhsLocalStorage = () => { - if (!(global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage)) { - return null; - } - const storedObject = global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage.getItem(LOCAL_STORAGE_KEY); - if (!storedObject) { - return null; - } - try { - return JSON.parse(storedObject); - } catch (e) { - // someone may have tampered with the value - return null; - } -}; -const updateVhsLocalStorage = options => { - if (!(global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage)) { - return false; - } - let objectToStore = getVhsLocalStorage(); - objectToStore = objectToStore ? merge(objectToStore, options) : options; - try { - global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore)); - } catch (e) { - // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where - // storage is set to 0). - // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions - // No need to perform any operation. - return false; + if (!name.length) { + // short-circuit the search for empty paths + return bytes.subarray(bytes.length); } - return objectToStore; -}; -/** - * Parses VHS-supported media types from data URIs. See - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - * for information on data URIs. - * - * @param {string} dataUri - * The data URI - * - * @return {string|Object} - * The parsed object/string, or the original string if no supported media type - * was found - */ -const expandDataUri = dataUri => { - if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) { - return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1)); - } // no known case for this data URI, return the string as-is + var i = 0; - return dataUri; + while (i < bytes.length) { + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + name.length), name)) { + var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0; + var end = size > 1 ? i + size : bytes.byteLength; + return bytes.subarray(i + 4, end); + } + + i++; + } // we've finished searching all of bytes + + + return bytes.subarray(bytes.length); }; -/** - * Adds a request hook to an xhr object - * - * @param {Object} xhr object to add the onRequest hook to - * @param {function} callback hook function for an xhr request - */ -const addOnRequestHook = (xhr, callback) => { - if (!xhr._requestCallbackSet) { - xhr._requestCallbackSet = new Set(); +var parseSamples = function parseSamples(data, entrySize, parseEntry) { + if (entrySize === void 0) { + entrySize = 4; } - xhr._requestCallbackSet.add(callback); -}; -/** - * Adds a response hook to an xhr object - * - * @param {Object} xhr object to add the onResponse hook to - * @param {function} callback hook function for an xhr response - */ -const addOnResponseHook = (xhr, callback) => { - if (!xhr._responseCallbackSet) { - xhr._responseCallbackSet = new Set(); + if (parseEntry === void 0) { + parseEntry = function parseEntry(d) { + return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(d); + }; } - xhr._responseCallbackSet.add(callback); -}; -/** - * Removes a request hook on an xhr object, deletes the onRequest set if empty. - * - * @param {Object} xhr object to remove the onRequest hook from - * @param {function} callback hook function to remove - */ -const removeOnRequestHook = (xhr, callback) => { - if (!xhr._requestCallbackSet) { - return; + var entries = []; + + if (!data || !data.length) { + return entries; } - xhr._requestCallbackSet.delete(callback); - if (!xhr._requestCallbackSet.size) { - delete xhr._requestCallbackSet; + + var entryCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(data.subarray(4, 8)); + + for (var i = 8; entryCount; i += entrySize, entryCount--) { + entries.push(parseEntry(data.subarray(i, i + entrySize))); } + + return entries; }; -/** - * Removes a response hook on an xhr object, deletes the onResponse set if empty. - * - * @param {Object} xhr object to remove the onResponse hook from - * @param {function} callback hook function to remove - */ -const removeOnResponseHook = (xhr, callback) => { - if (!xhr._responseCallbackSet) { - return; - } - xhr._responseCallbackSet.delete(callback); - if (!xhr._responseCallbackSet.size) { - delete xhr._responseCallbackSet; +var buildFrameTable = function buildFrameTable(stbl, timescale) { + var keySamples = parseSamples(findBox(stbl, ['stss'])[0]); + var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]); + var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) { + return { + sampleCount: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), + sampleDelta: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)) + }; + }); + var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) { + return { + firstChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), + samplesPerChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)), + sampleDescriptionIndex: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(8, 12)) + }; + }); + var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need + + var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null); + var frames = []; + + for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) { + var samplesInChunk = void 0; + + for (var i = 0; i < samplesToChunks.length; i++) { + var sampleToChunk = samplesToChunks[i]; + var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk); + + if (isThisOne) { + samplesInChunk = sampleToChunk.samplesPerChunk; + break; + } + } + + var chunkOffset = chunkOffsets[chunkIndex]; + + for (var _i = 0; _i < samplesInChunk; _i++) { + var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe + + var keyframe = !keySamples.length; + + if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) { + keyframe = true; + } + + var frame = { + keyframe: keyframe, + start: chunkOffset, + end: chunkOffset + frameEnd + }; + + for (var k = 0; k < timeToSamples.length; k++) { + var _timeToSamples$k = timeToSamples[k], + sampleCount = _timeToSamples$k.sampleCount, + sampleDelta = _timeToSamples$k.sampleDelta; + + if (frames.length <= sampleCount) { + // ms to ns + var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0; + frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000; + frame.duration = sampleDelta; + break; + } + } + + frames.push(frame); + chunkOffset += frameEnd; + } } + + return frames; }; -/** - * Whether the browser has built-in HLS support. - */ +var addSampleDescription = function addSampleDescription(track, bytes) { + var codec = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(0, 4)); -Vhs.supportsNativeHls = function () { - if (!(global_document__WEBPACK_IMPORTED_MODULE_1___default()) || !(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement)) { - return false; + if (track.type === 'video') { + track.info = track.info || {}; + track.info.width = bytes[28] << 8 | bytes[29]; + track.info.height = bytes[30] << 8 | bytes[31]; + } else if (track.type === 'audio') { + track.info = track.info || {}; + track.info.channels = bytes[20] << 8 | bytes[21]; + track.info.bitDepth = bytes[22] << 8 | bytes[23]; + track.info.sampleRate = bytes[28] << 8 | bytes[29]; } - const video = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement('video'); // native HLS is definitely not supported if HTML5 video isn't - if (!videojs.getTech('Html5').isSupported()) { - return false; - } // HLS manifests can go by many mime-types + if (codec === 'avc1') { + var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord - const canPlay = [ - // Apple santioned - 'application/vnd.apple.mpegurl', - // Apple sanctioned for backwards compatibility - 'audio/mpegurl', - // Very common - 'audio/x-mpegurl', - // Very common - 'application/x-mpegurl', - // Included for completeness - 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl']; - return canPlay.some(function (canItPlay) { - return /maybe|probably/i.test(video.canPlayType(canItPlay)); - }); -}(); -Vhs.supportsNativeDash = function () { - if (!(global_document__WEBPACK_IMPORTED_MODULE_1___default()) || !(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement) || !videojs.getTech('Html5').isSupported()) { - return false; - } - return /maybe|probably/i.test(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement('video').canPlayType('application/dash+xml')); -}(); -Vhs.supportsTypeNatively = type => { - if (type === 'hls') { - return Vhs.supportsNativeHls; - } - if (type === 'dash') { - return Vhs.supportsNativeDash; - } - return false; -}; -/** - * VHS is a source handler, not a tech. Make sure attempts to use it - * as one do not cause exceptions. - */ + codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(avcC); + track.info.avcC = avcC; // TODO: do we need to parse all this? + + /* { + configurationVersion: avcC[0], + profile: avcC[1], + profileCompatibility: avcC[2], + level: avcC[3], + lengthSizeMinusOne: avcC[4] & 0x3 + }; + let spsNalUnitCount = avcC[5] & 0x1F; + const spsNalUnits = track.info.avc.spsNalUnits = []; + // past spsNalUnitCount + let offset = 6; + while (spsNalUnitCount--) { + const nalLen = avcC[offset] << 8 | avcC[offset + 1]; + spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); + offset += nalLen + 2; + } + let ppsNalUnitCount = avcC[offset]; + const ppsNalUnits = track.info.avc.ppsNalUnits = []; + // past ppsNalUnitCount + offset += 1; + while (ppsNalUnitCount--) { + const nalLen = avcC[offset] << 8 | avcC[offset + 1]; + ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); + offset += nalLen + 2; + }*/ + // HEVCDecoderConfigurationRecord + } else if (codec === 'hvc1' || codec === 'hev1') { + codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(findNamedBox(bytes, 'hvcC')); + } else if (codec === 'mp4a' || codec === 'mp4v') { + var esds = findNamedBox(bytes, 'esds'); + var esDescriptor = parseDescriptors(esds.subarray(4))[0]; + var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) { + var tag = _ref.tag; + return tag === 0x04; + })[0]; -Vhs.isSupported = function () { - return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\'s techOrder.'); -}; -/** - * A global function for setting an onRequest hook - * - * @param {function} callback for request modifiction - */ + if (decoderConfig) { + // most codecs do not have a further '.' + // such as 0xa5 for ac-3 and 0xa6 for e-ac-3 + codec += '.' + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(decoderConfig.oti); -Vhs.xhr.onRequest = function (callback) { - addOnRequestHook(Vhs.xhr, callback); -}; -/** - * A global function for setting an onResponse hook - * - * @param {callback} callback for response data retrieval - */ + if (decoderConfig.oti === 0x40) { + codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString(); + } else if (decoderConfig.oti === 0x20) { + codec += '.' + decoderConfig.descriptors[0].bytes[4].toString(); + } else if (decoderConfig.oti === 0xdd) { + codec = 'vorbis'; + } + } else if (track.type === 'audio') { + codec += '.40.2'; + } else { + codec += '.20.9'; + } + } else if (codec === 'av01') { + // AV1DecoderConfigurationRecord + codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(findNamedBox(bytes, 'av1C')); + } else if (codec === 'vp09') { + // VPCodecConfigurationRecord + var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/ -Vhs.xhr.onResponse = function (callback) { - addOnResponseHook(Vhs.xhr, callback); -}; -/** - * Deletes a global onRequest callback if it exists - * - * @param {function} callback to delete from the global set - */ + var profile = vpcC[0]; + var level = vpcC[1]; + var bitDepth = vpcC[2] >> 4; + var chromaSubsampling = (vpcC[2] & 0x0F) >> 1; + var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3; + var colourPrimaries = vpcC[3]; + var transferCharacteristics = vpcC[4]; + var matrixCoefficients = vpcC[5]; + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients, 2, '0'); + codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag, 2, '0'); + } else if (codec === 'theo') { + codec = 'theora'; + } else if (codec === 'spex') { + codec = 'speex'; + } else if (codec === '.mp3') { + codec = 'mp4a.40.34'; + } else if (codec === 'msVo') { + codec = 'vorbis'; + } else if (codec === 'Opus') { + codec = 'opus'; + var dOps = findNamedBox(bytes, 'dOps'); + track.info.opus = (0,_opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__.parseOpusHead)(dOps); // TODO: should this go into the webm code?? + // Firefox requires a codecDelay for opus playback + // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238 -Vhs.xhr.offRequest = function (callback) { - removeOnRequestHook(Vhs.xhr, callback); -}; -/** - * Deletes a global onResponse callback if it exists - * - * @param {function} callback to delete from the global set - */ + track.info.codecDelay = 6500000; + } else { + codec = codec.toLowerCase(); + } + /* eslint-enable */ + // flac, ac-3, ec-3, opus -Vhs.xhr.offResponse = function (callback) { - removeOnResponseHook(Vhs.xhr, callback); + + track.codec = codec; }; -const Component = videojs.getComponent('Component'); -/** - * The Vhs Handler object, where we orchestrate all of the parts - * of VHS to interact with video.js - * - * @class VhsHandler - * @extends videojs.Component - * @param {Object} source the soruce object - * @param {Tech} tech the parent tech object - * @param {Object} options optional and required options - */ +var parseTracks = function parseTracks(bytes, frameTable) { + if (frameTable === void 0) { + frameTable = true; + } -class VhsHandler extends Component { - constructor(source, tech, options) { - super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed - // use that over the VHS level `bandwidth` option + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + var traks = findBox(bytes, ['moov', 'trak'], true); + var tracks = []; + traks.forEach(function (trak) { + var track = { + bytes: trak + }; + var mdia = findBox(trak, ['mdia'])[0]; + var hdlr = findBox(mdia, ['hdlr'])[0]; + var trakType = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(hdlr.subarray(8, 12)); - if (typeof options.initialBandwidth === 'number') { - this.options_.bandwidth = options.initialBandwidth; + if (trakType === 'soun') { + track.type = 'audio'; + } else if (trakType === 'vide') { + track.type = 'video'; + } else { + track.type = trakType; } - this.logger_ = logger('VhsHandler'); // we need access to the player in some cases, - // so, get it from Video.js via the `playerId` - if (tech.options_ && tech.options_.playerId) { - const _player = videojs.getPlayer(tech.options_.playerId); - this.player_ = _player; - } - this.tech_ = tech; - this.source_ = source; - this.stats = {}; - this.ignoreNextSeekingEvent_ = false; - this.setOptions_(); - if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) { - tech.overrideNativeAudioTracks(true); - tech.overrideNativeVideoTracks(true); - } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) { - // overriding native VHS only works if audio tracks have been emulated - // error early if we're misconfigured - throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB'); - } // listen for fullscreenchange events for this player so that we - // can adjust our quality selection quickly + var tkhd = findBox(trak, ['tkhd'])[0]; - this.on((global_document__WEBPACK_IMPORTED_MODULE_1___default()), ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => { - const fullscreenElement = (global_document__WEBPACK_IMPORTED_MODULE_1___default().fullscreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().webkitFullscreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().mozFullScreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().msFullscreenElement); - if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) { - this.playlistController_.fastQualityChange_(); - } else { - // When leaving fullscreen, since the in page pixel dimensions should be smaller - // than full screen, see if there should be a rendition switch down to preserve - // bandwidth. - this.playlistController_.checkABR_(); - } - }); - this.on(this.tech_, 'seeking', function () { - if (this.ignoreNextSeekingEvent_) { - this.ignoreNextSeekingEvent_ = false; - return; - } - this.setCurrentTime(this.tech_.currentTime()); - }); - this.on(this.tech_, 'error', function () { - // verify that the error was real and we are loaded - // enough to have pc loaded. - if (this.tech_.error() && this.playlistController_) { - this.playlistController_.pauseLoading(); - } - }); - this.on(this.tech_, 'play', this.play); - } - setOptions_() { - // defaults - this.options_.withCredentials = this.options_.withCredentials || false; - this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true; - this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false; - this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false; - this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false; - this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false; - this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false; - this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false; - this.options_.customTagParsers = this.options_.customTagParsers || []; - this.options_.customTagMappers = this.options_.customTagMappers || []; - this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; - this.options_.llhls = this.options_.llhls === false ? false : true; - this.options_.bufferBasedABR = this.options_.bufferBasedABR || false; - if (typeof this.options_.playlistExclusionDuration !== 'number') { - this.options_.playlistExclusionDuration = 60; + if (tkhd) { + var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength); + var tkhdVersion = view.getUint8(0); + track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20); } - if (typeof this.options_.bandwidth !== 'number') { - if (this.options_.useBandwidthFromLocalStorage) { - const storedObject = getVhsLocalStorage(); - if (storedObject && storedObject.bandwidth) { - this.options_.bandwidth = storedObject.bandwidth; - this.tech_.trigger({ - type: 'usage', - name: 'vhs-bandwidth-from-local-storage' - }); - } - if (storedObject && storedObject.throughput) { - this.options_.throughput = storedObject.throughput; - this.tech_.trigger({ - type: 'usage', - name: 'vhs-throughput-from-local-storage' - }); - } - } - } // if bandwidth was not set by options or pulled from local storage, start playlist - // selection at a reasonable bandwidth - if (typeof this.options_.bandwidth !== 'number') { - this.options_.bandwidth = Config.INITIAL_BANDWIDTH; - } // If the bandwidth number is unchanged from the initial setting - // then this takes precedence over the enableLowInitialPlaylist option + var mdhd = findBox(mdia, ['mdhd'])[0]; - this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src + if (mdhd) { + // mdhd is a FullBox, meaning it will have its own version as the first byte + var version = mdhd[0]; + var index = version === 0 ? 12 : 20; + track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0; + } - ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => { - if (typeof this.source_[option] !== 'undefined') { - this.options_[option] = this.source_[option]; - } - }); - this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions; - this.useDevicePixelRatio = this.options_.useDevicePixelRatio; - } - /** - * called when player.src gets called, handle a new source - * - * @param {Object} src the source object to handle - */ + var stbl = findBox(mdia, ['minf', 'stbl'])[0]; + var stsd = findBox(stbl, ['stsd'])[0]; + var descriptionCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(4, 8)); + var offset = 8; // add codec and codec info - src(src, type) { - // do nothing if the src is falsey - if (!src) { - return; + while (descriptionCount--) { + var len = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(offset, offset + 4)); + var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len); + addSampleDescription(track, sampleDescriptor); + offset += 4 + len; } - this.setOptions_(); // add main playlist controller options - - this.options_.src = expandDataUri(this.source_.src); - this.options_.tech = this.tech_; - this.options_.externVhs = Vhs; - this.options_.sourceType = (0,_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__.simpleTypeFromSourceType)(type); // Whenever we seek internally, we should update the tech - this.options_.seekTo = time => { - this.tech_.setCurrentTime(time); - }; - this.playlistController_ = new PlaylistController(this.options_); - const playbackWatcherOptions = merge({ - liveRangeSafeTimeDelta: SAFE_TIME_DELTA - }, this.options_, { - seekable: () => this.seekable(), - media: () => this.playlistController_.media(), - playlistController: this.playlistController_ - }); - this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions); - this.playlistController_.on('error', () => { - const player = videojs.players[this.tech_.options_.playerId]; - let error = this.playlistController_.error; - if (typeof error === 'object' && !error.code) { - error.code = 3; - } else if (typeof error === 'string') { - error = { - message: error, - code: 3 - }; - } - player.error(error); - }); - const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards - // compatibility with < v2 + if (frameTable) { + track.frameTable = buildFrameTable(stbl, track.timescale); + } // codec has no sub parameters - this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this); - this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2 - this.playlists = this.playlistController_.mainPlaylistLoader_; - this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist - // controller. Using a custom property for backwards compatibility - // with < v2 + tracks.push(track); + }); + return tracks; +}; +var parseMediaInfo = function parseMediaInfo(bytes) { + var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0]; - Object.defineProperties(this, { - selectPlaylist: { - get() { - return this.playlistController_.selectPlaylist; - }, - set(selectPlaylist) { - this.playlistController_.selectPlaylist = selectPlaylist.bind(this); - } - }, - throughput: { - get() { - return this.playlistController_.mainSegmentLoader_.throughput.rate; - }, - set(throughput) { - this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value - // for the cumulative average + if (!mvhd || !mvhd.length) { + return; + } - this.playlistController_.mainSegmentLoader_.throughput.count = 1; - } - }, - bandwidth: { - get() { - let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth; - const networkInformation = (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).connection || (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).mozConnection || (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).webkitConnection; - const tenMbpsAsBitsPerSecond = 10e6; - if (this.options_.useNetworkInformationApi && networkInformation) { - // downlink returns Mbps - // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink - const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player - // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that - // high quality streams are not filtered out. + var info = {}; // ms to ns + // mvhd v1 has 8 byte duration and other fields too - if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) { - playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec); - } else { - playerBandwidthEst = networkInfoBandwidthEstBitsPerSec; - } - } - return playerBandwidthEst; - }, - set(bandwidth) { - this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter - // `count` is set to zero that current value of `rate` isn't included - // in the cumulative average + if (mvhd[0] === 1) { + info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(20, 24)); + info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(24, 32)); + } else { + info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(12, 16)); + info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(16, 20)); + } - this.playlistController_.mainSegmentLoader_.throughput = { - rate: 0, - count: 0 - }; - } - }, - /** - * `systemBandwidth` is a combination of two serial processes bit-rates. The first - * is the network bitrate provided by `bandwidth` and the second is the bitrate of - * the entire process after that - decryption, transmuxing, and appending - provided - * by `throughput`. - * - * Since the two process are serial, the overall system bandwidth is given by: - * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput) - */ - systemBandwidth: { - get() { - const invBandwidth = 1 / (this.bandwidth || 1); - let invThroughput; - if (this.throughput > 0) { - invThroughput = 1 / this.throughput; - } else { - invThroughput = 0; - } - const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput)); - return systemBitrate; - }, - set() { - videojs.log.error('The "systemBandwidth" property is read-only'); - } - } - }); - if (this.options_.bandwidth) { - this.bandwidth = this.options_.bandwidth; - } - if (this.options_.throughput) { - this.throughput = this.options_.throughput; - } - Object.defineProperties(this.stats, { - bandwidth: { - get: () => this.bandwidth || 0, - enumerable: true - }, - mediaRequests: { - get: () => this.playlistController_.mediaRequests_() || 0, - enumerable: true - }, - mediaRequestsAborted: { - get: () => this.playlistController_.mediaRequestsAborted_() || 0, - enumerable: true - }, - mediaRequestsTimedout: { - get: () => this.playlistController_.mediaRequestsTimedout_() || 0, - enumerable: true - }, - mediaRequestsErrored: { - get: () => this.playlistController_.mediaRequestsErrored_() || 0, - enumerable: true - }, - mediaTransferDuration: { - get: () => this.playlistController_.mediaTransferDuration_() || 0, - enumerable: true - }, - mediaBytesTransferred: { - get: () => this.playlistController_.mediaBytesTransferred_() || 0, - enumerable: true - }, - mediaSecondsLoaded: { - get: () => this.playlistController_.mediaSecondsLoaded_() || 0, - enumerable: true - }, - mediaAppends: { - get: () => this.playlistController_.mediaAppends_() || 0, - enumerable: true - }, - mainAppendsToLoadedData: { - get: () => this.playlistController_.mainAppendsToLoadedData_() || 0, - enumerable: true - }, - audioAppendsToLoadedData: { - get: () => this.playlistController_.audioAppendsToLoadedData_() || 0, - enumerable: true - }, - appendsToLoadedData: { - get: () => this.playlistController_.appendsToLoadedData_() || 0, - enumerable: true - }, - timeToLoadedData: { - get: () => this.playlistController_.timeToLoadedData_() || 0, - enumerable: true - }, - buffered: { - get: () => timeRangesToArray(this.tech_.buffered()), - enumerable: true - }, - currentTime: { - get: () => this.tech_.currentTime(), - enumerable: true - }, - currentSource: { - get: () => this.tech_.currentSource_, - enumerable: true - }, - currentTech: { - get: () => this.tech_.name_, - enumerable: true - }, - duration: { - get: () => this.tech_.duration(), - enumerable: true - }, - main: { - get: () => this.playlists.main, - enumerable: true - }, - playerDimensions: { - get: () => this.tech_.currentDimensions(), - enumerable: true - }, - seekable: { - get: () => timeRangesToArray(this.tech_.seekable()), - enumerable: true - }, - timestamp: { - get: () => Date.now(), - enumerable: true - }, - videoPlaybackQuality: { - get: () => this.tech_.getVideoPlaybackQuality(), - enumerable: true - } - }); - this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_)); - this.tech_.on('bandwidthupdate', () => { - if (this.options_.useBandwidthFromLocalStorage) { - updateVhsLocalStorage({ - bandwidth: this.bandwidth, - throughput: Math.round(this.throughput) - }); - } - }); - this.playlistController_.on('selectedinitialmedia', () => { - // Add the manual rendition mix-in to VhsHandler - renditionSelectionMixin(this); - }); - this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => { - this.setupEme_(); - }); // the bandwidth of the primary segment loader is our best - // estimate of overall bandwidth + info.bytes = mvhd; + return info; +}; - this.on(this.playlistController_, 'progress', function () { - this.tech_.trigger('progress'); - }); // In the live case, we need to ignore the very first `seeking` event since - // that will be the result of the seek-to-live behavior +/***/ }), - this.on(this.playlistController_, 'firstplay', function () { - this.ignoreNextSeekingEvent_ = true; - }); - this.setupQualityLevels_(); // do nothing if the tech has been disposed already - // this can occur if someone sets the src in player.ready(), for instance +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (!this.tech_.el()) { - return; - } - this.mediaSourceUrl_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.createObjectURL(this.playlistController_.mediaSource); - this.tech_.src(this.mediaSourceUrl_); - } - createKeySessions_() { - const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader; - this.logger_('waiting for EME key session creation'); - waitForKeySessionCreation({ - player: this.player_, - sourceKeySystems: this.source_.keySystems, - audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(), - mainPlaylists: this.playlists.main.playlists - }).then(() => { - this.logger_('created EME key session'); - this.playlistController_.sourceUpdater_.initializedEme(); - }).catch(err => { - this.logger_('error while creating EME key session', err); - this.player_.error({ - message: 'Failed to initialize media keys for EME', - code: 3 - }); - }); - } - handleWaitingForKey_() { - // If waitingforkey is fired, it's possible that the data that's necessary to retrieve - // the key is in the manifest. While this should've happened on initial source load, it - // may happen again in live streams where the keys change, and the manifest info - // reflects the update. - // - // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's - // already requested keys for, we don't have to worry about this generating extraneous - // requests. - this.logger_('waitingforkey fired, attempting to create any new key sessions'); - this.createKeySessions_(); - } - /** - * If necessary and EME is available, sets up EME options and waits for key session - * creation. - * - * This function also updates the source updater so taht it can be used, as for some - * browsers, EME must be configured before content is appended (if appending unencrypted - * content before encrypted content). - */ +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EMULATION_PREVENTION: () => (/* binding */ EMULATION_PREVENTION), +/* harmony export */ NAL_TYPE_ONE: () => (/* binding */ NAL_TYPE_ONE), +/* harmony export */ NAL_TYPE_TWO: () => (/* binding */ NAL_TYPE_TWO), +/* harmony export */ discardEmulationPreventionBytes: () => (/* binding */ discardEmulationPreventionBytes), +/* harmony export */ findH264Nal: () => (/* binding */ findH264Nal), +/* harmony export */ findH265Nal: () => (/* binding */ findH265Nal), +/* harmony export */ findNal: () => (/* binding */ findNal) +/* harmony export */ }); +/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - setupEme_() { - const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader; - const didSetupEmeOptions = setupEmeOptions({ - player: this.player_, - sourceKeySystems: this.source_.keySystems, - media: this.playlists.media(), - audioMedia: audioPlaylistLoader && audioPlaylistLoader.media() - }); - this.player_.tech_.on('keystatuschange', e => { - if (e.status !== 'output-restricted') { - return; - } - const mainPlaylist = this.playlistController_.main(); - if (!mainPlaylist || !mainPlaylist.playlists) { - return; - } - const excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection +var NAL_TYPE_ONE = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x00, 0x01]); +var NAL_TYPE_TWO = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x01]); +var EMULATION_PREVENTION = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x03]); +/** + * Expunge any "Emulation Prevention" bytes from a "Raw Byte + * Sequence Payload" + * + * @param data {Uint8Array} the bytes of a RBSP from a NAL + * unit + * @return {Uint8Array} the RBSP without any Emulation + * Prevention Bytes + */ - mainPlaylist.playlists.forEach(playlist => { - if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) { - if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) { - playlist.excludeUntil = Infinity; - excludedHDPlaylists.push(playlist); - } - } - }); - if (excludedHDPlaylists.length) { - videojs.log.warn('DRM keystatus changed to "output-restricted." Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.', ...excludedHDPlaylists); // Clear the buffer before switching playlists, since it may already contain unplayable segments +var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) { + var positions = []; + var i = 1; // Find all `Emulation Prevention Bytes` - this.playlistController_.mainSegmentLoader_.resetEverything(); - this.playlistController_.fastQualityChange_(); - } - }); - this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this); - this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_); - if (!didSetupEmeOptions) { - // If EME options were not set up, we've done all we could to initialize EME. - this.playlistController_.sourceUpdater_.initializedEme(); - return; + while (i < bytes.length - 2) { + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) { + positions.push(i + 2); + i++; } - this.createKeySessions_(); - } - /** - * Initializes the quality levels and sets listeners to update them. - * - * @method setupQualityLevels_ - * @private - */ - setupQualityLevels_() { - const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin - // or qualityLevels_ listeners have already been setup, do nothing. + i++; + } // If no Emulation Prevention Bytes were found just return the original + // array - if (!player || !player.qualityLevels || this.qualityLevels_) { - return; + + if (positions.length === 0) { + return bytes; + } // Create a new array to hold the NAL unit data + + + var newLength = bytes.length - positions.length; + var newData = new Uint8Array(newLength); + var sourceIndex = 0; + + for (i = 0; i < newLength; sourceIndex++, i++) { + if (sourceIndex === positions[0]) { + // Skip this byte + sourceIndex++; // Remove this position index + + positions.shift(); } - this.qualityLevels_ = player.qualityLevels(); - this.playlistController_.on('selectedinitialmedia', () => { - handleVhsLoadedMetadata(this.qualityLevels_, this); - }); - this.playlists.on('mediachange', () => { - handleVhsMediaChange(this.qualityLevels_, this.playlists); - }); - } - /** - * return the version - */ - static version() { - return { - '@videojs/http-streaming': version$4, - 'mux.js': version$3, - 'mpd-parser': version$2, - 'm3u8-parser': version$1, - 'aes-decrypter': version - }; + newData[i] = bytes[sourceIndex]; } - /** - * return the version - */ - version() { - return this.constructor.version(); - } - canChangeType() { - return SourceUpdater.canChangeType(); + return newData; +}; +var findNal = function findNal(bytes, dataType, types, nalLimit) { + if (nalLimit === void 0) { + nalLimit = Infinity; } - /** - * Begin playing the video. - */ - play() { - this.playlistController_.play(); - } - /** - * a wrapper around the function in PlaylistController - */ + bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); + types = [].concat(types); + var i = 0; + var nalStart; + var nalsFound = 0; // keep searching until: + // we reach the end of bytes + // we reach the maximum number of nals they want to seach + // NOTE: that we disregard nalLimit when we have found the start + // of the nal we want so that we can find the end of the nal we want. - setCurrentTime(currentTime) { - this.playlistController_.setCurrentTime(currentTime); - } - /** - * a wrapper around the function in PlaylistController - */ + while (i < bytes.length && (nalsFound < nalLimit || nalStart)) { + var nalOffset = void 0; - duration() { - return this.playlistController_.duration(); - } - /** - * a wrapper around the function in PlaylistController - */ + if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_ONE)) { + nalOffset = 4; + } else if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_TWO)) { + nalOffset = 3; + } // we are unsynced, + // find the next nal unit - seekable() { - return this.playlistController_.seekable(); - } - /** - * Abort all outstanding work and cleanup. - */ - dispose() { - if (this.playbackWatcher_) { - this.playbackWatcher_.dispose(); - } - if (this.playlistController_) { - this.playlistController_.dispose(); - } - if (this.qualityLevels_) { - this.qualityLevels_.dispose(); + if (!nalOffset) { + i++; + continue; } - if (this.tech_ && this.tech_.vhs) { - delete this.tech_.vhs; + + nalsFound++; + + if (nalStart) { + return discardEmulationPreventionBytes(bytes.subarray(nalStart, i)); } - if (this.mediaSourceUrl_ && (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL).revokeObjectURL) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.revokeObjectURL(this.mediaSourceUrl_); - this.mediaSourceUrl_ = null; + + var nalType = void 0; + + if (dataType === 'h264') { + nalType = bytes[i + nalOffset] & 0x1f; + } else if (dataType === 'h265') { + nalType = bytes[i + nalOffset] >> 1 & 0x3f; } - if (this.tech_) { - this.tech_.off('waitingforkey', this.handleWaitingForKey_); + + if (types.indexOf(nalType) !== -1) { + nalStart = i + nalOffset; + } // nal header is 1 length for h264, and 2 for h265 + + + i += nalOffset + (dataType === 'h264' ? 1 : 2); + } + + return bytes.subarray(0, 0); +}; +var findH264Nal = function findH264Nal(bytes, type, nalLimit) { + return findNal(bytes, 'h264', type, nalLimit); +}; +var findH265Nal = function findH265Nal(bytes, type, nalLimit) { + return findNal(bytes, 'h265', type, nalLimit); +}; + +/***/ }), + +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ OPUS_HEAD: () => (/* binding */ OPUS_HEAD), +/* harmony export */ parseOpusHead: () => (/* binding */ parseOpusHead), +/* harmony export */ setOpusHead: () => (/* binding */ setOpusHead) +/* harmony export */ }); +var OPUS_HEAD = new Uint8Array([// O, p, u, s +0x4f, 0x70, 0x75, 0x73, // H, e, a, d +0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus +// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html +// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html + +var parseOpusHead = function parseOpusHead(bytes) { + var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian. + + var littleEndian = version !== 0; + var config = { + version: version, + channels: view.getUint8(1), + preSkip: view.getUint16(2, littleEndian), + sampleRate: view.getUint32(4, littleEndian), + outputGain: view.getUint16(8, littleEndian), + channelMappingFamily: view.getUint8(10) + }; + + if (config.channelMappingFamily > 0 && bytes.length > 10) { + config.streamCount = view.getUint8(11); + config.twoChannelStreamCount = view.getUint8(12); + config.channelMapping = []; + + for (var c = 0; c < config.channels; c++) { + config.channelMapping.push(view.getUint8(13 + c)); } - super.dispose(); } - convertToProgramTime(time, callback) { - return getProgramTime({ - playlist: this.playlistController_.media(), - time, - callback - }); - } // the player must be playing before calling this - seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) { - return seekToProgramTime({ - programTime, - playlist: this.playlistController_.media(), - retryCount, - pauseAfterSeek, - seekTo: this.options_.seekTo, - tech: this.options_.tech, - callback + return config; +}; +var setOpusHead = function setOpusHead(config) { + var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels; + var view = new DataView(new ArrayBuffer(size)); + var littleEndian = config.version !== 0; + view.setUint8(0, config.version); + view.setUint8(1, config.channels); + view.setUint16(2, config.preSkip, littleEndian); + view.setUint32(4, config.sampleRate, littleEndian); + view.setUint16(8, config.outputGain, littleEndian); + view.setUint8(10, config.channelMappingFamily); + + if (config.channelMappingFamily > 0) { + view.setUint8(11, config.streamCount); + config.channelMapping.foreach(function (cm, i) { + view.setUint8(12 + i, cm); }); } - /** - * Adds the onRequest, onResponse, offRequest and offResponse functions - * to the VhsHandler xhr Object. - */ - setupXhrHooks_() { - /** - * A player function for setting an onRequest hook - * - * @param {function} callback for request modifiction - */ - this.xhr.onRequest = callback => { - addOnRequestHook(this.xhr, callback); - }; - /** - * A player function for setting an onResponse hook - * - * @param {callback} callback for response data retrieval - */ + return new Uint8Array(view.buffer); +}; - this.xhr.onResponse = callback => { - addOnResponseHook(this.xhr, callback); - }; - /** - * Deletes a player onRequest callback if it exists - * - * @param {function} callback to delete from the player set - */ +/***/ }), - this.xhr.offRequest = callback => { - removeOnRequestHook(this.xhr, callback); - }; - /** - * Deletes a player onResponse callback if it exists - * - * @param {function} callback to delete from the player set - */ +/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - this.xhr.offResponse = callback => { - removeOnResponseHook(this.xhr, callback); - }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks. - // This allows hooks to be set before the source is set to vhs when handleSource is called. +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); +/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); +/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); - this.player_.trigger('xhr-hooks-ready'); - } -} -/** - * The Source Handler object, which informs video.js what additional - * MIME types are supported and sets up playback. It is registered - * automatically to the appropriate tech based on the capabilities of - * the browser it is running in. It is not necessary to use or modify - * this object in normal usage. - */ -const VhsSourceHandler = { - name: 'videojs-http-streaming', - VERSION: version$4, - canHandleSource(srcObj, options = {}) { - const localOptions = merge(videojs.options, options); - return VhsSourceHandler.canPlayType(srcObj.type, localOptions); - }, - handleSource(source, tech, options = {}) { - const localOptions = merge(videojs.options, options); - tech.vhs = new VhsHandler(source, tech, localOptions); - tech.vhs.xhr = xhrFactory(); - tech.vhs.setupXhrHooks_(); - tech.vhs.src(source.src, source.type); - return tech.vhs; - }, - canPlayType(type, options) { - const simpleType = (0,_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__.simpleTypeFromSourceType)(type); - if (!simpleType) { - return ''; - } - const overrideNative = VhsSourceHandler.getOverrideNative(options); - const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType); - const canUseMsePlayback = !supportsTypeNatively || overrideNative; - return canUseMsePlayback ? 'maybe' : ''; - }, - getOverrideNative(options = {}) { - const { - vhs = {} - } = options; - const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS); - const { - overrideNative = defaultOverrideNative - } = vhs; - return overrideNative; +var DEFAULT_LOCATION = 'http://example.com'; + +var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { + // return early if we don't need to resolve + if (/^[a-z]+:/i.test(relativeUrl)) { + return relativeUrl; + } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location + + + if (/^data:/.test(baseUrl)) { + baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; + } // IE11 supports URL but not the URL constructor + // feature detect the behavior we want + + + var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; + var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) + // and if baseUrl isn't an absolute url + + var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location + + if (nativeURL) { + baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); + } else if (!/\/\//i.test(baseUrl)) { + baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); } -}; -/** - * Check to see if the native MediaSource object exists and supports - * an MP4 container with both H.264 video and AAC-LC audio. - * - * @return {boolean} if native media sources are supported - */ -const supportsNativeMediaSources = () => { - return (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)('avc1.4d400d,mp4a.40.2'); -}; // register source handlers with the appropriate techs + if (nativeURL) { + var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol + // and if we're location-less, remove the location + // otherwise, return the url unmodified -if (supportsNativeMediaSources()) { - videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0); -} -videojs.VhsHandler = VhsHandler; -videojs.VhsSourceHandler = VhsSourceHandler; -videojs.Vhs = Vhs; -if (!videojs.use) { - videojs.registerComponent('Vhs', Vhs); -} -videojs.options.vhs = videojs.options.vhs || {}; -if (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) { - videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError); -} + if (removeLocation) { + return newUrl.href.slice(DEFAULT_LOCATION.length); + } else if (protocolLess) { + return newUrl.href.slice(newUrl.protocol.length); + } + return newUrl.href; + } + return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); /***/ }), diff --git a/app/js/main.js.map b/app/js/main.js.map index 4134039..adf63c6 100644 --- a/app/js/main.js.map +++ b/app/js/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA,kIAAkI,SAAS,sCAAsC,WAAW,wEAAwE,8BAA8B,YAAY,IAAI,KAAK,aAAa,uCAAuC,aAAa,gCAAgC,+BAA+B,wCAAwC,aAAa,SAAS,oFAAoF,sGAAsG,4NAA4N,YAAY,wBAAwB,4DAA4D,eAAe,4FAA4F,WAAW,+CAA+C,SAAS,WAAW,4CAA4C,yBAAyB,aAAa,wDAAwD,aAAa,oBAAoB,QAAQ,qCAAqC,6CAA6C,gFAAgF,kBAAkB,6EAA6E,QAAQ,eAAe,4IAA4I,4FAA4F,gEAAgE,GAAG,QAAQ,eAAe,+BAA+B,eAAe,EAAE,GAAG,EAAE,qFAAqF,oCAAoC,iBAAiB,mLAAmL,sBAAsB,sFAAsF,gBAAgB,+HAA+H,kBAAkB,yDAAyD,iCAAiC,qDAAqD,iCAAiC,yDAAyD,0GAA0G,sBAAsB,oHAAoH,WAAW,yDAAyD,WAAW,GAAG,oBAAoB,oFAAoF,+HAA+H,WAAW,gEAAgE,WAAW,yDAAyD,WAAW,yHAAyH,OAAO,kEAAkE,WAAW,mEAAmE,WAAW,4DAA4D,WAAW,yOAAyO,0BAA0B,gGAAgG,QAAQ,gBAAgB,EAAE,oBAAoB,mCAAmC,6EAA6E,gBAAgB,iBAAiB,YAAY,6DAA6D,eAAe,MAAM,QAAQ,sEAAsE,iBAAiB,iCAAiC,EAAE,eAAe,EAAE,cAAc,SAAS,mBAAmB,kCAAkC,QAAQ,EAAE,6BAA6B,EAAE,aAAa,YAAY,WAAW,qCAAqC,SAAS,eAAe,EAAE,MAAM,EAAE,cAAc,QAAQ,SAAS,+CAA+C,YAAY,yCAAyC,0CAA0C,4BAA4B,QAAQ,UAAU,SAAS,iDAAiD,YAAY,yCAAyC,iBAAiB,sCAAsC,mBAAmB,QAAQ,SAAS,0CAA0C,uBAAuB,6BAA6B,SAAS,uBAAuB,IAAI,KAAK,aAAa,wBAAwB,IAAI,OAAO,qBAAqB,QAAQ,gDAAgD,gBAAgB,yFAAyF,6FAA6F,SAAS,iBAAiB,WAAW,qCAAqC,8DAA8D,eAAe,oCAAoC,kDAAkD,oCAAoC,sBAAsB,gBAAgB,6BAA6B,MAAM,iEAAiE,sBAAsB,OAAO,SAAS,sTAAsT,kBAAkB,kBAAkB,EAAE,aAAa,2CAA2C,wEAAwE,wNAAwN,WAAW,mBAAmB,aAAa,wBAAwB,+EAA+E,qEAAqE,oDAAoD,gBAAgB,qEAAqE,mLAAmL,cAAc,uHAAuH,iBAAiB,gBAAgB,iBAAiB,eAAe,mHAAmH,iBAAiB,gBAAgB,0BAA0B,UAAU,iCAAiC,0CAA0C,yBAAyB,WAAW,6BAA6B,sFAAsF,qKAAqK,0CAA0C,iMAAiM,uJAAuJ,WAAW,+FAA+F,iBAAiB,kDAAkD,oGAAoG,+CAA+C,oRAAoR,mCAAmC,mFAAmF,eAAe,QAAQ,EAAE,iBAAiB,+EAA+E,iBAAiB,QAAQ,EAAE,eAAe,0GAA0G,WAAW,yDAAyD,WAAW,sBAAsB,+BAA+B,cAAc,kCAAkC,kCAAkC,4BAA4B,8BAA8B,6FAA6F,4CAA4C,8CAA8C,YAAY,WAAW,KAAK,aAAa,wCAAwC,wBAAwB,kCAAkC,yDAAyD,SAAS,kCAAkC,oNAAoN,gBAAgB,qCAAqC,mEAAmE,4LAA4L,8EAA8E,2HAA2H,0HAA0H,0DAA0D,sBAAsB,+FAA+F,8EAA8E,kCAAkC,kCAAkC,ghBAAghB,sHAAsH,kBAAkB,iEAAiE,2EAA2E,8BAA8B,gBAAgB,0EAA0E,wBAAwB,aAAa,qCAAqC,qBAAqB,mBAAmB,+DAA+D,mMAAmM,+BAA+B,gCAAgC,qDAAqD,aAAa,EAAE,gCAAgC,+BAA+B,0EAA0E,eAAe,kDAAkD,EAAE,OAAO,EAAE,sBAAsB,eAAe,sDAAsD,qDAAqD,gDAAgD,uLAAuL,4EAA4E,gDAAgD,oBAAoB,iDAAiD,oBAAoB,wEAAwE,iBAAiB,MAAM,gBAAgB,cAAc,gBAAgB,2DAA2D,oBAAoB,qCAAqC,kBAAkB,wBAAwB,iBAAiB,qCAAqC,+IAA+I,+NAA+N,MAAM,wLAAwL,uBAAuB,WAAW,EAAE,mBAAmB,EAAE,gCAAgC,4BAA4B,mBAAmB,EAAE,6BAA6B,0BAA0B,iGAAiG,6GAA6G,mKAAmK,oDAAoD,qBAAqB,6BAA6B,OAAO,4BAA4B,gDAAgD,2BAA2B,uBAAuB,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAA8B,SAAS,EAAE,cAAc,EAAE,IAAI,iBAAiB,kCAAkC,kDAAkD,gCAAgC,iCAAiC,yGAAyG,cAAc,sGAAsG,iBAAiB,8BAA8B,qCAAqC,UAAU,yDAAyD,WAAW,yDAAyD,eAAe,EAAE,+FAA+F,iBAAiB,mCAAmC,kBAAkB,GAAG,EAAE,wEAAwE,6EAA6E,6EAA6E,MAAM,kBAAkB,0BAA0B,kDAAkD,qDAAqD,EAAE,wBAAwB,2HAA2H,OAAO,4EAA4E,OAAO,mGAAmG,GAAG,EAAE,kCAAkC,MAAM,kBAAkB,mBAAmB,kFAAkF,gCAAgC,kCAAkC,wCAAwC,mIAAmI,4CAA4C,iBAAiB,4HAA4H,UAAU,2RAA2R,mEAAmE,qDAAqD,aAAa,gCAAgC,iCAAiC,mBAAmB,GAAG,YAAY,IAAI,YAAY,2BAA2B,wGAAwG,QAAQ,oBAAoB,gBAAgB,mBAAmB,QAAQ,iBAAiB,gBAAgB,mBAAmB,OAAO,mBAAmB,eAAe,+BAA+B,oCAAoC,kBAAkB,mEAAmE,YAAY,+GAA+G,yCAAyC,yDAAyD,uFAAuF,SAAS,yCAAyC,yDAAyD,wFAAwF,oBAAoB,qCAAqC,MAAM,kBAAkB,yCAAyC,YAAY,+IAA+I,8CAA8C,2BAA2B,qBAAqB,8CAA8C,4BAA4B,eAAe,mMAAmM,uBAAuB,wNAAwN,cAAc,4HAA4H,gBAAgB,UAAU,uFAAuF,gCAAgC,yHAAyH,wBAAwB,kGAAkG,QAAQ,sHAAsH,2CAA2C,oCAAoC,SAAS,EAAE,cAAc,EAAE,8DAA8D,EAAE,MAAM,EAAE,iBAAiB,EAAE,kDAAkD,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,+BAA+B,gBAAgB,4DAA4D,gBAAgB,mGAAmG,eAAe,sCAAsC,oQAAoQ,eAAe,gHAAgH,WAAW,4DAA4D,WAAW,8JAA8J,UAAU,oNAAoN,gCAAgC,gBAAgB,QAAQ,sBAAsB,6BAA6B,iCAAiC,QAAQ,eAAe,8GAA8G,UAAU,0CAA0C,EAAE,GAAG,gBAAgB,yCAAyC,iDAAiD,EAAE,kBAAkB,IAAI,uEAAuE,EAAE,GAAG,yHAAyH,EAAE,uCAAuC,2FAA2F,KAAK,QAAQ,yXAAyX,YAAY,mCAAmC,2aAA2a,UAAU,+JAA+J,SAAS,kDAAkD,SAAS,mEAAmE,YAAY,oPAAoP,+EAA+E,QAAQ,eAAe,wPAAwP,kBAAkB,yDAAyD,eAAe,yDAAyD,eAAe,wSAAwS,aAAa,wBAAwB,kBAAkB,6CAA6C,aAAa,oBAAoB,uEAAuE,6CAA6C,uBAAuB,4BAA4B,sBAAsB,8DAA8D,iBAAiB,sFAAsF,8CAA8C,qBAAqB,wGAAwG,2BAA2B,iDAAiD,UAAU,uBAAuB,oHAAoH,SAAS,2QAA2Q,YAAY,cAAc,SAAS,wBAAwB,eAAe,6CAA6C,mEAAmE,YAAY,gFAAgF,qCAAqC,yEAAyE,uCAAuC,uCAAuC,2DAA2D,oGAAoG,6GAA6G,aAAa,kIAAkI,cAAc,iBAAiB,yCAAyC,yCAAyC,wBAAwB,mCAAmC,mBAAmB,IAAI,iDAAiD,KAAK,YAAY,IAAI,KAAK,qCAAqC,kKAAkK,MAAM,mDAAmD,eAAe,MAAM,wHAAwH,6BAA6B,qBAAqB,eAAe,sBAAsB,mCAAmC,kCAAkC,GAAG,kDAAkD,kCAAkC,WAAW,oBAAoB,YAAY,mBAAmB,SAAS,8BAA8B,SAAS,qEAAqE,SAAS,SAAS,yJAAyJ,0GAA0G,OAAO,iEAAiE,kBAAkB,kBAAkB,EAAE,kBAAkB,iIAAiI,8HAA8H,OAAO,0QAA0Q,8BAA8B,+GAA+G,aAAa,0DAA0D,0EAA0E,EAAE,EAAE,WAAW,kSAAkS,EAAE,EAAE,QAAQ,0MAA0M,aAAa,eAAe,oCAAoC,sBAAsB,EAAE,gCAAgC,gBAAgB,SAAS,gBAAgB,qEAAqE,gGAAgG,gBAAgB,eAAe,6BAA6B,sDAAsD,gDAAgD,GAAG,qHAAqH,iGAAiG,0CAA0C,wCAAwC,qBAAqB,aAAa,uDAAuD,EAAE,KAAK,YAAY,YAAY,qBAAqB,MAAM,qBAAqB,mCAAmC,qBAAqB,yEAAyE,oDAAoD,mBAAmB,kOAAkO,GAAG,WAAW,MAAM,eAAe,SAAS,MAAM,gJAAgJ,gBAAgB,gBAAgB,aAAa,oCAAoC,mKAAmK,6CAA6C,mBAAmB,OAAO,uBAAuB,2PAA2P,iEAAiE,mDAAmD,yGAAyG,oBAAoB,oBAAoB,sDAAsD,sBAAsB,YAAY,+BAA+B,YAAY,+BAA+B,cAAc,EAAE,MAAM,mEAAmE,GAAG,8EAA8E,mCAAmC,8EAA8E,cAAc,qCAAqC,eAAe,EAAE,+NAA+N,gDAAgD,yBAAyB,uDAAuD,sCAAsC,EAAE,yBAAyB,kBAAkB,yGAAyG,wBAAwB,mDAAmD,gBAAgB,qCAAqC,uGAAuG,yIAAyI,sEAAsE,iGAAiG,YAAY,8BAA8B,uBAAuB,+CAA+C,4FAA4F,6PAA6P,yBAAyB,YAAY,wCAAwC,mCAAmC,+BAA+B,sCAAsC,+BAA+B,sCAAsC,qIAAqI,GAAG,YAAY,6BAA6B,QAAQ,+EAA+E,cAAc,uBAAuB,6BAA6B,iBAAiB,aAAa,UAAU,0BAA0B,iCAAiC,MAAM,sFAAsF,8BAA8B,0DAA0D,wBAAwB,sEAAsE,EAAE,IAAI,mEAAmE,EAAE,qBAAqB,OAAO,sCAAsC,wMAAwM,WAAW,6BAA6B,iBAAiB,GAAG,gBAAgB,WAAW,aAAa,yDAAyD,iBAAiB,mIAAmI,iBAAiB,2EAA2E,qBAAqB,gEAAgE,6BAA6B,cAAc,aAAa,8BAA8B,wPAAwP,GAAG,aAAa,6CAA6C,WAAW,EAAE,oBAAoB,yGAAyG,sBAAsB,+CAA+C,sFAAsF,qBAAqB,SAAS,4OAA4O,gBAAgB,gCAAgC,2JAA2J,WAAW,qDAAqD,gBAAgB,2BAA2B,mBAAmB,EAAE,4DAA4D,kBAAkB,uBAAuB,0BAA0B,kDAAkD,wCAAwC,uBAAuB,yDAAyD,MAAM,qCAAqC,gBAAgB,YAAY,aAAa,4BAA4B,gGAAgG,sEAAsE,+BAA+B,yCAAyC,gCAAgC,kEAAkE,2CAA2C,8EAA8E,yHAAyH,UAAU,8CAA8C,sBAAsB,+DAA+D,+BAA+B,wFAAwF,WAAW,gXAAgX,SAAS,+CAA+C,oBAAoB,gBAAgB,EAAE,IAAI,6BAA6B,mBAAmB,iBAAiB,EAAE,KAAK,mGAAmG,kCAAkC,6BAA6B,GAAG,aAAa,SAAS,oEAAoE,mEAAmE,KAAK,cAAc,QAAQ,eAAe,uDAAuD,+EAA+E,aAAa,sEAAsE,YAAY,sPAAsP,YAAY,oDAAoD,eAAe,0CAA0C,QAAQ,0BAA0B,sCAAsC,uJAAuJ,4BAA4B,WAAW,qEAAqE,0CAA0C,MAAM,8BAA8B,yBAAyB,6CAA6C,6DAA6D,0CAA0C,YAAY,WAAW,oCAAoC,gBAAgB,WAAW,mDAAmD,EAAE,KAAK,EAAE,oCAAoC,gBAAgB,EAAE,EAAE,SAAS,SAAS,kFAAkF,OAAO,oHAAoH,OAAO,wHAAwH,UAAU,+IAA+I,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,gBAAgB,mDAAmD,0BAA0B,0FAA0F,eAAe,gCAAgC,oBAAoB,KAAK,KAAK,IAAI,OAAO,uBAAuB,UAAU,qEAAqE,QAAQ,6DAA6D,aAAa,kGAAkG,QAAQ,qBAAqB,KAAK,UAAU,QAAQ,+EAA+E,QAAQ,eAAe,gBAAgB,wJAAwJ,aAAa,mPAAmP,SAAS,uDAAuD,eAAe,+DAA+D,kBAAkB,gDAAgD,2BAA2B,wIAAwI,GAAG,0CAA0C,6EAA6E,4DAA4D,EAAE,GAAG,EAAE,6CAA6C,EAAE,6CAA6C,wDAAwD,2EAA2E,oDAAoD,EAAE,GAAG,EAAE,6BAA6B,0CAA0C,IAAI,WAAW,EAAE,0GAA0G,KAAK,OAAO,+FAA+F,UAAU,kDAAkD,iDAAiD,IAAI,WAAW,EAAE,yDAAyD,KAAK,UAAU,gDAAgD,wBAAwB,iZAAiZ,oKAAoK,UAAU,2CAA2C,wFAAwF,GAAG,qBAAqB,kDAAkD,qBAAqB,MAAM,wCAAwC,gCAAgC,+DAA+D,6BAA6B,MAAM,qCAAqC,kBAAkB,2BAA2B,OAAO,EAAE,kBAAkB,iBAAiB,GAAG,QAAQ,yBAAyB,KAAK,sCAAsC,wFAAwF,8BAA8B,iCAAiC,mBAAmB,GAAG,mBAAmB,2CAA2C,iDAAiD,sJAAsJ,gBAAgB,KAAK,gBAAgB,KAAK,qBAAqB,8KAA8K,qBAAqB,yDAAyD,0EAA0E,KAAK,GAAG,QAAQ,qCAAqC,yLAAyL,iBAAiB,sCAAsC,0FAA0F,gBAAgB,cAAc,GAAG,eAAe,iBAAiB,SAAS,2HAA2H,6BAA6B,kBAAkB,6BAA6B,aAAa,2BAA2B,YAAY,uBAAuB,oEAAoE,EAAE,qCAAqC,2BAA2B,wBAAwB,UAAU,gEAAgE,SAAS,EAAE,cAAc,EAAE,IAAI,GAAG,gBAAgB,kBAAkB,aAAa,iCAAiC,sBAAsB,kCAAkC,0CAA0C,yNAAyN,qEAAqE,EAAE,sDAAsD,eAAe,uBAAuB,UAAU,SAAS,SAAS,iBAAiB,eAAe,EAAE,qBAAqB,EAAE,yBAAyB,eAAe,sBAAsB,yEAAyE,GAAG,cAAc,gBAAgB,eAAe,6CAA6C,MAAM,mGAAmG,EAAE,KAAK,EAAE,sBAAsB,QAAQ,8DAA8D,QAAQ,0BAA0B,MAAM,mDAAmD,MAAM,mCAAmC,MAAM,6CAA6C,uCAAuC,iCAAiC,qBAAqB,qCAAqC,aAAa,+CAA+C,qCAAqC,MAAM,iBAAiB,0BAA0B,cAAc,oBAAoB,IAAI,UAAU,iEAAiE,aAAa,yDAAyD,MAAM,+EAA+E,iCAAiC,EAAE,2BAA2B,sEAAsE,0BAA0B,kDAAkD,6DAA6D,4BAA4B,IAAI,uBAAuB,0BAA0B,IAAI,qCAAqC,UAAU,OAAO,SAAS,qBAAqB,4BAA4B,2BAA2B,kCAAkC,2HAA2H,qBAAqB,oIAAoI,mBAAmB,iLAAiL,0BAA0B,mEAAmE,aAAa,IAAI,yBAAyB,0CAA0C,gIAAgI,kHAAkH,WAAW,SAAS,mFAAmF,SAAS,wFAAwF,aAAa,QAAQ,eAAe,gBAAgB,+IAA+I,aAAa,oLAAoL,UAAU,2CAA2C,0BAA0B,GAAG,YAAY,qBAAqB,aAAa,kFAAkF,kEAAkE,+EAA+E,qBAAqB,kDAAkD,qBAAqB,yMAAyM,cAAc,oDAAoD,mBAAmB,iCAAiC,sCAAsC,4BAA4B,sCAAsC,+BAA+B,yDAAyD,oCAAoC,4BAA4B,0KAA0K,2CAA2C,MAAM,sCAAsC,yGAAyG,sBAAsB,oKAAoK,uBAAuB,iBAAiB,kOAAkO,WAAW,8DAA8D,WAAW,qDAAqD,aAAa,IAAI,oBAAoB,8EAA8E,GAAG,6KAA6K,uCAAuC,gDAAgD,qCAAqC,6GAA6G,oCAAoC,kEAAkE,IAAI,iBAAiB,iJAAiJ,eAAe,sJAAsJ,gDAAgD,4CAA4C,yCAAyC,WAAW,qCAAqC,mEAAmE,gDAAgD,uEAAuE,iBAAiB,oCAAoC,sCAAsC,kCAAkC,MAAM,yDAAyD,8GAA8G,OAAO,0EAA0E,kDAAkD,SAAS,kDAAkD,+BAA+B,qBAAqB,+BAA+B,iDAAiD,qFAAqF,4GAA4G,YAAY,oEAAoE,EAAE,UAAU,iDAAiD,aAAa,6FAA6F,iDAAiD,YAAY,MAAM,+BAA+B,qBAAqB,wBAAwB,iDAAiD,UAAU,gEAAgE,mDAAmD,OAAO,gBAAgB,mCAAmC,oNAAoN,gDAAgD,0GAA0G,0BAA0B,aAAa,0HAA0H,mEAAmE,MAAM,kCAAkC,MAAM,uDAAuD,aAAa,wCAAwC,kBAAkB,uGAAuG,oDAAoD,YAAY,UAAU,2EAA2E,MAAM,kCAAkC,MAAM,qDAAqD,mFAAmF,6GAA6G,0BAA0B,YAAY,kBAAkB,qBAAqB,sBAAsB,iEAAiE,4BAA4B,EAAE,GAAG,SAAS,8BAA8B,SAAS,gCAAgC,YAAY,2NAA2N,UAAU,QAAQ,eAAe,gBAAgB,kEAAkE,aAAa,kFAAkF,4DAA4D,YAAY,mBAAmB,qCAAqC,sEAAsE,SAAS,uBAAuB,KAAK,yEAAyE,0EAA0E,qEAAqE,IAAI,+CAA+C,kGAAkG,WAAW,QAAQ,YAAY,qEAAqE,0CAA0C,qFAAqF,WAAW,UAAU,kBAAkB,UAAU,mBAAmB,sBAAsB,mBAAmB,oDAAoD,MAAM,sBAAsB,kBAAkB,aAAa,4CAA4C,EAAE,KAAK,+CAA+C,yBAAyB,0BAA0B,qDAAqD,EAAE,KAAK,mGAAmG,yBAAyB,IAAI,sBAAsB,MAAM,eAAe,oDAAoD,sBAAsB,MAAM,mBAAmB,8CAA8C,sEAAsE,sDAAsD,2CAA2C,2CAA2C,iBAAiB,iBAAiB,aAAa,yEAAyE,mDAAmD,4GAA4G,GAAG,iBAAiB,2DAA2D,sBAAsB,iIAAiI,OAAO,kCAAkC,SAAS,gJAAgJ,iQAAiQ,cAAc,+KAA+K,QAAQ,eAAe,kGAAkG,WAAW,mBAAmB,WAAW,mCAAmC,oDAAoD,4BAA4B,uKAAuK,WAAW,EAAE,KAAK,qBAAqB,oNAAoN,EAAE,kCAAkC,aAAa,oKAAoK,WAAW,4NAA4N,yBAAyB,kBAAkB,aAAa,4KAA4K,SAAS,uFAAuF,SAAS,0FAA0F,SAAS,qGAAqG,OAAO,4CAA4C,aAAa,OAAO,iIAAiI,yBAAyB,OAAO,+HAA+H,yBAAyB,aAAa,uWAAuW,oFAAoF,YAAY,+RAA+R,4CAA4C,OAAO,yLAAyL,mBAAmB,yCAAyC,mBAAmB,WAAW,2NAA2N,qBAAqB,SAAS,onBAAonB,oBAAoB,qCAAqC,eAAe,QAAQ,+IAA+I,wCAAwC,QAAQ,eAAe,uDAAuD,mIAAmI,aAAa,wTAAwT,SAAS,+CAA+C,SAAS,wDAAwD,KAAK,MAAM,yCAAyC,wDAAwD,4BAA4B,qCAAqC,QAAQ,YAAY,sBAAsB,mNAAmN,yBAAyB,WAAW,aAAa,6CAA6C,WAAW,uCAAuC,kJAAkJ,WAAW,qFAAqF,YAAY,uBAAuB,wJAAwJ,aAAa,2JAA2J,iBAAiB,sEAAsE,YAAY,6GAA6G,iBAAiB,MAAM,wPAAwP,kDAAkD,0DAA0D,EAAE,UAAU,0KAA0K,+BAA+B,gIAAgI,QAAQ,eAAe,kDAAkD,yBAAyB,EAAE,2BAA2B,EAAE,0BAA0B,iCAAiC,wDAAwD,QAAQ,sBAAsB,gHAAgH,qBAAqB,2DAA2D,8DAA8D,qDAAqD,eAAe,wDAAwD,mBAAmB,sCAAsC,qCAAqC,oCAAoC,sCAAsC,yFAAyF,WAAW,GAAG,4DAA4D,iBAAiB,6FAA6F,SAAS,gIAAgI,uWAAuW,kEAAkE,kJAAkJ,wGAAwG,gGAAgG,sCAAsC,mJAAmJ,sJAAsJ,UAAU,sIAAsI,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,SAAS,iBAAiB,eAAe,2DAA2D,6FAA6F,UAAU,8BAA8B,4JAA4J,WAAW,wDAAwD,WAAW,gDAAgD,WAAW,EAAE,WAAW,sBAAsB,iBAAiB,kEAAkE,aAAa,mBAAmB,6DAA6D,aAAa,MAAM,YAAY,eAAe,IAAI,yDAAyD,gBAAgB,qDAAqD,eAAe,oFAAoF,wBAAwB,oCAAoC,+BAA+B,qCAAqC,yLAAyL,2BAA2B,WAAW,2CAA2C,UAAU,uFAAuF,sBAAsB,iPAAiP,WAAW,EAAE,SAAS,4CAA4C,SAAS,6DAA6D,2CAA2C,SAAS,gQAAgQ,iJAAiJ,WAAW,6RAA6R,OAAO,2gBAA2gB,WAAW,QAAQ,kBAAkB,kBAAkB,EAAE,0FAA0F,mZAAmZ,eAAe,wBAAwB,oBAAoB,4FAA4F,eAAe,6JAA6J,eAAe,mPAAmP,eAAe,qOAAqO,aAAa,kDAAkD,mCAAmC,0TAA0T,+HAA+H,OAAO,GAAG,quBAAquB,iCAAiC,iJAAiJ,YAAY,WAAW,kBAAkB,mBAAmB,MAAM,sBAAsB,6IAA6I,eAAe,OAAO,wCAAwC,0MAA0M,iBAAiB,cAAc,oKAAoK,aAAa,eAAe,iDAAiD,EAAE,sBAAsB,8EAA8E,gOAAgO,YAAY,8EAA8E,UAAU,+IAA+I,kBAAkB,UAAU,gDAAgD,KAAK,uCAAuC,EAAE,qFAAqF,iFAAiF,oFAAoF,oCAAoC,mBAAmB,oBAAoB,mIAAmI,6DAA6D,QAAQ,GAAG,QAAQ,EAAE,iLAAiL,WAAW,uCAAuC,WAAW,gCAAgC,WAAW,6BAA6B,0BAA0B,mFAAmF,6EAA6E,6EAA6E,+BAA+B,MAAM,yCAAyC,uBAAuB,0CAA0C,2CAA2C,uCAAuC,6BAA6B,yBAAyB,MAAM,wBAAwB,cAAc,gCAAgC,8BAA8B,cAAc,uBAAuB,yMAAyM,IAAI,EAAE,eAAe,mBAAmB,6FAA6F,wHAAwH,cAAc,oEAAoE,aAAa,4BAA4B,iDAAiD,wCAAwC,8CAA8C,2HAA2H,qBAAqB,uHAAuH,2CAA2C,aAAa,sCAAsC,WAAW,sBAAsB,kBAAkB,mEAAmE,0CAA0C,SAAS,8BAA8B,8EAA8E,wEAAwE,gDAAgD,6CAA6C,0CAA0C,WAAW,gBAAgB,iFAAiF,mVAAmV,kOAAkO,gBAAgB,aAAa,6GAA6G,iCAAiC,4GAA4G,iBAAiB,EAAE,IAAI,mHAAmH,kBAAkB,2DAA2D,2DAA2D,cAAc,gBAAgB,0MAA0M,mBAAmB,EAAE,MAAM,cAAc,yJAAyJ,KAAK,2DAA2D,iDAAiD,qGAAqG,4BAA4B,6VAA6V,mBAAmB,mBAAmB,GAAG,qBAAqB,wEAAwE,2CAA2C,yCAAyC,2WAA2W,iBAAiB,wDAAwD,SAAS,wNAAwN,aAAa,iBAAiB,kBAAkB,sDAAsD,yBAAyB,iDAAiD,oBAAoB,gGAAgG,wDAAwD,QAAQ,sCAAsC,wBAAwB,6DAA6D,cAAc,mDAAmD,sCAAsC,qEAAqE,OAAO,4BAA4B,eAAe,EAAE,eAAe,oDAAoD,gDAAgD,sJAAsJ,6CAA6C,qBAAqB,eAAe,yDAAyD,mHAAmH,OAAO,sBAAsB,mCAAmC,OAAO,sBAAsB,mCAAmC,aAAa,2CAA2C,YAAY,iEAAiE,YAAY,mCAAmC,SAAS,iDAAiD,6CAA6C,oIAAoI,+FAA+F,wBAAwB,qCAAqC,sEAAsE,2BAA2B,kEAAkE,mCAAmC,eAAe,OAAO,UAAU,iCAAiC,6CAA6C,iGAAiG,+EAA+E,eAAe,uGAAuG,wBAAwB,iJAAiJ,kBAAkB,EAAE,kBAAkB,uBAAuB,EAAE,6BAA6B,iCAAiC,2CAA2C,4BAA4B,cAAc,sJAAsJ,qDAAqD,EAAE,+CAA+C,kBAAkB,iDAAiD,OAAO,SAAS,IAAI,oGAAoG,UAAU,uCAAuC,GAAG,SAAS,MAAM,wDAAwD,wBAAwB,8EAA8E,SAAS,wBAAwB,EAAE,4CAA4C,wBAAwB,uHAAuH,EAAE,MAAM,aAAa,kDAAkD,uCAAuC,8CAA8C,EAAE,iCAAiC,wBAAwB,uFAAuF,qFAAqF,iBAAiB,sFAAsF,EAAE,KAAK,2EAA2E,mCAAmC,SAAS,mBAAmB,SAAS,OAAO,YAAY,8CAA8C,eAAe,IAAI,wBAAwB,IAAI,kBAAkB,EAAE,aAAa,uDAAuD,sJAAsJ,iBAAiB,gDAAgD,iBAAiB,MAAM,KAAK,kBAAkB,aAAa,4EAA4E,sBAAsB,qBAAqB,2EAA2E,qBAAqB,0CAA0C,KAAK,wBAAwB,eAAe,cAAc,wBAAwB,YAAY,cAAc,wBAAwB,aAAa,wFAAwF,6CAA6C,2CAA4F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACD92uF,CAAC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;;AAGO;AACP;AACA,GAAG;;AAEI;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,6DAAa;AAC1B;AACO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;AACM;AACA;AACA;AACP,mCAAmC;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,eAAe;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI,WAAW;AACf;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACO;AACP,yEAAyE,aAAa;AACtF;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEO;AACP,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC9Q0E,CAAC;AAC3E;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAQ;;AAEnC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,iBAAiB,0DAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA;AACO;AACP,kBAAkB,6DAAW;AAC7B,wBAAwB,6DAAW;AACnC,gBAAgB,6DAAW;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA,4BAA4B;;AAE5B,kCAAkC,gEAAc,kDAAkD;;AAElG;AACA,gCAAgC,gEAAc;AAC9C;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/FmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,GAAG,GAAG;;AAEN,sBAAsB;AACtB;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;;AAGJ,yBAAyB;AACzB;;AAEA;AACA;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;;AAEA,oCAAoC;AACpC;AACO;AACP;AACA;AACA;;AAEA,SAAS,kEAAkB,IAAI,kEAAkB,oBAAoB,gEAAkB;AACvF;AACO;AACP;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,oBAAoB,4BAA4B;AAChD;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACO;AACA;;;;;;;;;;;;;;;;;;;;;;AC5PiD;AACb;AACa;AACR;AACY;AAC5D;AACA;AACA,UAAU,yDAAO;AACjB;AACA,cAAc,yDAAO;AACrB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD,iCAAiC;;AAEjC;AACA;;AAEA;AACA,sBAAsB,yDAAO;AAC7B;AACA,CAAC,GAAG;;AAEG,0BAA0B;AACjC;;AAEO;AACP,UAAU,yDAAO;;AAEjB,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEI;AACP,SAAS,wDAAO;AAChB;;;;;;;;;;;;;;;;;;;;;ACtL4G;AACjC,CAAC;AAC5E;AACA;AACA;;AAEO;AACP,QAAQ,sDAAO;AACf,WAAW,sDAAO;AAClB,WAAW,sDAAO;AAClB,eAAe,sDAAO;AACtB,UAAU,sDAAO;AACjB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB,mBAAmB,sDAAO;AAC1B,cAAc,sDAAO;AACrB,aAAa,sDAAO;AACpB,eAAe,sDAAO;AACtB,WAAW,sDAAO;AAClB,gBAAgB,sDAAO;AACvB,cAAc,sDAAO;AACrB,cAAc,sDAAO;AACrB;AACA;AACA;AACA,WAAW,sDAAO;AAClB,aAAa,sDAAO;AACpB,kBAAkB,sDAAO;AACzB,cAAc,sDAAO;AACrB,iBAAiB,sDAAO;AACxB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4DAAa;AACxB;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,IAAI;AAC7B;AACA,KAAK;AACL;;AAEA;AACA,WAAW,4DAAa;AACxB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,MAAM,yDAAU;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGO;AACP;AACA,UAAU,sDAAO;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,yDAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,mEAAmE;;AAEnE;AACA;;AAEA;AACA,GAAG;;AAEI;AACP;;AAEA;AACA;;AAEA;AACA,iBAAiB,4DAAa;AAC9B;AACA;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD,4FAA4F;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;AACA,IAAI;;;AAGJ;AACA,qBAAqB,yBAAyB;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEO;AACP,UAAU,sDAAO;AACjB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA,gBAAgB,4DAAa;AAC7B;AACA;AACA,cAAc,4DAAa;AAC3B,uBAAuB,4DAAa;AACpC;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,8DAAW;AACnC,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,sBAAsB,uDAAQ,6BAA6B;;AAE3D;AACA;AACA;AACA,4FAA4F;;AAE5F;AACA,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA,gGAAgG;;AAEhG;AACA,qBAAqB,4DAAa;AAClC,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kBAAkB,4DAAa;AAC/B,MAAM;;;AAGN;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChfwD;AACxD,UAAU,yDAAO;AACV;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;;AAEjB,qCAAqC,4DAAU;AAC/C;AACA,GAAG;AACH;AACA;;AAEA,uCAAuC;AACvC;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACnC4H;AACjD;AACzB;;AAElD;AACA;AACA,WAAW,+DAAa;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACO;AACP,UAAU,yDAAO;AACjB;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,iBAAiB,+DAAa;AAC9B;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,yCAAyC;AACpD;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA,UAAU,yDAAO;AACjB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+DAAa;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,+DAAa;;AAEhC,kBAAkB,YAAY;AAC9B;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;AAChC,mBAAmB,+DAAa;AAChC;AACA,GAAG;AACH;AACA;AACA,kBAAkB,+DAAa;AAC/B,uBAAuB,+DAAa;AACpC,8BAA8B,+DAAa;AAC3C;AACA,GAAG;AACH,yCAAyC;;AAEzC;AACA;;AAEA,2BAA2B,kCAAkC;AAC7D;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB,qBAAqB;AAC1C,iDAAiD;;AAEjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,cAAc,+DAAa;;AAE3B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C,mBAAmB,8DAAW;AAC9B,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,qBAAqB,6DAAW;;AAEhC;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,sBAAsB,+DAAa,QAAQ;AAC3C;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;;AAEhC;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,+DAAa;AACxC,oBAAoB;;AAEpB;AACA,gBAAgB,+DAAa;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,GAAG;AACH;AACA;AACO;AACP;;AAEA;AACA;AACA;;AAEA,iBAAiB;AACjB;;AAEA;AACA,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC,IAAI;AACJ,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACxiBwD;AACjD,mBAAmB,yDAAO;AAC1B,mBAAmB,yDAAO;AAC1B,2BAA2B,yDAAO;AACzC;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,YAAY,YAAY;AACxB;AACA;;AAEO;AACP;AACA,aAAa;;AAEb;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA,qBAAqB;;AAErB;AACA;;AAEA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,4DAAU;AAClB;AACA,MAAM,SAAS,4DAAU;AACzB;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;;;;;;;;;;;;;;;;AC/GO;AACP;AACA,0BAA0B;AAC1B;AACA;;AAEO;AACP;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACnDqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;;AC9CZ;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;AC7Da;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC,eAAe,mBAAO,CAAC,wFAAgC;;AAEvD,iBAAiB,mBAAO,CAAC,wDAAa;;AAEtC,wBAAwB,mBAAO,CAAC,0EAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA,4BAA4B;;AAE5B,yBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB;AACxB;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wFAAwF;;AAExF;AACA,4GAA4G;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B,gCAAgC;AAChC;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;;;;;;;;;;;;;;;ACvSA,IAAIA,KAAK,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,CAAC;AACzD,IAAIC,KAAK,GAAGF,QAAQ,CAACC,gBAAgB,CAAC,2BAA2B,CAAC;AAE3D,MAAME,eAAe,GAAGA,CAAA,KAAM;EACnCD,KAAK,CAACE,OAAO,CAAEC,QAAQ,IACrBA,QAAQ,CAACC,gBAAgB,CAAC,OAAO,EAAE,YAAY;IAC7C,IAAIC,QAAQ,GAAG,IAAI,CAACC,UAAU;IAE9BT,KAAK,CAACK,OAAO,CAAEK,IAAI,IAAK;MACtB,IAAIF,QAAQ,IAAIE,IAAI,EAAE;QACpBF,QAAQ,CAACG,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;QACnC;MACF;MACAF,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACjC,CAAC,CAAC;EACJ,CAAC,CACH,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACjBD,MAAMC,MAAM,GAAGb,QAAQ,CAACc,aAAa,CAAC,YAAY,CAAC;AACnD,MAAMC,IAAI,GAAGf,QAAQ,CAACc,aAAa,CAAC,UAAU,CAAC;AAC/C,MAAME,SAAS,GAAGhB,QAAQ,CAACC,gBAAgB,CAAC,YAAY,CAAC;AAElD,MAAMgB,UAAU,GAAGA,CAAA,KAAM;EAC/BJ,MAAM,EAAEP,gBAAgB,CAAC,OAAO,EAAE,MAAM;IACvCS,IAAI,EAAEL,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAChCE,MAAM,EAAEH,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAClC,IAAII,IAAI,EAAEL,SAAS,CAACQ,QAAQ,CAAC,QAAQ,CAAC,EAAE;MACvClB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,QAAQ;IACzC,CAAC,MAAM;MACNrB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;IACvC;EACD,CAAC,CAAC;EAEFL,SAAS,CAACZ,OAAO,CAAEkB,EAAE,IAAK;IACzBA,EAAE,CAAChB,gBAAgB,CAAC,OAAO,EAAE,MAAM;MAClCS,IAAI,EAAEL,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MAChCZ,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;MACtCR,MAAM,EAAEH,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC,CAAC,CAAC;EACH,CAAC,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACtBD,MAAMW,OAAO,GAAGvB,QAAQ,CAACc,aAAa,CAAC,oBAAoB,CAAC;AAErD,MAAMU,QAAQ,GAAGA,CAAA,KAAM;EAC5B,IAAI;IACF,MAAMC,WAAW,GAAGA,CAAA,KAAM;MACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;MAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;QACdH,OAAO,CAACb,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MACjC,CAAC,MAAM;QACLN,OAAO,CAACb,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MACpC;IACF,CAAC;IAEDa,WAAW,CAAC,CAAC;IACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtCmB,WAAW,CAAC,CAAC;IACf,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOK,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;;;;;;;;ACpBmF;AACpF,MAAMI,MAAM,GAAGlC,QAAQ,CAACc,aAAa,CAAC,QAAQ,CAAC;AAC/C,MAAMqB,YAAY,GAAGnC,QAAQ,CAACc,aAAa,CAAC,iBAAiB,CAAC;AAEvD,MAAMsB,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,MAAM,GAAG,IAAIJ,0FAAY,CAAC,cAAc,EAAE;IAC9CC,MAAM,EAAE,SAAS;IACjBI,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,MAAMb,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;IAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;MACdQ,MAAM,CAACxB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IAChC,CAAC,MAAM;MACLK,MAAM,CAACxB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC;IAEA,IAAIc,GAAG,IAAI,GAAG,EAAE;MACdS,YAAY,CAACzB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IACtC,CAAC,MAAM;MACLM,YAAY,CAACzB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACzC;EACF,CAAC;EACDa,WAAW,CAAC,CAAC;EACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IACtCmB,WAAW,CAAC,CAAC;EACf,CAAC,CAAC;AACJ,CAAC;;;;;;;;;;;;;;;;AC5BgE;AACjEc,8CAAM,CAACI,GAAG,CAAC,CAACH,8CAAU,EAAEC,8CAAU,EAAEC,4CAAQ,CAAC,CAAC;AAEvC,MAAME,qBAAqB,GAAGA,CAAA,KAAM;EACzC,IAAI;IACF,MAAMC,oBAAoB,GAAG,IAAIN,8CAAM,CAAC,0BAA0B,EAAE;MAClEO,aAAa,EAAE,GAAG;MAClBC,UAAU,EAAE;QACVC,MAAM,EAAE,0CAA0C;QAClDC,MAAM,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;IACR,CAAC,CAAC;IAEF,MAAMC,WAAW,GAAG,IAAIZ,8CAAM,CAAC,gBAAgB,EAAE;MAC/CO,aAAa,EAAE,CAAC;MAChBI,IAAI,EAAE,IAAI;MACVH,UAAU,EAAE;QACVC,MAAM,EAAE,qBAAqB;QAC7BC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,2BAA2B;QAC/B+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHR,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,CAAC,EAAE;UACDA,aAAa,EAAE;QACjB;MACF;IACF,CAAC,CAAC;IAEF,MAAMS,kBAAkB,GAAG,IAAIhB,8CAAM,CAAC,uBAAuB,EAAE;MAC7DQ,UAAU,EAAE;QACVC,MAAM,EAAE,uCAAuC;QAC/CC,MAAM,EAAE;MACV,CAAC;MACDO,mBAAmB,EAAE,IAAI;MACzB;MACAC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,CAAC;MAChBR,KAAK,EAAE,IAAI;MACXqB,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ,CAAC;MACDR,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,kCAAkC;QACtC+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHO,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC,GAAG;UAClBf,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHe,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHf,aAAa,EAAE,GAAG;UAClBe,YAAY,EAAE,CAAC;QACjB;MACF,CAAC;MACDC,cAAc,EAAE;IAClB,CAAC,CAAC;IAEF,MAAMC,eAAe,GAAG,IAAIxB,8CAAM,CAAC,oBAAoB,EAAE;MACvDQ,UAAU,EAAE;QACVC,MAAM,EAAE,oCAAoC;QAC5CC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACV9B,EAAE,EAAE,+BAA+B;QACnC+B,SAAS,EAAE;MACb,CAAC;MACDS,cAAc,EAAE,KAAK;MACrBN,mBAAmB,EAAE,IAAI;MACzBE,cAAc,EAAE,IAAI;MACpBR,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE;IACT,CAAC,CAAC;IAEF,MAAM0B,cAAc,GAAG,IAAIzB,8CAAM,CAAC,oBAAoB,EAAE;MACtD0B,QAAQ,EAAE,IAAI;MACdC,UAAU,EAAE,IAAI;MAChBR,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,MAAM;MACrBI,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE,IAAI;MACX6B,QAAQ,EAAE;QACRC,OAAO,EAAE,IAAI;QACbC,KAAK,EAAE,CAAC;QACRC,oBAAoB,EAAE;MACxB,CAAC;MACDC,gBAAgB,EAAE;IACpB,CAAC,CAAC;IAEFvE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,WAAW,EAAE,YAAY;MACzC0D,cAAc,CAACG,QAAQ,CAACK,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;IAEJxE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,UAAU,EAAE,YAAY;MACxC0D,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;IAEJ9C,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtC,IAAI,CAAC0D,cAAc,CAACG,QAAQ,CAACO,OAAO,EAAE;QACpCV,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;MACjC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAO3C,CAAC,EAAE;IACVC,OAAO,CAAC4C,KAAK,CAAC7C,CAAC,CAAC;EAClB;AACF,CAAC;;;;;;;;;;;;;;;;ACtI6B;AAE9B,MAAM+C,OAAO,GAAG7E,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC;AACrD,MAAMgE,UAAU,GAAG9E,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMiE,SAAS,GAAG/E,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMkE,SAAS,GAAGhF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMmE,aAAa,GAAGjF,QAAQ,CAACc,aAAa,CAAC,kBAAkB,CAAC;AAChE,MAAMoE,UAAU,GAAGlF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMqE,SAAS,GAAGnF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMsE,WAAW,GAAGpF,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC;AAEhD,MAAMuE,cAAc,GAAGA,CAAA,KAAM;EAClC,IAAI;IACF,IAAIC,cAAc,GAAG,IAAI;IAEzB,MAAMC,WAAW,GAAGX,oDAAO,CAAC5E,QAAQ,CAACwF,cAAc,CAAC,eAAe,CAAC,EAAE;MACpErB,QAAQ,EAAE,IAAI;MACdjB,IAAI,EAAE,IAAI;MACVuC,KAAK,EAAE,IAAI;MACXC,QAAQ,EAAE,KAAK;MACfC,UAAU,EAAE;IACd,CAAC,CAAC;IAEF,MAAMC,aAAa,GAAGA,CAACC,UAAU,EAAEC,SAAS,KAAK;MAC/C,IAAInE,MAAM,CAACoE,MAAM,CAACC,KAAK,GAAG,GAAG,EAAE;QAC7BT,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWJ,UAAW;QAC9B,CAAC,CAAC;MACJ,CAAC,MAAM;QACLN,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWH,SAAU;QAC7B,CAAC,CAAC;MACJ;IACF,CAAC;IAEDF,aAAa,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAClDL,WAAW,CAACY,MAAM,CAAC,GAAG,CAAC;IACvB,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;MAC/Bb,WAAW,CAACc,IAAI,CAAC,CAAC;MAElBd,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;MAC5Bf,WAAW,CAACE,KAAK,CAAC,KAAK,CAAC;MACxBF,WAAW,CAACG,QAAQ,CAAC,IAAI,CAAC;MAC1BH,WAAW,CAACrC,IAAI,CAAC,KAAK,CAAC;MAEvB2B,OAAO,CAACnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC7BiD,UAAU,CAACpE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChCkD,SAAS,CAACrE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC/BmD,SAAS,CAACtE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;IACjC,CAAC;IAED0D,WAAW,CAACgB,EAAE,CAAC,MAAM,EAAE,MAAM;MAC3B,IAAI,CAAChB,WAAW,CAACiB,MAAM,CAAC,CAAC,EAAE;QACzBjB,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;QAC5Bf,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC,CAAC,MAAM,IAAI0D,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAIjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACrDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;MACjC,CAAC,MAAM,IAAIlB,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAI,CAACjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACtDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC;IACF,CAAC,CAAC;IAEF0D,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;IACnC,CAAC,CAAC;IAEF2E,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjCuE,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFuE,SAAS,CAAC7E,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACxCuE,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjC2E,WAAW,CAACmB,KAAK,CAAC,CAAC;MACnBvB,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFiE,OAAO,CAACvE,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACtC,IAAIgF,cAAc,KAAK,IAAI,EAAE;QAC3BM,aAAa,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9CN,cAAc,GAAG,KAAK;MACxB;MACAtF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC/D7B,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC3D7B,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAE7D0D,WAAW,CAACoB,KAAK,CAAC,IAAI,CAAC;MACvB1B,aAAa,EAAEvE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MACpCsD,SAAS,EAAEzE,SAAS,CAACmB,GAAG,CAAC,SAAS,CAAC;MACnCgD,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,iBAAiB,CAAC;MACzC7B,QAAQ,CAACc,aAAa,CAAC,OAAO,CAAC,CAACM,KAAK,CAACwF,SAAS,GAAG,SAAS;MAE3D,IAAIrB,WAAW,CAACE,KAAK,CAAC,CAAC,EAAE;QACvBF,WAAW,CAACsB,WAAW,CAAC,CAAC,CAAC;QAC1BT,kBAAkB,CAAC,CAAC;MACtB,CAAC,MAAM;QACLA,kBAAkB,CAAC,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOtE,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;AC1GD,sBAAsB,qBAAM,mBAAmB,qBAAM;AACrD;AACA,aAAa,mBAAO,CAAC,2BAAc;;AAEnC;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA;;AAEA;AACA;AACA,EAAE,gBAAgB,qBAAM;AACxB,UAAU,qBAAM;AAChB,EAAE;AACF;AACA,EAAE;AACF;AACA;;AAEA;;;;;;;;;;;ACZA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,2BAA2B;AAC3B,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,YAAY,YAAY,GAAG,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;;AAEtB;AACA,iBAAiB,QAAQ;;AAEzB;AACA,YAAY,QAAQ;;AAEpB;AACA,YAAY,QAAQ;;AAEpB;AACA;AACA;AACA;AACA;;AAEA,YAAY,aAAa,GAAG,aAAa,MAAM;;AAE/C;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC9KA;AACqD;AACC;AACiC;;AAEvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,uEAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;;AAEA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;;AAGN,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,0BAA0B,uEAAM;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA,eAAe;;AAEf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;;;AAGA,2CAA2C;;AAE3C;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB,0EAAQ;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;;AAEA,+DAA+D,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,6CAA6C,EAAE;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;;AAGR;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,KAAK,8CAA8C,kBAAkB;AACvF,KAAK;AACL;;AAEA;AACA;AACA,kBAAkB,KAAK,sBAAsB,kBAAkB,2BAA2B,kBAAkB;AAC5G,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,kBAAkB,KAAK,uDAAuD,mBAAmB;AACjG,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA,kBAAkB,KAAK,2BAA2B,mBAAmB,+BAA+B,gBAAgB;AACpH,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,qBAAqB,uEAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB,oBAAoB;;AAEpB;AACA;;AAEA;;AAEA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,OAAO;AACP;;AAEA,0EAA0E;;AAE1E,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA,+EAA+E;AAC/E;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,kBAAkB;AAClB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,wBAAwB,8FAAqB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;;AAEA,cAAc,0EAAQ;AACtB,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA,yEAAyE;;AAEzE;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;;AAGhB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,aAAa;;AAEb;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4DAA4D,WAAW,eAAe,aAAa;;AAEnG;AACA;AACA;AACA;AACA,2DAA2D,GAAG;AAC9D,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,oEAAoE,OAAO,eAAe,aAAa;;AAEvG;AACA;AACA,gBAAgB;AAChB;;;AAGA,8BAA8B,wCAAwC;AACtE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD,OAAO,eAAe,cAAc,oBAAoB,WAAW,mBAAmB,EAAE;AAC7I,mBAAmB;AACnB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE,MAAM;AAC9E,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iEAAiE,MAAM;AACvE;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA,WAAW;AACX,SAAS;;AAET;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,aAAa;AACb;AACA,YAAY;;;AAGZ;AACA;AACA;;AAEA,iDAAiD;;AAEjD;AACA;AACA,YAAY;;;AAGZ,oCAAoC;;AAEpC;AACA,SAAS;;AAET,mBAAmB;AACnB,SAAS;;AAET;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,YAAY;AACZ;AACA;AACA;AACA;;AAEA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,oBAAoB,YAAY,+BAA+B,mBAAmB;AAClF,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;;AAEA;;AAE2C;;;;;;;;;;;;;;;;;;AC/lDR;;AAEnC;AACA,SAAS,2DAAW,GAAG,yDAAW;AAClC;;AAEe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;;AAGA;AACA;;AAEA,sBAAsB,YAAY;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHD;AAC2D;AACxB;AACoC;AACa;AACzC;;AAE3C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;AACA;;AAEA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,6EAAU;AAC3B;;AAEA;AACA;AACA,wCAAwC;;AAExC,qBAAqB,6DAAa,GAAG,2DAAa;AAClD,mBAAmB,6DAAa,GAAG,2DAAa,uCAAuC;;AAEvF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,2DAAa,aAAa,2DAAa,eAAe,2DAAa;AAClF,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,2DAAa,qBAAqB,2DAAa,qBAAqB,2DAAa;AAChG,IAAI;AACJ;AACA;;AAEA,YAAY,iBAAiB,GAAG,SAAS;AACzC;;AAEA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,4DAA4D;AAC5D;;AAEA,6CAA6C;AAC7C;;AAEA,+DAA+D;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC,kGAAkG;;AAElG;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;;AAElB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B;AAC7B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,oEAAoE;;AAEpE,iDAAiD;;AAEjD;AACA;AACA,+DAA+D;;AAE/D,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C,kBAAkB;;AAElB;AACA,iBAAiB,2DAAa;AAC9B,IAAI;AACJ;AACA;;AAEA,kBAAkB,4BAA4B;AAC9C,0CAA0C;;AAE1C,2CAA2C;AAC3C;;AAEA,mDAAmD;;AAEnD,kBAAkB;;AAElB;AACA,8BAA8B,2DAAa,SAAS,2DAAa;AACjE,MAAM;AACN;AACA;;AAEA,0BAA0B,WAAW,GAAG,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,2DAAa;AACjC,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,iBAAiB;AAC7B;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA,EAAE,qFAAiB;AACnB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,KAAK;AACzC,iBAAiB,yBAAyB,EAAE,UAAU;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA;AACA;;AAEA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC,IAAI;;AAEL;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,iBAAiB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,eAAe;AACf,6BAA6B;AAC7B;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,uBAAuB,iCAAiC;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA,YAAY,8CAA8C,EAAE,MAAM;AAClE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6EAAU;AAC7B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY,gBAAgB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+EAA+E;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,6EAAU;AACxC;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,kBAAkB;AAChC;AACA,cAAc,oBAAoB;AAClC;AACA,cAAc,kBAAkB;AAChC;AACA,cAAc,kBAAkB;AAChC;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uIAAuI;AACvI;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,oBAAoB;AAClC;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,2FAAqB;AAC3D;AACA;;AAEA;AACA,GAAG,IAAI;AACP,GAAG;;;AAGH;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA,oBAAoB;;AAEpB;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC,YAAY;AACZ,4CAA4C;AAC5C,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,MAAM;AACpB;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,GAAG,6CAA6C;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,qEAAqE;;AAErE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,qDAAS;AAC9B;AACA;;AAEA;AACA;AACA;AACA,IAAI,WAAW;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;;AAGA;;AAE6K;;;;;;;;;;;;;;;;;;ACzqF1I;;AAEnC;AACA,SAAS,2DAAW,GAAG,yDAAW;AAClC;;AAEe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACpBqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;;AC9Cb;;AAEZ;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,WAAW,aAAa,2BAA2B,GAAG;AACtD,WAAW,oDAAoD,2BAA2B,YAAY;AACtG,WAAW,uDAAuD;AAClE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,4CAA4C;AACvD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,2BAA2B;AACtC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,cAAc;AACd,YAAY;AACZ,cAAc;AACd,iBAAiB;AACjB,iBAAiB;;;;;;;;;;;AC1MjB,kBAAkB,mBAAO,CAAC,+FAAe;AACzC,UAAU,mBAAO,CAAC,+EAAO;AACzB,eAAe,mBAAO,CAAC,yFAAY;AACnC,UAAU,mBAAO,CAAC,+EAAO;;AAEzB;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,oBAAoB;AAClC;AACA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB;AAC/D;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA,gCAAgC;AAChC;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,KAAK;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,CAAC;;AAED,mHAAmH;AACnH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,CAAC;;AAED,oBAAoB;AACpB,4BAA4B;AAC5B,iBAAiB;;;;;;;;;;;ACjUjB,kBAAkB,mBAAO,CAAC,+FAAe;;AAEzC;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,oBAAoB,YAAY,QAAQ;AAChF,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,0BAA0B,cAAc;AACxC;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,yBAAyB;AACrC,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,MAAM;AAClB,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;;AAGA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,YAAY,QAAQ;AACpB,YAAY,mBAAmB;AAC/B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,EAAE;AACF,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,yBAAyB;AACzB,0BAA0B;AAC1B,2BAA2B;AAC3B,4BAA4B;AAC5B,+BAA+B;AAC/B;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,SAAS;AACT;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ,gEAAgE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA,6BAA6B,+CAA+C;AAC5E,IAAI;AACJ,6BAA6B,mCAAmC;AAChE;AACA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,4EAA4E;AAC5E,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,SAAS;AACV;;AAEA;AACA,CAAC,oBAAoB;AACrB,CAAC,oBAAoB;AACrB,CAAC,yBAAyB;AAC1B,CAAC,eAAe;AAChB,CAAC,YAAY;AACb,CAAC,gBAAgB;AACjB,CAAC,qBAAqB;AACtB;;;;;;;;;;;;AC/yDa;;AAEb,aAAa,6HAA+B;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;ACrnEjB,UAAU,mBAAO,CAAC,+EAAO;AACzB,yBAAyB;AACzB,qBAAqB;AACrB,gJAAqD;;;;;;;;;;;ACHrD,gBAAgB,gIAAkC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd,eAAe;AACf,mBAAmB;AACnB,aAAa;AACb,4BAA4B;AAC5B,mBAAmB;AACnB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,WAAW;AACX,mBAAmB,MAAM;AACzB;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,IAAI,KAAK;AACT;AACA;AACA;AACA,wBAAwB;AACxB,yBAAyB;AACzB,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,IAAI;AACJ;;AAEA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,KAAK;AACZ,gCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,KAAK;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,EAAE;AACF;AACA,0BAA0B,yBAAyB;AACnD,wBAAwB,uBAAuB;AAC/C,sBAAsB,qBAAqB;AAC3C,oBAAoB,mBAAmB;AACvC,sBAAsB;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ,uBAAuB,0DAA0D;AACjF;AACA,wBAAwB;AACxB;;;;AAIA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,kBAAkB;;;;;;;;;;;ACrpBlB,gBAAgB,wGAAwC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,UAAU;;AAEV;;AAEA,UAAU;;AAEV,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;AAGA;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK,IAA0C;AAC/C,EAAE,iCAAO,EAAE,mCAAG;AACd;AACA,GAAG;AAAA,kGAAE;AACL,GAAG,KAAK,EAIN;AACF,CAAC,SAAS,qBAAM,mBAAmB,qBAAM;;AAEzC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;;AAEA;AACA,+DAA+D;AAC/D,sEAAsE;AACtE,gHAAgH;AAChH,uEAAuE;AACvE,gFAAgF;AAChF,8IAA8I;AAC9I,8EAA8E;AAC9E,uFAAuF;AACvF,0IAA0I;AAC1I,qFAAqF;AACrF,8FAA8F;AAC9F,0JAA0J;;AAE1J;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,yBAAyB;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA,6DAA6D,GAAG;;AAEhE;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA,8MAA8M;AAC9M,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,iBAAiB;;AAE9D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,4CAA4C,GAAG;AAC/C,mFAAmF;;AAEnF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;;;;;;;;;;ACzoBD;;AAEA;AACA;AACA,sFAAsF,iBAAiB;AACvG;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,MAAM,IAAyD;AAC/D;AACA,OAAO,EAKgC;AACvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7KD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEqC;AACE;AACT;AACqB;AACpB;AACE;AAC8B;AACT;AACjB;AACqL;AAC1I;AACkC;AACnB;AAC3C;AACa;AACoC;AAC3C;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,wBAAwB;AACxB,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA,sBAAsB,wDAAQ;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,8DAAgB;AACvB;AACA;;AAEA;AACA;AACA;AACA,WAAW,8DAAgB;AAC3B;AACA;AACA;AACA,SAAS,8DAAgB,SAAS,8DAAgB;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,8DAAgB;AAC7D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,0BAA0B,MAAM,EAAE,iBAAiB,EAAE,QAAQ;AAC7D;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,yBAAyB;AAC/D;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6BAA6B,MAAM;AACnC,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,yDAAyD;AAC7D;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,2CAA2C,wEAA0B,IAAI,gEAAkB,mBAAmB,oEAAsB,IAAI,+DAAiB,YAAY,oEAAsB;AAC3L,YAAY,gEAAkB,IAAI,gEAAkB;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,gEAAkB,IAAI,gEAAkB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,sBAAsB,oBAAoB;AAC1C,2BAA2B,yBAAyB;AACpD,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,qBAAqB,mBAAmB;AACxC,4BAA4B,0BAA0B;AACtD,0BAA0B,wBAAwB;AAClD,sBAAsB,oBAAoB;AAC1C,qBAAqB,mBAAmB;AACxC,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS,wDAAQ,KAAK,+DAAiB;AACvC;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6DAAe,KAAK,2DAAa;AAC5C,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa,wDAAQ;AACrB;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA,0CAA0C,wDAAQ;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,kDAAkD,iBAAiB;AACnE,aAAa,oEAAsB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,sCAAsC;AAClD,qCAAqC;AACrC;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,2DAAa;AACf,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qEAAuB;AACpC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uEAAyB;AACtC;AACA;AACA,2BAA2B,qEAAyB;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,MAAM,oEAAoB;AAC1B;AACA;AACA,oBAAoB,oEAAsB;AAC1C;AACA;AACA,MAAM;AACN,mBAAmB,oEAAsB;AACzC;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,2EAA6B;AACvE,4CAA4C,2EAA6B;AACzE,0CAA0C,2EAA6B;AACvE;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAAmB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,wEAA4B;AAC9B;AACA;AACA,MAAM,mEAAmB;AACzB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qEAAyB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4DAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,wDAAQ;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wEAAwB;AAC1C,mBAAmB,6DAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,OAAO;AACP,MAAM,qEAAyB;AAC/B,MAAM,wEAA4B;AAClC,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,GAAG;AACjB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,gEAAoB;AACjC;AACA,gBAAgB,gEAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,4DAA4D,sDAAQ;AACpE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,oBAAoB,+DAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,0CAA0C,aAAa,GAAG,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,8CAA8C,aAAa,GAAG,SAAS;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4CAA4C,aAAa,GAAG,SAAS;AACrE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,OAAO,6BAA6B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc,UAAU;AACxE;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDAAgD;AAC5D;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,WAAW;AAC/B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,qCAAqC;AACrC;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI,+DAAmB;AACvB;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,sBAAsB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,WAAW;AACX;AACA;AACA,MAAM,iDAAiD;AACvD;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC,KAAK;AAC/C;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,YAAY,mDAAmD;AAC/D;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,GAAG,aAAa,UAAU;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,GAAG,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE;AACvE;AACA;AACA;AACA;AACA,sDAAsD,GAAG,SAAS,EAAE;AACpE;AACA,qBAAqB,GAAG,IAAI,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mEAAmE,mBAAmB;AACtF;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,kBAAkB,sEAAwB;AAC1C;AACA,kBAAkB,sEAAwB;AAC1C;AACA,oDAAoD,SAAS;AAC7D;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,mBAAmB;AACjD,oCAAoC,YAAY,mBAAmB;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,0BAA0B;AAClE,0CAA0C,0BAA0B;AACpE;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,uBAAuB;AACrC,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,uBAAuB,KAAK,uBAAuB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,6DAA6D;AAC7D,YAAY,OAAO;AACnB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gEAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,SAAS,yBAAyB;AAClC,uDAAuD;AACvD;AACA;AACA;AACA,cAAc,8BAA8B,IAAI,yBAAyB;AACzE;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+DAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,MAAM,2BAA2B,4BAA4B;AAC7D;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,4BAA4B;AACzC;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,+BAA+B;AAC7D,SAAS,yBAAyB;AAClC,yCAAyC;AACzC;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,cAAc,+BAA+B;AAC7C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB,gEAAoB;AAC3C;AACA;AACA;;AAEA;AACA;AACA,MAAM,4BAA4B,8BAA8B;AAChE;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,6BAA6B;AAC1C;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,kEAAsB;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,2BAA2B;AACnC;AACA,sCAAsC,iCAAiC;AACvE;AACA;AACA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,sCAAsC;AACpE;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0EAA8B;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA,uCAAuC,sCAAsC;AAC7E;AACA,0DAA0D,wBAAwB;AAClF;AACA,aAAa,QAAQ;AACrB,sDAAsD,sCAAsC;AAC5F;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,yEAA6B;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc,WAAW,8CAA8C,WAAW;AAClF,yCAAyC,yBAAyB;AAClE,cAAc,mCAAmC;AACjD;AACA;AACA,cAAc,wCAAwC;AACtD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,kDAAkD,KAAK,GAAG;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,6CAA6C,KAAK,GAAG,EAAE,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,iBAAiB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,0CAA0C,OAAO,yCAAyC,MAAM,uCAAuC,SAAS;AAChJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6DAAe,IAAI,6DAAe;AACxC,kBAAkB,6DAAe;AACjC;AACA;AACA;;AAEA;AACA;AACA,IAAI,4FAA4F;AAChG;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA,UAAU;AACV;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mDAAmD,4BAA4B;AAC/E;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,iBAAiB;AACtC,mBAAmB,gBAAgB;AACnC;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B,iBAAiB,gBAAgB;AACjC,IAAI,iDAAiD;AACrD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA,YAAY;AACZ,4DAA4D,WAAW;AACvE,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA,2BAA2B,gBAAgB,QAAQ,YAAY;AAC/D,WAAW,iBAAiB;AAC5B;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,SAAS;AACtB,0DAA0D;AAC1D;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB,iBAAiB;AACrC;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6BAA6B,UAAU;AACvC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc,kBAAkB,aAAa,sBAAsB;AACnE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,SAAS,yDAAkB;AAC3B;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wEAA0B,qBAAqB,sEAAwB,qDAAqD,uEAAyB,qBAAqB,wEAA0B,qBAAqB,0EAA4B,qBAAqB,wEAA0B,yDAAyD,wEAA0B,qBAAqB,wEAA0B,qBAAqB,uEAAyB;AACnf,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gCAAgC,oBAAoB,GAAG,qBAAqB;AAC5E,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oBAAoB,mBAAmB;AACvC;AACA;AACA;;AAEA;AACA,YAAY,aAAa;AACzB;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,aAAa;AAC5B;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA,uDAAuD,mBAAmB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,kBAAkB;AAC/B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,QAAQ;AACxB,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA,YAAY,kBAAkB;AAC9B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,mDAAmD,YAAY;AAC/D;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC,MAAM,gBAAgB;AACtB;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,wBAAwB;AACvC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE,iBAAiB;AACrF,IAAI,iBAAiB,OAAO,gBAAgB;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY,oEAAsB;AAClC;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC;;AAEA;AACA;AACA,mBAAmB,+DAAiB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oEAAsB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gDAAgD,IAAI;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,8CAA8C,+DAAiB;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA,qBAAqB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc,EAAE,2DAAe;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB,iDAAiD,UAAU;AACjF;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,mDAAG;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA;AACA;AACA,4EAA4E,UAAU;AACtF;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,QAAQ;AAC1B,4DAA4D,qBAAqB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,4DAAc;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA,gBAAgB,qBAAqB,YAAY,kBAAkB;AACnE;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB,qBAAqB;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,gCAAgC,KAAK;AACrC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA,0BAA0B,mDAAmD;AAC7E,6DAA6D;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,uBAAuB,YAAY,iBAAiB,gBAAgB;AACpE;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ,WAAW;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,0BAA0B,wBAAwB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM;AACjC,8BAA8B,MAAM;AACpC;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM,yBAAyB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,sDAAsD,qBAAqB;AAC3E,MAAM,qBAAqB,OAAO,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA,8CAA8C,gCAAgC;AAC9E;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,4BAA4B,qBAAqB,GAAG,OAAO,eAAe;AAC1E,MAAM,qBAAqB;AAC3B;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6DAAe;AACvB;AACA;;AAEA;AACA;AACA;AACA,QAAQ,2DAAa;AACrB;AACA;AACA;AACA,8CAA8C,uDAAG,iBAAiB,uDAAG;AACrE;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,oEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM,6DAAe;AACrB;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA,aAAa,QAAQ;AACrB,iBAAiB,kCAAkC;AACnD;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sDAAQ,IAAI,8DAAgB,IAAI,8DAAgB;AACxD,wBAAwB,MAAM;AAC9B,aAAa,8DAAgB;AAC7B;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD,iBAAiB,4BAA4B;AAC7C;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,8BAA8B;AACpE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,IAAI,+CAA+C;AACnD,IAAI,+CAA+C;AACnD,IAAI,mDAAmD;AACvD;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,IAAI,0DAA0D;AAC9D;AACA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA,2DAA2D,cAAc;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E,KAAK,kBAAkB;AAClG;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,MAAM;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC,KAAK,2BAA2B;AAC1E;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC;AAC1C,MAAM,sCAAsC;AAC5C;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6DAAe,gBAAgB,sDAAQ;AACvE,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,gBAAgB;AACvD,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA,eAAe,6DAAe;AAC9B,MAAM,2DAAe,aAAa,sDAAQ;AAC1C;AACA;;AAEA;AACA,qDAAqD,8BAA8B;AACnF,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,8BAA8B,MAAM,+BAA+B;AAC3E;AACA;AACA;AACA;AACA,wCAAwC,wDAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,iBAAiB,yBAAyB,wBAAwB;AAC9E;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS,gBAAgB,SAAS,gBAAgB,SAAS;AACzH,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS;AAC7G,UAAU;AACV,0DAA0D,UAAU,UAAU,UAAU,cAAc,SAAS,WAAW,SAAS;AACnI,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS,YAAY,SAAS;AAClI;AACA;AACA;AACA,yBAAyB,+DAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB,WAAW,WAAW,GAAG,oBAAoB;AAC3E;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;;AAEA;AACA,IAAI,2DAAe,aAAa,sDAAQ;;AAExC;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,GAAG;AACtC,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8DAA8D,GAAG;AACjE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8EAA8E,UAAU,oBAAoB;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,6DAA6D;AAC7D;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,sCAAsC;AAC5C;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,KAAK;AACL;AACA;AACA,sBAAsB,+BAA+B;AACrD,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,oBAAoB,UAAU;AAC9B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qEAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,sBAAsB,6BAA6B;AACnD,KAAK;AACL,gCAAgC,qEAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,8BAA8B;AACjF,MAAM,2BAA2B;AACjC;AACA,aAAa,YAAY;AACzB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,0BAA0B,KAAK,wBAAwB;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,sBAAsB,qEAAuB;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,eAAe;AAC3B,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,sBAAsB;AAC9C;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,wBAAwB;AAChC,IAAI,sBAAsB,kCAAkC;AAC5D;AACA,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,+BAA+B,iCAAiC;AAChE,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,cAAc,wDAAQ;AACtB;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,GAAG,UAAU,EAAE,0EAA0E,GAAG,IAAI,EAAE;AACnM;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,wBAAwB,8CAAO;AACrC;AACA;AACA,4BAA4B,sDAAa,CAAC,8CAAO,WAAW,sDAAa;AACzE;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,uCAAuC;AACxE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,sBAAsB;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,QAAQ,gFAAgC,gHAAgH,oFAAsC;AAC9L;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,oCAAoC,IAAI,oCAAoC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,+BAA+B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,kBAAkB,QAAQ;AAC1B;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,+BAA+B;AACvC,IAAI,oBAAoB,kCAAkC;AAC1D;AACA,IAAI,gBAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE,QAAQ;AACR,iCAAiC,mCAAmC;AACpE;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,uBAAuB;AAC3D;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,iBAAiB;AACpE,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mEAAmE,aAAa,UAAU,EAAE;AAC5F,kCAAkC,MAAM;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,wDAAQ;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C,oDAAoD,GAAG;AACvD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B,EAAE,sBAAsB;AAClF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C,qDAAqD,GAAG;AACxD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B,EAAE,sBAAsB;AACpF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mDAAmD,GAAG;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,eAAe;AAChD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gBAAgB;AAC5B;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,iDAAiD,sEAAsB;;AAEvE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gBAAgB;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,8BAA8B,iBAAiB,EAAE,aAAa,EAAE,sBAAsB;AACtF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,8BAA8B,iBAAiB,EAAE,sBAAsB;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,yDAAkB,iBAAiB,yDAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,8BAA8B,yDAAkB;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4DAAc;AACjC;AACA;AACA,wBAAwB,4DAAc;AACtC,YAAY;AACZ;AACA;AACA;AACA;AACA,kBAAkB,kEAAoB;AACtC;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO,mBAAmB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,qEAAqE;AACrE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA,gCAAgC,6BAA6B;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yBAAyB,sBAAsB;AAC/C;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM,MAAM,GAAG,WAAW,oCAAoC,uCAAuC,KAAK,gCAAgC,oBAAoB;AAC9K;AACA,6BAA6B,SAAS,WAAW,KAAK,yBAAyB,qBAAqB,EAAE,SAAS;AAC/G,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD,8EAA8E,SAAS;AACvF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,oBAAoB,gEAAgE,oBAAoB,wEAAwE,sBAAsB;AACnR,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iEAAqB;AAC/C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iEAAqB;AAC7B,QAAQ;AACR,QAAQ,iEAAqB;AAC7B;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0FAA0F,4DAA4D;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,8DAA8D,qEAAuB;;AAErF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oDAAoD,qEAAuB;AAC3E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,gEAAoB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C,OAAO;AACP;AACA;AACA,yCAAyC,UAAU;AACnD,OAAO;AACP;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,oBAAoB;AACjC,aAAa,UAAU;AACvB,aAAa,gCAAgC;AAC7C;AACA;AACA,cAAc,QAAQ,WAAW;AACjC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,GAAG;AACH;AACA;AACA,kBAAkB,oEAAsB;;AAExC;AACA;;AAEA;AACA,oBAAoB,6EAA+B;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI,4DAAgB;;AAEpB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uEAAyB,YAAY,8DAAgB;;AAEtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,4BAA4B,4DAAgB;AAC5C;AACA;AACA,GAAG;AACH;AACA,IAAI,4DAAgB;AACpB;AACA;AACA,CAAC;AACD,2DAA2D,uEAAyB;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAA6C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK;AAChD;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,0BAA0B,cAAc;AACxC,sCAAsC,cAAc;AACpD,wDAAwD,cAAc;AACtE,OAAO;AACP;AACA,0BAA0B,KAAK;AAC/B,YAAY,cAAc;AAC1B;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,aAAa,oEAAsB;;AAEnC;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,8BAA8B;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc,kBAAkB;AAChC,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kEAAoB;AAC5B,0CAA0C,gEAAoB;AAC9D;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC,gBAAgB,oEAAsB;AACtC;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,+DAAmB;AACzB;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,mDAAmD,0BAA0B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,IAAI,yBAAyB;AAC7B;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,uEAAuE,4BAA4B;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,0DAA0D,WAAW;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,mEAAmE,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,2DAA2D,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,oEAAoE,WAAW;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD,wCAAwC,EAAE;AAC1C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,6CAA6C;AAC7C,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA,kDAAkD,UAAU;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,aAAa;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,QAAQ,wDAAQ;AAChB,QAAQ,wDAAQ;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,MAAM;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,MAAM,qBAAqB,UAAU;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;;AAEA,SAAS,QAAQ;AACjB,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU,GAAG,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,cAAc,aAAa,cAAc;AACjF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD,qBAAqB;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA,WAAW;AACX;AACA;AACA,0BAA0B,yBAAyB;AACnD,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe;AAC9F,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;AACpE;AACA;AACA;AACA,yEAAyE,WAAW;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,qEAAqE,WAAW;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2BAA2B,QAAQ,yBAAyB,gBAAgB;AAC5E;AACA;;AAEA;AACA;AACA,2BAA2B,QAAQ,iBAAiB,gBAAgB;AACpE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,eAAe;AACf,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,sBAAsB,wDAAQ;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,wEAAwB;;AAEnD;AACA,OAAO,wDAAQ;;AAEf;AACA,IAAI,wEAAwB;;AAE5B;AACA,aAAa,6DAAa;;AAE1B;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;;AAEhB;AACA,IAAI,wEAAwB;;AAE5B;AACA,gBAAgB,6DAAa;;AAE7B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,+EAAiC;AACzF,2BAA2B,oEAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX,aAAa,6EAAiC;AAC9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,QAAQ,+EAAiC,IAAI,+EAAiC;AAC9E;AACA,MAAM,6EAAiC;AACvC;AACA;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,aAAa,2EAA6B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,yDAAkB;AACxD,gCAAgC,yDAAkB;AAClD,qCAAqC,yDAAkB,uBAAuB,yDAAkB;AAChG,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU,wDAAQ;AAClB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,cAAc;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,QAAQ,KAAK;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,yBAAyB,kBAAkB,EAAE,wCAAwC;;AAErF;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,mCAAmC,iBAAiB;AACpD,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB,QAAQ,uBAAuB;AACtE;AACA,aAAa,QAAQ;AACrB,gCAAgC,wBAAwB;AACxD,aAAa,wBAAwB;AACrC;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC,MAAM,qBAAqB,KAAK,2BAA2B;AAC3D;AACA,aAAa,QAAQ;AACrB,oBAAoB,iBAAiB;AACrC;AACA,cAAc;AACd;AACA;AACA,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,aAAa,QAAQ;AACrB,0DAA0D,kBAAkB;AAC5E;AACA,cAAc;AACd,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,yBAAyB;AACzB;AACA,cAAc;AACd;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA,gBAAgB;AAChB,gBAAgB,QAAQ;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,oBAAoB,yGAAyG;AAC7H;AACA;AACA;AACA;AACA,oCAAoC,iCAAiC;AACrE;;AAEA;AACA,kCAAkC,qCAAqC;AACvE;AACA,cAAc,oBAAoB;AAClC;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4DAAc,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,4BAA4B;AAC/C;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,UAAU;AACV;AACA;AACA,kBAAkB,gEAAkB;;AAEpC;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA;AACA,cAAc;AACd;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,+DAA+D;AACrE;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA,eAAe,sCAAsC;AACrD;AACA,cAAc;AACd;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,+CAA+C,KAAK,2BAA2B,YAAY;AAC3F;AACA;AACA,oCAAoC,KAAK;AACzC,MAAM;AACN,+CAA+C,KAAK;AACpD;AACA;AACA,6CAA6C,KAAK,6BAA6B,cAAc;AAC7F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,kBAAkB;AAC9B;AACA;AACA,sBAAsB,SAAS,uCAAuC,MAAM,IAAI,aAAa,SAAS;AACtG;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA,IAAI,cAAc;AAClB;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA,qCAAqC,cAAc,KAAK,YAAY;AACpE;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,eAAe;AAC3B,6CAA6C,cAAc,KAAK,YAAY;AAC5E;AACA;AACA,YAAY;AACZ,+CAA+C,qBAAqB;AACpE;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,iEAAmB;AAC3F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,+EAAiC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA,0CAA0C;AAC1C;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,cAAc,QAAQ;AACtB;AACA;AACA,WAAW;AACX;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,uBAAuB,6CAA6C;AACpE;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,wBAAwB;AACnC;AACA;AACA,YAAY;AACZ;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,iBAAiB,EAAE;AAC5D;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;;AAEA;AACA,uBAAuB,uCAAuC;AAC9D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,kBAAkB,kBAAkB,EAAE;AAClE;AACA;AACA,CAAC;AACD;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,mCAAmC;AAC1D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,cAAc,cAAc;AAC5B;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA,gDAAgD;AAChD,GAAG;;AAEH,wDAAwD;;AAExD;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,4EAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,OAAO,KAAK,IAAI;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;;AAEA,kBAAkB,wBAAwB;AAC1C;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;AACN,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY;AACZ;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,cAAc;AAChC;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA,8BAA8B;;AAE9B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA,IAAI;AACJ,yCAAyC;AACzC,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,gDAAgD;AAChD;;AAEA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA;AACA,YAAY,SAAS;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA,aAAa,gEAAiB;AAC9B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6BAA6B,2BAA2B;AACxD;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ,kBAAkB,2BAA2B;AAC7C;AACA,sEAAsE;;AAEtE,+CAA+C,6EAAY;AAC3D;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,YAAY,MAAM,GAAG,IAAI;AACzB,GAAG;;AAEH;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,MAAM;AACnD;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB,+CAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,eAAe;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4CAA4C;;AAE5C,6CAA6C;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,KAAK;AACL,SAAS,+DAAiB;AAC1B,iBAAiB,+DAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA,0CAA0C,EAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0EAAQ,GAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,yBAAyB;AACzB;;AAEA,yCAAyC;;AAEzC;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS;;AAEf,+DAA+D;AAC/D;AACA;;AAEA;AACA,gDAAgD;;AAEhD,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA,IAAI;AACJ,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,+BAA+B;AACxD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wCAAwC;AAC9D;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA,IAAI;;AAEJ;AACA;AACA,mDAAmD;AACnD;;AAEA,sBAAsB,mCAAmC;AACzD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,oBAAoB,iCAAiC;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,SAAS;AACpB;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,cAAc,UAAU;AACxB;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,mCAAmC,+DAAmB;AACtD;AACA;AACA;AACA;AACA,8DAA8D;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,kEAAkE;;AAElE;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,MAAM;;AAEN;AACA;AACA;AACA,8BAA8B,+DAAmB;AACjD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC,QAAQ;AACR;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,iCAAiC,+DAAiB;AAClD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB;AACA;;AAEA,sFAAsF;AACtF;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,wFAAwF;;AAExF,oFAAoF;;AAEpF,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2DAAe,qBAAqB,2DAAe,qBAAqB,2DAAe;AAC1G,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,sFAAiB;AACzB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,MAAM;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kCAAkC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E;;AAE3E;AACA;AACA,kBAAkB,aAAa;AAC/B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,iHAAiH;;AAEjH,YAAY,sFAAiB,QAAQ,kFAAa;AAClD,6BAA6B,gFAAY,SAAS;AAClD;;AAEA;AACA;AACA;AACA,iBAAiB,0FAAuB,SAAS;AACjD;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,uBAAuB;AACzC;AACA,oCAAoC;;AAEpC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,WAAW;AACxD;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,kDAAK;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN,kBAAkB,8BAA8B;AAChD;AACA;AACA,sBAAsB,4DAAe,iBAAiB;;AAEtD;AACA,QAAQ,sEAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,0DAA0D;AAC1D;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,4DAAe,iBAAiB;;AAErE;AACA;AACA,2BAA2B,+DAAmB;AAC9C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAS,CAAC,4EAAO;AAChC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sEAAyB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wBAAwB,0CAA0C,IAAI;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+BAA+B;;AAE/B,qCAAqC;AACrC;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA,2BAA2B,+DAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA,sBAAsB,2DAAc,qCAAqC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,6DAA6D,IAAI;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+DAAmB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+DAAmB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC,mCAAmC;AAC7G;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wQAAwQ;;AAExQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,kBAAkB,gBAAgB;AAClC;AACA,8DAA8D;;AAE9D,kGAAkG;AAClG,QAAQ;;AAER,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uVAAuV;AACvV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,cAAc,YAAY;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA,oEAAoE;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,iBAAiB;AACjC,4BAA4B;;AAE5B,kBAAkB,uBAAuB;AACzC,sCAAsC;;AAEtC,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;;AAEf,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,oCAAoC,SAAS;AAC7C,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;AACN;;AAEA,uEAAuE;;AAEvE,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,MAAM;;AAEN;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,MAAM;;AAEN,oDAAoD;;AAEpD;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN,gDAAgD;;AAEhD;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,WAAW,uBAAuB;AAClC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA,oDAAoD;;AAEpD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,mCAAmC;;AAEnC,sCAAsC;;AAEtC,6BAA6B;;AAE7B;AACA,+CAA+C;;AAE/C,mCAAmC;;AAEnC;AACA,8BAA8B;;AAE9B;AACA,uCAAuC;;AAEvC,6BAA6B;;AAE7B;AACA,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C,uCAAuC;;AAEvC,yCAAyC;;AAEzC,iCAAiC;;AAEjC;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC,2CAA2C;;AAE3C,mCAAmC;;AAEnC;AACA,2CAA2C;;AAE3C,wCAAwC;;AAExC,8CAA8C;;AAE9C,+CAA+C;;AAE/C,gCAAgC;;AAEhC;AACA,2CAA2C;;AAE3C,+CAA+C;;AAE/C,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA,4BAA4B;AAC5B;;AAEA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,sCAAsC;;AAEtC,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,yCAAyC;;AAEzC,wCAAwC;;AAExC,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,wCAAwC;;AAExC,0CAA0C;;AAE1C,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA,2BAA2B;;AAE3B;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,uBAAuB;AACvB;;AAEA,uIAAuI;AACvI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,qCAAqC,mCAAmC;;AAExE;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC;AACA;AACA,mCAAmC;;AAEnC;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA,gCAAgC;AAChC,QAAQ;AACR;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,2BAA2B,eAAe;AAC1C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2DAA2D;AAC3D,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,uFAAuF;;AAEvF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,4BAA4B;AAC5B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4DAA4D;AAC5D;;AAEA,mBAAmB;;AAEnB;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,gEAAgE;AAChE,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;AAER;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,yBAAyB;;AAEzB,2EAA2E;;AAE3E;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B,iCAAiC;AACjC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E;;AAE/E,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;;AAEA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,wCAAwC;AACxC;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,+DAA+D;;AAE/D;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,6EAA6E;;AAE7E,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA,UAAU;;AAEV,+DAA+D;;AAE/D,gEAAgE;AAChE;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,iDAAiD;;AAEjD;AACA;AACA;AACA,0BAA0B;;AAE1B,mDAAmD;AACnD;AACA,UAAU;AACV;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA,UAAU;;AAEV,qCAAqC;AACrC;;AAEA,iFAAiF;;AAEjF;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO,KAAK,KAAK,WAAW,UAAU;AAC7E,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA,0HAA0H;AAC1H;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,4BAA4B;;AAE5B,iCAAiC,yCAAyC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA,yCAAyC;;AAEzC;AACA,OAAO;;AAEP;AACA,+CAA+C;;AAE/C;AACA;AACA,+BAA+B;AAC/B;;AAEA,gCAAgC;AAChC,OAAO;AACP;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,mBAAmB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,gCAAgC,QAAQ;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,gBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,kEAAkE;;AAElE,sDAAsD;;AAEtD,gDAAgD;AAChD;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA,kDAAkD;;AAElD,kDAAkD;;AAElD,sCAAsC;;AAEtC;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA,kDAAkD;AAClD,QAAQ;AACR,sCAAsC;;AAEtC,0CAA0C;;AAE1C,0CAA0C;;AAE1C;AACA,oBAAoB,oCAAoC;AACxD,4CAA4C;AAC5C;AACA;;AAEA,gDAAgD;;AAEhD,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ,uEAAuE;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG;;AAExG;AACA;AACA;AACA;AACA;AACA,4HAA4H;;AAE5H,0IAA0I;AAC1I;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,oCAAoC,SAAS;AAC7C;AACA,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;;AAEd,sEAAsE;;AAEtE,yBAAyB;;AAEzB;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV,kEAAkE;;AAElE;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,kBAAkB,2BAA2B;AAC7C;AACA,wCAAwC;;AAExC;AACA;AACA,UAAU;;AAEV;AACA;AACA,UAAU;;AAEV,0EAA0E;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,yDAAyD;;AAEzD,kEAAkE;AAClE;;AAEA,0CAA0C;;AAE1C,sDAAsD;;AAEtD,kBAAkB,8BAA8B;AAChD;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,QAAQ;AACR;;AAEA,sEAAsE;;AAEtE;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,kGAAkG;;AAElG,6FAA6F;;AAE7F;AACA;AACA;AACA,SAAS;AACT,OAAO,GAAG;;AAEV,2EAA2E;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,+HAA+H;AAC/H;;AAEA;AACA;AACA,oGAAoG;;AAEpG;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,sGAAsG;;AAEtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH;;AAEpH;AACA,YAAY;;AAEZ;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO;AACP,iFAAiF;;AAEjF;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B;AACA,cAAc,QAAQ;AACtB;AACA,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,eAAe,2BAA2B;AAC1C;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;;AAEA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,sBAAsB;;AAEtB,iBAAiB;;AAEjB,mBAAmB;;AAEnB,wBAAwB;;AAExB;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,gBAAgB,UAAU;AAC1B,gBAAgB,yBAAyB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mBAAmB;AACnB,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,eAAe;;AAEf,iDAAiD;;AAEjD;AACA,6CAA6C;;AAE7C,mFAAmF;;AAEnF,yCAAyC;;AAEzC;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,sBAAsB,YAAY;AAClC,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA,0DAA0D;;AAE1D,2DAA2D;;AAE3D;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA,sCAAsC;AACtC;;AAEA,+FAA+F;;AAE/F;AACA;AACA,sCAAsC;;AAEtC,gFAAgF;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA,oBAAoB;;AAEpB,qDAAqD;;AAErD;AACA;AACA;AACA,sBAAsB;;AAEtB,uDAAuD;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,WAAW,6CAA6C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,gBAAgB,UAAU;AAC1B;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0EAAQ,GAAG;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA,eAAe,0FAAuB,qBAAqB;AAC3D;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB,+CAA+C,IAAI;AAC1G;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,kDAAkD;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iEAAiE;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA,MAAM,2FAAwB;AAC9B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,wBAAwB,0FAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,+BAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,2BAA2B,qFAAoB,IAAI,KAAK,EAAE,QAAQ;AAClE,GAAG;AACH;AACA;AACA,0BAA0B,WAAW,8BAA8B,6BAA6B;AAChG;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,iBAAiB,QAAQ;AACzB,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kFAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,qEAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6DAAe;AAClD;AACA;AACA;AACA,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6DAAe;AAC1C;AACA;AACA;AACA,6BAA6B,6DAAe,YAAY;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,8DAA8D;AAC9D;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,qFAAqF;AACrF;;AAEA,iGAAiG;AACjG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,8FAA8F;AAC9F;;AAEA,6HAA6H;;AAE7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mCAAmC,QAAQ,MAAM;AACzE;AACA;AACA;AACA;AACA,IAAI;;AAEJ,uFAAuF;;AAEvF,yEAAyE;;AAEzE;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA,gHAAgH;;AAEhH,qKAAqK;AACrK;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,sBAAsB,mCAAmC,QAAQ,MAAM;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA,gDAAgD,uEAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,uEAAyB;AAC3E;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;AAChB;;AAEA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2GAA2G;;AAE3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA,8EAA8E;;AAE9E,mEAAmE;AACnE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;;AAEA,oCAAoC,0DAAc;AAClD;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG,IAAI,GAAG;;AAEV,sGAAsG;;AAEtG;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA,KAAK;AACL,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,EAAE;AACxE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA,sBAAsB,cAAc,GAAG,YAAY,GAAG,SAAS;AAC/D;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ,iEAAiE,qEAAgB;AACjF;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,SAAS;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,iDAAiD,qEAAgB;AACjE,6CAA6C,qEAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,0BAA0B;;AAE1B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE,IAAI;AACJ;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,YAAY,MAAM,GAAG,YAAY,GAAG,iBAAiB,+BAA+B,UAAU,GAAG,mBAAmB,kCAAkC,eAAe,KAAK,YAAY,yCAAyC,YAAY,KAAK,SAAS,+BAA+B,eAAe,mBAAmB,SAAS,mBAAmB,SAAS,sBAAsB,UAAU,mBAAmB,GAAG;AACrZ;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,aAAa;AACxB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,iBAAiB,2DAAe,QAAQ,2DAAe;AACvD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,sDAAsD,wBAAwB,qBAAqB,yBAAyB,yBAAyB,iBAAiB,qCAAqC,sBAAsB,kCAAkC,eAAe;AAClR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,6BAA6B;;AAE7B;AACA;AACA,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER,iCAAiC;;AAEjC;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,0BAA0B,aAAa,KAAK,SAAS;AACrD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,qCAAqC,OAAO,KAAK,kCAAkC,KAAK;AACxF;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA,MAAM;AACN;;AAEA;AACA,uCAAuC,kBAAkB,KAAK;AAC9D;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,kEAAkE;AAClE;AACA;;AAEA;AACA;AACA,2DAA2D,eAAe;AAC1E,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB,aAAa,SAAS;AACtB;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kDAAkD,KAAK,cAAc,MAAM;AAC3E;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA,qFAAqF;;AAErF,6EAA6E;;AAE7E,mGAAmG;AACnG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,sEAAsE,YAAY,mBAAmB,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,0KAA0K;AAC1K;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+IAA+I;AAC/I;AACA;;AAEA,sHAAsH;AACtH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,IAAI,UAAU,IAAI,KAAK,IAAI;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,WAAW,KAAK,SAAS,MAAM,UAAU;AAChF,oFAAoF;AACpF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C,gDAAgD;;AAEhD,6EAA6E;AAC7E;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,2EAA2E;;AAE3E;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA,kEAAkE;AAClE;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,iBAAiB,uBAAuB,4CAA4C,uBAAuB,4CAA4C;AACvS;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6CAA6C;AAC7C;;AAEA;AACA,0EAA0E,kBAAkB;AAC5F;AACA,gEAAgE,gBAAgB;AAChF,qCAAqC;AACrC;;AAEA,6CAA6C,+DAAmB;AAChE;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;AACA,kBAAkB,MAAM,YAAY,aAAa,6BAA6B,wBAAwB,cAAc,wBAAwB,IAAI;AAChJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0EAAQ,GAAG;AACnC;AACA,SAAS;AACT,QAAQ,0EAAQ;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,6BAA6B;;AAE7B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+BAA+B,IAAI;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,wBAAwB,gCAAgC,gCAAgC,QAAQ,OAAO,MAAM,IAAI,QAAQ;AACzH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,6HAA6H;AAC7H;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,SAAS,uCAAuC,mCAAmC;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA,+DAA+D,+BAA+B;AAC9F;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,0BAA0B,sCAAsC,EAAE,+BAA+B;AACjG;AACA;AACA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,4EAA4E,qBAAqB,uCAAuC,mCAAmC;AAC3K;AACA;AACA,uCAAuC;AACvC;;AAEA,iFAAiF;;AAEjF,+GAA+G;AAC/G;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB,IAAI,6DAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,gEAAgE,YAAY;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC,KAAK;AAC7C;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE,yDAAyD,UAAU;AACnE;AACA,mBAAmB,KAAK;AACxB;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,+CAA+C,uBAAuB,KAAK,cAAc,WAAW,KAAK;AACzG;AACA;AACA,MAAM;AACN,+CAA+C,QAAQ,+FAA+F,wBAAwB,KAAK,KAAK;AACxL;AACA;AACA;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA;AACA,MAAM;AACN,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,qCAAqC,KAAK,qBAAqB,OAAO;AACtE;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,6DAA6D,YAAY;AACzE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA,6DAA6D,SAAS;AACtE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA,MAAM;AACN,6CAA6C,KAAK;AAClD;AACA,GAAG;AACH;AACA;AACA,iBAAiB,gFAAe;AAChC,oCAAoC,KAAK,oBAAoB,OAAO;AACpE;AACA,kEAAkE,UAAU;AAC5E,8DAA8D,UAAU;AACxE;AACA,qBAAqB,KAAK;AAC1B,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B;AAC3F;AACA;AACA,MAAM;AACN,uDAAuD,KAAK;AAC5D;AACA,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,iBAAiB,gFAAe,SAAS;AACzC;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B,KAAK,MAAM;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oCAAoC,KAAK;AACzC;AACA,2BAA2B,MAAM,4DAA4D;AAC7F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,KAAK;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,kEAAoB,IAAI,kEAAoB,qBAAqB,kEAAoB;AAC/H;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,WAAW,mEAAqB,IAAI,mEAAqB,qBAAqB,mEAAqB;AACnG;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,cAAc;AAC1D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gBAAgB,KAAK;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA,gFAAgF;;AAEhF;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C,eAAe,6DAAe;AAC9B,uCAAuC;AACvC;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,uEAAuE,6DAAe;AACtF,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA,eAAe,kEAAoB;AACnC,oBAAoB,kEAAoB;AACxC,MAAM;AACN,gBAAgB,2DAAe;AAC/B;AACA;AACA,uBAAuB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qEAAgB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA,kBAAkB,6DAAe;AACjC,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA,sDAAsD;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0BAA0B;AAC1B,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA,2BAA2B;;AAE3B,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW,IAAI,aAAa,+BAA+B,aAAa,WAAW,mBAAmB,sBAAsB,2BAA2B,iEAAiE,wBAAwB;AACnR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;AAEA;AACA,qFAAqF;;AAErF;AACA,8EAA8E,mBAAmB;AACjG;AACA,MAAM;AACN;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0BAA0B,wBAAwB,mCAAmC;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qBAAqB,gBAAgB,gBAAgB,cAAc,mBAAmB;AACxI;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,SAAS;AACzB;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,QAAQ;AACR;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,gBAAgB,SAAS;AACzB;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,uBAAuB,qBAAqB;AAC5C,6BAA6B;;AAE7B;AACA,oHAAoH;;AAEpH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,GAAG;AACrB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA+D;;AAE/D;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,6FAA6F;AAC7F;;AAEA;AACA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,iEAAiE,cAAc,KAAK,eAAe;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN,gEAAgE;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ,WAAW,aAAa;AAClE;AACA,iCAAiC;AACjC;AACA,UAAU;AACV;AACA,UAAU;AACV,4FAA4F;AAC5F;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,8BAA8B;AAC9B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,YAAY;AACvB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA,iEAAiE;;AAEjE;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN,8GAA8G;;AAE9G,uFAAuF;;AAEvF;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD,6EAA6E,KAAK;AAClF;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+CAA+C,MAAM;AACrD,yDAAyD,cAAc;AACvE;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,kCAAkC,0DAAY;AAC9C,qCAAqC,0DAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,4CAA4C,yDAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA;AACA;AACA,kEAAkE;;AAElE,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,+DAAmB;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,2CAA2C,iDAAiD,KAAK,gBAAgB;AACjH;AACA,WAAW,eAAe;AAC1B;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,uEAAuE;AACvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA,mIAAmI;AACnI;;AAEA;AACA,WAAW,eAAe,oCAAoC,UAAU,IAAI,sBAAsB;AAClG;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,qBAAqB,eAAe,yCAAyC,eAAe,IAAI,cAAc;AAC9G;AACA,8DAA8D,eAAe,IAAI,oBAAoB;AACrG;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,qBAAqB,eAAe,0CAA0C,eAAe,KAAK,mBAAmB;AACrH;AACA,6DAA6D,eAAe,IAAI,cAAc;AAC9F;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kEAAoB;AAC/C;AACA;AACA;AACA,qFAAqF;;AAErF;AACA,+EAA+E;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,KAAK,aAAa;;AAElB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO,KAAK,OAAO,OAAO,MAAM;AACnE;AACA;AACA,sCAAsC,MAAM;AAC5C,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kEAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA,oDAAoD;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,uCAAuC;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG;;AAEZ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER,iCAAiC;;AAEjC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,4EAA4E;;AAE5E;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;;AAEA;AACA,4DAA4D,qBAAqB;AACjF,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uIAAuI;AACvI;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iDAAiD,4BAA4B,qBAAqB,QAAQ,cAAc,wBAAwB,gBAAgB,KAAK;;AAElL;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,gIAAgI;;AAEhI;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,KAAK;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;;AAEA,4GAA4G;;AAE5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA;AACA;AACA,sEAAsE,gFAAmB;AACzF;AACA;AACA,0BAA0B,iDAAiD,gFAAmB,CAAC;AAC/F;AACA;AACA,gGAAgG,gFAAmB,EAAE;;AAErH;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN,wDAAwD,qFAAoB,UAAU,mFAAkB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4CAA4C,YAAY,KAAK,kBAAkB,8BAA8B,aAAa;AAC1H,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,8BAA8B,uCAAuC;AAClG;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B,4EAAW,iDAAiD;AACtF,0BAA0B,4EAAW,6BAA6B;AAClE;AACA,kCAAkC,iCAAiC,QAAQ,aAAa;AACxF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,uDAAuD,0BAA0B;AACjF;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA;AACA,uCAAuC,YAAY;AACnD;AACA;AACA;AACA,kCAAkC,YAAY,mBAAmB,uBAAuB;AACxF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,4EAAW;AAC9C;AACA,yCAAyC,4EAAW;AACpD,yCAAyC,4EAAW;AACpD;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,8CAA8C,kBAAkB,SAAS,YAAY;AACrF,QAAQ;AACR;;AAEA;AACA,2DAA2D,4EAAW;AACtE,2DAA2D,4EAAW,kCAAkC;;AAExG;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG,UAAU;;AAEV;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG;AACA;AACA;AACA;AACA,kCAAkC,WAAW,IAAI,8BAA8B;AAC/E;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uJAAuJ;AACvJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG;AACvG;;AAEA;AACA;AACA,qFAAqF;;AAErF;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,gCAAgC,YAAY,MAAM,2BAA2B;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK,kEAAkE;AACnF;AACA;;AAEA,YAAY,KAAK,iEAAiE;AAClF;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,KAAK;AACnB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB;AACA,OAAO;AACP;AACA,QAAQ,iEAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B,MAAM;;AAEN,oCAAoC,+DAAmB;AACvD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,KAAK;AACpD,gBAAgB,KAAK;AACrB,oEAAoE,MAAM;AAC1E;AACA,YAAY,KAAK;AACjB,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA,yDAAyD,KAAK;AAC9D,YAAY,KAAK,wBAAwB;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,2BAA2B,QAAQ,KAAK,qBAAqB,EAAE,MAAM;AACrE;AACA;AACA,KAAK,GAAG;;AAER,gBAAgB,KAAK;AACrB;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA,mBAAmB,KAAK;AACxB,KAAK;AACL;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,8BAA8B,MAAM;AACpC,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,aAAa,2BAA2B,yBAAyB,oBAAoB,OAAO;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA,sIAAsI;AACtI;;AAEA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA,sEAAsE;AACtE;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB,kCAAkC,YAAY,gBAAgB,OAAO;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,aAAa,uCAAuC,uBAAuB,KAAK,oBAAoB,yEAAyE;;AAE9M;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,YAAY,8CAA8C,UAAU;AAC1H;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,4DAA4D;;AAE5D;AACA,iCAAiC,aAAa,iBAAiB,mBAAmB;AAClF;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD,WAAW,KAAK,QAAQ,iCAAiC,YAAY;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ;;AAEvJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oCAAoC,MAAM;AAC1C;AACA,KAAK;AACL;AACA,oCAAoC,MAAM;AAC1C;AACA,yCAAyC,MAAM;AAC/C;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,gBAAgB;AAC3B;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4EAAW;AACxC;AACA;AACA;AACA;AACA,2BAA2B,gFAAe;AAC1C,2BAA2B,gFAAe,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG,GAAG;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA,uBAAuB,iEAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gBAAgB,oEAAsB,WAAW;;AAEjD;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gCAAgC,oEAAsB;AACtD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA,YAAY,wDAAQ;AACpB,gCAAgC,0EAA0B,IAAI,gFAAgC,IAAI,6EAA6B,IAAI,4EAA4B;AAC/J;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,6IAA6I;;AAE7I;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,+BAA+B,+FAAwB,QAAQ;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,sIAAsI;AACtI;;AAEA;AACA,+FAA+F;;AAE/F;AACA,6DAA6D;AAC7D;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA,oFAAoF;AACpF;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qCAAqC,gEAAkB,eAAe,gEAAkB,kBAAkB,gEAAkB;AAC5H;AACA;AACA;AACA;AACA,iGAAiG;AACjG;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6EAA6E;AAC7E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK;AACL,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA,2BAA2B,wDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,4SAA4S;;AAE5S;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kEAAkE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,0DAAY;AAC5C,MAAM,wDAAY;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,uBAAuB,+FAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,SAAS,qFAAoB;AAC7B,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8B;;;;;;;;;;;AChgkD9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA,UAAU,mBAAO,CAAC,0DAAU;AAC5B,UAAU,mBAAO,CAAC,gEAAa;AAC/B,aAAa,mBAAO,CAAC,sEAAgB;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc,uBAAuB;AACxD;AACA,eAAe,mBAAO,CAAC,0DAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,IAAI,MAAM,IAAI,QAAQ,EAAE;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gDAAgD;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,+BAA+B;AAC/B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gDAAgD,aAAa;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACt0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;ACtIA;;;;;;;;;;ACAA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA;AACA,2BAA2B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;;;;;;ACdvE;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,kCAAkC;AACxD;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;;AAEA,4CAA4C,IAAI;;AAEhD;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,IAAI;AACJ,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,sDAAsD;AAC7G;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,+BAA+B;AACrD;AACA;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC,yEAAyE,SAAS;AAClF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE;AACxE,2CAA2C;;AAE3C,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,qDAAS;AAC5B,qBAAqB,uDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,gBAAgB,gBAAgB;AAChC,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;;AAE9B,kBAAkB,gBAAgB;AAClC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;;AAEA,cAAc,iBAAiB;AAC/B;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA,MAAM;AACN,kBAAkB,qBAAqB;AACvC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC,qCAAqC;;AAErC;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,kBAAkB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB;;AAEvB,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA,gBAAgB,kBAAkB;AAClC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH,EAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,SAAS;AACT,0BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,CAAC,EAAC;AACquB;;;;;;;;;;;;;;;;;;;;ACz9CtvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,YAAY;AACZ,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB;AACrB,8BAA8B;AAC9B;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B,uBAAuB;AACvB,gBAAgB;AAChB,kBAAkB;AAClB,KAAK;AACL;AACA;AACA,KAAK;AACL,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,eAAe;AACf,cAAc;AACd,cAAc;AACd,oBAAoB;AACpB,sBAAsB;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEkE;;;;;;;;;;;;;;;;;ACnJ3B;AACxB;AACf;AACA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA,MAAM;;AAEN;AACA,2CAA2C,MAAM;AACjD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACvC+C;AACA;AAC/C,iEAAe;AACf,eAAe;AACf,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;ACL8C;;AAE/C;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,8BAA8B,OAAO,8BAA8B;AAC1F;AACA,IAAI;AACJ,oBAAoB,8BAA8B;;AAElD;AACA,sBAAsB,8BAA8B;AACpD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,wDAAM;AACR;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA,CAAC;;;;;;;;;;;;;;;ACrCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnDyC;AACM;AAC/C,iEAAe;AACf,YAAY;AACZ,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACyC;AACR;AAC6B;AACR;AACF;AACE;AACN;AACM;AACN;AACT;AACM;AACE;AACV;AACF;AACa;AACT;AACU;AACR;AACF;AACe;AACjB;AACoB;AACzD;AACA,eAAe;AACf,QAAQ;AACR,WAAW;AACX,YAAY;AACZ,OAAO;AACP,MAAM;AACN,YAAY;AACZ,QAAQ;AACR,aAAa;AACb,eAAe;AACf,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,aAAa,wDAAM,GAAG;AACtB;;AAEA,qBAAqB,0DAAC;AACtB;AACA,MAAM,0DAAC;AACP,0BAA0B,wDAAM,GAAG;AACnC;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA,qBAAqB,kEAAU;AAC/B,oBAAoB,gEAAS;AAC7B;AACA,KAAK;AACL,qBAAqB,kEAAU;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,mEAAkB;AACxC;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;;AAER,yBAAyB,wDAAM,GAAG,EAAE,qDAAQ,qBAAqB;;AAEjE,oBAAoB,wDAAM,GAAG;AAC7B,4BAA4B,wDAAM,GAAG;AACrC,0BAA0B,wDAAM,GAAG,WAAW;;AAE9C;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;;;AAGN,eAAe,sDAAC,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0DAAC;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,4BAA4B;;AAE5B;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC,mBAAmB;AACzD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B,qCAAqC,EAAE,iBAAiB,eAAe,qCAAqC,EAAE,aAAa;AACzJ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;;AAErC,gBAAgB,0DAAC;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,+DAA+D;AAChF;;AAEA;AACA;AACA,oBAAoB,0DAAC,qDAAqD;;AAE1E;;AAEA;AACA;;AAEA;AACA,OAAO;;;AAGP;;AAEA;AACA,uBAAuB,uDAAW;AAClC;AACA,mBAAmB,0DAAC;AACpB;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN,2BAA2B;;AAE3B,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA,kCAAkC;;AAElC,gCAAgC;;AAEhC,2BAA2B;;AAE3B;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM,6DAAW;AACjB;;AAEA;AACA;AACA;;AAEA;AACA,IAAI,wDAAM;AACV;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,qDAAQ;AACnB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD,YAAY,iEAAM,EAAE,qEAAQ;AAC5B,iEAAe,MAAM;;;;;;;;;;;;;;;ACjmBrB,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;ACzHD;AACA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;AC3GwC;AACI;AACF;AACF;AACJ;AACF;AACE;AACrC;;AAEA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA,6HAA6H,oDAAQ;AACrI,IAAI;AACJ,2CAA2C,oDAAQ;AACnD;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,wDAAY;AACpC,uBAAuB,uDAAW;AAClC,sBAAsB,sDAAU;;AAEhC;AACA,sBAAsB,oDAAQ;AAC9B;;AAEA,mBAAmB,mDAAO;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA,CAAC;;;;;;;;;;;;;;;AChGc;AACf;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACZe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ,0CAA0C;;AAE1C;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Ce;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AClCsD;AACvC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ,uBAAuB,qDAAG;AAC1B,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qDAAG;AAC1B,EAAE,0DAAQ;AACV;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iFAAiF;AACjF;;AAEA;AACA,oFAAoF;AACpF;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC/IyC;AACL;AACQ;AAC7B;AACf,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4BAA4B,qDAAG;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,+CAA+C,0DAAC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ,gDAAgD;;AAEhD;AACA;;;;;;;;;;;;;;;;;;AC7NoD;AAChB;AACQ,CAAC;;AAE7C;AACA;AACA,sBAAsB,uDAAW,aAAa,qDAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEe;AACf;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;;AAE9C;;AAEA;AACA,gBAAgB,0DAAC;AACjB;;AAEA,sFAAsF,sBAAsB;AAC5G,8DAA8D;;AAE9D;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wBAAwB,qDAAG;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,0DAAC;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACjH+C;AACI;AACnD,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACRuC;AACQ;AAC/C,iEAAe;AACf,WAAW;AACX,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;;ACLsC;AACH;AACrB;AACf,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA,oBAAoB,0DAAC;;AAErB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpCe;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClByC;AACN;AACQ;AAC3C,iEAAe;AACf,YAAY;AACZ,SAAS;AACT,aAAa;AACb,CAAC;;;;;;;;;;;;;;;;;ACPwC;AACL;AACrB;AACf;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI,UAAU;;AAEd,uDAAuD,0DAAC;AACxD,yBAAyB,kBAAkB,GAAG,2BAA2B;AACzE,sCAAsC,kBAAkB;;AAExD;AACA;;AAEA;AACA,sBAAsB,oBAAoB;AAC1C,0BAA0B,0DAAC,4CAA4C,mBAAmB,EAAE,uBAAuB;AACnH;AACA;;AAEA,sCAAsC,kBAAkB;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH,kBAAkB,yBAAyB;AAC3C,qBAAqB,0DAAC;AACtB;;AAEA,yCAAyC,QAAQ;AACjD,sBAAsB,0DAAC;AACvB;AACA;;;;;;;;;;;;;;;AC1De;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,0BAA0B,kBAAkB,GAAG,2BAA2B,IAAI,kBAAkB,GAAG,uBAAuB;AAC1H;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxC4C;AAC7B;AACf,uCAAuC;AACvC;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,wDAAM;AACV;AACA;;;;;;;;;;;;;;;;ACrCuC;AACxB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iBAAiB,qDAAS;;AAE1B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB,6BAA6B;AACnD;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;;;;;AC1EuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;ACnEmC;AACQ;AACJ;AACA;AACE;AACQ;AACU;AAC3D,iEAAe;AACf,SAAS;AACT,aAAa;AACb,WAAW;AACX,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,qBAAqB;AACrB,CAAC;;;;;;;;;;;;;;;ACfD;AACe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC7BA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC9DA;AACe;AACf;AACA;AACA;;;;;;;;;;;;;;;;ACJ6D;AAC9C;AACf;AACA,+FAA+F,aAAa;AAC5G;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA,4FAA4F,MAAM;AAClG,MAAM;AACN;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;;AAE1C,oCAAoC;;AAEpC;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,sDAAsD,0BAA0B;;AAEnI;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACpLoC;AACa;AAClC;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,0DAAC;;AAE1B;AACA;AACA;AACA,+CAA+C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC5I,QAAQ,0DAAQ;AAChB;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,6CAA6C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC1I,MAAM,0DAAQ;AACd;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACtCA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC/Be;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACT+C;AACI;AACJ;AAC/C,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACPc;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACRe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,kDAAkD,mDAAmD;AACrG;;AAEA,2BAA2B,KAAK;;AAEhC;AACA;AACA,yCAAyC,KAAK;AAC9C;AACA;;AAEA,wCAAwC,KAAK;;AAE7C;AACA,wCAAwC,KAAK;AAC7C,MAAM;AACN,wCAAwC,KAAK;AAC7C;AACA;AACA;;;;;;;;;;;;;;;;AChCiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACfiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AClBqD;AACtC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,8DAAY;AACrC;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACrB6C;AACA;AACA;AACA;AACF;AAC3C,iEAAe;AACf,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,aAAa;AACb,CAAC;;;;;;;;;;;;;;;ACXc;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAE;AAC1D;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC/C6D;AAC9C;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E,kFAAkF,+BAA+B;;AAEhM;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACpFyC;AACI;AACQ;AACI;AACI;AACZ;AACU;AACJ;AACE;AACzD,iEAAe;AACf,YAAY;AACZ,cAAc;AACd,kBAAkB;AAClB,oBAAoB;AACpB,sBAAsB;AACtB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,oBAAoB;AACpB,CAAC;;;;;;;;;;;;;;;ACnBc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,uEAAuE,UAAU;AACjF;;;;;;;;;;;;;;;;AChDoC;AACrB;AACf;AACA;AACA,gBAAgB,0DAAC,gBAAgB,kBAAkB;AACnD;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC,0DAAC;AACtC,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnCe;AACf;;AAEA;AACA,qDAAqD;;AAErD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjDe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AChCuD;AACxC;AACf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA,GAAG,EAAE;AACL;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA,IAAI,gEAAc;AAClB,IAAI,gEAAc;AAClB;;AAEA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,GAAG;;AAEH,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA,yDAAyD,UAAU;AACnE;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,gBAAgB,yCAAyC;AACzD,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,yCAAyC;AAChF,KAAK;AACL;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,IAAI,gEAAc,yDAAyD,aAAa;AACxF,IAAI,gEAAc,wDAAwD,kEAAkE;AAC5I;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,wBAAwB,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kCAAkC,EAAE,gCAAgC,EAAE,+BAA+B;AAC1M;;AAEA;AACA,6CAA6C,kBAAkB,4BAA4B,YAAY;AACvG,IAAI;AACJ;AACA,IAAI;;;AAGJ;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,UAAU;AAC1H,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,UAAU;AACpH;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;;AAEA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;;;;;;;;;;;;;;;ACPoC;AACrB;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,0DAAC;AAC1B;;;;;;;;;;;;;;;;;AC3CoE;AAChC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD,4BAA4B,QAAQ,IAAI,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,0DAAC;;AAEvB;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,0CAA0C,0EAAiB;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;;AAEzB;AACA;;AAEA;AACA;AACA,0EAA0E,EAAE,OAAO,EAAE;AACrF;AACA;;AAEA,2BAA2B,2CAA2C;AACtE;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,iEAAiE,oBAAoB;AACrF;AACA;AACA,iCAAiC;;AAEjC;AACA,2BAA2B,0DAAC;AAC5B;;AAEA,cAAc,0DAAC;AACf;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA,mEAAmE,EAAE,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE;AAC9H;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,0CAA0C,0EAAiB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,2CAA2C,0EAAiB;AAC5D;AACA;;AAEA;AACA,iBAAiB,0DAAC,iBAAiB,qCAAqC;AACxE,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrSA;;AAEA;AACyC;AACQ;AAClC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,0DAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA,kEAAkE;AAClE;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,qBAAqB,uDAAW;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,uDAAW;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,uDAAW;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC7NA,kCAAkC,iBAAiB;AACF;AAClC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA,mBAAmB;AACnB;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,0DAAQ;AAClB;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;AC9LyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,sBAAsB;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;;AAEA;AACA;AACA,qBAAqB,GAAG,QAAQ,2BAA2B;AAC3D,QAAQ;AACR;AACA,qBAAqB,GAAG,SAAS,2BAA2B;AAC5D,QAAQ;AACR,gBAAgB,GAAG;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,2BAA2B,OAAO,2BAA2B;AACzG;AACA,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG;AACvC,kBAAkB,OAAO;AACzB,gBAAgB,YAAY;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;AC5HyD;AACJ;AACI;AAC1C;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA,oCAAoC;;AAEpC;AACA;AACA;;AAEA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,KAAK,WAAW,KAAK,WAAW,eAAe,QAAQ,eAAe,QAAQ,aAAa,MAAM;AACxJ,wBAAwB,oEAAY;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,oEAAY;AACxC;;AAEA;AACA,2BAA2B,oEAAY;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACtGyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,cAAc,MAAM;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,oDAAoD,OAAO;AAC3D;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;;AAGR;AACA,2BAA2B,MAAM,QAAQ,0CAA0C,IAAI,gCAAgC;AACvH,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA,sCAAsC,KAAK,eAAe,KAAK,eAAe,KAAK;AACnF,0DAA0D,qDAAqD,cAAc,qDAAqD;AAClL;AACA,uCAAuC,gBAAgB,IAAI,cAAc,EAAE,YAAY,GAAG;;AAE1F;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;ACzJoC;AACiB;AACtC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC,SAAS;AACT,QAAQ;AACR;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,+BAA+B,eAAe,8BAA8B,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG;;AAEvJ;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,oCAAoC,8BAA8B;AAC5F;AACA;;AAEA;AACA,wBAAwB,0DAAC,oCAAoC,kCAAkC;AAC/F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D,sCAAsC,eAAe;AACrD,KAAK;;AAEL;AACA;AACA,oDAAoD,sCAAsC,MAAM,iBAAiB,yCAAyC,mBAAmB;AAC7K,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO,OAAO,OAAO,qBAAqB,0BAA0B,MAAM,2BAA2B;AAChJ;AACA;;AAEA;AACA,8CAA8C,QAAQ,cAAc,0CAA0C,eAAe,2CAA2C;AACxK;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;ACnLqD;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO,2BAA2B,GAAG,MAAM,GAAG;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACrEyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,oEAAY;AACrC;;AAEA;AACA,wBAAwB,oEAAY;AACpC;;AAEA;AACA;AACA;;AAEA,uCAAuC,GAAG,MAAM,GAAG,mBAAmB,QAAQ,eAAe,QAAQ;AACrG,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;ACrG4C;AAC7B;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,YAAY,qDAAG;AACf,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB,yBAAyB,qDAAG;AAC5B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;;AAGA,0BAA0B,qDAAG;AAC7B;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;;AAEA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;;AAGR;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACpPe;AACf;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM,sBAAsB;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,8EAA8E,aAAa;AAC3F;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,uCAAuC,kCAAkC;AACzE,KAAK;;AAEL;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnHoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,sDAAsD,yBAAyB,cAAc,QAAQ;AACrG;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kDAAkD,uDAAuD;AACzG;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC/FuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,KAAK,GAAG,IAAI,GAAG,MAAM;AACtC,MAAM;AACN,iBAAiB,IAAI,GAAG,MAAM;AAC9B;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;;AAE5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrJA;AACoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,iCAAiC,yBAAyB,wCAAwC,+BAA+B;AACjI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA,MAAM;AACN;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AClIuC;AACH;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB,4BAA4B,MAAM;AAC3H,sCAAsC,oBAAoB,QAAQ,mBAAmB,SAAS,oBAAoB;;AAElH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,WAAW;AAC9D;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,0DAAC;;AAE/B;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,sBAAsB;;AAEhD;AACA;;AAEA;AACA,0FAA0F,mBAAmB,UAAU,kCAAkC;AACzJ;AACA,YAAY;AACZ,mEAAmE,kCAAkC,4BAA4B,mBAAmB;AACpJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,wBAAwB,4BAA4B,MAAM;AAC9F;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA,eAAe,0DAAC;AAChB;;AAEA,aAAa,0DAAC;AACd;;AAEA;;AAEA;AACA,8BAA8B,+BAA+B;AAC7D,kCAAkC,0DAAC,4CAA4C,0DAAC;AAChF;AACA,OAAO;AACP,MAAM;AACN,gCAAgC,iCAAiC;AACjE;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2EAA2E;;AAE3E,kDAAkD,cAAc;AAChE;AACA,UAAU;;;AAGV,+BAA+B,iBAAiB;AAChD;AACA;AACA,QAAQ;AACR,kDAAkD,4BAA4B;AAC9E;AACA,kDAAkD,4BAA4B;AAC9E;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA,iEAAiE,0DAAC,wCAAwC,0DAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,oBAAoB,wBAAwB;AAC5C;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;AC1RmD;AACE;AACR;AACM;AACQ;AAC5C;AACf;AACA,CAAC;AACD;AACA,iBAAiB,+DAAW;AAC5B,kBAAkB,gEAAY;AAC9B,cAAc,4DAAQ;AACtB,iBAAiB,+DAAW;AAC5B,qBAAqB,mEAAe;AACpC,GAAG;AACH;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjCe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;AC9CA;AACuC;AACH;AACkB;AACvC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,qDAAG;AACrD;AACA;AACA,MAAM;AACN;AACA;;;AAGA,+BAA+B,qDAAG;AAClC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;;AAGN,kDAAkD;;AAElD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA,8CAA8C;;AAE9C;AACA;AACA;;AAEA;AACA;AACA,4FAA4F;AAC5F,QAAQ,6EAA6E;AACrF,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA,SAAS;;AAET;AACA,mCAAmC;AACnC;;AAEA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA,aAAa,MAAM,aAAa;AAChC;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;;;AAGV,mDAAmD;;AAEnD,0GAA0G;;AAE1G;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrasF;AAClD;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,0DAAC;;AAEb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,oFAAyB;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD,0DAAC,2BAA2B,0DAAC;AAC9E;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;ACxLoC;AACgC;AACkB;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B,4BAA4B,IAAI;AAChC,wBAAwB,IAAI;AAC5B,uBAAuB,IAAI;AAC3B,qBAAqB,IAAI;AACzB,sBAAsB,IAAI;AAC1B,+BAA+B,IAAI;AACnC,mCAAmC,IAAI;AACvC,yBAAyB,IAAI;AAC7B,oBAAoB,IAAI;AACxB,0BAA0B,IAAI;AAC9B,wBAAwB,IAAI;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,sCAAsC,kBAAkB,GAAG,SAAS,2BAA2B,kBAAkB,GAAG,SAAS,GAAG,SAAS;AACzI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D,6CAA6C;;AAE5G;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uGAAuG,yBAAyB,EAAE,OAAO;;AAEzI;AACA;AACA,0BAA0B,0DAAC;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,gBAAgB;AACnD,sCAAsC,yBAAyB;AAC/D;;AAEA;AACA;AACA,sDAAsD,QAAQ;AAC9D,2DAA2D,yBAAyB;AACpF;;AAEA,qFAAqF,yBAAyB;AAC9G,cAAc;AACd;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mEAAmE,cAAc;AACjF;AACA;;AAEA;AACA,eAAe,0EAAiB;AAChC,eAAe,0EAAiB;AAChC;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,eAAe,0EAAiB,sEAAsE,OAAO,WAAW,OAAO;AAC/H;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA,UAAU;AACV,gCAAgC,sBAAsB,SAAS,mBAAmB,MAAM,qBAAqB;AAC7G;AACA;;AAEA;AACA,2CAA2C,0EAAiB;AAC5D;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,oBAAoB,qCAAqC,kBAAkB;AACpH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,4BAA4B;AACrE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,oFAAyB;AACxD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;AACf;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,cAAc,0DAAC;AACf;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,qBAAqB,EAAE,YAAY;AACzD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,0EAAiB;AACvC;AACA,oBAAoB,0DAAC;AACrB;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,0EAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN,kGAAkG,0DAAC;AACnG;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACzZoC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN,gBAAgB,0DAAC;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,MAAM;AACN,aAAa,yBAAyB;AACtC;;AAEA;AACA,aAAa,2BAA2B;AACxC,MAAM;AACN,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,EAAE,IAAI,EAAE;AAC3C,MAAM;AACN;AACA,mCAAmC,EAAE,IAAI,EAAE,eAAe,aAAa;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACjHyC;AACL;AACa;AACqC;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C,kCAAkC,QAAQ;AAC1C,MAAM;AACN,4CAA4C,OAAO;AACnD,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C,MAAM;AACN,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,0DAAQ;AAC5B;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,8BAA8B,oFAAyB;AACvD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;;AAEf;AACA;AACA;;AAEA,+BAA+B,kCAAkC;;AAEjE;AACA,gBAAgB,0DAAC,gBAAgB,kCAAkC;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACxWiD;AACb;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;AACzB;AACA;;AAEA;AACA,8BAA8B,0DAAC;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,4FAA4F,aAAa;AACzG,4FAA4F,aAAa;AACzG,qEAAqE,oEAAoE,uFAAuF;AAChO;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,MAAM,SAAS,0DAAQ;AACvB,iDAAiD;AACjD;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,UAAU;;;AAGV,gHAAgH,iBAAiB;AACjI,gHAAgH,iBAAiB;;AAEjI;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU,2FAA2F;AACrG;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,sBAAsB;AAC5C,sEAAsE,qBAAqB;AAC3F;AACA,MAAM;AACN,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AC3MoC;AACmB;AACxC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C,0DAAC,kDAAkD,0DAAC,gBAAgB,yBAAyB,6BAA6B,MAAM,IAAI,MAAM;AACpL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,SAAS;AACtC;AACA;;AAEA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,yBAAyB;AAC1D,MAAM;AACN,iCAAiC,iBAAiB;AAClD;AACA,qCAAqC,yBAAyB,4BAA4B,EAAE;AAC5F;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mEAAmE,OAAO;AAC1E;AACA;;AAEA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,MAAM,gEAAc,+CAA+C,mBAAmB;AACtF;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;AClSuC;AACH;AACiB;AACtC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,uBAAuB,yBAAyB;AAC1E;AACA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D,WAAW;AACtE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2FAA2F,WAAW;AACtG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,8DAAY;AACjC,qBAAqB,8DAAY;AACjC;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAe,MAAM,eAAe;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe,MAAM,eAAe;AACnH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,0DAAC,uBAAuB,yBAAyB;AAC5E;;AAEA;AACA;AACA,4DAA4D,+BAA+B;AAC3F,UAAU;AACV;AACA;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,kEAAkE,WAAW,MAAM,WAAW;AAC9F,2EAA2E,WAAW;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0DAA0D,+BAA+B;AACzF,QAAQ;AACR;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,sDAAsD,kCAAkC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,uDAAuD,kCAAkC;AACzF;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACnmBe;AACf,aAAa;AACb,sBAAsB;AACtB;;;;;;;;;;;;;;;;ACHyC;AAC1B;AACf,mBAAmB,uDAAW;;AAE9B;AACA;AACA;AACA,8CAA8C,gBAAgB;;AAE9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;ACtByB;AACV;AACf,4CAA4C,WAAW,KAAK,OAAO;AACnE;AACA,gDAAgD,YAAY;;AAE5D;AACA,gBAAgB,mDAAC,mCAAmC,WAAW,KAAK,OAAO;AAC3E;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACZyU;AACzU;AACA,UAAU;AACV,aAAa;AACb,UAAU;AACV,aAAa;AACb,MAAM;AACN,YAAY;AACZ,WAAW;AACX,YAAY;AACZ,IAAI;AACJ,KAAK;AACL,SAAS;AACT,eAAe;AACf,YAAY;AACZ,aAAa;AACb,QAAQ;AACR,QAAQ;AACR,KAAK;AACL,MAAM;AACN,MAAM;AACN,MAAM;AACN,IAAI;AACJ,OAAO;AACP,IAAI;AACJ,QAAQ;AACR,SAAS;AACT,MAAM;AACN,SAAS;AACT,MAAM;AACN,SAAS;AACT,QAAQ;AACR,SAAS;AACT,SAAS;AACT,MAAM;AACN,UAAU;AACV,QAAQ;AACR,QAAQ;AACR;AACA;AACA,wBAAwB,mCAAC;AACzB;AACA;AACA,GAAG;AACH,CAAC;AACD,iEAAe,mCAAC;;;;;;;;;;;;;;;AC7CD;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8BAA8B,qCAAqC,EAAE,OAAO;;AAE5E;AACA,gCAAgC,qCAAqC;AACrE;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;AC9Be;AACf;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;AClCuC;AACvC;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACvBuC;AACO;AAC9C;;AAEA;AACA;AACA,EAAE,IAAI;AACN,kBAAkB,2DAAU;AAC5B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;;AAE3D;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;;AAEA,gEAAgE,YAAY,GAAG,aAAa;AAC5F;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACtDoD;AACpD;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA,QAAQ,WAAW;AACnB;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;;AAEA;AACA;AACA,MAAM,WAAW;AACjB;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,4DAA4D;AAClE;;;AAGA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;;AAEA,sDAAsD,iBAAiB;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE4D;AACM;AACG;AACM;AACA;AACA;AACH;AACH;AACZ;AACA;AACkB;AAClB;AACS;AACuB;AACpB;AACN;AACQ;AACd;AACwB;AACJ;AACA;AACA;AACe;AACH;;;;;;;UCnCzF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNwC;AAEa;AACW;AACA;AACJ;AACE;AACT;AAErDb,mEAAU,CAAC,CAAC;AACZoE,2EAAc,CAAC,CAAC;AAChBzC,6EAAqB,CAAC,CAAC;AACvBR,6EAAe,CAAC,CAAC;AACjBjC,yEAAe,CAAC,CAAC;AACjBqB,kEAAQ,CAAC,CAAC,C","sources":["webpack://gulp-builder/./node_modules/@fancyapps/ui/dist/fancybox.esm.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/byte-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/codec-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/codecs.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/containers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/ebml-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/id3-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/media-types.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/mp4-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/nal-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/opus-helpers.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/http-handler.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/index.js","webpack://gulp-builder/./src/js/components/accordion.js","webpack://gulp-builder/./src/js/components/burger-menu.js","webpack://gulp-builder/./src/js/components/paint-btn.js","webpack://gulp-builder/./src/js/components/scroll-smooth.js","webpack://gulp-builder/./src/js/components/sliders.js","webpack://gulp-builder/./src/js/components/video-player.js","webpack://gulp-builder/./node_modules/global/document.js","webpack://gulp-builder/./node_modules/global/window.js","webpack://gulp-builder/./node_modules/is-function/index.js","webpack://gulp-builder/./node_modules/keycode/index.js","webpack://gulp-builder/./node_modules/m3u8-parser/dist/m3u8-parser.es.js","webpack://gulp-builder/./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack://gulp-builder/./node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/stream.js","webpack://gulp-builder/./node_modules/mpd-parser/dist/mpd-parser.es.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js","webpack://gulp-builder/./node_modules/mux.js/lib/tools/parse-sidx.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/clock.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/numbers.js","webpack://gulp-builder/./node_modules/safe-json-parse/tuple.js","webpack://gulp-builder/./node_modules/smooth-scroll/dist/smooth-scroll.js","webpack://gulp-builder/./node_modules/url-toolkit/src/url-toolkit.js","webpack://gulp-builder/./node_modules/video.js/dist/video.es.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/browser-index.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vtt.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttcue.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttregion.js","webpack://gulp-builder/ignored|C:\\Users\\kiril\\OneDrive\\Рабочий стол\\Projects\\felix-gulp\\node_modules\\global|min-document","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/extends.js","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://gulp-builder/./node_modules/dom7/dom7.esm.js","webpack://gulp-builder/./node_modules/ssr-window/ssr-window.esm.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/getBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/index.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/setBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/check-overflow/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/addClasses.js","webpack://gulp-builder/./node_modules/swiper/core/classes/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/removeClasses.js","webpack://gulp-builder/./node_modules/swiper/core/core.js","webpack://gulp-builder/./node_modules/swiper/core/defaults.js","webpack://gulp-builder/./node_modules/swiper/core/events-emitter.js","webpack://gulp-builder/./node_modules/swiper/core/events/index.js","webpack://gulp-builder/./node_modules/swiper/core/events/onClick.js","webpack://gulp-builder/./node_modules/swiper/core/events/onResize.js","webpack://gulp-builder/./node_modules/swiper/core/events/onScroll.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchEnd.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchMove.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchStart.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/index.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/setGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/images/index.js","webpack://gulp-builder/./node_modules/swiper/core/images/loadImage.js","webpack://gulp-builder/./node_modules/swiper/core/images/preloadImages.js","webpack://gulp-builder/./node_modules/swiper/core/loop/index.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopCreate.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopDestroy.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopFix.js","webpack://gulp-builder/./node_modules/swiper/core/moduleExtendParams.js","webpack://gulp-builder/./node_modules/swiper/core/modules/observer/observer.js","webpack://gulp-builder/./node_modules/swiper/core/modules/resize/resize.js","webpack://gulp-builder/./node_modules/swiper/core/slide/index.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideNext.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slidePrev.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideReset.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideTo.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClosest.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToLoop.js","webpack://gulp-builder/./node_modules/swiper/core/transition/index.js","webpack://gulp-builder/./node_modules/swiper/core/transition/setTransition.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEmit.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEnd.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionStart.js","webpack://gulp-builder/./node_modules/swiper/core/translate/getTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/index.js","webpack://gulp-builder/./node_modules/swiper/core/translate/maxTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/minTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/setTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/translateTo.js","webpack://gulp-builder/./node_modules/swiper/core/update/index.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateActiveIndex.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateAutoHeight.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateProgress.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSize.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlides.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesClasses.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesOffset.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesProgress.js","webpack://gulp-builder/./node_modules/swiper/modules/a11y/a11y.js","webpack://gulp-builder/./node_modules/swiper/modules/autoplay/autoplay.js","webpack://gulp-builder/./node_modules/swiper/modules/controller/controller.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cards/effect-cards.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-creative/effect-creative.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cube/effect-cube.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-fade/effect-fade.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-flip/effect-flip.js","webpack://gulp-builder/./node_modules/swiper/modules/free-mode/free-mode.js","webpack://gulp-builder/./node_modules/swiper/modules/grid/grid.js","webpack://gulp-builder/./node_modules/swiper/modules/hash-navigation/hash-navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/history/history.js","webpack://gulp-builder/./node_modules/swiper/modules/keyboard/keyboard.js","webpack://gulp-builder/./node_modules/swiper/modules/lazy/lazy.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/manipulation.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/addSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/appendSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/prependSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/mousewheel/mousewheel.js","webpack://gulp-builder/./node_modules/swiper/modules/navigation/navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/pagination/pagination.js","webpack://gulp-builder/./node_modules/swiper/modules/parallax/parallax.js","webpack://gulp-builder/./node_modules/swiper/modules/scrollbar/scrollbar.js","webpack://gulp-builder/./node_modules/swiper/modules/thumbs/thumbs.js","webpack://gulp-builder/./node_modules/swiper/modules/virtual/virtual.js","webpack://gulp-builder/./node_modules/swiper/modules/zoom/zoom.js","webpack://gulp-builder/./node_modules/swiper/shared/classes-to-selector.js","webpack://gulp-builder/./node_modules/swiper/shared/create-element-if-not-defined.js","webpack://gulp-builder/./node_modules/swiper/shared/create-shadow.js","webpack://gulp-builder/./node_modules/swiper/shared/dom.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-init.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-target.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-virtual-transition-end.js","webpack://gulp-builder/./node_modules/swiper/shared/get-browser.js","webpack://gulp-builder/./node_modules/swiper/shared/get-device.js","webpack://gulp-builder/./node_modules/swiper/shared/get-support.js","webpack://gulp-builder/./node_modules/swiper/shared/utils.js","webpack://gulp-builder/./node_modules/swiper/swiper.esm.js","webpack://gulp-builder/webpack/bootstrap","webpack://gulp-builder/webpack/runtime/compat get default export","webpack://gulp-builder/webpack/runtime/define property getters","webpack://gulp-builder/webpack/runtime/global","webpack://gulp-builder/webpack/runtime/hasOwnProperty shorthand","webpack://gulp-builder/webpack/runtime/make namespace object","webpack://gulp-builder/./src/js/main.js"],"sourcesContent":["// @fancyapps/ui/Fancybox v4.0.31\nconst t=t=>\"object\"==typeof t&&null!==t&&t.constructor===Object&&\"[object Object]\"===Object.prototype.toString.call(t),e=(...i)=>{let s=!1;\"boolean\"==typeof i[0]&&(s=i.shift());let o=i[0];if(!o||\"object\"!=typeof o)throw new Error(\"extendee must be an object\");const n=i.slice(1),a=n.length;for(let i=0;i(t=parseFloat(t)||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t){return!!(t&&\"object\"==typeof t&&t instanceof Element&&t!==document.body)&&(!t.__Panzoom&&(function(t){const e=getComputedStyle(t)[\"overflow-y\"],i=getComputedStyle(t)[\"overflow-x\"],s=(\"scroll\"===e||\"auto\"===e)&&Math.abs(t.scrollHeight-t.clientHeight)>1,o=(\"scroll\"===i||\"auto\"===i)&&Math.abs(t.scrollWidth-t.clientWidth)>1;return s||o}(t)?t:s(t.parentNode)))},o=\"undefined\"!=typeof window&&window.ResizeObserver||class{constructor(t){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=t}observe(t){if(this.observables.some((e=>e.el===t)))return;const e={el:t,size:{height:t.clientHeight,width:t.clientWidth}};this.observables.push(e)}unobserve(t){this.observables=this.observables.filter((e=>e.el!==t))}disconnect(){this.observables=[]}check(){const t=this.observables.filter((t=>{const e=t.el.clientHeight,i=t.el.clientWidth;if(t.size.height!==e||t.size.width!==i)return t.size.height=e,t.size.width=i,!0})).map((t=>t.el));t.length>0&&this.callback(t),window.requestAnimationFrame(this.boundCheck)}};class n{constructor(t){this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY}}const a=(t,e)=>e?Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2):0,r=(t,e)=>e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t;class h{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=t,this.startPointers=[],this.currentPointers=[],this._pointerStart=t=>{if(t.buttons>0&&0!==t.button)return;const e=new n(t);this.currentPointers.some((t=>t.id===e.id))||this._triggerPointerStart(e,t)&&(window.addEventListener(\"mousemove\",this._move),window.addEventListener(\"mouseup\",this._pointerEnd))},this._touchStart=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerStart(new n(e),t)},this._move=t=>{const e=this.currentPointers.slice(),i=(t=>\"changedTouches\"in t)(t)?Array.from(t.changedTouches).map((t=>new n(t))):[new n(t)];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(this.currentPointers[e]=t)}this._moveCallback(e,this.currentPointers.slice(),t)},this._triggerPointerEnd=(t,e)=>{const i=this.currentPointers.findIndex((e=>e.id===t.id));return!(i<0)&&(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(t,e),!0)},this._pointerEnd=t=>{t.buttons>0&&0!==t.button||this._triggerPointerEnd(new n(t),t)&&(window.removeEventListener(\"mousemove\",this._move,{passive:!1}),window.removeEventListener(\"mouseup\",this._pointerEnd,{passive:!1}))},this._touchEnd=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerEnd(new n(e),t)},this._startCallback=e,this._moveCallback=i,this._endCallback=s,this._element.addEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.addEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.addEventListener(\"touchmove\",this._move,{passive:!1}),this._element.addEventListener(\"touchend\",this._touchEnd),this._element.addEventListener(\"touchcancel\",this._touchEnd)}stop(){this._element.removeEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.removeEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.removeEventListener(\"touchmove\",this._move,{passive:!1}),this._element.removeEventListener(\"touchend\",this._touchEnd),this._element.removeEventListener(\"touchcancel\",this._touchEnd),window.removeEventListener(\"mousemove\",this._move),window.removeEventListener(\"mouseup\",this._pointerEnd)}_triggerPointerStart(t,e){return!!this._startCallback(t,e)&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}}class l{constructor(t={}){this.options=e(!0,{},t),this.plugins=[],this.events={};for(const t of[\"on\",\"once\"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(t,e,...i){t=String(t);let s=(o=t,n=this.options,o.split(\".\").reduce((function(t,e){return t&&t[e]}),n));var o,n;return\"function\"==typeof s&&(s=s.call(this,this,...i)),void 0===s?e:s}localize(t,e=[]){return t=(t=String(t).replace(/\\{\\{(\\w+).?(\\w+)?\\}\\}/g,((t,i,s)=>{let o=\"\";s?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(o=this.option(`l10n.${i}`)),o||(o=t);for(let t=0;te))}on(e,i){if(t(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(\" \").forEach((t=>{const e=this.events[t]=this.events[t]||[];-1==e.indexOf(i)&&e.push(i)})),this}once(e,i){if(t(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(\" \").forEach((t=>{const e=(...s)=>{this.off(t,e),i.call(this,this,...s)};e._=i,this.on(t,e)})),this}off(e,i){if(!t(e))return e.split(\" \").forEach((t=>{const e=this.events[t];if(!e||!e.length)return this;let s=-1;for(let t=0,o=e.length;t1||Math.abs(e.left-this.dragStart.rect.left)>1))return t.preventDefault(),void t.stopPropagation();!1!==this.trigger(\"click\",t)&&this.option(\"zoom\")&&\"toggleZoom\"===this.option(\"click\")&&(t.preventDefault(),t.stopPropagation(),this.zoomWithClick(t))}onWheel(t){!1!==this.trigger(\"wheel\",t)&&this.option(\"zoom\")&&this.option(\"wheel\")&&this.zoomWithWheel(t)}zoomWithWheel(t){void 0===this.changedDelta&&(this.changedDelta=0);const e=Math.max(-1,Math.min(1,-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)),i=this.content.scale;let s=i*(100+e*this.option(\"wheelFactor\"))/100;if(e<0&&Math.abs(i-this.option(\"minScale\"))<.01||e>0&&Math.abs(i-this.option(\"maxScale\"))<.01?(this.changedDelta+=Math.abs(e),s=i):(this.changedDelta=0,s=Math.max(Math.min(s,this.option(\"maxScale\")),this.option(\"minScale\"))),this.changedDelta>this.option(\"wheelLimit\"))return;if(t.preventDefault(),s===i)return;const o=this.$content.getBoundingClientRect(),n=t.clientX-o.left,a=t.clientY-o.top;this.zoomTo(s,{x:n,y:a})}zoomWithClick(t){const e=this.$content.getClientRects()[0],i=t.clientX-e.left,s=t.clientY-e.top;this.toggleZoom({x:i,y:s})}attachEvents(){this.$content.addEventListener(\"load\",this.onLoad),this.$container.addEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.addEventListener(\"click\",this.onClick,{passive:!1}),this.initObserver();const t=new h(this.$container,{start:(e,i)=>{if(!this.option(\"touch\"))return!1;if(this.velocity.scale<0)return!1;const o=i.composedPath()[0];if(!t.currentPointers.length){if(-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(o.nodeName))return!1;if(this.option(\"textSelection\")&&((t,e,i)=>{const s=t.childNodes,o=document.createRange();for(let t=0;t=a.left&&i>=a.top&&e<=a.right&&i<=a.bottom)return n}return!1})(o,e.clientX,e.clientY))return!1}return!s(o)&&(!1!==this.trigger(\"touchStart\",i)&&(\"mousedown\"===i.type&&i.preventDefault(),this.state=\"pointerdown\",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0))},move:(e,i,s)=>{if(\"pointerdown\"!==this.state)return;if(!1===this.trigger(\"touchMove\",s))return void s.preventDefault();if(i.length<2&&!0===this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\"))return;if(i.length>1&&(!this.option(\"zoom\")||!1===this.option(\"pinchToZoom\")))return;const o=r(e[0],e[1]),n=r(i[0],i[1]),h=n.clientX-o.clientX,l=n.clientY-o.clientY,c=a(e[0],e[1]),d=a(i[0],i[1]),u=c&&d?d/c:1;this.dragOffset.x+=h,this.dragOffset.y+=l,this.dragOffset.scale*=u,this.dragOffset.time=Date.now()-this.dragPosition.time;const f=1===this.dragStart.scale&&this.option(\"lockAxis\");if(f&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=t>45&&t<135?\"y\":\"x\"}if(\"xy\"===f||\"y\"!==this.lockAxis){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset[\"x\"===this.lockAxis?\"y\":\"x\"]=0),this.$container.classList.add(this.option(\"draggingClass\")),this.transform.scale===this.option(\"baseScale\")&&\"y\"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option(\"baseScale\")&&\"x\"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const e=r(t.startPointers[0],t.startPointers[1]),i=e.clientX-this.dragStart.rect.x,s=e.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,s);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=n}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(e,i)=>{if(\"pointerdown\"!==this.state)return;if(this._dragOffset={...this.dragOffset},t.currentPointers.length)return void this.resetDragPosition();if(this.state=\"decel\",this.friction=this.option(\"decelFriction\"),this.recalculateTransform(),this.$container.classList.remove(this.option(\"draggingClass\")),!1===this.trigger(\"touchEnd\",i))return;if(\"decel\"!==this.state)return;const s=this.option(\"minScale\");if(this.transform.scale.01){const t=this.dragPosition.midPoint||e,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:t.clientX-i.left,y:t.clientY-i.top})}else;}});this.pointerTracker=t}initObserver(){this.resizeObserver||(this.resizeObserver=new o((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const t=this.$container.getBoundingClientRect();t.width&&t.height?((Math.abs(t.width-this.container.width)>1||Math.abs(t.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option(\"baseScale\"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option(\"friction\"),this.velocity={x:0,y:0,scale:0};const{x:t,y:e,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:t,y:e,scale:i},this.dragPosition={...this.dragPosition,x:t,y:e,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(t){!0!==t&&this.trigger(\"beforeUpdate\");const e=this.$container,s=this.$content,o=this.$viewport,n=s instanceof HTMLImageElement,a=this.option(\"zoom\"),r=this.option(\"resizeParent\",a);let h=this.option(\"width\"),l=this.option(\"height\"),c=h||(d=s,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(t=>Math.max(parseFloat(t.naturalHeight||0),parseFloat(t.height&&t.height.baseVal&&t.height.baseVal.value||0),parseFloat(t.offsetHeight||0),parseFloat(t.scrollHeight||0)))(s);Object.assign(s.style,{width:h?`${h}px`:\"\",height:l?`${l}px`:\"\",maxWidth:\"\",maxHeight:\"\"}),r&&Object.assign(o.style,{width:\"\",height:\"\"});const f=this.option(\"ratio\");c=i(c*f),u=i(u*f),h=c,l=u;const g=s.getBoundingClientRect(),p=o.getBoundingClientRect(),m=o==e?p:e.getBoundingClientRect();let y=Math.max(o.offsetWidth,i(p.width)),v=Math.max(o.offsetHeight,i(p.height)),b=window.getComputedStyle(o);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,a){if(Math.abs(c-g.width)>.1||Math.abs(u-g.height)>.1){const t=((t,e,i,s)=>{const o=Math.min(i/t||0,s/e);return{width:t*o||0,height:e*o||0}})(c,u,Math.min(c,g.width),Math.min(u,g.height));h=i(t.width),l=i(t.height)}Object.assign(s.style,{width:`${h}px`,height:`${l}px`,transform:\"\"})}if(r&&(Object.assign(o.style,{width:`${h}px`,height:`${l}px`}),this.viewport={...this.viewport,width:h,height:l}),n&&a&&\"function\"!=typeof this.options.maxScale){const t=this.option(\"maxScale\");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:t}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:h,fitHeight:l,width:h,height:l,scale:1,isZoomable:a},this.container={width:m.width,height:m.height},!0!==t&&this.trigger(\"afterUpdate\")}zoomIn(t){this.zoomTo(this.content.scale+(t||this.option(\"step\")))}zoomOut(t){this.zoomTo(this.content.scale-(t||this.option(\"step\")))}toggleZoom(t={}){const e=this.option(\"maxScale\"),i=this.option(\"baseScale\"),s=this.content.scale>i+.5*(e-i)?i:e;this.zoomTo(s,t)}zoomTo(t=this.option(\"baseScale\"),{x:e=null,y:s=null}={}){t=Math.max(Math.min(t,this.option(\"maxScale\")),this.option(\"minScale\"));const o=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===e&&(e=this.content.width*o*.5),null===s&&(s=this.content.height*o*.5);const{deltaX:n,deltaY:a}=this.getZoomDelta(t,e,s);e=this.content.x-n,s=this.content.y-a,this.panTo({x:e,y:s,scale:t,friction:this.option(\"zoomFriction\")})}getZoomDelta(t,e=0,i=0){const s=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,n=e>0&&s?e/s:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*t-s)*n,deltaY:(this.content.fitHeight*t-o)*a}}panTo({x:t=this.content.x,y:e=this.content.y,scale:i,friction:s=this.option(\"friction\"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:s,boundY:o}=this.getBounds(i);s&&(t=Math.max(Math.min(t,s.to),s.from)),o&&(e=Math.max(Math.min(e,o.to),o.from))}this.friction=s,this.transform={...this.transform,x:t,y:e,scale:i},s?(this.state=\"panning\",this.velocity={x:(1/this.friction-1)*(t-this.content.x),y:(1/this.friction-1)*(e-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger(\"startAnimation\"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if(\"pointerdown\"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(t){let e=this.boundX,s=this.boundY;if(void 0!==e&&void 0!==s)return{boundX:e,boundY:s};e={from:0,to:0},s={from:0,to:0},t=t||this.transform.scale;const o=this.content.fitWidth*t,n=this.content.fitHeight*t,a=this.viewport.width,r=this.viewport.height;if(oe.to),i&&(n=this.content.yi.to),s||o){let i=((s?e.from:e.to)-this.content.x)*t;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=e.from&&o<=e.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(n||a){let e=((n?i.from:i.to)-this.content.y)*t;const s=this.content.y+(e+this.velocity.y)/this.friction;s>=i.from&&s<=i.to&&(e+=this.velocity.y),this.velocity.y=e,this.recalculateTransform()}}setDragResistance(){if(\"pointerdown\"!==this.state)return;const{boundX:t,boundY:e}=this.getBounds(this.dragPosition.scale);let i,s,o,n;if(t&&(i=this.dragPosition.xt.to),e&&(o=this.dragPosition.ye.to),(i||s)&&(!i||!s)){const e=i?t.from:t.to,s=e-this.dragPosition.x;this.dragPosition.x=e-.3*s}if((o||n)&&(!o||!n)){const t=o?e.from:e.to,i=t-this.dragPosition.y;this.dragPosition.y=t-.3*i}}setDragForce(){\"pointerdown\"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(t){let e,s,o;if(t?(e=i(this.transform.x),s=i(this.transform.y),o=this.transform.scale,this.content={...this.content,x:e,y:s,scale:o}):(e=i(this.content.x),s=i(this.content.y),o=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:e,y:s}),this.trigger(\"beforeTransform\"),e=i(this.content.x),s=i(this.content.y),t&&this.option(\"zoom\")){let t,n;t=i(this.content.fitWidth*o),n=i(this.content.fitHeight*o),this.content.width=t,this.content.height=n,this.transform={...this.transform,width:t,height:n,scale:o},Object.assign(this.$content.style,{width:`${t}px`,height:`${n}px`,maxWidth:\"none\",maxHeight:\"none\",transform:`translate3d(${e}px, ${s}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${e}px, ${s}px, 0) scale(${o})`;this.trigger(\"afterTransform\")}endAnimation(t){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state=\"ready\",this.handleCursor(),!0!==t&&this.trigger(\"endAnimation\")}handleCursor(){const t=this.option(\"draggableClass\");t&&this.option(\"touch\")&&(1==this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\")?this.$container.classList.remove(t):this.$container.classList.add(t))}detachEvents(){this.$content.removeEventListener(\"load\",this.onLoad),this.$container.removeEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.removeEventListener(\"click\",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){\"destroy\"!==this.state&&(this.state=\"destroy\",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}d.version=\"4.0.31\",d.Plugins={};const u=(t,e)=>{let i=0;return function(...s){const o=(new Date).getTime();if(!(o-i{e.preventDefault(),e.stopPropagation(),this.carousel[\"slide\"+(\"next\"===t?\"Next\":\"Prev\")]()})),e}build(){this.$container||(this.$container=document.createElement(\"div\"),this.$container.classList.add(...this.option(\"classNames.main\").split(\" \")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton(\"next\"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton(\"prev\"),this.$container.appendChild(this.$prev))}onRefresh(){const t=this.carousel.pages.length;t<=1||t>1&&this.carousel.elemDimWidth=t-1&&this.$next.setAttribute(\"disabled\",\"\")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on(\"refresh change\",this.onRefresh)}detach(){this.carousel.off(\"refresh change\",this.onRefresh),this.cleanup()}}f.defaults={prevTpl:'',nextTpl:'',classNames:{main:\"carousel__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}};class g{constructor(t){this.carousel=t,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(t){this.target=this.carousel,this.nav=t,this.attachEvents()}addAsNavFor(t){this.target=t,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on(\"ready\",this.onNavReady),this.nav.on(\"createSlide\",this.onNavCreateSlide),this.nav.on(\"Panzoom.click\",this.onNavClick),this.target.on(\"change\",this.onTargetChange),this.target.on(\"Panzoom.afterUpdate\",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(t,e,i){const s=i.target.closest(\".carousel__slide\");if(!s)return;i.stopPropagation();const o=parseInt(s.dataset.index,10),n=this.target.findPageForSlide(o);this.target.page!==n&&this.target.slideTo(n,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){const t=this.target.pages[this.target.page].indexes[0],e=this.nav.findPageForSlide(t);this.nav.slideTo(e),this.markSelectedSlide(t)}markSelectedSlide(t){this.selectedIndex=t,[...this.nav.slides].filter((t=>t.$el&&t.$el.classList.remove(\"is-nav-selected\")));const e=this.nav.slides[t];e&&e.$el&&e.$el.classList.add(\"is-nav-selected\")}attach(t){const e=t.options.Sync;(e.target||e.nav)&&(e.target?this.addAsNavFor(e.target):e.nav&&this.addAsTargetFor(e.nav),this.friction=e.friction)}detach(){this.nav&&(this.nav.off(\"ready\",this.onNavReady),this.nav.off(\"Panzoom.click\",this.onNavClick),this.nav.off(\"createSlide\",this.onNavCreateSlide)),this.target&&(this.target.off(\"Panzoom.afterUpdate\",this.onTargetChange),this.target.off(\"change\",this.onTargetChange))}}g.defaults={friction:.92};const p={Navigation:f,Dots:class{constructor(t){this.carousel=t,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length{if(!(\"page\"in t.target.dataset))return;t.preventDefault(),t.stopPropagation();const e=parseInt(t.target.dataset.page,10),i=this.carousel;e!==i.page&&(i.pages.length<3&&i.option(\"infinite\")?i[0==e?\"slidePrev\":\"slideNext\"]():i.slideTo(e))})),this.$list=t,this.carousel.$container.appendChild(t),this.carousel.$container.classList.add(\"has-dots\"),t}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove(\"has-dots\")}rebuildDots(){let t=this.$list;const e=!!t,i=this.carousel.pages.length;if(i<2)return void(e&&this.removeList());e||(t=this.buildList());const s=this.$list.children.length;if(s>i)for(let t=i;t{const i=t.code;let s;\"Enter\"===i||\"NumpadEnter\"===i?s=e:\"ArrowRight\"===i?s=e.nextSibling:\"ArrowLeft\"===i&&(s=e.previousSibling),s&&s.click()})),this.$list.appendChild(e)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((t=>{t.classList.remove(\"is-selected\")}));const t=this.$list.childNodes[this.carousel.page];t&&t.classList.add(\"is-selected\")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:g};const m={slides:[],preload:0,slidesPerPage:\"auto\",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:\"\",classNames:{viewport:\"carousel__viewport\",track:\"carousel__track\",slide:\"carousel__slide\",slideSelected:\"is-selected\"},l10n:{NEXT:\"Next slide\",PREV:\"Previous slide\",GOTO:\"Go to slide #%d\"}};class y extends l{constructor(t,i={}){if(super(i=e(!0,{},m,i)),this.state=\"init\",this.$container=t,!(this.$container instanceof HTMLElement))throw new Error(\"No root element provided\");this.slideNext=u(this.slideNext.bind(this),250),this.slidePrev=u(this.slidePrev.bind(this),250),this.init(),t.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(y.Plugins),this.trigger(\"init\"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state=\"ready\",this.trigger(\"ready\")}initLayout(){const t=this.option(\"prefix\"),e=this.option(\"classNames\");this.$viewport=this.option(\"viewport\")||this.$container.querySelector(`.${t}${e.viewport}`),this.$viewport||(this.$viewport=document.createElement(\"div\"),this.$viewport.classList.add(...(t+e.viewport).split(\" \")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option(\"track\")||this.$container.querySelector(`.${t}${e.track}`),this.$track||(this.$track=document.createElement(\"div\"),this.$track.classList.add(...(t+e.track).split(\" \")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[];this.$viewport.querySelectorAll(`.${this.option(\"prefix\")}${this.option(\"classNames.slide\")}`).forEach((t=>{const e={$el:t,isDom:!0};this.slides.push(e),this.trigger(\"createSlide\",e,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=e(!0,[...this.slides],this.options.slides))}updateMetrics(){let t,e=0,s=[];this.slides.forEach(((i,o)=>{const n=i.$el,a=i.isDom||!t?this.getSlideMetrics(n):t;i.index=o,i.width=a,i.left=e,t=a,e+=a,s.push(o)}));let o=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),n=getComputedStyle(this.$track);o-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),this.contentWidth=e,this.viewportWidth=o;const a=[],r=this.option(\"slidesPerPage\");if(Number.isInteger(r)&&e>o)for(let t=0;to)&&(a.push({indexes:[],slides:[]}),t=a.length-1,e=0),e+=s.width,a[t].indexes.push(i),a[t].slides.push(s)}}const h=this.option(\"center\"),l=this.option(\"fill\");a.forEach(((t,i)=>{t.index=i,t.width=t.slides.reduce(((t,e)=>t+e.width),0),t.left=t.slides[0].left,h&&(t.left+=.5*(o-t.width)*-1),l&&!this.option(\"infiniteX\",this.option(\"infinite\"))&&e>o&&(t.left=Math.max(t.left,0),t.left=Math.min(t.left,e-o))}));const c=[];let d;a.forEach((t=>{const e={...t};d&&e.left===d.left?(d.width+=e.width,d.slides=[...d.slides,...e.slides],d.indexes=[...d.indexes,...e.indexes]):(e.index=c.length,d=e,c.push(e))})),this.pages=c;let u=this.page;if(null===u){const t=this.option(\"initialSlide\");u=null!==t?this.findPageForSlide(t):parseInt(this.option(\"initialPage\",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger(\"refresh\")}getSlideMetrics(t){if(!t){const e=this.slides[0];(t=document.createElement(\"div\")).dataset.isTestEl=1,t.style.visibility=\"hidden\",t.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),e.customClass&&t.classList.add(...e.customClass.split(\" \")),this.$track.prepend(t)}let e=Math.max(t.offsetWidth,i(t.getBoundingClientRect().width));const s=t.currentStyle||window.getComputedStyle(t);return e=e+(parseFloat(s.marginLeft)||0)+(parseFloat(s.marginRight)||0),t.dataset.isTestEl&&t.remove(),e}findPageForSlide(t){t=parseInt(t,10)||0;const e=this.pages.find((e=>e.indexes.indexOf(t)>-1));return e?e.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(t,e={}){const{x:i=-1*this.setPage(t,!0),y:s=0,friction:o=this.option(\"friction\")}=e;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:s,friction:o,ignoreBounds:!0}),\"ready\"===this.state&&\"ready\"===this.Panzoom.state&&this.trigger(\"settle\"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const t=e(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:\"x\",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option(\"textSelection\",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option(\"Panzoom\"));this.Panzoom=new d(this.$container,t),this.Panzoom.on({\"*\":(t,...e)=>this.trigger(`Panzoom.${t}`,...e),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger(\"settle\")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option(\"infiniteX\",this.option(\"infinite\"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option(\"infiniteY\",this.option(\"infinite\"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const t=this.contentWidth,e=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option(\"preload\"),o=this.option(\"infiniteX\",this.option(\"infinite\")),n=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-left\")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-right\"));this.slides.forEach((r=>{let h,l,c=0;h=i-n,l=i+e+a,h-=s*(e+n+a),l+=s*(e+n+a);const d=r.left+r.width>h&&r.lefth&&r.lefth&&r.lefti&&r.left<=i+e+a&&(c=0)):this.removeSlideEl(r),r.hasDiff=c}));let r=0,h=0;this.slides.forEach(((e,i)=>{let s=0;e.$el?(i!==r||e.hasDiff?s=h+e.hasDiff*t:h=0,e.$el.style.left=Math.abs(s)>.1?`${h+e.hasDiff*t}px`:\"\",r++):h+=e.width})),this.markSelectedSlides()}createSlideEl(t){if(!t)return;if(t.$el){let e=t.$el.dataset.index;if(!e||parseInt(e,10)!==t.index){let e;t.$el.dataset.index=t.index,t.$el.querySelectorAll(\"[data-lazy-srcset]\").forEach((t=>{t.srcset=t.dataset.lazySrcset})),t.$el.querySelectorAll(\"[data-lazy-src]\").forEach((t=>{let e=t.dataset.lazySrc;t instanceof HTMLImageElement?t.src=e:t.style.backgroundImage=`url('${e}')`})),(e=t.$el.dataset.lazySrc)&&(t.$el.style.backgroundImage=`url('${e}')`),t.state=\"ready\"}return}const e=document.createElement(\"div\");e.dataset.index=t.index,e.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),t.customClass&&e.classList.add(...t.customClass.split(\" \")),t.html&&(e.innerHTML=t.html);const i=[];this.slides.forEach(((t,e)=>{t.$el&&i.push(e)}));const s=t.index;let o=null;if(i.length){let t=i.reduce(((t,e)=>Math.abs(e-s){const o=i.$el;if(!o)return;const n=this.pages[this.page];n&&n.indexes&&n.indexes.indexOf(s)>-1?(t&&!o.classList.contains(t)&&(o.classList.add(t),this.trigger(\"selectSlide\",i)),o.removeAttribute(e)):(t&&o.classList.contains(t)&&(o.classList.remove(t),this.trigger(\"unselectSlide\",i)),o.setAttribute(e,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option(\"infiniteX\",this.option(\"infinite\"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const t=this.contentWidth,e=this.viewportWidth;if(!this.option(\"infiniteX\",this.option(\"infinite\"))||this.pages.length<2||te&&(i.content.x-=t,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&\"pointerdown\"===i.state&&i.resetDragPosition(),s}onTouchEnd(t,e){const i=this.option(\"dragFree\");if(!i&&this.pages.length>1&&t.dragOffset.time<350&&Math.abs(t.dragOffset.y)<1&&Math.abs(t.dragOffset.x)>5)this[t.dragOffset.x<0?\"slideNext\":\"slidePrev\"]();else if(i){const[,e]=this.getPageFromPosition(-1*t.transform.x);this.setPage(e)}else this.slideToClosest()}slideToClosest(t={}){let[,e]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(e,t)}getPageFromPosition(t){const e=this.pages.length;this.option(\"center\")&&(t+=.5*this.viewportWidth);const i=Math.floor(t/this.contentWidth);t-=i*this.contentWidth;let s=this.slides.find((e=>e.left<=t&&e.left+e.width>t));if(s){let t=this.findPageForSlide(s.index);return[t,t+i*e]}return[0,0]}setPage(t,e){let i=0,s=parseInt(t,10)||0;const o=this.page,n=this.pageIndex,a=this.pages.length,r=this.contentWidth,h=this.viewportWidth;if(t=(s%a+a)%a,this.option(\"infiniteX\",this.option(\"infinite\"))&&r>h){const o=Math.floor(s/a)||0,n=r;if(i=this.pages[t].left+o*n,!0===e&&a>2){let t=-1*this.Panzoom.content.x;const e=i-n,o=i+n,r=Math.abs(t-i),h=Math.abs(t-e),l=Math.abs(t-o);l{this.removeSlideEl(t)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}y.version=\"4.0.31\",y.Plugins=p;const v=!(\"undefined\"==typeof window||!window.document||!window.document.createElement);let b=null;const x=[\"a[href]\",\"area[href]\",'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\"select:not([disabled]):not([aria-hidden])\",\"textarea:not([disabled]):not([aria-hidden])\",\"button:not([disabled]):not([aria-hidden])\",\"iframe\",\"object\",\"embed\",\"video\",\"audio\",\"[contenteditable]\",'[tabindex]:not([tabindex^=\"-\"]):not([disabled]):not([aria-hidden])'],w=t=>{if(t&&v){null===b&&document.createElement(\"div\").focus({get preventScroll(){return b=!0,!1}});try{if(t.setActive)t.setActive();else if(b)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:\"auto\"})}}catch(t){}}};const $={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:\"t\",Carousel:{},tpl:'
'};class C{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onPrepare\",\"onClosing\",\"onKeydown\"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length=this.fancybox.option(\"Thumbs.minScreenHeight\")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(t,e){e===t.option(\"Thumbs.key\")&&this.toggle()}build(){if(this.$container)return;const t=document.createElement(\"div\");t.classList.add(\"fancybox__thumbs\"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel.nextSibling),this.Carousel=new y(t,e(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option(\"Thumbs.Carousel\"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on(\"wheel\",((t,e)=>{e.preventDefault(),this.fancybox[e.deltaY<0?\"prev\":\"next\"]()})),this.$container=t,this.state=\"visible\"}getSlides(){const t=[];for(const e of this.fancybox.items){const i=e.thumb;i&&t.push({html:this.fancybox.option(\"Thumbs.tpl\").replace(/\\{\\{src\\}\\}/gi,i),customClass:`has-thumb has-${e.type||\"image\"}`})}return t}toggle(){\"visible\"===this.state?this.hide():\"hidden\"===this.state?this.show():this.build()}show(){\"hidden\"===this.state&&(this.$container.style.display=\"\",this.Carousel.Panzoom.attachEvents(),this.state=\"visible\")}hide(){\"visible\"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display=\"none\",this.state=\"hidden\")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state=\"init\"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}C.defaults=$;const S=(t,e)=>{const i=new URL(t),s=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[t,i]of[...s,...Object.entries(e)])\"t\"===t?o.set(\"start\",parseInt(i)):o.set(t,i);o=o.toString();let n=t.match(/#t=((.*)?\\d+s)/);return n&&(o+=`#t=${n[1]}`),o},E={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:\"transparent\",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'',format:\"\"}};class P{constructor(t){this.fancybox=t;for(const t of[\"onInit\",\"onReady\",\"onCreateSlide\",\"onRemoveSlide\",\"onSelectSlide\",\"onUnselectSlide\",\"onRefresh\",\"onMessage\"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide,\"Carousel.selectSlide\":this.onSelectSlide,\"Carousel.unselectSlide\":this.onUnselectSlide,\"Carousel.refresh\":this.onRefresh}}onInit(){for(const t of this.fancybox.items)this.processType(t)}processType(t){if(t.html)return t.src=t.html,t.type=\"html\",void delete t.html;const i=t.src||\"\";let s=t.type||this.fancybox.options.type,o=null;if(!i||\"string\"==typeof i){if(o=i.match(/(?:youtube\\.com|youtu\\.be|youtube\\-nocookie\\.com)\\/(?:watch\\?(?:.*&)?v=|v\\/|u\\/|embed\\/?)?(videoseries\\?list=(?:.*)|[\\w-]{11}|\\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const e=S(i,this.fancybox.option(\"Html.youtube\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://www.youtube-nocookie.com/embed/${n}?${e}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${n}/mqdefault.jpg`,t.vendor=\"youtube\",s=\"video\"}else if(o=i.match(/^.+vimeo.com\\/(?:\\/)?([\\d]+)(.*)?/)){const e=S(i,this.fancybox.option(\"Html.vimeo\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://player.vimeo.com/video/${n}?${e}`,t.vendor=\"vimeo\",s=\"video\"}else(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:(?:(?:maps\\/(?:place\\/(?:.*)\\/)?\\@(.*),(\\d+.?\\d+?)z))|(?:\\?ll=))(.*)?/i))?(t.src=`//maps.google.${o[1]}/?ll=${(o[2]?o[2]+\"&z=\"+Math.floor(o[3])+(o[4]?o[4].replace(/^\\//,\"&\"):\"\"):o[4]+\"\").replace(/\\?/,\"&\")}&output=${o[4]&&o[4].indexOf(\"layer=c\")>0?\"svembed\":\"embed\"}`,s=\"map\"):(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:maps\\/search\\/)(.*)/i))&&(t.src=`//maps.google.${o[1]}/maps?q=${o[2].replace(\"query=\",\"q=\").replace(\"api=1\",\"\")}&output=embed`,s=\"map\");s||(\"#\"===i.charAt(0)?s=\"inline\":(o=i.match(/\\.(mp4|mov|ogv|webm)((\\?|#).*)?$/i))?(s=\"html5video\",t.format=t.format||\"video/\"+(\"ogv\"===o[1]?\"ogg\":o[1])):i.match(/(^data:image\\/[a-z0-9+\\/=]*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\\?|#).*)?$)/i)?s=\"image\":i.match(/\\.(pdf)((\\?|#).*)?$/i)&&(s=\"pdf\")),t.type=s||this.fancybox.option(\"defaultType\",\"image\"),\"html5video\"!==s&&\"video\"!==s||(t.video=e({},this.fancybox.option(\"Html.video\"),t.video),t._width&&t._height?t.ratio=parseFloat(t._width)/parseFloat(t._height):t.ratio=t.ratio||t.video.ratio||E.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&(this.setContent(t),t.index===this.fancybox.getSlide().index&&this.playVideo(t))}))}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}loadInlineContent(t){let e;if(t.src instanceof HTMLElement)e=t.src;else if(\"string\"==typeof t.src){const i=t.src.split(\"#\",2),s=2===i.length&&\"\"===i[0]?i[1]:i[0];e=document.getElementById(s)}if(e){if(\"clone\"===t.type||e.$placeHolder){e=e.cloneNode(!0);let i=e.getAttribute(\"id\");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${t.index}`,e.setAttribute(\"id\",i)}else{const t=document.createElement(\"div\");t.classList.add(\"fancybox-placeholder\"),e.parentNode.insertBefore(t,e),e.$placeHolder=t}this.fancybox.setContent(t,e)}else this.fancybox.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}loadAjaxContent(t){const e=this.fancybox,i=new XMLHttpRequest;e.showLoading(t),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&\"ready\"===e.state&&(e.hideLoading(t),200===i.status?e.setContent(t,i.responseText):e.setError(t,404===i.status?\"{{AJAX_NOT_FOUND}}\":\"{{AJAX_FORBIDDEN}}\"))};const s=t.ajax||null;i.open(s?\"POST\":\"GET\",t.src),i.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),i.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),i.send(s),t.xhr=i}loadIframeContent(t){const e=this.fancybox,i=document.createElement(\"iframe\");if(i.className=\"fancybox__iframe\",i.setAttribute(\"id\",`fancybox__iframe_${e.id}_${t.index}`),i.setAttribute(\"allow\",\"autoplay; fullscreen\"),i.setAttribute(\"scrolling\",\"auto\"),t.$iframe=i,\"iframe\"!==t.type||!1===t.preload)return i.setAttribute(\"src\",t.src),this.fancybox.setContent(t,i),void this.resizeIframe(t);e.showLoading(t);const s=document.createElement(\"div\");s.style.visibility=\"hidden\",this.fancybox.setContent(t,s),s.appendChild(i),i.onerror=()=>{e.setError(t,\"{{IFRAME_ERROR}}\")},i.onload=()=>{e.hideLoading(t);let s=!1;i.isReady||(i.isReady=!0,s=!0),i.src.length&&(i.parentNode.style.visibility=\"\",this.resizeIframe(t),s&&e.revealContent(t))},i.setAttribute(\"src\",t.src)}setAspectRatio(t){const e=t.$content,i=t.ratio;if(!e)return;let s=t._width,o=t._height;if(i||s&&o){Object.assign(e.style,{width:s&&o?\"100%\":\"\",height:s&&o?\"100%\":\"\",maxWidth:\"\",maxHeight:\"\"});let t=e.offsetWidth,n=e.offsetHeight;if(s=s||t,o=o||n,s>t||o>n){let e=Math.min(t/s,n/o);s*=e,o*=e}Math.abs(s/o-i)>.01&&(i{t.$el&&(t.$iframe&&this.resizeIframe(t),t.ratio&&this.setAspectRatio(t))}))}setContent(t){if(t&&!t.isDom){switch(t.type){case\"html\":this.fancybox.setContent(t,t.src);break;case\"html5video\":this.fancybox.setContent(t,this.fancybox.option(\"Html.html5video.tpl\").replace(/\\{\\{src\\}\\}/gi,t.src).replace(\"{{format}}\",t.format||t.html5video&&t.html5video.format||\"\").replace(\"{{poster}}\",t.poster||t.thumb||\"\"));break;case\"inline\":case\"clone\":this.loadInlineContent(t);break;case\"ajax\":this.loadAjaxContent(t);break;case\"pdf\":case\"video\":case\"map\":t.preload=!1;case\"iframe\":this.loadIframeContent(t)}t.ratio&&this.setAspectRatio(t)}}onSelectSlide(t,e,i){\"ready\"===t.state&&this.playVideo(i)}playVideo(t){if(\"html5video\"===t.type&&t.video.autoplay)try{const e=t.$el.querySelector(\"video\");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(t){}if(\"video\"!==t.type||!t.$iframe||!t.$iframe.contentWindow)return;const e=()=>{if(\"done\"===t.state&&t.$iframe&&t.$iframe.contentWindow){let e;if(t.$iframe.isReady)return t.video&&t.video.autoplay&&(e=\"youtube\"==t.vendor?{event:\"command\",func:\"playVideo\"}:{method:\"play\",value:\"true\"}),void(e&&t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"));\"youtube\"===t.vendor&&(e={event:\"listening\",id:t.$iframe.getAttribute(\"id\")},t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"))}t.poller=setTimeout(e,250)};e()}onUnselectSlide(t,e,i){if(\"html5video\"===i.type){try{i.$el.querySelector(\"video\").pause()}catch(t){}return}let s=!1;\"vimeo\"==i.vendor?s={method:\"pause\",value:\"true\"}:\"youtube\"===i.vendor&&(s={event:\"command\",func:\"pauseVideo\"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),\"*\"),clearTimeout(i.poller)}onRemoveSlide(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src=\"//about:blank\",i.$iframe=null);const s=i.$content;\"inline\"===i.type&&s&&(s.classList.remove(\"fancybox__content\"),\"none\"!==s.style.display&&(s.style.display=\"none\")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=s&&s.$placeHolder;o&&(o.parentNode.insertBefore(s,o),o.remove(),s.$placeHolder=null)}onMessage(t){try{let e=JSON.parse(t.data);if(\"https://player.vimeo.com\"===t.origin){if(\"ready\"===e.event)for(let e of document.getElementsByClassName(\"fancybox__iframe\"))e.contentWindow===t.source&&(e.isReady=1)}else\"https://www.youtube-nocookie.com\"===t.origin&&\"onReady\"===e.event&&(document.getElementById(e.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener(\"message\",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener(\"message\",this.onMessage,!1)}}P.defaults=E;class T{constructor(t){this.fancybox=t;for(const t of[\"onReady\",\"onClosing\",\"onDone\",\"onPageChange\",\"onCreateSlide\",\"onRemoveSlide\",\"onImageStatusChange\"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,\"Carousel.change\":this.onPageChange,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&this.setContent(t)}))}onDone(t,e){this.handleCursor(e)}onClosing(t){clearTimeout(this.clickTimer),this.clickTimer=null,t.Carousel.slides.forEach((t=>{t.$image&&(t.state=\"destroy\"),t.Panzoom&&t.Panzoom.detachEvents()})),\"closing\"===this.fancybox.state&&this.canZoom(t.getSlide())&&this.zoomOut()}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(t,e,i){i.$image&&(i.$el.classList.remove(t.option(\"Image.canZoomInClass\")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(t){if(t.isDom||t.html||t.type&&\"image\"!==t.type)return;if(t.$image)return;t.type=\"image\",t.state=\"loading\";const e=document.createElement(\"div\");e.style.visibility=\"hidden\";const i=document.createElement(\"img\");i.addEventListener(\"load\",(e=>{e.stopImmediatePropagation(),this.onImageStatusChange(t)})),i.addEventListener(\"error\",(()=>{this.onImageStatusChange(t)})),i.src=t.src,i.alt=\"\",i.draggable=!1,i.classList.add(\"fancybox__image\"),t.srcset&&i.setAttribute(\"srcset\",t.srcset),t.sizes&&i.setAttribute(\"sizes\",t.sizes),t.$image=i;const s=this.fancybox.option(\"Image.wrap\");if(s){const o=document.createElement(\"div\");o.classList.add(\"string\"==typeof s?s:\"fancybox__image-wrap\"),o.appendChild(i),e.appendChild(o),t.$wrap=o}else e.appendChild(i);t.$el.dataset.imageFit=this.fancybox.option(\"Image.fit\"),this.fancybox.setContent(t,e),i.complete||i.error?this.onImageStatusChange(t):this.fancybox.showLoading(t)}onImageStatusChange(t){const e=t.$image;e&&\"loading\"===t.state&&(e.complete&&e.naturalWidth&&e.naturalHeight?(this.fancybox.hideLoading(t),\"contain\"===this.fancybox.option(\"Image.fit\")&&this.initSlidePanzoom(t),t.$el.addEventListener(\"wheel\",(e=>this.onWheel(t,e)),{passive:!1}),t.$content.addEventListener(\"click\",(e=>this.onClick(t,e)),{passive:!1}),this.revealContent(t)):this.fancybox.setError(t,\"{{IMAGE_ERROR}}\"))}initSlidePanzoom(t){t.Panzoom||(t.Panzoom=new d(t.$el,e(!0,this.fancybox.option(\"Image.Panzoom\",{}),{viewport:t.$wrap,content:t.$image,width:t._width,height:t._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option(\"Image.touch\"),panOnlyZoomed:!0,click:!1,wheel:!1})),t.Panzoom.on(\"startAnimation\",(()=>{this.fancybox.trigger(\"Image.startAnimation\",t)})),t.Panzoom.on(\"endAnimation\",(()=>{\"zoomIn\"===t.state&&this.fancybox.done(t),this.handleCursor(t),this.fancybox.trigger(\"Image.endAnimation\",t)})),t.Panzoom.on(\"afterUpdate\",(()=>{this.handleCursor(t),this.fancybox.trigger(\"Image.afterUpdate\",t)})))}revealContent(t){null===this.fancybox.Carousel.prevPage&&t.index===this.fancybox.options.startIndex&&this.canZoom(t)?this.zoomIn():this.fancybox.revealContent(t)}getZoomInfo(t){const e=t.$thumb.getBoundingClientRect(),i=e.width,s=e.height,o=t.$content.getBoundingClientRect(),n=o.width,a=o.height,r=o.top-e.top,h=o.left-e.left;let l=this.fancybox.option(\"Image.zoomOpacity\");return\"auto\"===l&&(l=Math.abs(i/s-n/a)>.1),{top:r,left:h,scale:n&&i?i/n:1,opacity:l}}canZoom(t){const e=this.fancybox,i=e.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(t.Panzoom&&!t.Panzoom.content.width)return!1;if(!e.option(\"Image.zoom\")||\"contain\"!==e.option(\"Image.fit\"))return!1;const s=t.$thumb;if(!s||\"loading\"===t.state)return!1;i.classList.add(\"fancybox__no-click\");const o=s.getBoundingClientRect();let n;if(this.fancybox.option(\"Image.ignoreCoveredThumbnail\")){const t=document.elementFromPoint(o.left+1,o.top+1)===s,e=document.elementFromPoint(o.right-1,o.bottom-1)===s;n=t&&e}else n=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===s;return i.classList.remove(\"fancybox__no-click\"),n}zoomIn(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom,{top:s,left:o,scale:n,opacity:a}=this.getZoomInfo(e);t.trigger(\"reveal\",e),i.panTo({x:-1*o,y:-1*s,scale:n,friction:0,ignoreBounds:!0}),e.$content.style.visibility=\"\",e.state=\"zoomIn\",!0===a&&i.on(\"afterTransform\",(t=>{\"zoomIn\"!==e.state&&\"zoomOut\"!==e.state||(t.$content.style.opacity=Math.min(1,1-(1-t.content.scale)/(1-n)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option(\"Image.zoomFriction\")})}zoomOut(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom;if(!i)return;e.state=\"zoomOut\",t.state=\"customClosing\",e.$caption&&(e.$caption.style.visibility=\"hidden\");let s=this.fancybox.option(\"Image.zoomFriction\");const o=t=>{const{top:o,left:n,scale:a,opacity:r}=this.getZoomInfo(e);t||r||(s*=.82),i.panTo({x:-1*n,y:-1*o,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener(\"scroll\",o),i.once(\"endAnimation\",(()=>{window.removeEventListener(\"scroll\",o),t.destroy()})),o()}handleCursor(t){if(\"image\"!==t.type||!t.$el)return;const e=t.Panzoom,i=this.fancybox.option(\"Image.click\",!1,t),s=this.fancybox.option(\"Image.touch\"),o=t.$el.classList,n=this.fancybox.option(\"Image.canZoomInClass\"),a=this.fancybox.option(\"Image.canZoomOutClass\");if(o.remove(a),o.remove(n),e&&\"toggleZoom\"===i){e&&1===e.content.scale&&e.option(\"maxScale\")-e.content.scale>.01?o.add(n):e.content.scale>1&&!s&&o.add(a)}else\"close\"===i&&o.add(a)}onWheel(t,e){if(\"ready\"===this.fancybox.state&&!1!==this.fancybox.trigger(\"Image.wheel\",e))switch(this.fancybox.option(\"Image.wheel\")){case\"zoom\":\"done\"===t.state&&t.Panzoom&&t.Panzoom.zoomWithWheel(e);break;case\"close\":this.fancybox.close();break;case\"slide\":this.fancybox[e.deltaY<0?\"prev\":\"next\"]()}}onClick(t,e){if(\"ready\"!==this.fancybox.state)return;const i=t.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case\"toggleZoom\":e.stopPropagation(),t.Panzoom&&t.Panzoom.zoomWithClick(e);break;case\"close\":this.fancybox.close();break;case\"next\":e.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option(\"Image.click\"),n=this.fancybox.option(\"Image.doubleClick\");n?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(n)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(o)}),300):s(o)}onPageChange(t,e){const i=t.getSlide();e.slides.forEach((t=>{t.Panzoom&&\"done\"===t.state&&t.index!==i.index&&t.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}T.defaults={canZoomInClass:\"can-zoom_in\",canZoomOutClass:\"can-zoom_out\",zoom:!0,zoomOpacity:\"auto\",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:\"toggleZoom\",doubleClick:null,wheel:\"zoom\",fit:\"contain\",wrap:!1,Panzoom:{ratio:1}};class L{constructor(t){this.fancybox=t;for(const t of[\"onChange\",\"onClosing\"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,\"Carousel.change\":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash=\"\",this.timer=null}onChange(t){const e=t.Carousel;this.timer&&clearTimeout(this.timer);const i=null===e.prevPage,s=t.getSlide(),o=new URL(document.URL).hash;let n=!1;if(s.slug)n=\"#\"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,o=t.option(\"slug\")||i&&i.fancybox;o&&o.length&&\"true\"!==o&&(n=\"#\"+o+(e.slides.length>1?\"-\"+(s.index+1):\"\"))}i&&(this.origHash=o!==n?o:\"\"),n&&o!==n&&(this.timer=setTimeout((()=>{try{window.history[i?\"pushState\":\"replaceState\"]({},document.title,window.location.pathname+window.location.search+n),i&&(this.hasCreatedHistory=!0)}catch(t){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||\"\"))}catch(t){}}attach(t){t.on(this.events)}detach(t){t.off(this.events)}static startFromUrl(){const t=L.Fancybox;if(!t||t.getInstance()||!1===t.defaults.Hash)return;const{hash:e,slug:i,index:s}=L.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug=\"${e}\"]`);if(o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})),t.getInstance())return;const n=document.querySelectorAll(`[data-fancybox=\"${i}\"]`);n.length&&(null===s&&1===n.length?o=n[0]:s&&(o=n[s-1]),o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:t,index:e}=L.getParsedURL(),i=L.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(t){const i=s.Carousel;if(t===s.option(\"slug\"))return i.slideTo(e-1);for(let e of i.slides)if(e.slug&&e.slug===t)return i.slideTo(e.index);const o=s.getSlide(),n=o.$trigger&&o.$trigger.dataset;if(n&&n.fancybox===t)return i.slideTo(e-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}L.startFromUrl()}static create(t){function e(){window.addEventListener(\"hashchange\",L.onHashChange,!1),L.startFromUrl()}L.Fancybox=t,v&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?e():document.addEventListener(\"DOMContentLoaded\",e)}))}static destroy(){window.removeEventListener(\"hashchange\",L.onHashChange,!1)}static getParsedURL(){const t=window.location.hash.substr(1),e=t.split(\"-\"),i=e.length>1&&/^\\+?\\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||null;return{hash:t,slug:e.join(\"-\"),index:i}}}const _={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(t){_.pageXOffset=window.pageXOffset,_.pageYOffset=window.pageYOffset,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class A{constructor(t){this.fancybox=t,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const t=this.fancybox.option(\"slideshow.delay\",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option(\"infinite\")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),t);let e=this.$progress;e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__progress\"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel),this.$progress=e,e.offsetHeight),e.style.transitionDuration=`${t}ms`,e.style.transform=\"scaleX(1)\"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration=\"\",this.$progress.style.transform=\"\",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add(\"has-slideshow\"),\"done\"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener(\"visibilitychange\",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove(\"has-slideshow\"),document.removeEventListener(\"visibilitychange\",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const z={display:[\"counter\",\"zoom\",\"slideshow\",\"fullscreen\",\"thumbs\",\"close\"],autoEnable:!0,items:{counter:{position:\"left\",type:\"div\",class:\"fancybox__counter\",html:' / ',attr:{tabindex:-1}},prev:{type:\"button\",class:\"fancybox__button--prev\",label:\"PREV\",html:'',attr:{\"data-fancybox-prev\":\"\"}},next:{type:\"button\",class:\"fancybox__button--next\",label:\"NEXT\",html:'',attr:{\"data-fancybox-next\":\"\"}},fullscreen:{type:\"button\",class:\"fancybox__button--fullscreen\",label:\"TOGGLE_FULLSCREEN\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),_.element()?_.deactivate():_.activate(this.fancybox.$container)}},slideshow:{type:\"button\",class:\"fancybox__button--slideshow\",label:\"TOGGLE_SLIDESHOW\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),this.Slideshow.toggle()}},zoom:{type:\"button\",class:\"fancybox__button--zoom\",label:\"TOGGLE_ZOOM\",html:'',click:function(t){t.preventDefault();const e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:\"link\",label:\"DOWNLOAD\",class:\"fancybox__button--download\",html:'',click:function(t){t.stopPropagation()}},thumbs:{type:\"button\",label:\"TOGGLE_THUMBS\",class:\"fancybox__button--thumbs\",html:'',click:function(t){t.stopPropagation();const e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:\"button\",label:\"CLOSE\",class:\"fancybox__button--close\",html:'',attr:{\"data-fancybox-close\":\"\",tabindex:0}}}};class k{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onInit\",\"onPrepare\",\"onDone\",\"onKeydown\",\"onClosing\",\"onChange\",\"onSettle\",\"onRefresh\"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,\"Carousel.change\":this.onChange,\"Carousel.settle\":this.onSettle,\"Carousel.Panzoom.touchStart\":()=>this.onRefresh(),\"Image.startAnimation\":(t,e)=>this.onRefresh(e),\"Image.afterUpdate\":(t,e)=>this.onRefresh(e)}}onInit(){if(this.fancybox.option(\"Toolbar.autoEnable\")){let t=!1;for(const e of this.fancybox.items)if(\"image\"===e.type){t=!0;break}if(!t)return void(this.state=\"disabled\")}for(const e of this.fancybox.option(\"Toolbar.display\")){if(\"close\"===(t(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}}onPrepare(){const t=this.fancybox;if(\"init\"===this.state&&(this.build(),this.update(),this.Slideshow=new A(t),!t.Carousel.prevPage&&(t.option(\"slideshow.autoStart\")&&this.Slideshow.activate(),t.option(\"fullscreen.autoStart\")&&!_.element())))try{_.activate(t.$container)}catch(t){}}onFsChange(){window.scrollTo(_.pageXOffset,_.pageYOffset)}onSettle(){const t=this.fancybox,e=this.Slideshow;e&&e.isActive()&&(t.getSlide().index!==t.Carousel.slides.length-1||t.option(\"infinite\")?\"done\"===t.getSlide().state&&e.setTimer():e.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(t,e){const i=this.Slideshow;e.index===t.getSlide().index&&(this.update(),i&&i.isActive()&&(t.option(\"infinite\")||e.index!==t.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(t){t&&t.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||t&&\"done\"!==t.state||this.Slideshow.deactivate())}onKeydown(t,e,i){\" \"===e&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener(\"fullscreenchange\",this.onFsChange)}createElement(t){let e;\"div\"===t.type?e=document.createElement(\"div\"):(e=document.createElement(\"link\"===t.type?\"a\":\"button\"),e.classList.add(\"carousel__button\")),e.innerHTML=t.html,e.setAttribute(\"tabindex\",t.tabindex||0),t.class&&e.classList.add(...t.class.split(\" \"));for(const i in t.attr)e.setAttribute(i,t.attr[i]);t.label&&e.setAttribute(\"title\",this.fancybox.localize(`{{${t.label}}}`)),t.click&&e.addEventListener(\"click\",t.click.bind(this)),\"prev\"===t.id&&e.setAttribute(\"data-fancybox-prev\",\"\"),\"next\"===t.id&&e.setAttribute(\"data-fancybox-next\",\"\");const i=e.querySelector(\"svg\");return i&&(i.setAttribute(\"role\",\"img\"),i.setAttribute(\"tabindex\",\"-1\"),i.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\")),e}build(){this.cleanup();const i=this.fancybox.option(\"Toolbar.items\"),s=[{position:\"left\",items:[]},{position:\"center\",items:[]},{position:\"right\",items:[]}],o=this.fancybox.plugins.Thumbs;for(const n of this.fancybox.option(\"Toolbar.display\")){let a,r;if(t(n)?(a=n.id,r=e({},i[a],n)):(a=n,r=i[a]),[\"counter\",\"next\",\"prev\",\"slideshow\"].includes(a)&&this.fancybox.items.length<2)continue;if(\"fullscreen\"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener(\"fullscreenchange\",this.onFsChange)}if(\"thumbs\"===a&&(!o||\"disabled\"===o.state))continue;if(!r)continue;let h=r.position||\"right\",l=s.find((t=>t.position===h));l&&l.items.push(r)}const n=document.createElement(\"div\");n.classList.add(\"fancybox__toolbar\");for(const t of s)if(t.items.length){const e=document.createElement(\"div\");e.classList.add(\"fancybox__toolbar__items\"),e.classList.add(`fancybox__toolbar__items--${t.position}`);for(const i of t.items)e.appendChild(this.createElement(i));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const t=this.fancybox.getSlide(),e=t.index,i=this.fancybox.items.length,s=t.downloadSrc||(\"image\"!==t.type||t.error?null:t.src);for(const t of this.fancybox.$container.querySelectorAll(\"a.fancybox__button--download\"))s?(t.removeAttribute(\"disabled\"),t.removeAttribute(\"tabindex\"),t.setAttribute(\"href\",s),t.setAttribute(\"download\",s),t.setAttribute(\"target\",\"_blank\")):(t.setAttribute(\"disabled\",\"\"),t.setAttribute(\"tabindex\",-1),t.removeAttribute(\"href\"),t.removeAttribute(\"download\"));const o=t.Panzoom,n=o&&o.option(\"maxScale\")>o.option(\"baseScale\");for(const t of this.fancybox.$container.querySelectorAll(\".fancybox__button--zoom\"))n?t.removeAttribute(\"disabled\"):t.setAttribute(\"disabled\",\"\");for(const e of this.fancybox.$container.querySelectorAll(\"[data-fancybox-index]\"))e.innerHTML=t.index+1;for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-count]\"))t.innerHTML=i;if(!this.fancybox.option(\"infinite\")){for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-prev]\"))0===e?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\");for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-next]\"))e===i-1?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}k.defaults=z;const O={ScrollLock:class{constructor(t){this.fancybox=t,this.viewport=null,this.pendingUpdate=null;for(const t of[\"onReady\",\"onResize\",\"onTouchstart\",\"onTouchmove\"])this[t]=this[t].bind(this)}onReady(){const t=window.visualViewport;t&&(this.viewport=t,this.startY=0,t.addEventListener(\"resize\",this.onResize),this.updateViewport()),window.addEventListener(\"touchstart\",this.onTouchstart,{passive:!1}),window.addEventListener(\"touchmove\",this.onTouchmove,{passive:!1}),window.addEventListener(\"wheel\",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const t=this.fancybox,e=this.viewport,i=e.scale||1,s=t.$container;if(!s)return;let o=\"\",n=\"\",a=\"\";i-1>.1&&(o=e.width*i+\"px\",n=e.height*i+\"px\",a=`translate3d(${e.offsetLeft}px, ${e.offsetTop}px, 0) scale(${1/i})`),s.style.width=o,s.style.height=n,s.style.transform=a}onTouchstart(t){this.startY=t.touches?t.touches[0].screenY:t.screenY}onTouchmove(t){const e=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!t.cancelable)return;if(t.touches.length>1||1!==i)return;const o=s(t.composedPath()[0]);if(!o)return void t.preventDefault();const n=window.getComputedStyle(o),a=parseInt(n.getPropertyValue(\"height\"),10),r=t.touches?t.touches[0].screenY:t.screenY,h=e<=r&&0===o.scrollTop,l=e>=r&&o.scrollHeight-o.scrollTop===a;(h||l)&&t.preventDefault()}onWheel(t){s(t.composedPath()[0])||t.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const t=this.viewport;t&&(t.removeEventListener(\"resize\",this.onResize),this.viewport=null),window.removeEventListener(\"touchstart\",this.onTouchstart,!1),window.removeEventListener(\"touchmove\",this.onTouchmove,!1),window.removeEventListener(\"wheel\",this.onWheel,{passive:!1})}attach(){this.fancybox.on(\"initLayout\",this.onReady)}detach(){this.fancybox.off(\"initLayout\",this.onReady),this.cleanup()}},Thumbs:C,Html:P,Toolbar:k,Image:T,Hash:L};const M={startIndex:0,preload:1,infinite:!0,showClass:\"fancybox-zoomInUp\",hideClass:\"fancybox-fadeOut\",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:\"close\",closeButton:\"inside\",dragToClose:!0,keyboard:{Escape:\"close\",Delete:\"close\",Backspace:\"close\",PageUp:\"next\",PageDown:\"prev\",ArrowUp:\"next\",ArrowDown:\"prev\",ArrowRight:\"next\",ArrowLeft:\"prev\"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:\"Close\",NEXT:\"Next\",PREV:\"Previous\",MODAL:\"You can close this modal content with the ESC key\",ERROR:\"Something Went Wrong, Please Try Again Later\",IMAGE_ERROR:\"Image Not Found\",ELEMENT_NOT_FOUND:\"HTML Element Not Found\",AJAX_NOT_FOUND:\"Error Loading AJAX : Not Found\",AJAX_FORBIDDEN:\"Error Loading AJAX : Forbidden\",IFRAME_ERROR:\"Error Loading Page\",TOGGLE_ZOOM:\"Toggle zoom level\",TOGGLE_THUMBS:\"Toggle thumbnails\",TOGGLE_SLIDESHOW:\"Toggle slideshow\",TOGGLE_FULLSCREEN:\"Toggle full-screen mode\",DOWNLOAD:\"Download\"}},I=new Map;let F=0;class R extends l{constructor(t,i={}){t=t.map((t=>(t.width&&(t._width=t.width),t.height&&(t._height=t.height),t))),super(e(!0,{},M,i)),this.bindHandlers(),this.state=\"init\",this.setItems(t),this.attachPlugins(R.Plugins),this.trigger(\"init\"),!0===this.option(\"hideScrollbar\")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),I.set(this.id,this),this.trigger(\"prepare\"),this.state=\"ready\",this.trigger(\"ready\"),this.$container.setAttribute(\"aria-hidden\",\"false\"),this.option(\"trapFocus\")&&this.focus()}option(t,...e){const i=this.getSlide();let s=i?i[t]:void 0;return void 0!==s?(\"function\"==typeof s&&(s=s.call(this,this,...e)),s):super.option(t,...e)}bindHandlers(){for(const t of[\"onMousedown\",\"onKeydown\",\"onClick\",\"onFocus\",\"onCreateSlide\",\"onSettle\",\"onTouchMove\",\"onTouchEnd\",\"onTransform\"])this[t]=this[t].bind(this)}attachEvents(){document.addEventListener(\"mousedown\",this.onMousedown),document.addEventListener(\"keydown\",this.onKeydown,!0),this.option(\"trapFocus\")&&document.addEventListener(\"focus\",this.onFocus,!0),this.$container.addEventListener(\"click\",this.onClick)}detachEvents(){document.removeEventListener(\"mousedown\",this.onMousedown),document.removeEventListener(\"keydown\",this.onKeydown,!0),document.removeEventListener(\"focus\",this.onFocus,!0),this.$container.removeEventListener(\"click\",this.onClick)}initLayout(){this.$root=this.option(\"parentEl\")||document.body;let t=this.option(\"template.main\");t&&(this.$root.insertAdjacentHTML(\"beforeend\",this.localize(t)),this.$container=this.$root.querySelector(\".fancybox__container\")),this.$container||(this.$container=document.createElement(\"div\"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:\"fancybox__container\",role:\"dialog\",tabIndex:\"-1\",\"aria-modal\":\"true\",\"aria-hidden\":\"true\",\"aria-label\":this.localize(\"{{MODAL}}\")}).forEach((t=>this.$container.setAttribute(...t))),this.option(\"animated\")&&this.$container.classList.add(\"is-animated\"),this.$backdrop=this.$container.querySelector(\".fancybox__backdrop\"),this.$backdrop||(this.$backdrop=document.createElement(\"div\"),this.$backdrop.classList.add(\"fancybox__backdrop\"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(\".fancybox__carousel\"),this.$carousel||(this.$carousel=document.createElement(\"div\"),this.$carousel.classList.add(\"fancybox__carousel\"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute(\"id\"),this.id||(this.id=this.options.id||++F,this.$container.setAttribute(\"id\",\"fancybox-\"+this.id));const e=this.option(\"mainClass\");return e&&this.$container.classList.add(...e.split(\" \")),document.documentElement.classList.add(\"with-fancybox\"),this.trigger(\"initLayout\"),this}setItems(t){const e=[];for(const i of t){const t=i.$trigger;if(t){const e=t.dataset||{};i.src=e.src||t.getAttribute(\"href\")||i.src,i.type=e.type||i.type,!i.src&&t instanceof HTMLImageElement&&(i.src=t.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let t=i.$trigger&&i.$trigger.origTarget;t&&(s=t instanceof HTMLImageElement?t:t.querySelector(\"img:not([aria-hidden])\")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector(\"img:not([aria-hidden])\"))}i.$thumb=s||null;let o=i.thumb;!o&&s&&(o=s.currentSrc||s.src,!o&&s.dataset&&(o=s.dataset.lazySrc||s.dataset.src)),o||\"image\"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||\"\",e.push(i)}this.items=e}initCarousel(){return this.Carousel=new y(this.$carousel,e(!0,{},{prefix:\"\",classNames:{viewport:\"fancybox__viewport\",track:\"fancybox__track\",slide:\"fancybox__slide\"},textSelection:!0,preload:this.option(\"preload\"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option(\"infinite\"),infiniteY:!0,l10n:this.option(\"l10n\"),Dots:!1,Navigation:{classNames:{main:\"fancybox__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option(\"dragToClose\"),lockAxis:()=>{if(this.Carousel){let t=\"x\";return this.option(\"dragToClose\")&&(t+=\"y\"),t}}},on:{\"*\":(t,...e)=>this.trigger(`Carousel.${t}`,...e),init:t=>this.Carousel=t,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option(\"Carousel\"))),this.option(\"dragToClose\")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger(\"initCarousel\"),this}onCreateSlide(t,e){let i=e.caption||\"\";if(\"function\"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,e)),\"string\"==typeof i&&i.length){const t=document.createElement(\"div\"),s=`fancybox__caption_${this.id}_${e.index}`;t.className=\"fancybox__caption\",t.innerHTML=i,t.setAttribute(\"id\",s),e.$caption=e.$el.appendChild(t),e.$el.classList.add(\"has-caption\"),e.$el.setAttribute(\"aria-labelledby\",s)}}onSettle(){this.option(\"autoFocus\")&&this.focus()}onFocus(t){this.isTopmost()&&this.focus(t)}onClick(t){if(t.defaultPrevented)return;let e=t.composedPath()[0];if(e.matches(\"[data-fancybox-close]\"))return t.preventDefault(),void R.close(!1,t);if(e.matches(\"[data-fancybox-next]\"))return t.preventDefault(),void R.next();if(e.matches(\"[data-fancybox-prev]\"))return t.preventDefault(),void R.prev();const i=document.activeElement;if(i){if(i.closest(\"[contenteditable]\"))return;e.matches(x)||i.blur()}if(e.closest(\".fancybox__content\"))return;if(getSelection().toString().length)return;if(!1===this.trigger(\"click\",t))return;switch(this.option(\"click\")){case\"close\":this.close();break;case\"next\":this.next()}}onTouchMove(){const t=this.getSlide().Panzoom;return!t||1===t.content.scale}onTouchEnd(t){const e=t.dragOffset.y;Math.abs(e)>=150||Math.abs(e)>=35&&t.dragOffset.time<350?(this.option(\"hideClass\")&&(this.getSlide().hideClass=\"fancybox-throwOut\"+(t.content.y<0?\"Up\":\"Down\")),this.close()):\"y\"===t.lockAxis&&t.panTo({y:0})}onTransform(t){if(this.$backdrop){const e=Math.abs(t.content.y),i=e<1?\"\":Math.max(.33,Math.min(1,1-e/t.content.fitHeight*1.5));this.$container.style.setProperty(\"--fancybox-ts\",i?\"0s\":\"\"),this.$container.style.setProperty(\"--fancybox-opacity\",i)}}onMousedown(){\"ready\"===this.state&&document.body.classList.add(\"is-using-mouse\")}onKeydown(t){if(!this.isTopmost())return;document.body.classList.remove(\"is-using-mouse\");const e=t.key,i=this.option(\"keyboard\");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const s=t.composedPath()[0],o=document.activeElement&&document.activeElement.classList,n=o&&o.contains(\"carousel__button\");if(\"Escape\"!==e&&!n){if(t.target.isContentEditable||-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(s.nodeName))return}if(!1===this.trigger(\"keydown\",e,t))return;const a=i[e];\"function\"==typeof this[a]&&this[a]()}getSlide(){const t=this.Carousel;if(!t)return null;const e=null===t.page?t.option(\"initialPage\"):t.page,i=t.pages||[];return i.length&&i[e]?i[e].slides[0]:null}focus(t){if(R.ignoreFocusChange)return;if([\"init\",\"closing\",\"customClosing\",\"destroy\"].indexOf(this.state)>-1)return;const e=this.$container,i=this.getSlide(),s=\"done\"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;t&&t.preventDefault(),R.ignoreFocusChange=!0;const o=Array.from(e.querySelectorAll(x));let n,a=[];for(let t of o){const e=t.offsetParent,i=s&&s.contains(t),o=!this.Carousel.$viewport.contains(t);e&&(i||o)?(a.push(t),void 0!==t.dataset.origTabindex&&(t.tabIndex=t.dataset.origTabindex,t.removeAttribute(\"data-orig-tabindex\")),(t.hasAttribute(\"autoFocus\")||!n&&i&&!t.classList.contains(\"carousel__button\"))&&(n=t)):(t.dataset.origTabindex=void 0===t.dataset.origTabindex?t.getAttribute(\"tabindex\"):t.dataset.origTabindex,t.tabIndex=-1)}t?a.indexOf(t.target)>-1?this.lastFocus=t.target:this.lastFocus===e?w(a[a.length-1]):w(e):this.option(\"autoFocus\")&&n?w(n):a.indexOf(document.activeElement)<0&&w(e),this.lastFocus=document.activeElement,R.ignoreFocusChange=!1}hideScrollbar(){if(!v)return;const t=window.innerWidth-document.documentElement.getBoundingClientRect().width,e=\"fancybox-style-noscroll\";let i=document.getElementById(e);i||t>0&&(i=document.createElement(\"style\"),i.id=e,i.type=\"text/css\",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${t}px;}`,document.getElementsByTagName(\"head\")[0].appendChild(i),document.body.classList.add(\"compensate-for-scrollbar\"))}revealScrollbar(){document.body.classList.remove(\"compensate-for-scrollbar\");const t=document.getElementById(\"fancybox-style-noscroll\");t&&t.remove()}clearContent(t){this.Carousel.trigger(\"removeSlide\",t),t.$content&&(t.$content.remove(),t.$content=null),t.$closeButton&&(t.$closeButton.remove(),t.$closeButton=null),t._className&&t.$el.classList.remove(t._className)}setContent(t,e,i={}){let s;const o=t.$el;if(e instanceof HTMLElement)[\"img\",\"iframe\",\"video\",\"audio\"].indexOf(e.nodeName.toLowerCase())>-1?(s=document.createElement(\"div\"),s.appendChild(e)):s=e;else{const t=document.createRange().createContextualFragment(e);s=document.createElement(\"div\"),s.appendChild(t)}if(t.filter&&!t.error&&(s=s.querySelector(t.filter)),s instanceof Element)return t._className=`has-${i.suffix||t.type||\"unknown\"}`,o.classList.add(t._className),s.classList.add(\"fancybox__content\"),\"none\"!==s.style.display&&\"none\"!==getComputedStyle(s).getPropertyValue(\"display\")||(s.style.display=t.display||this.option(\"defaultDisplay\")||\"flex\"),t.id&&s.setAttribute(\"id\",t.id),t.$content=s,o.prepend(s),this.manageCloseButton(t),\"loading\"!==t.state&&this.revealContent(t),s;this.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}manageCloseButton(t){const e=void 0===t.closeButton?this.option(\"closeButton\"):t.closeButton;if(!e||\"top\"===e&&this.$closeButton)return;const i=document.createElement(\"button\");i.classList.add(\"carousel__button\",\"is-close\"),i.setAttribute(\"title\",this.options.l10n.CLOSE),i.innerHTML=this.option(\"template.closeButton\"),i.addEventListener(\"click\",(t=>this.close(t))),\"inside\"===e?(t.$closeButton&&t.$closeButton.remove(),t.$closeButton=t.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(t){this.trigger(\"reveal\",t),t.$content.style.visibility=\"\";let e=!1;t.error||\"loading\"===t.state||null!==this.Carousel.prevPage||t.index!==this.options.startIndex||(e=void 0===t.showClass?this.option(\"showClass\"):t.showClass),e?(t.state=\"animating\",this.animateCSS(t.$content,e,(()=>{this.done(t)}))):this.done(t)}animateCSS(t,e,i){if(t&&t.dispatchEvent(new CustomEvent(\"animationend\",{bubbles:!0,cancelable:!0})),!t||!e)return void(\"function\"==typeof i&&i());const s=function(o){o.currentTarget===this&&(t.removeEventListener(\"animationend\",s),i&&i(),t.classList.remove(e))};t.addEventListener(\"animationend\",s),t.classList.add(e)}done(t){t.state=\"done\",this.trigger(\"done\",t);const e=this.getSlide();e&&t.index===e.index&&this.option(\"autoFocus\")&&this.focus()}setError(t,e){t.error=e,this.hideLoading(t),this.clearContent(t);const i=document.createElement(\"div\");i.classList.add(\"fancybox-error\"),i.innerHTML=this.localize(e||\"

{{ERROR}}

\"),this.setContent(t,i,{suffix:\"error\"})}showLoading(t){t.state=\"loading\",t.$el.classList.add(\"is-loading\");let e=t.$el.querySelector(\".fancybox__spinner\");e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__spinner\"),e.innerHTML=this.option(\"template.spinner\"),e.addEventListener(\"click\",(()=>{this.Carousel.Panzoom.velocity||this.close()})),t.$el.prepend(e))}hideLoading(t){const e=t.$el&&t.$el.querySelector(\".fancybox__spinner\");e&&(e.remove(),t.$el.classList.remove(\"is-loading\")),\"loading\"===t.state&&(this.trigger(\"load\",t),t.state=\"ready\")}next(){const t=this.Carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.Carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.Carousel&&this.Carousel.slideTo(...t)}isClosing(){return[\"closing\",\"customClosing\",\"destroy\"].includes(this.state)}isTopmost(){return R.getInstance().id==this.id}close(t){if(t&&t.preventDefault(),this.isClosing())return;if(!1===this.trigger(\"shouldClose\",t))return;if(this.state=\"closing\",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger(\"closing\",t),\"destroy\"===this.state)return;this.$container.setAttribute(\"aria-hidden\",\"true\"),this.$container.classList.add(\"is-closing\");const e=this.getSlide();if(this.Carousel.slides.forEach((t=>{t.$content&&t.index!==e.index&&this.Carousel.trigger(\"removeSlide\",t)})),\"closing\"===this.state){const t=void 0===e.hideClass?this.option(\"hideClass\"):e.hideClass;this.animateCSS(e.$content,t,(()=>{this.destroy()}),!0)}}destroy(){if(\"destroy\"===this.state)return;this.state=\"destroy\",this.trigger(\"destroy\");const t=this.option(\"placeFocusBack\")?this.option(\"triggerTarget\",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,t&&w(t),I.delete(this.id);const e=R.getInstance();e?e.focus():(document.documentElement.classList.remove(\"with-fancybox\"),document.body.classList.remove(\"is-using-mouse\"),this.revealScrollbar())}static show(t,e={}){return new R(t,e)}static fromEvent(t,e={}){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;const i=t.composedPath()[0];let s,o,n,a=i;if((a.matches(\"[data-fancybox-trigger]\")||(a=a.closest(\"[data-fancybox-trigger]\")))&&(e.triggerTarget=a,s=a&&a.dataset&&a.dataset.fancyboxTrigger),s){const t=document.querySelectorAll(`[data-fancybox=\"${s}\"]`),e=parseInt(a.dataset.fancyboxIndex,10)||0;a=t.length?t[e]:a}Array.from(R.openers.keys()).reverse().some((e=>{n=a||i;let s=!1;try{n instanceof Element&&(\"string\"==typeof e||e instanceof String)&&(s=n.matches(e)||(n=n.closest(e)))}catch(t){}return!!s&&(t.preventDefault(),o=e,!0)}));let r=!1;if(o){e.event=t,e.target=n,n.origTarget=i,r=R.fromOpener(o,e);const s=R.getInstance();s&&\"ready\"===s.state&&t.detail&&document.body.classList.add(\"is-using-mouse\")}return r}static fromOpener(t,i={}){let s=[],o=i.startIndex||0,n=i.target||null;const a=void 0!==(i=e({},i,R.openers.get(t))).groupAll&&i.groupAll,r=void 0===i.groupAttr?\"data-fancybox\":i.groupAttr,h=r&&n?n.getAttribute(`${r}`):\"\";if(!n||h||a){const e=i.root||(n?n.getRootNode():document.body);s=[].slice.call(e.querySelectorAll(t))}if(n&&!a&&(s=h?s.filter((t=>t.getAttribute(`${r}`)===h)):[n]),!s.length)return!1;const l=R.getInstance();return!(l&&s.indexOf(l.options.$trigger)>-1)&&(o=n?s.indexOf(n):o,s=s.map((function(t){const e=[\"false\",\"0\",\"no\",\"null\",\"undefined\"],i=[\"true\",\"1\",\"yes\"],s=Object.assign({},t.dataset),o={};for(let[t,n]of Object.entries(s))if(\"fancybox\"!==t)if(\"width\"===t||\"height\"===t)o[`_${t}`]=n;else if(\"string\"==typeof n||n instanceof String)if(e.indexOf(n)>-1)o[t]=!1;else if(i.indexOf(o[t])>-1)o[t]=!0;else try{o[t]=JSON.parse(n)}catch(e){o[t]=n}else o[t]=n;return t instanceof Element&&(o.$trigger=t),o})),new R(s,e({},i,{startIndex:o,$trigger:n})))}static bind(t,e={}){function i(){document.body.addEventListener(\"click\",R.fromEvent,!1)}v&&(R.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener(\"DOMContentLoaded\",i)),R.openers.set(t,e))}static unbind(t){R.openers.delete(t),R.openers.size||R.destroy()}static destroy(){let t;for(;t=R.getInstance();)t.destroy();R.openers=new Map,document.body.removeEventListener(\"click\",R.fromEvent,!1)}static getInstance(t){if(t)return I.get(t);return Array.from(I.values()).reverse().find((t=>!t.isClosing()&&t))||null}static close(t=!0,e){if(t)for(const t of I.values())t.close(e);else{const t=R.getInstance();t&&t.close(e)}}static next(){const t=R.getInstance();t&&t.next()}static prev(){const t=R.getInstance();t&&t.prev()}}R.version=\"4.0.31\",R.defaults=M,R.openers=new Map,R.Plugins=O,R.bind(\"[data-fancybox]\");for(const[t,e]of Object.entries(R.Plugins||{}))\"function\"==typeof e.create&&e.create(R);export{y as Carousel,R as Fancybox,d as Panzoom};\n","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n var acc = '';\n\n while (len--) {\n acc += str;\n }\n\n return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nexport var countBits = function countBits(x) {\n return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n if (str === void 0) {\n str = ' ';\n }\n\n return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n\n return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n if (bytes instanceof Uint8Array) {\n return bytes;\n }\n\n if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n // any non-number or NaN leads to empty uint8array\n // eslint-disable-next-line\n if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n bytes = 0;\n } else {\n bytes = [bytes];\n }\n }\n\n return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(16), 2, '0');\n }\n\n return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(2), 8, '0');\n }\n\n return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n if (b[0] === 0xFF) {\n return 'big';\n }\n\n if (b[0] === 0xCC) {\n return 'little';\n }\n\n return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$signed = _ref.signed,\n signed = _ref$signed === void 0 ? false : _ref$signed,\n _ref$le = _ref.le,\n le = _ref$le === void 0 ? false : _ref$le;\n\n bytes = toUint8(bytes);\n var fn = le ? 'reduce' : 'reduceRight';\n var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n var number = obj.call(bytes, function (total, byte, i) {\n var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n return total + BigInt(byte) * BYTE_TABLE[exponent];\n }, BigInt(0));\n\n if (signed) {\n var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n number = BigInt(number);\n\n if (number > max) {\n number -= max;\n number -= max;\n number -= BigInt(2);\n }\n }\n\n return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$le = _ref2.le,\n le = _ref2$le === void 0 ? false : _ref2$le;\n\n // eslint-disable-next-line\n if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n number = 0;\n }\n\n number = BigInt(number);\n var byteCount = countBytes(number);\n var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n for (var i = 0; i < byteCount; i++) {\n var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n if (number < 0) {\n bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n bytes[byteIndex] -= i === 0 ? 1 : 2;\n }\n }\n\n return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n if (!bytes) {\n return '';\n } // TODO: should toUint8 handle cases where we only have 8 bytes\n // but report more since this is a Uint16+ Array?\n\n\n bytes = Array.prototype.slice.call(bytes);\n var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n try {\n return decodeURIComponent(escape(string));\n } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n // or full non string data. Just return the potentially garbled string.\n }\n\n return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n string = string.toString();\n }\n\n if (typeof string !== 'string') {\n return new Uint8Array();\n } // If the string already is bytes, we don't have to do this\n // otherwise we do this so that we split multi length characters\n // into individual bytes\n\n\n if (!stringIsBytes) {\n string = unescape(encodeURIComponent(string));\n }\n\n var view = new Uint8Array(string.length);\n\n for (var i = 0; i < string.length; i++) {\n view[i] = string.charCodeAt(i);\n }\n\n return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n buffers[_key] = arguments[_key];\n }\n\n buffers = buffers.filter(function (b) {\n return b && (b.byteLength || b.length) && typeof b !== 'string';\n });\n\n if (buffers.length <= 1) {\n // for 0 length we will return empty uint8\n // for 1 length we return the first uint8\n return toUint8(buffers[0]);\n }\n\n var totalLen = buffers.reduce(function (total, buf, i) {\n return total + (buf.byteLength || buf.length);\n }, 0);\n var tempBuffer = new Uint8Array(totalLen);\n var offset = 0;\n buffers.forEach(function (buf) {\n buf = toUint8(buf);\n tempBuffer.set(buf, offset);\n offset += buf.byteLength;\n });\n return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n * Bytes to check in\n *\n * @param {Uint8Array|Array} b\n * Bytes to check for\n *\n * @param {Object} options\n * options\n *\n * @param {Array|Uint8Array} [offset=0]\n * offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n * mask to use on bytes before comparison.\n *\n * @return {boolean}\n * If all bytes in b are inside of a, taking into account\n * bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$offset = _ref3.offset,\n offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n _ref3$mask = _ref3.mask,\n mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n a = toUint8(a);\n b = toUint8(b); // ie 11 does not support uint8 every\n\n var fn = b.every ? b.every : Array.prototype.every;\n return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n fn.call(b, function (bByte, i) {\n var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n return bByte === aByte;\n });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n if (Uint8Array.prototype.slice) {\n return Uint8Array.prototype.slice.call(src, start, end);\n }\n\n return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n if (src.reverse) {\n return src.reverse();\n }\n\n return Array.prototype.reverse.call(src);\n};","import { padStart, toHexString, toBinaryString } from './byte-helpers.js'; // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax\n// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1\n\nexport var getAv1Codec = function getAv1Codec(bytes) {\n var codec = '';\n var profile = bytes[1] >>> 3;\n var level = bytes[1] & 0x1F;\n var tier = bytes[2] >>> 7;\n var highBitDepth = (bytes[2] & 0x40) >> 6;\n var twelveBit = (bytes[2] & 0x20) >> 5;\n var monochrome = (bytes[2] & 0x10) >> 4;\n var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;\n var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;\n var chromaSamplePosition = bytes[2] & 0x03;\n codec += profile + \".\" + padStart(level, 2, '0');\n\n if (tier === 0) {\n codec += 'M';\n } else if (tier === 1) {\n codec += 'H';\n }\n\n var bitDepth;\n\n if (profile === 2 && highBitDepth) {\n bitDepth = twelveBit ? 12 : 10;\n } else {\n bitDepth = highBitDepth ? 10 : 8;\n }\n\n codec += \".\" + padStart(bitDepth, 2, '0'); // TODO: can we parse color range??\n\n codec += \".\" + monochrome;\n codec += \".\" + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;\n return codec;\n};\nexport var getAvcCodec = function getAvcCodec(bytes) {\n var profileId = toHexString(bytes[1]);\n var constraintFlags = toHexString(bytes[2] & 0xFC);\n var levelId = toHexString(bytes[3]);\n return \"\" + profileId + constraintFlags + levelId;\n};\nexport var getHvcCodec = function getHvcCodec(bytes) {\n var codec = '';\n var profileSpace = bytes[1] >> 6;\n var profileId = bytes[1] & 0x1F;\n var tierFlag = (bytes[1] & 0x20) >> 5;\n var profileCompat = bytes.subarray(2, 6);\n var constraintIds = bytes.subarray(6, 12);\n var levelId = bytes[12];\n\n if (profileSpace === 1) {\n codec += 'A';\n } else if (profileSpace === 2) {\n codec += 'B';\n } else if (profileSpace === 3) {\n codec += 'C';\n }\n\n codec += profileId + \".\"; // ffmpeg does this in big endian\n\n var profileCompatVal = parseInt(toBinaryString(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...\n\n if (profileCompatVal > 255) {\n profileCompatVal = parseInt(toBinaryString(profileCompat), 2);\n }\n\n codec += profileCompatVal.toString(16) + \".\";\n\n if (tierFlag === 0) {\n codec += 'L';\n } else {\n codec += 'H';\n }\n\n codec += levelId;\n var constraints = '';\n\n for (var i = 0; i < constraintIds.length; i++) {\n var v = constraintIds[i];\n\n if (v) {\n if (constraints) {\n constraints += '.';\n }\n\n constraints += v.toString(16);\n }\n }\n\n if (constraints) {\n codec += \".\" + constraints;\n }\n\n return codec;\n};","import window from 'global/window';\nvar regexs = {\n // to determine mime types\n mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n // to determine if a codec is audio or video\n video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n text: /^(stpp.ttml.im1t)/,\n // mux.js support regex\n muxerVideo: /^(avc0?1)/,\n muxerAudio: /^(mp4a)/,\n // match nothing as muxer does not support text right now.\n // there cannot never be a character before the start of a string\n // so this matches nothing.\n muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {string} codec\n * Codec string to translate\n * @return {string}\n * The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n if (!codec) {\n return codec;\n }\n\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n};\n/**\n * Replace the old apple-style `avc1.
.
` codec strings with the standard\n * `avc1.`\n *\n * @param {string[]} codecs\n * An array of codec strings to translate\n * @return {string[]}\n * The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the\n * standard `avc1.`.\n *\n * @param {string} codecString\n * The codec string\n * @return {string}\n * The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n * Number of codecs parsed\n * @property {string} [videoCodec]\n * Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n * Video object type indicator (if found)\n * @property {string|null} audioProfile\n * Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n * The codec string to parse\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n var codecs = codecString.split(',');\n var result = [];\n codecs.forEach(function (codec) {\n codec = codec.trim();\n var codecType;\n mediaTypes.forEach(function (name) {\n var match = regexs[name].exec(codec.toLowerCase());\n\n if (!match || match.length <= 1) {\n return;\n }\n\n codecType = name; // maintain codec case\n\n var type = codec.substring(0, match[1].length);\n var details = codec.replace(type, '');\n result.push({\n type: type,\n details: details,\n mediaType: name\n });\n });\n\n if (!codecType) {\n result.push({\n type: codec,\n details: '',\n mediaType: 'unknown'\n });\n }\n });\n return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n * The master playlist\n * @param {string} audioGroupId\n * ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n if (!audioGroup) {\n return null;\n }\n\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n\n if (audioType.default && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS);\n }\n }\n\n return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n if (!codecString || typeof codecString !== 'string') {\n return;\n }\n\n var codecs = codecString.toLowerCase().split(',').map(function (c) {\n return translateLegacyCodec(c.trim());\n }); // default to video type\n\n var type = 'video'; // only change to audio type if the only codec we have is\n // audio\n\n if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n type = 'audio';\n } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n // text uses application/ for now\n type = 'application';\n } // default the container to mp4\n\n\n var container = 'mp4'; // every codec must be able to go into the container\n // for that container to be the correct one\n\n if (codecs.every(function (c) {\n return regexs.mp4.test(c);\n })) {\n container = 'mp4';\n } else if (codecs.every(function (c) {\n return regexs.webm.test(c);\n })) {\n container = 'webm';\n } else if (codecs.every(function (c) {\n return regexs.ogg.test(c);\n })) {\n container = 'ogg';\n }\n\n return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return codecString.toLowerCase().split(',').every(function (codec) {\n codec = codec.trim(); // any match is supported.\n\n for (var i = 0; i < upperMediaTypes.length; i++) {\n var type = upperMediaTypes[i];\n\n if (regexs[\"muxer\" + type].test(codec)) {\n return true;\n }\n }\n\n return false;\n });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","import { toUint8, bytesMatch } from './byte-helpers.js';\nimport { findBox } from './mp4-helpers.js';\nimport { findEbml, EBML_TAGS } from './ebml-helpers.js';\nimport { getId3Offset } from './id3-helpers.js';\nimport { findH264Nal, findH265Nal } from './nal-helpers.js';\nvar CONSTANTS = {\n // \"webm\" string literal in hex\n 'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n // \"matroska\" string literal in hex\n 'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n // \"fLaC\" string literal in hex\n 'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n // \"OggS\" string literal in hex\n 'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n // ac-3 sync byte, also works for ec-3 as that is simply a codec\n // of ac-3\n 'ac3': toUint8([0x0b, 0x77]),\n // \"RIFF\" string literal in hex used for wav and avi\n 'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n // \"AVI\" string literal in hex\n 'avi': toUint8([0x41, 0x56, 0x49]),\n // \"WAVE\" string literal in hex\n 'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n // \"ftyp3g\" string literal in hex\n '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n // \"ftyp\" string literal in hex\n 'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n // \"styp\" string literal in hex\n 'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n // \"ftypqt\" string literal in hex\n 'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n // moov string literal in hex\n 'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n // moof string literal in hex\n 'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n aac: function aac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x10], {\n offset: offset,\n mask: [0xFF, 0x16]\n });\n },\n mp3: function mp3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x02], {\n offset: offset,\n mask: [0xFF, 0x06]\n });\n },\n webm: function webm(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n return bytesMatch(docType, CONSTANTS.webm);\n },\n mkv: function mkv(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n return bytesMatch(docType, CONSTANTS.matroska);\n },\n mp4: function mp4(bytes) {\n // if this file is another base media file format, it is not mp4\n if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n return false;\n } // if this file starts with a ftyp or styp box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.mp4, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n offset: 4\n })) {\n return true;\n } // if this file starts with a moof/moov box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.moof, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.moov, {\n offset: 4\n })) {\n return true;\n }\n },\n mov: function mov(bytes) {\n return bytesMatch(bytes, CONSTANTS.mov, {\n offset: 4\n });\n },\n '3gp': function gp(bytes) {\n return bytesMatch(bytes, CONSTANTS['3gp'], {\n offset: 4\n });\n },\n ac3: function ac3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.ac3, {\n offset: offset\n });\n },\n ts: function ts(bytes) {\n if (bytes.length < 189 && bytes.length >= 1) {\n return bytes[0] === 0x47;\n }\n\n var i = 0; // check the first 376 bytes for two matching sync bytes\n\n while (i + 188 < bytes.length && i < 188) {\n if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n flac: function flac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.flac, {\n offset: offset\n });\n },\n ogg: function ogg(bytes) {\n return bytesMatch(bytes, CONSTANTS.ogg);\n },\n avi: function avi(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n offset: 8\n });\n },\n wav: function wav(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n offset: 8\n });\n },\n 'h264': function h264(bytes) {\n // find seq_parameter_set_rbsp\n return findH264Nal(bytes, 7, 3).length;\n },\n 'h265': function h265(bytes) {\n // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n return findH265Nal(bytes, [32, 33], 3).length;\n }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n var isLikelyFn = _isLikely[type];\n\n _isLikely[type] = function (bytes) {\n return isLikelyFn(toUint8(bytes));\n };\n}); // export after wrapping\n\nexport var isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexport var detectContainerForBytes = function detectContainerForBytes(bytes) {\n bytes = toUint8(bytes);\n\n for (var i = 0; i < isLikelyTypes.length; i++) {\n var type = isLikelyTypes[i];\n\n if (isLikely[type](bytes)) {\n return type;\n }\n }\n\n return '';\n}; // fmp4 is not a container\n\nexport var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n return findBox(bytes, ['moof']).length > 0;\n};","import { toUint8, bytesToNumber, bytesMatch, bytesToString, numberToBytes, padStart } from './byte-helpers';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js'; // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nexport var EBML_TAGS = {\n EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n DocType: toUint8([0x42, 0x82]),\n Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n Track: toUint8([0xAE]),\n TrackNumber: toUint8([0xd7]),\n DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n TrackEntry: toUint8([0xAE]),\n TrackType: toUint8([0x83]),\n FlagDefault: toUint8([0x88]),\n CodecID: toUint8([0x86]),\n CodecPrivate: toUint8([0x63, 0xA2]),\n VideoTrack: toUint8([0xe0]),\n AudioTrack: toUint8([0xe1]),\n // Not used yet, but will be used for live webm/mkv\n // see https://www.matroska.org/technical/basics.html#block-structure\n // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n Timestamp: toUint8([0xE7]),\n TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n BlockGroup: toUint8([0xA0]),\n BlockDuration: toUint8([0x9B]),\n Block: toUint8([0xA1]),\n SimpleBlock: toUint8([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n var len = 1;\n\n for (var i = 0; i < LENGTH_TABLE.length; i++) {\n if (byte & LENGTH_TABLE[i]) {\n break;\n }\n\n len++;\n }\n\n return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n if (removeLength === void 0) {\n removeLength = true;\n }\n\n if (signed === void 0) {\n signed = false;\n }\n\n var length = getLength(bytes[offset]);\n var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n // as they will be modified below to remove the dataSizeLen bits and we do not\n // want to modify the original data. normally we could just call slice on\n // uint8array but ie 11 does not support that...\n\n if (removeLength) {\n valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n valueBytes[0] ^= LENGTH_TABLE[length - 1];\n }\n\n return {\n length: length,\n value: bytesToNumber(valueBytes, {\n signed: signed\n }),\n bytes: valueBytes\n };\n};\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return path.match(/.{1,2}/g).map(function (p) {\n return normalizePath(p);\n });\n }\n\n if (typeof path === 'number') {\n return numberToBytes(path);\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n if (offset >= bytes.length) {\n return bytes.length;\n }\n\n var innerid = getvint(bytes, offset, false);\n\n if (bytesMatch(id.bytes, innerid.bytes)) {\n return offset;\n }\n\n var dataHeader = getvint(bytes, offset + innerid.length);\n return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n * converting the byte to binary and counting the zeros\n * before a 1. Then you add 1 to that. Examples\n * 00011111 = length 4 because there are 3 zeros before a 1.\n * 00100000 = length 3 because there are 2 zeros before a 1.\n * 00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n * Then all the bytes are merged into a value. NOTE: this\n * is not the case for id ebml tags as there id includes\n * length bits.\n *\n */\n\n\nexport var findEbml = function findEbml(bytes, paths) {\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var id = getvint(bytes, i, false);\n var dataHeader = getvint(bytes, i + id.length);\n var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n if (dataHeader.value === 0x7f) {\n dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n\n if (dataHeader.value !== bytes.length) {\n dataHeader.value -= dataStart;\n }\n }\n\n var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n var data = bytes.subarray(dataStart, dataEnd);\n\n if (bytesMatch(paths[0], id.bytes)) {\n if (paths.length === 1) {\n // this is the end of the paths and we've found the tag we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next tag inside of the data\n // of this one\n results = results.concat(findEbml(data, paths.slice(1)));\n }\n }\n\n var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n i += totalLength;\n }\n\n return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nexport var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n var duration;\n\n if (type === 'group') {\n duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n if (duration) {\n duration = bytesToNumber(duration);\n duration = 1 / timestampScale * duration * timestampScale / 1000;\n }\n\n block = findEbml(block, [EBML_TAGS.Block])[0];\n type = 'block'; // treat data as a block after this point\n }\n\n var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n var trackNumber = getvint(block, 0);\n var timestamp = dv.getInt16(trackNumber.length, false);\n var flags = block[trackNumber.length + 2];\n var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n var parsed = {\n duration: duration,\n trackNumber: trackNumber.value,\n keyframe: type === 'simple' && flags >> 7 === 1,\n invisible: (flags & 0x08) >> 3 === 1,\n lacing: (flags & 0x06) >> 1,\n discardable: type === 'simple' && (flags & 0x01) === 1,\n frames: [],\n pts: ptsdts,\n dts: ptsdts,\n timestamp: timestamp\n };\n\n if (!parsed.lacing) {\n parsed.frames.push(data);\n return parsed;\n }\n\n var numberOfFrames = data[0] + 1;\n var frameSizes = [];\n var offset = 1; // Fixed\n\n if (parsed.lacing === 2) {\n var sizeOfFrame = (data.length - offset) / numberOfFrames;\n\n for (var i = 0; i < numberOfFrames; i++) {\n frameSizes.push(sizeOfFrame);\n }\n } // xiph\n\n\n if (parsed.lacing === 1) {\n for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n var size = 0;\n\n do {\n size += data[offset];\n offset++;\n } while (data[offset - 1] === 0xFF);\n\n frameSizes.push(size);\n }\n } // ebml\n\n\n if (parsed.lacing === 3) {\n // first vint is unsinged\n // after that vints are singed and\n // based on a compounding size\n var _size = 0;\n\n for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true);\n _size += vint.value;\n frameSizes.push(_size);\n offset += vint.length;\n }\n }\n\n frameSizes.forEach(function (size) {\n parsed.frames.push(data.subarray(offset, offset + size));\n offset += size;\n });\n return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n var i = 0;\n var params = {};\n\n while (i < bytes.length) {\n var id = bytes[i] & 0x7f;\n var len = bytes[i + 1];\n var val = void 0;\n\n if (len === 1) {\n val = bytes[i + 2];\n } else {\n val = bytes.subarray(i + 2, i + 2 + len);\n }\n\n if (id === 1) {\n params.profile = val;\n } else if (id === 2) {\n params.level = val;\n } else if (id === 3) {\n params.bitDepth = val;\n } else if (id === 4) {\n params.chromaSubsampling = val;\n } else {\n params[id] = val;\n }\n\n i += 2 + len;\n }\n\n return params;\n};\n\nexport var parseTracks = function parseTracks(bytes) {\n bytes = toUint8(bytes);\n var decodedTracks = [];\n var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n return decodedTracks;\n }\n\n tracks.forEach(function (track) {\n var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\n if (!trackType || !trackType.length) {\n return;\n } // 1 is video, 2 is audio, 17 is subtitle\n // other values are unimportant in this context\n\n\n if (trackType[0] === 1) {\n trackType = 'video';\n } else if (trackType[0] === 2) {\n trackType = 'audio';\n } else if (trackType[0] === 17) {\n trackType = 'subtitle';\n } else {\n return;\n } // todo parse language\n\n\n var decodedTrack = {\n rawCodec: bytesToString(findEbml(track, [EBML_TAGS.CodecID])[0]),\n type: trackType,\n codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n number: bytesToNumber(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n defaultDuration: bytesToNumber(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n default: findEbml(track, [EBML_TAGS.FlagDefault])[0],\n rawData: track\n };\n var codec = '';\n\n if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n codec = \"avc1.\" + getAvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n codec = \"hev1.\" + getHvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n } else {\n codec = 'mp4v.20.9';\n }\n } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n codec = 'theora';\n } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n codec = 'vp8';\n } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n profile = _parseVp9Private.profile,\n level = _parseVp9Private.level,\n bitDepth = _parseVp9Private.bitDepth,\n chromaSubsampling = _parseVp9Private.chromaSubsampling;\n\n codec = 'vp09.';\n codec += padStart(profile, 2, '0') + \".\";\n codec += padStart(level, 2, '0') + \".\";\n codec += padStart(bitDepth, 2, '0') + \".\";\n codec += \"\" + padStart(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n codec += \".\" + padStart(colourPrimaries[0], 2, '0');\n codec += \".\" + padStart(transferCharacteristics[0], 2, '0');\n codec += \".\" + padStart(matrixCoefficients[0], 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag[0], 2, '0');\n }\n } else {\n codec = 'vp9';\n }\n } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n codec = \"av01.\" + getAv1Codec(decodedTrack.codecPrivate);\n } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n codec = 'alac';\n } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n codec = 'mp2';\n } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n codec = 'mp3';\n } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n } else {\n codec = 'mp4a.40.2';\n }\n } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n codec = 'ac-3';\n } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n codec = 'pcm';\n } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n codec = 'speex';\n } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n codec = 'ec-3';\n } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n codec = 'vorbis';\n } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n codec = 'flac';\n } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n codec = 'opus';\n }\n\n decodedTrack.codec = codec;\n decodedTracks.push(decodedTrack);\n });\n return decodedTracks.sort(function (a, b) {\n return a.number - b.number;\n });\n};\nexport var parseData = function parseData(data, tracks) {\n var allBlocks = [];\n var segment = findEbml(data, [EBML_TAGS.Segment])[0];\n var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n if (timestampScale && timestampScale.length) {\n timestampScale = bytesToNumber(timestampScale);\n } else {\n timestampScale = 1000000;\n }\n\n var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n if (!tracks) {\n tracks = parseTracks(segment);\n }\n\n clusters.forEach(function (cluster, ci) {\n var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n return {\n type: 'simple',\n data: b\n };\n });\n var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n return {\n type: 'group',\n data: b\n };\n });\n var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n\n if (timestamp && timestamp.length) {\n timestamp = bytesToNumber(timestamp);\n } // get all blocks then sort them into the correct order\n\n\n var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n return a.data.byteOffset - b.data.byteOffset;\n });\n blocks.forEach(function (block, bi) {\n var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp);\n allBlocks.push(decoded);\n });\n });\n return {\n tracks: tracks,\n blocks: allBlocks\n };\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nvar ID3 = toUint8([0x49, 0x44, 0x33]);\nexport var getId3Size = function getId3Size(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n var flags = bytes[offset + 5];\n var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n var footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n\n return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n\n if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n offset: offset\n })) {\n return offset;\n }\n\n offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n // have multiple ID3 tag sections even though\n // they should not.\n\n return getId3Offset(bytes, offset);\n};","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n * Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n * VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n if (MPEGURL_REGEX.test(type)) {\n return 'hls';\n }\n\n if (DASH_REGEX.test(type)) {\n return 'dash';\n } // Denotes the special case of a manifest object passed to http-streaming instead of a\n // source URL.\n //\n // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n //\n // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n // project, and the +json suffix identifies the structure of the media type.\n\n\n if (type === 'application/vnd.videojs.vhs+json') {\n return 'vhs-json';\n }\n\n return null;\n};","import { stringToBytes, toUint8, bytesMatch, bytesToString, toHexString, padStart, bytesToNumber } from './byte-helpers.js';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js';\nimport { parseOpusHead } from './opus-helpers.js';\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return stringToBytes(path);\n }\n\n if (typeof path === 'number') {\n return path;\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n bytes = toUint8(bytes);\n var results = [];\n var i = 0;\n\n while (bytes.length > i) {\n var tag = bytes[i];\n var size = 0;\n var headerSize = 0; // tag\n\n headerSize++;\n var byte = bytes[headerSize]; // first byte\n\n headerSize++;\n\n while (byte & 0x80) {\n size = (byte & 0x7F) << 7;\n byte = bytes[headerSize];\n headerSize++;\n }\n\n size += byte & 0x7F;\n\n for (var z = 0; z < DESCRIPTORS.length; z++) {\n var _DESCRIPTORS$z = DESCRIPTORS[z],\n id = _DESCRIPTORS$z.id,\n parser = _DESCRIPTORS$z.parser;\n\n if (tag === id) {\n results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n break;\n }\n }\n\n i += size + headerSize;\n }\n\n return results;\n};\nDESCRIPTORS = [{\n id: 0x03,\n parser: function parser(bytes) {\n var desc = {\n tag: 0x03,\n id: bytes[0] << 8 | bytes[1],\n flags: bytes[2],\n size: 3,\n dependsOnEsId: 0,\n ocrEsId: 0,\n descriptors: [],\n url: ''\n }; // depends on es id\n\n if (desc.flags & 0x80) {\n desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n } // url\n\n\n if (desc.flags & 0x40) {\n var len = bytes[desc.size];\n desc.url = bytesToString(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n desc.size += len;\n } // ocr es id\n\n\n if (desc.flags & 0x20) {\n desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n }\n\n desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || [];\n return desc;\n }\n}, {\n id: 0x04,\n parser: function parser(bytes) {\n // DecoderConfigDescriptor\n var desc = {\n tag: 0x04,\n oti: bytes[0],\n streamType: bytes[1],\n bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n descriptors: parseDescriptors(bytes.subarray(13))\n };\n return desc;\n }\n}, {\n id: 0x05,\n parser: function parser(bytes) {\n // DecoderSpecificInfo\n return {\n tag: 0x05,\n bytes: bytes\n };\n }\n}, {\n id: 0x06,\n parser: function parser(bytes) {\n // SLConfigDescriptor\n return {\n tag: 0x06,\n bytes: bytes\n };\n }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n * An array of paths or a single path representing the name\n * of boxes to search through in bytes. Paths may be\n * uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n * Should we search only for complete boxes on the final path.\n * This is very useful when you do not want to get back partial boxes\n * in the case of streaming files.\n *\n * @return {Uint8Array[]}\n * An array of the end paths that we found.\n */\n\nexport var findBox = function findBox(bytes, paths, complete) {\n if (complete === void 0) {\n complete = false;\n }\n\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n // short-circuit the search for empty paths\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n if (size === 0) {\n break;\n }\n\n var end = i + size;\n\n if (end > bytes.length) {\n // this box is bigger than the number of bytes we have\n // and complete is set, we cannot find any more boxes.\n if (complete) {\n break;\n }\n\n end = bytes.length;\n }\n\n var data = bytes.subarray(i + 8, end);\n\n if (bytesMatch(type, paths[0])) {\n if (paths.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next box along the path\n results.push.apply(results, findBox(data, paths.slice(1), complete));\n }\n }\n\n i = end;\n } // we've finished searching all of bytes\n\n\n return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n * The name of the box to find.\n *\n * @return {Uint8Array[]}\n * a subarray of bytes representing the name boxed we found.\n */\n\nexport var findNamedBox = function findNamedBox(bytes, name) {\n name = normalizePath(name);\n\n if (!name.length) {\n // short-circuit the search for empty paths\n return bytes.subarray(bytes.length);\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n if (bytesMatch(bytes.subarray(i, i + name.length), name)) {\n var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n var end = size > 1 ? i + size : bytes.byteLength;\n return bytes.subarray(i + 4, end);\n }\n\n i++;\n } // we've finished searching all of bytes\n\n\n return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n if (entrySize === void 0) {\n entrySize = 4;\n }\n\n if (parseEntry === void 0) {\n parseEntry = function parseEntry(d) {\n return bytesToNumber(d);\n };\n }\n\n var entries = [];\n\n if (!data || !data.length) {\n return entries;\n }\n\n var entryCount = bytesToNumber(data.subarray(4, 8));\n\n for (var i = 8; entryCount; i += entrySize, entryCount--) {\n entries.push(parseEntry(data.subarray(i, i + entrySize)));\n }\n\n return entries;\n};\n\nexport var buildFrameTable = function buildFrameTable(stbl, timescale) {\n var keySamples = parseSamples(findBox(stbl, ['stss'])[0]);\n var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]);\n var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) {\n return {\n sampleCount: bytesToNumber(entry.subarray(0, 4)),\n sampleDelta: bytesToNumber(entry.subarray(4, 8))\n };\n });\n var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n return {\n firstChunk: bytesToNumber(entry.subarray(0, 4)),\n samplesPerChunk: bytesToNumber(entry.subarray(4, 8)),\n sampleDescriptionIndex: bytesToNumber(entry.subarray(8, 12))\n };\n });\n var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n var frames = [];\n\n for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n var samplesInChunk = void 0;\n\n for (var i = 0; i < samplesToChunks.length; i++) {\n var sampleToChunk = samplesToChunks[i];\n var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n\n if (isThisOne) {\n samplesInChunk = sampleToChunk.samplesPerChunk;\n break;\n }\n }\n\n var chunkOffset = chunkOffsets[chunkIndex];\n\n for (var _i = 0; _i < samplesInChunk; _i++) {\n var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n var keyframe = !keySamples.length;\n\n if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n keyframe = true;\n }\n\n var frame = {\n keyframe: keyframe,\n start: chunkOffset,\n end: chunkOffset + frameEnd\n };\n\n for (var k = 0; k < timeToSamples.length; k++) {\n var _timeToSamples$k = timeToSamples[k],\n sampleCount = _timeToSamples$k.sampleCount,\n sampleDelta = _timeToSamples$k.sampleDelta;\n\n if (frames.length <= sampleCount) {\n // ms to ns\n var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n frame.duration = sampleDelta;\n break;\n }\n }\n\n frames.push(frame);\n chunkOffset += frameEnd;\n }\n }\n\n return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n var codec = bytesToString(bytes.subarray(0, 4));\n\n if (track.type === 'video') {\n track.info = track.info || {};\n track.info.width = bytes[28] << 8 | bytes[29];\n track.info.height = bytes[30] << 8 | bytes[31];\n } else if (track.type === 'audio') {\n track.info = track.info || {};\n track.info.channels = bytes[20] << 8 | bytes[21];\n track.info.bitDepth = bytes[22] << 8 | bytes[23];\n track.info.sampleRate = bytes[28] << 8 | bytes[29];\n }\n\n if (codec === 'avc1') {\n var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n codec += \".\" + getAvcCodec(avcC);\n track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n /* {\n configurationVersion: avcC[0],\n profile: avcC[1],\n profileCompatibility: avcC[2],\n level: avcC[3],\n lengthSizeMinusOne: avcC[4] & 0x3\n };\n let spsNalUnitCount = avcC[5] & 0x1F;\n const spsNalUnits = track.info.avc.spsNalUnits = [];\n // past spsNalUnitCount\n let offset = 6;\n while (spsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }\n let ppsNalUnitCount = avcC[offset];\n const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n // past ppsNalUnitCount\n offset += 1;\n while (ppsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }*/\n // HEVCDecoderConfigurationRecord\n } else if (codec === 'hvc1' || codec === 'hev1') {\n codec += \".\" + getHvcCodec(findNamedBox(bytes, 'hvcC'));\n } else if (codec === 'mp4a' || codec === 'mp4v') {\n var esds = findNamedBox(bytes, 'esds');\n var esDescriptor = parseDescriptors(esds.subarray(4))[0];\n var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n var tag = _ref.tag;\n return tag === 0x04;\n })[0];\n\n if (decoderConfig) {\n // most codecs do not have a further '.'\n // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n codec += '.' + toHexString(decoderConfig.oti);\n\n if (decoderConfig.oti === 0x40) {\n codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n } else if (decoderConfig.oti === 0x20) {\n codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n } else if (decoderConfig.oti === 0xdd) {\n codec = 'vorbis';\n }\n } else if (track.type === 'audio') {\n codec += '.40.2';\n } else {\n codec += '.20.9';\n }\n } else if (codec === 'av01') {\n // AV1DecoderConfigurationRecord\n codec += \".\" + getAv1Codec(findNamedBox(bytes, 'av1C'));\n } else if (codec === 'vp09') {\n // VPCodecConfigurationRecord\n var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n var profile = vpcC[0];\n var level = vpcC[1];\n var bitDepth = vpcC[2] >> 4;\n var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n var colourPrimaries = vpcC[3];\n var transferCharacteristics = vpcC[4];\n var matrixCoefficients = vpcC[5];\n codec += \".\" + padStart(profile, 2, '0');\n codec += \".\" + padStart(level, 2, '0');\n codec += \".\" + padStart(bitDepth, 2, '0');\n codec += \".\" + padStart(chromaSubsampling, 2, '0');\n codec += \".\" + padStart(colourPrimaries, 2, '0');\n codec += \".\" + padStart(transferCharacteristics, 2, '0');\n codec += \".\" + padStart(matrixCoefficients, 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag, 2, '0');\n } else if (codec === 'theo') {\n codec = 'theora';\n } else if (codec === 'spex') {\n codec = 'speex';\n } else if (codec === '.mp3') {\n codec = 'mp4a.40.34';\n } else if (codec === 'msVo') {\n codec = 'vorbis';\n } else if (codec === 'Opus') {\n codec = 'opus';\n var dOps = findNamedBox(bytes, 'dOps');\n track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n // Firefox requires a codecDelay for opus playback\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n track.info.codecDelay = 6500000;\n } else {\n codec = codec.toLowerCase();\n }\n /* eslint-enable */\n // flac, ac-3, ec-3, opus\n\n\n track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n if (frameTable === void 0) {\n frameTable = true;\n }\n\n bytes = toUint8(bytes);\n var traks = findBox(bytes, ['moov', 'trak'], true);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {\n bytes: trak\n };\n var mdia = findBox(trak, ['mdia'])[0];\n var hdlr = findBox(mdia, ['hdlr'])[0];\n var trakType = bytesToString(hdlr.subarray(8, 12));\n\n if (trakType === 'soun') {\n track.type = 'audio';\n } else if (trakType === 'vide') {\n track.type = 'video';\n } else {\n track.type = trakType;\n }\n\n var tkhd = findBox(trak, ['tkhd'])[0];\n\n if (tkhd) {\n var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n var tkhdVersion = view.getUint8(0);\n track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n\n var mdhd = findBox(mdia, ['mdhd'])[0];\n\n if (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n }\n\n var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n var stsd = findBox(stbl, ['stsd'])[0];\n var descriptionCount = bytesToNumber(stsd.subarray(4, 8));\n var offset = 8; // add codec and codec info\n\n while (descriptionCount--) {\n var len = bytesToNumber(stsd.subarray(offset, offset + 4));\n var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n addSampleDescription(track, sampleDescriptor);\n offset += 4 + len;\n }\n\n if (frameTable) {\n track.frameTable = buildFrameTable(stbl, track.timescale);\n } // codec has no sub parameters\n\n\n tracks.push(track);\n });\n return tracks;\n};\nexport var parseMediaInfo = function parseMediaInfo(bytes) {\n var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n if (!mvhd || !mvhd.length) {\n return;\n }\n\n var info = {}; // ms to ns\n // mvhd v1 has 8 byte duration and other fields too\n\n if (mvhd[0] === 1) {\n info.timestampScale = bytesToNumber(mvhd.subarray(20, 24));\n info.duration = bytesToNumber(mvhd.subarray(24, 32));\n } else {\n info.timestampScale = bytesToNumber(mvhd.subarray(12, 16));\n info.duration = bytesToNumber(mvhd.subarray(16, 20));\n }\n\n info.bytes = mvhd;\n return info;\n};","import { bytesMatch, toUint8 } from './byte-helpers.js';\nexport var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\nexport var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\nexport var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nexport var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n var positions = [];\n var i = 1; // Find all `Emulation Prevention Bytes`\n\n while (i < bytes.length - 2) {\n if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n positions.push(i + 2);\n i++;\n }\n\n i++;\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (positions.length === 0) {\n return bytes;\n } // Create a new array to hold the NAL unit data\n\n\n var newLength = bytes.length - positions.length;\n var newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === positions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n positions.shift();\n }\n\n newData[i] = bytes[sourceIndex];\n }\n\n return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n if (nalLimit === void 0) {\n nalLimit = Infinity;\n }\n\n bytes = toUint8(bytes);\n types = [].concat(types);\n var i = 0;\n var nalStart;\n var nalsFound = 0; // keep searching until:\n // we reach the end of bytes\n // we reach the maximum number of nals they want to seach\n // NOTE: that we disregard nalLimit when we have found the start\n // of the nal we want so that we can find the end of the nal we want.\n\n while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n var nalOffset = void 0;\n\n if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n nalOffset = 4;\n } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n nalOffset = 3;\n } // we are unsynced,\n // find the next nal unit\n\n\n if (!nalOffset) {\n i++;\n continue;\n }\n\n nalsFound++;\n\n if (nalStart) {\n return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n }\n\n var nalType = void 0;\n\n if (dataType === 'h264') {\n nalType = bytes[i + nalOffset] & 0x1f;\n } else if (dataType === 'h265') {\n nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n }\n\n if (types.indexOf(nalType) !== -1) {\n nalStart = i + nalOffset;\n } // nal header is 1 length for h264, and 2 for h265\n\n\n i += nalOffset + (dataType === 'h264' ? 1 : 2);\n }\n\n return bytes.subarray(0, 0);\n};\nexport var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h264', type, nalLimit);\n};\nexport var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h265', type, nalLimit);\n};","export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nexport var parseOpusHead = function parseOpusHead(bytes) {\n var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n var littleEndian = version !== 0;\n var config = {\n version: version,\n channels: view.getUint8(1),\n preSkip: view.getUint16(2, littleEndian),\n sampleRate: view.getUint32(4, littleEndian),\n outputGain: view.getUint16(8, littleEndian),\n channelMappingFamily: view.getUint8(10)\n };\n\n if (config.channelMappingFamily > 0 && bytes.length > 10) {\n config.streamCount = view.getUint8(11);\n config.twoChannelStreamCount = view.getUint8(12);\n config.channelMapping = [];\n\n for (var c = 0; c < config.channels; c++) {\n config.channelMapping.push(view.getUint8(13 + c));\n }\n }\n\n return config;\n};\nexport var setOpusHead = function setOpusHead(config) {\n var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n var view = new DataView(new ArrayBuffer(size));\n var littleEndian = config.version !== 0;\n view.setUint8(0, config.version);\n view.setUint8(1, config.channels);\n view.setUint16(2, config.preSkip, littleEndian);\n view.setUint32(4, config.sampleRate, littleEndian);\n view.setUint16(8, config.outputGain, littleEndian);\n view.setUint8(10, config.channelMappingFamily);\n\n if (config.channelMappingFamily > 0) {\n view.setUint8(11, config.streamCount);\n config.channelMapping.foreach(function (cm, i) {\n view.setUint8(12 + i, cm);\n });\n }\n\n return new Uint8Array(view.buffer);\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n if (decodeResponseBody === void 0) {\n decodeResponseBody = false;\n }\n\n return function (err, response, responseBody) {\n // if the XHR failed, return that error\n if (err) {\n callback(err);\n return;\n } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n if (response.statusCode >= 400 && response.statusCode <= 599) {\n var cause = responseBody;\n\n if (decodeResponseBody) {\n if (window.TextDecoder) {\n var charset = getCharset(response.headers && response.headers['content-type']);\n\n try {\n cause = new TextDecoder(charset).decode(responseBody);\n } catch (e) {}\n } else {\n cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n }\n }\n\n callback({\n cause: cause\n });\n return;\n } // otherwise, request succeeded\n\n\n callback(null, responseBody);\n };\n};\n\nfunction getCharset(contentTypeHeader) {\n if (contentTypeHeader === void 0) {\n contentTypeHeader = '';\n }\n\n return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n var _contentType$split = contentType.split('='),\n type = _contentType$split[0],\n value = _contentType$split[1];\n\n if (type.trim() === 'charset') {\n return value.trim();\n }\n\n return charset;\n }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\ncreateXHR.httpHandler = require('./http-handler.js');\n/**\n * @license\n * slighly modified parse-headers 2.0.2 \n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * \n */\n\nvar parseHeaders = function parseHeaders(headers) {\n var result = {};\n\n if (!headers) {\n return result;\n }\n\n headers.trim().split('\\n').forEach(function (row) {\n var index = row.indexOf(':');\n var key = row.slice(0, index).trim().toLowerCase();\n var value = row.slice(index + 1).trim();\n\n if (typeof result[key] === 'undefined') {\n result[key] = value;\n } else if (Array.isArray(result[key])) {\n result[key].push(value);\n } else {\n result[key] = [result[key], value];\n }\n });\n return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i]);\n }\n}\n\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n\n return true;\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri;\n\n if (isFunction(options)) {\n callback = options;\n\n if (typeof uri === \"string\") {\n params = {\n uri: uri\n };\n }\n } else {\n params = _extends({}, options, {\n uri: uri\n });\n }\n\n params.callback = callback;\n return params;\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n if (typeof options.callback === \"undefined\") {\n throw new Error(\"callback argument missing\");\n }\n\n var called = false;\n\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n\n return body;\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n\n if (!(evt instanceof Error)) {\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n }\n\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n } // will load the data & process the response in a special response object\n\n\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n\n var response = failureResponse;\n var err = null;\n\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\");\n }\n\n return callback(err, response, response.body);\n }\n\n var xhr = options.xhr || null;\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n\n var key;\n var aborted;\n var uri = xhr.url = options.uri || options.url;\n var method = xhr.method = options.method || \"GET\";\n var body = options.body || options.data;\n var headers = xhr.headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n\n if (\"json\" in options && options.json !== false) {\n isJson = true;\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n body = JSON.stringify(options.json === true ? body : options.json);\n }\n }\n\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n xhr.onprogress = function () {// IE must die\n };\n\n xhr.onabort = function () {\n aborted = true;\n };\n\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n } // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n\n xhr.abort(\"timeout\");\n var e = new Error(\"XMLHttpRequest timeout\");\n e.code = \"ETIMEDOUT\";\n errorFunc(e);\n }, options.timeout);\n }\n\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType;\n }\n\n if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n options.beforeSend(xhr);\n } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n\n\n xhr.send(body || null);\n return xhr;\n}\n\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML;\n }\n\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n } catch (e) {}\n\n return null;\n}\n\nfunction noop() {}","let items = document.querySelectorAll('.accordion__item')\r\nlet title = document.querySelectorAll('.accordion__title-wrapper')\r\n\r\nexport const toggleAccordion = () => {\r\n title.forEach((question) =>\r\n question.addEventListener('click', function () {\r\n let thisItem = this.parentNode\r\n\r\n items.forEach((item) => {\r\n if (thisItem == item) {\r\n thisItem.classList.toggle('active')\r\n return\r\n }\r\n item.classList.remove('active')\r\n })\r\n })\r\n )\r\n}\r\n","const burger = document.querySelector('.burger-js')\r\nconst menu = document.querySelector('.menu-js')\r\nconst menuLinks = document.querySelectorAll('.nav__link')\r\n\r\nexport const changeMenu = () => {\r\n\tburger?.addEventListener('click', () => {\r\n\t\tmenu?.classList.toggle('active')\r\n\t\tburger?.classList.toggle('active')\r\n\t\tif (menu?.classList.contains('active')) {\r\n\t\t\tdocument.body.style.overflowY = 'hidden'\r\n\t\t} else {\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t}\r\n\t})\r\n\r\n\tmenuLinks.forEach((el) => {\r\n\t\tel.addEventListener('click', () => {\r\n\t\t\tmenu?.classList.remove('active')\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t\tburger?.classList.remove('active')\r\n\t\t})\r\n\t})\r\n}\r\n","const btnNext = document.querySelector('.nav-history__next')\r\n\r\nexport const paintBtn = () => {\r\n try {\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n btnNext.classList.add('active')\r\n } else {\r\n btnNext.classList.remove('active')\r\n }\r\n }\r\n\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","import SmoothScroll from '../../../node_modules/smooth-scroll/dist/smooth-scroll.js'\r\nconst header = document.querySelector('header')\r\nconst btnUpWrapper = document.querySelector('.btn-up-wrapper')\r\n\r\nexport const addSmoothScroll = () => {\r\n const scroll = new SmoothScroll('a[href*=\"#\"]', {\r\n header: '.header',\r\n speed: 500\r\n })\r\n\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n header.classList.add('active')\r\n } else {\r\n header.classList.remove('active')\r\n }\r\n\r\n if (top >= 300) {\r\n btnUpWrapper.classList.add('active')\r\n } else {\r\n btnUpWrapper.classList.remove('active')\r\n }\r\n }\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n}\r\n","import Swiper, { Navigation, Pagination, Autoplay } from 'swiper'\r\nSwiper.use([Navigation, Pagination, Autoplay])\r\n\r\nexport const initializationSliders = () => {\r\n try {\r\n const recomendationsSlider = new Swiper('.recommendations__slider', {\r\n slidesPerView: '1',\r\n navigation: {\r\n nextEl: '.recommendations__slider-navigation-next',\r\n prevEl: '.recommendations__slider-navigation-prev'\r\n },\r\n loop: true\r\n })\r\n\r\n const goodsSlider = new Swiper('.goods__slider', {\r\n slidesPerView: 3,\r\n loop: true,\r\n navigation: {\r\n nextEl: '.goods__slider-next',\r\n prevEl: '.goods__slider-prev'\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.goods__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 940: {\r\n slidesPerView: 4\r\n },\r\n 764: {\r\n slidesPerView: 3\r\n },\r\n 600: {\r\n slidesPerView: 2\r\n },\r\n 0: {\r\n slidesPerView: 1\r\n }\r\n }\r\n })\r\n\r\n const professionalSlider = new Swiper('.professional__slider', {\r\n navigation: {\r\n nextEl: '.professional__slider-navigation-next',\r\n prevEl: '.professional__slider-navigation-prev'\r\n },\r\n paginationClickable: true,\r\n // loop: true,\r\n initialSlide: 1,\r\n centeredSlides: true,\r\n slidesPerView: 2,\r\n speed: 1000,\r\n zoom: {\r\n maxRatio: 1.6\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.professional__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 993: {\r\n spaceBetween: -180\r\n },\r\n 860: {\r\n spaceBetween: -260,\r\n slidesPerView: 2\r\n },\r\n 768: {\r\n spaceBetween: -200\r\n },\r\n 500: {\r\n spaceBetween: -80\r\n },\r\n 320: {\r\n slidesPerView: 1.6,\r\n spaceBetween: -80\r\n }\r\n },\r\n allowTouchMove: false\r\n })\r\n\r\n const interviewSlider = new Swiper('.interview__slider', {\r\n navigation: {\r\n nextEl: '.interview__slider-navigation-next',\r\n prevEl: '.interview__slider-navigation-prev'\r\n },\r\n pagination: {\r\n el: '.interview__slider-pagination',\r\n clickable: true\r\n },\r\n allowTouchMove: false,\r\n paginationClickable: true,\r\n centeredSlides: true,\r\n loop: true,\r\n speed: 1000\r\n })\r\n\r\n const partnersSlider = new Swiper('.partners__wrapper', {\r\n freeMode: true,\r\n grabCursor: true,\r\n centeredSlides: true,\r\n slidesPerView: 'auto',\r\n loop: true,\r\n speed: 2000,\r\n autoplay: {\r\n enabled: true,\r\n delay: 1,\r\n disableOnInteraction: true\r\n },\r\n freeModeMomentum: true\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseover', function () {\r\n partnersSlider.autoplay.stop()\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseout', function () {\r\n partnersSlider.autoplay.start()\r\n })\r\n\r\n window.addEventListener('scroll', () => {\r\n if (!partnersSlider.autoplay.running) {\r\n partnersSlider.autoplay.start()\r\n }\r\n })\r\n } catch (e) {\r\n console.error(e)\r\n }\r\n}\r\n","import videojs from 'video.js'\r\n\r\nconst playBtn = document.querySelector('.video__btn')\r\nconst videoTitle = document.querySelector('.video__title')\r\nconst videoText = document.querySelector('.video__text')\r\nconst videoLink = document.querySelector('.video__link')\r\nconst videoGradient = document.querySelector('.video__gradient')\r\nconst videoIntro = document.querySelector('.video__intro')\r\nconst videoMask = document.querySelector('.video__mask')\r\nconst videoJsTech = document.querySelector('.vjs-tech')\r\n\r\nexport const addVideoPlayer = () => {\r\n try {\r\n let isPreviewVideo = true\r\n\r\n const videoPlayer = videojs(document.getElementById('video__player'), {\r\n autoplay: true,\r\n loop: true,\r\n muted: true,\r\n controls: false,\r\n playToggle: false\r\n })\r\n\r\n const loadMainVideo = (desktopUrl, mobileUrl) => {\r\n if (window.screen.width > 768) {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${desktopUrl}`\r\n })\r\n } else {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${mobileUrl}`\r\n })\r\n }\r\n }\r\n\r\n loadMainVideo('preview.mp4', 'preview-mobile.mp4')\r\n videoPlayer.volume(0.7)\r\n const changePlayerStatus = () => {\r\n videoPlayer.play()\r\n\r\n videoPlayer.addClass('play')\r\n videoPlayer.muted(false)\r\n videoPlayer.controls(true)\r\n videoPlayer.loop(false)\r\n\r\n playBtn.classList.add('hide')\r\n videoTitle.classList.add('hide')\r\n videoText.classList.add('hide')\r\n videoLink.classList.add('hide')\r\n }\r\n\r\n videoPlayer.on('play', () => {\r\n if (!videoPlayer.played()) {\r\n videoPlayer.addClass('play')\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n } else if (videoPlayer.played() && videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n } else if (videoPlayer.played() && !videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n }\r\n })\r\n\r\n videoPlayer.on('pause', () => {\r\n playBtn?.classList.remove('hide')\r\n })\r\n\r\n videoPlayer.on('ended', () => {\r\n playBtn?.classList.remove('hide')\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n videoMask.addEventListener('click', () => {\r\n playBtn?.classList.remove('hide')\r\n videoPlayer.pause()\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n playBtn.addEventListener('click', () => {\r\n if (isPreviewVideo === true) {\r\n loadMainVideo('video.mp4', 'video-mobile.mp4')\r\n isPreviewVideo = false\r\n }\r\n document.querySelector('.video__inner').classList.add('active')\r\n document.querySelector('.video-js').classList.add('active')\r\n document.querySelector('.vjs-poster').classList.add('active')\r\n\r\n videoPlayer.fluid(true)\r\n videoGradient?.classList.add('hide')\r\n videoMask?.classList.add('visible')\r\n playBtn?.classList.add('center-position')\r\n document.querySelector('video').style.objectFit = 'contain'\r\n\r\n if (videoPlayer.muted()) {\r\n videoPlayer.currentTime(0)\r\n changePlayerStatus()\r\n } else {\r\n changePlayerStatus()\r\n }\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n if (!fn) {\n return false\n }\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === typeof searchInput) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n if (hasKeyCode) searchInput = hasKeyCode\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput]\n\n // Everything else (cast to string)\n var search = String(searchInput)\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0)\n\n return undefined\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === typeof event) {\n var keyCode = event.which || event.keyCode || event.charCode\n if (keyCode === null || keyCode === undefined) { return false; }\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n \n // check aliases\n var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n return false;\n }\n}\n\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n}\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias]\n}\n","/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nclass LineStream extends Stream {\n constructor() {\n super();\n this.buffer = '';\n }\n /**\n * Add new data to be parsed.\n *\n * @param {string} data the text to process\n */\n\n\n push(data) {\n let nextNewline;\n this.buffer += data;\n nextNewline = this.buffer.indexOf('\\n');\n\n for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n this.trigger('data', this.buffer.substring(0, nextNewline));\n this.buffer = this.buffer.substring(nextNewline + 1);\n }\n }\n\n}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n // optionally match and capture 0+ digits before `@`\n // optionally match and capture 0+ digits after `@`\n const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n const result = {};\n\n if (match[1]) {\n result.length = parseInt(match[1], 10);\n }\n\n if (match[2]) {\n result.offset = parseInt(match[2], 10);\n }\n\n return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue -> key '=' value\n * key -> [^=]*\n * value -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nconst attributeSeparator = function () {\n const key = '[^=]*';\n const value = '\"[^\"]*\"|[^,]*';\n const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nconst parseAttributes = function (attributes) {\n const result = {};\n\n if (!attributes) {\n return result;\n } // split the string using attributes as the separator\n\n\n const attrs = attributes.split(attributeSeparator());\n let i = attrs.length;\n let attr;\n\n while (i--) {\n // filter out unmatched portions of the string\n if (attrs[i] === '') {\n continue;\n } // split the key and value\n\n\n attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n result[attr[0]] = attr[1];\n }\n\n return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nclass ParseStream extends Stream {\n constructor() {\n super();\n this.customParsers = [];\n this.tagMappers = [];\n }\n /**\n * Parses an additional line of input.\n *\n * @param {string} line a single line of an M3U8 file to parse\n */\n\n\n push(line) {\n let match;\n let event; // strip whitespace\n\n line = line.trim();\n\n if (line.length === 0) {\n // ignore empty lines\n return;\n } // URIs\n\n\n if (line[0] !== '#') {\n this.trigger('data', {\n type: 'uri',\n uri: line\n });\n return;\n } // map tags\n\n\n const newLines = this.tagMappers.reduce((acc, mapper) => {\n const mappedLine = mapper(line); // skip if unchanged\n\n if (mappedLine === line) {\n return acc;\n }\n\n return acc.concat([mappedLine]);\n }, [line]);\n newLines.forEach(newLine => {\n for (let i = 0; i < this.customParsers.length; i++) {\n if (this.customParsers[i].call(this, newLine)) {\n return;\n }\n } // Comments\n\n\n if (newLine.indexOf('#EXT') !== 0) {\n this.trigger('data', {\n type: 'comment',\n text: newLine.slice(1)\n });\n return;\n } // strip off any carriage returns here so the regex matching\n // doesn't have to account for them.\n\n\n newLine = newLine.replace('\\r', ''); // Tags\n\n match = /^#EXTM3U/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'm3u'\n });\n return;\n }\n\n match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'inf'\n };\n\n if (match[1]) {\n event.duration = parseFloat(match[1]);\n }\n\n if (match[2]) {\n event.title = match[2];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'targetduration'\n };\n\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'version'\n };\n\n if (match[1]) {\n event.version = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'discontinuity-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'playlist-type'\n };\n\n if (match[1]) {\n event.playlistType = match[1];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = _extends(parseByterange(match[1]), {\n type: 'tag',\n tagType: 'byterange'\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'allow-cache'\n };\n\n if (match[1]) {\n event.allowed = !/NO/.test(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'map'\n };\n\n if (match[1]) {\n const attributes = parseAttributes(match[1]);\n\n if (attributes.URI) {\n event.uri = attributes.URI;\n }\n\n if (attributes.BYTERANGE) {\n event.byterange = parseByterange(attributes.BYTERANGE);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'stream-inf'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.RESOLUTION) {\n const split = event.attributes.RESOLUTION.split('x');\n const resolution = {};\n\n if (split[0]) {\n resolution.width = parseInt(split[0], 10);\n }\n\n if (split[1]) {\n resolution.height = parseInt(split[1], 10);\n }\n\n event.attributes.RESOLUTION = resolution;\n }\n\n if (event.attributes.BANDWIDTH) {\n event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n }\n\n if (event.attributes['FRAME-RATE']) {\n event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n }\n\n if (event.attributes['PROGRAM-ID']) {\n event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'endlist'\n });\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'discontinuity'\n });\n return;\n }\n\n match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'program-date-time'\n };\n\n if (match[1]) {\n event.dateTimeString = match[1];\n event.dateTimeObject = new Date(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'key'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n if (event.attributes.IV) {\n if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n event.attributes.IV = event.attributes.IV.substring(2);\n }\n\n event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n event.attributes.IV = new Uint32Array(event.attributes.IV);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'start'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out-cont'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-in'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'skip'\n };\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n }\n\n if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part'\n };\n event.attributes = parseAttributes(match[1]);\n ['DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['INDEPENDENT', 'GAP'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n\n if (event.attributes.hasOwnProperty('BYTERANGE')) {\n event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'server-control'\n };\n event.attributes = parseAttributes(match[1]);\n ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part-inf'\n };\n event.attributes = parseAttributes(match[1]);\n ['PART-TARGET'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'preload-hint'\n };\n event.attributes = parseAttributes(match[1]);\n ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n event.attributes.byterange = event.attributes.byterange || {};\n event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n delete event.attributes[key];\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'rendition-report'\n };\n event.attributes = parseAttributes(match[1]);\n ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'daterange'\n };\n event.attributes = parseAttributes(match[1]);\n ['ID', 'CLASS'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = String(event.attributes[key]);\n }\n });\n ['START-DATE', 'END-DATE'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = new Date(event.attributes[key]);\n }\n });\n ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['END-ON-NEXT'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/i.test(event.attributes[key]);\n }\n });\n ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = event.attributes[key].toString(16);\n }\n });\n const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n for (const key in event.attributes) {\n if (!clientAttributePattern.test(key)) {\n continue;\n }\n\n const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'independent-segments'\n });\n return;\n } // unknown tag type\n\n\n this.trigger('data', {\n type: 'tag',\n data: newLine.slice(4)\n });\n });\n }\n /**\n * Add a parser for custom headers\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.customType the custom type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser({\n expression,\n customType,\n dataParser,\n segment\n }) {\n if (typeof dataParser !== 'function') {\n dataParser = line => line;\n }\n\n this.customParsers.push(line => {\n const match = expression.exec(line);\n\n if (match) {\n this.trigger('data', {\n type: 'custom',\n data: dataParser(line),\n customType,\n segment\n });\n return true;\n }\n });\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper({\n expression,\n map\n }) {\n const mapFn = line => {\n if (expression.test(line)) {\n return map(line);\n }\n\n return line;\n };\n\n this.tagMappers.push(mapFn);\n }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n const result = {};\n Object.keys(attributes).forEach(function (key) {\n result[camelCase(key)] = attributes[key];\n });\n return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nconst setHoldBack = function (manifest) {\n const {\n serverControl,\n targetDuration,\n partTargetDuration\n } = manifest;\n\n if (!serverControl) {\n return;\n }\n\n const tag = '#EXT-X-SERVER-CONTROL';\n const hb = 'holdBack';\n const phb = 'partHoldBack';\n const minTargetDuration = targetDuration && targetDuration * 3;\n const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n serverControl[hb] = minTargetDuration;\n this.trigger('info', {\n message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n });\n }\n\n if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n this.trigger('warn', {\n message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n });\n serverControl[hb] = minTargetDuration;\n } // default no part hold back to part target duration * 3\n\n\n if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n serverControl[phb] = partTargetDuration * 3;\n this.trigger('info', {\n message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n });\n } // if part hold back is too small default it to part target duration * 2\n\n\n if (partTargetDuration && serverControl[phb] < minPartDuration) {\n this.trigger('warn', {\n message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n });\n serverControl[phb] = minPartDuration;\n }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n constructor() {\n super();\n this.lineStream = new LineStream();\n this.parseStream = new ParseStream();\n this.lineStream.pipe(this.parseStream);\n /* eslint-disable consistent-this */\n\n const self = this;\n /* eslint-enable consistent-this */\n\n const uris = [];\n let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n let currentMap; // if specified, the active decryption key\n\n let key;\n let hasParts = false;\n\n const noop = function () {};\n\n const defaultMediaGroups = {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n // used in MPDs with Widevine encrypted streams.\n\n const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n this.manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: []\n }; // keep track of the last seen segment's byte range end, as segments are not required\n // to provide the offset, in which case it defaults to the next byte after the\n // previous segment\n\n let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n let lastPartByterangeEnd = 0;\n const daterangeTags = {};\n this.on('end', () => {\n // only add preloadSegment if we don't yet have a uri for it.\n // and we actually have parts/preloadHints\n if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n return;\n }\n\n if (!currentUri.map && currentMap) {\n currentUri.map = currentMap;\n }\n\n if (!currentUri.key && key) {\n currentUri.key = key;\n }\n\n if (!currentUri.timeline && typeof currentTimeline === 'number') {\n currentUri.timeline = currentTimeline;\n }\n\n this.manifest.preloadSegment = currentUri;\n }); // update the manifest with the m3u8 entry from the parse stream\n\n this.parseStream.on('data', function (entry) {\n let mediaGroup;\n let rendition;\n ({\n tag() {\n // switch based on the tag type\n (({\n version() {\n if (entry.version) {\n this.manifest.version = entry.version;\n }\n },\n\n 'allow-cache'() {\n this.manifest.allowCache = entry.allowed;\n\n if (!('allowed' in entry)) {\n this.trigger('info', {\n message: 'defaulting allowCache to YES'\n });\n this.manifest.allowCache = true;\n }\n },\n\n byterange() {\n const byterange = {};\n\n if ('length' in entry) {\n currentUri.byterange = byterange;\n byterange.length = entry.length;\n\n if (!('offset' in entry)) {\n /*\n * From the latest spec (as of this writing):\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n *\n * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n *\n * \"If o [offset] is not present, the sub-range begins at the next byte\n * following the sub-range of the previous media segment.\"\n */\n entry.offset = lastByterangeEnd;\n }\n }\n\n if ('offset' in entry) {\n currentUri.byterange = byterange;\n byterange.offset = entry.offset;\n }\n\n lastByterangeEnd = byterange.offset + byterange.length;\n },\n\n endlist() {\n this.manifest.endList = true;\n },\n\n inf() {\n if (!('mediaSequence' in this.manifest)) {\n this.manifest.mediaSequence = 0;\n this.trigger('info', {\n message: 'defaulting media sequence to zero'\n });\n }\n\n if (!('discontinuitySequence' in this.manifest)) {\n this.manifest.discontinuitySequence = 0;\n this.trigger('info', {\n message: 'defaulting discontinuity sequence to zero'\n });\n }\n\n if (entry.duration > 0) {\n currentUri.duration = entry.duration;\n }\n\n if (entry.duration === 0) {\n currentUri.duration = 0.01;\n this.trigger('info', {\n message: 'updating zero segment duration to a small value'\n });\n }\n\n this.manifest.segments = uris;\n },\n\n key() {\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring key declaration without attribute list'\n });\n return;\n } // clear the active encryption key\n\n\n if (entry.attributes.METHOD === 'NONE') {\n key = null;\n return;\n }\n\n if (!entry.attributes.URI) {\n this.trigger('warn', {\n message: 'ignoring key declaration without URI'\n });\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.apple.fps.1_0'] = {\n attributes: entry.attributes\n };\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.microsoft.playready'] = {\n uri: entry.attributes.URI\n };\n return;\n } // check if the content is encrypted for Widevine\n // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n if (entry.attributes.KEYFORMAT === widevineUuid) {\n const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n this.trigger('warn', {\n message: 'invalid key method provided for Widevine'\n });\n return;\n }\n\n if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n this.trigger('warn', {\n message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n });\n }\n\n if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n this.trigger('warn', {\n message: 'invalid key URI provided for Widevine'\n });\n return;\n }\n\n if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n this.trigger('warn', {\n message: 'invalid key ID provided for Widevine'\n });\n return;\n } // if Widevine key attributes are valid, store them as `contentProtection`\n // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n this.manifest.contentProtection = this.manifest.contentProtection || {};\n this.manifest.contentProtection['com.widevine.alpha'] = {\n attributes: {\n schemeIdUri: entry.attributes.KEYFORMAT,\n // remove '0x' from the key id string\n keyId: entry.attributes.KEYID.substring(2)\n },\n // decode the base64-encoded PSSH box\n pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n };\n return;\n }\n\n if (!entry.attributes.METHOD) {\n this.trigger('warn', {\n message: 'defaulting key method to AES-128'\n });\n } // setup an encryption key for upcoming segments\n\n\n key = {\n method: entry.attributes.METHOD || 'AES-128',\n uri: entry.attributes.URI\n };\n\n if (typeof entry.attributes.IV !== 'undefined') {\n key.iv = entry.attributes.IV;\n }\n },\n\n 'media-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid media sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.mediaSequence = entry.number;\n },\n\n 'discontinuity-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid discontinuity sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.discontinuitySequence = entry.number;\n currentTimeline = entry.number;\n },\n\n 'playlist-type'() {\n if (!/VOD|EVENT/.test(entry.playlistType)) {\n this.trigger('warn', {\n message: 'ignoring unknown playlist type: ' + entry.playlist\n });\n return;\n }\n\n this.manifest.playlistType = entry.playlistType;\n },\n\n map() {\n currentMap = {};\n\n if (entry.uri) {\n currentMap.uri = entry.uri;\n }\n\n if (entry.byterange) {\n currentMap.byterange = entry.byterange;\n }\n\n if (key) {\n currentMap.key = key;\n }\n },\n\n 'stream-inf'() {\n this.manifest.playlists = uris;\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring empty stream-inf attributes'\n });\n return;\n }\n\n if (!currentUri.attributes) {\n currentUri.attributes = {};\n }\n\n _extends(currentUri.attributes, entry.attributes);\n },\n\n media() {\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n this.trigger('warn', {\n message: 'ignoring incomplete or missing media group'\n });\n return;\n } // find the media group, creating defaults as necessary\n\n\n const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n rendition = {\n default: /yes/i.test(entry.attributes.DEFAULT)\n };\n\n if (rendition.default) {\n rendition.autoselect = true;\n } else {\n rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n }\n\n if (entry.attributes.LANGUAGE) {\n rendition.language = entry.attributes.LANGUAGE;\n }\n\n if (entry.attributes.URI) {\n rendition.uri = entry.attributes.URI;\n }\n\n if (entry.attributes['INSTREAM-ID']) {\n rendition.instreamId = entry.attributes['INSTREAM-ID'];\n }\n\n if (entry.attributes.CHARACTERISTICS) {\n rendition.characteristics = entry.attributes.CHARACTERISTICS;\n }\n\n if (entry.attributes.FORCED) {\n rendition.forced = /yes/i.test(entry.attributes.FORCED);\n } // insert the new rendition\n\n\n mediaGroup[entry.attributes.NAME] = rendition;\n },\n\n discontinuity() {\n currentTimeline += 1;\n currentUri.discontinuity = true;\n this.manifest.discontinuityStarts.push(uris.length);\n },\n\n 'program-date-time'() {\n if (typeof this.manifest.dateTimeString === 'undefined') {\n // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n // to the manifest object\n // TODO: Consider removing this in future major version\n this.manifest.dateTimeString = entry.dateTimeString;\n this.manifest.dateTimeObject = entry.dateTimeObject;\n }\n\n currentUri.dateTimeString = entry.dateTimeString;\n currentUri.dateTimeObject = entry.dateTimeObject;\n },\n\n targetduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid target duration: ' + entry.duration\n });\n return;\n }\n\n this.manifest.targetDuration = entry.duration;\n setHoldBack.call(this, this.manifest);\n },\n\n start() {\n if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n this.trigger('warn', {\n message: 'ignoring start declaration without appropriate attribute list'\n });\n return;\n }\n\n this.manifest.start = {\n timeOffset: entry.attributes['TIME-OFFSET'],\n precise: entry.attributes.PRECISE\n };\n },\n\n 'cue-out'() {\n currentUri.cueOut = entry.data;\n },\n\n 'cue-out-cont'() {\n currentUri.cueOutCont = entry.data;\n },\n\n 'cue-in'() {\n currentUri.cueIn = entry.data;\n },\n\n 'skip'() {\n this.manifest.skip = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n },\n\n 'part'() {\n hasParts = true; // parts are always specifed before a segment\n\n const segmentIndex = this.manifest.segments.length;\n const part = camelCaseKeys(entry.attributes);\n currentUri.parts = currentUri.parts || [];\n currentUri.parts.push(part);\n\n if (part.byterange) {\n if (!part.byterange.hasOwnProperty('offset')) {\n part.byterange.offset = lastPartByterangeEnd;\n }\n\n lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n }\n\n const partIndex = currentUri.parts.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n if (this.manifest.renditionReports) {\n this.manifest.renditionReports.forEach((r, i) => {\n if (!r.hasOwnProperty('lastPart')) {\n this.trigger('warn', {\n message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n });\n }\n });\n }\n },\n\n 'server-control'() {\n const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n if (!attrs.hasOwnProperty('canBlockReload')) {\n attrs.canBlockReload = false;\n this.trigger('info', {\n message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n });\n }\n\n setHoldBack.call(this, this.manifest);\n\n if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n this.trigger('warn', {\n message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n });\n }\n },\n\n 'preload-hint'() {\n // parts are always specifed before a segment\n const segmentIndex = this.manifest.segments.length;\n const hint = camelCaseKeys(entry.attributes);\n const isPart = hint.type && hint.type === 'PART';\n currentUri.preloadHints = currentUri.preloadHints || [];\n currentUri.preloadHints.push(hint);\n\n if (hint.byterange) {\n if (!hint.byterange.hasOwnProperty('offset')) {\n // use last part byterange end or zero if not a part.\n hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n if (isPart) {\n lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n }\n }\n }\n\n const index = currentUri.preloadHints.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n if (!hint.type) {\n return;\n } // search through all preload hints except for the current one for\n // a duplicate type.\n\n\n for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n const otherHint = currentUri.preloadHints[i];\n\n if (!otherHint.type) {\n continue;\n }\n\n if (otherHint.type === hint.type) {\n this.trigger('warn', {\n message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n });\n }\n }\n },\n\n 'rendition-report'() {\n const report = camelCaseKeys(entry.attributes);\n this.manifest.renditionReports = this.manifest.renditionReports || [];\n this.manifest.renditionReports.push(report);\n const index = this.manifest.renditionReports.length - 1;\n const required = ['LAST-MSN', 'URI'];\n\n if (hasParts) {\n required.push('LAST-PART');\n }\n\n this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n },\n\n 'part-inf'() {\n this.manifest.partInf = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n if (this.manifest.partInf.partTarget) {\n this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n }\n\n setHoldBack.call(this, this.manifest);\n },\n\n 'daterange'() {\n this.manifest.daterange = this.manifest.daterange || [];\n this.manifest.daterange.push(camelCaseKeys(entry.attributes));\n const index = this.manifest.daterange.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n const daterange = this.manifest.daterange[index];\n\n if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n });\n }\n\n if (daterange.duration && daterange.duration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE DURATION must not be negative'\n });\n }\n\n if (daterange.plannedDuration && daterange.plannedDuration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n });\n }\n\n const endOnNextYes = !!daterange.endOnNext;\n\n if (endOnNextYes && !daterange.class) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n });\n }\n\n if (endOnNextYes && (daterange.duration || daterange.endDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n });\n }\n\n if (daterange.duration && daterange.endDate) {\n const startDate = daterange.startDate;\n const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration);\n this.manifest.daterange[index].endDate = new Date(newDateInSeconds);\n }\n\n if (daterange && !this.manifest.dateTimeString) {\n this.trigger('warn', {\n message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n });\n }\n\n if (!daterangeTags[daterange.id]) {\n daterangeTags[daterange.id] = daterange;\n } else {\n for (const attribute in daterangeTags[daterange.id]) {\n if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values'\n });\n break;\n }\n }\n }\n },\n\n 'independent-segments'() {\n this.manifest.independentSegments = true;\n }\n\n })[entry.tagType] || noop).call(self);\n },\n\n uri() {\n currentUri.uri = entry.uri;\n uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n if (this.manifest.targetDuration && !('duration' in currentUri)) {\n this.trigger('warn', {\n message: 'defaulting segment duration to the target duration'\n });\n currentUri.duration = this.manifest.targetDuration;\n } // annotate with encryption information, if necessary\n\n\n if (key) {\n currentUri.key = key;\n }\n\n currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n if (currentMap) {\n currentUri.map = currentMap;\n } // reset the last byterange end as it needs to be 0 between parts\n\n\n lastPartByterangeEnd = 0; // prepare for the next URI\n\n currentUri = {};\n },\n\n comment() {// comments are not important for playback\n },\n\n custom() {\n // if this is segment-level data attach the output to the segment\n if (entry.segment) {\n currentUri.custom = currentUri.custom || {};\n currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n } else {\n this.manifest.custom = this.manifest.custom || {};\n this.manifest.custom[entry.customType] = entry.data;\n }\n }\n\n })[entry.type].call(self);\n });\n }\n\n warnOnMissingAttributes_(identifier, attributes, required) {\n const missing = [];\n required.forEach(function (key) {\n if (!attributes.hasOwnProperty(key)) {\n missing.push(key);\n }\n });\n\n if (missing.length) {\n this.trigger('warn', {\n message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n });\n }\n }\n /**\n * Parse the input string and update the manifest object.\n *\n * @param {string} chunk a potentially incomplete portion of the manifest\n */\n\n\n push(chunk) {\n this.lineStream.push(chunk);\n }\n /**\n * Flush any remaining input. This can be handy if the last line of an M3U8\n * manifest did not contain a trailing newline but the file has been\n * completely received.\n */\n\n\n end() {\n // flush any buffered input\n this.lineStream.push('\\n');\n this.trigger('end');\n }\n /**\n * Add an additional parser for non-standard tags\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.type the type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser(options) {\n this.parseStream.addParser(options);\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper(options) {\n this.parseStream.addTagMapper(options);\n }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n","import window from 'global/window';\n\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n var _proto = Stream.prototype;\n\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */\n ;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */\n ;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n ;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n}();\n\nexport { Stream as default };","/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */\nimport resolveUrl from '@videojs/vhs-utils/es/resolve-url';\nimport window from 'global/window';\nimport { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array';\nimport { DOMParser } from '@xmldom/xmldom';\n\nvar version = \"1.2.2\";\n\nconst isObject = obj => {\n return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n return objects.reduce((result, source) => {\n if (typeof source !== 'object') {\n return result;\n }\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n result[key] = result[key].concat(source[key]);\n } else if (isObject(result[key]) && isObject(source[key])) {\n result[key] = merge(result[key], source[key]);\n } else {\n result[key] = source[key];\n }\n });\n return result;\n }, {});\n};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n const result = [];\n\n for (let i = start; i < end; i++) {\n result.push(i);\n }\n\n return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n if (!list.length) {\n return [];\n }\n\n const result = [];\n\n for (let i = 0; i < list.length; i++) {\n result.push(list[i]);\n }\n\n return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n if (e[key]) {\n a.push(i);\n }\n\n return a;\n}, []);\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nconst union = (lists, keyFunction) => {\n return values(lists.reduce((acc, list) => {\n list.forEach(el => {\n acc[keyFunction(el)] = el;\n });\n return acc;\n }, {}));\n};\n\nvar errors = {\n INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n DASH_INVALID_XML: 'DASH_INVALID_XML',\n NO_BASE_URL: 'NO_BASE_URL',\n MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n * requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n * follows RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n * to m3u8-parser\n */\n\nconst urlTypeToSegment = ({\n baseUrl = '',\n source = '',\n range = '',\n indexRange = ''\n}) => {\n const segment = {\n uri: source,\n resolvedUri: resolveUrl(baseUrl || '', source)\n };\n\n if (range || indexRange) {\n const rangeStr = range ? range : indexRange;\n const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n let endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n startRange = Number(startRange);\n }\n\n if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n endRange = Number(endRange);\n }\n\n let length;\n\n if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n } else {\n length = endRange - startRange + 1;\n }\n\n if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n length = Number(length);\n } // byterange should be inclusive according to\n // RFC 2616, Clause 14.35.1\n\n\n segment.byterange = {\n length,\n offset: startRange\n };\n }\n\n return segment;\n};\nconst byteRangeToString = byterange => {\n // `endRange` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n let endRange;\n\n if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n } else {\n endRange = byterange.offset + byterange.length - 1;\n }\n\n return `${byterange.offset}-${endRange}`;\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n * The end number attribute.\n *\n * @return {number|null}\n * The result of parsing the end number.\n */\n\nconst parseEndNumber = endNumber => {\n if (endNumber && typeof endNumber !== 'number') {\n endNumber = parseInt(endNumber, 10);\n }\n\n if (isNaN(endNumber)) {\n return null;\n }\n\n return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst segmentRange = {\n /**\n * Returns the entire range of available segments for a static MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n static(attributes) {\n const {\n duration,\n timescale = 1,\n sourceDuration,\n periodDuration\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber);\n const segmentDuration = duration / timescale;\n\n if (typeof endNumber === 'number') {\n return {\n start: 0,\n end: endNumber\n };\n }\n\n if (typeof periodDuration === 'number') {\n return {\n start: 0,\n end: periodDuration / segmentDuration\n };\n }\n\n return {\n start: 0,\n end: sourceDuration / segmentDuration\n };\n },\n\n /**\n * Returns the current live window range of available segments for a dynamic MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n dynamic(attributes) {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n duration,\n periodStart = 0,\n minimumUpdatePeriod = 0,\n timeShiftBufferDepth = Infinity\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n // after retrieving UTC server time.\n\n const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n // Convert the period start time to EPOCH.\n\n const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n const segmentCount = Math.ceil(periodDuration * timescale / duration);\n const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n const availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n return {\n start: Math.max(0, availableStart),\n end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n };\n }\n\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n * Number of the segment\n * @param {number} index\n * Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n * Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {toSegmentsCallback}\n * Callback map function\n */\n\nconst toSegments = attributes => number => {\n const {\n duration,\n timescale = 1,\n periodStart,\n startNumber = 1\n } = attributes;\n return {\n number: startNumber + number,\n duration: duration / timescale,\n timeline: periodStart,\n time: number * duration\n };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseByDuration = attributes => {\n const {\n type,\n duration,\n timescale = 1,\n periodDuration,\n sourceDuration\n } = attributes;\n const {\n start,\n end\n } = segmentRange[type](attributes);\n const segments = range(start, end).map(toSegments(attributes));\n\n if (type === 'static') {\n const index = segments.length - 1; // section is either a period or the full source\n\n const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n segments[index].duration = sectionDuration - duration / timescale * index;\n }\n\n return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @return {Object.} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n const {\n baseUrl,\n initialization = {},\n sourceDuration,\n indexRange = '',\n periodStart,\n presentationTime,\n number = 0,\n duration\n } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n if (!baseUrl) {\n throw new Error(errors.NO_BASE_URL);\n }\n\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: baseUrl,\n indexRange\n });\n segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n // (since SegmentBase is only for one total segment)\n\n if (duration) {\n const segmentTimeInfo = parseByDuration(attributes);\n\n if (segmentTimeInfo.length) {\n segment.duration = segmentTimeInfo[0].duration;\n segment.timeline = segmentTimeInfo[0].timeline;\n }\n } else if (sourceDuration) {\n segment.duration = sourceDuration;\n segment.timeline = periodStart;\n } // If presentation time is provided, these segments are being generated by SIDX\n // references, and should use the time provided. For the general case of SegmentBase,\n // there should only be one segment in the period, so its presentation time is the same\n // as its period start.\n\n\n segment.presentationTime = presentationTime || periodStart;\n segment.number = number;\n return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n // Retain init segment information\n const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n const timeline = playlist.timeline || 0;\n const sidxByteRange = playlist.sidx.byterange;\n const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n const segments = [];\n const type = playlist.endList ? 'static' : 'dynamic';\n const periodStart = playlist.sidx.timeline;\n let presentationTime = periodStart;\n let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n let startIndex; // eslint-disable-next-line\n\n if (typeof sidx.firstOffset === 'bigint') {\n startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n } else {\n startIndex = sidxEnd + sidx.firstOffset;\n }\n\n for (let i = 0; i < mediaReferences.length; i++) {\n const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale\n // this will be converted to seconds when generating segments\n\n const duration = reference.subsegmentDuration; // should be an inclusive range\n\n let endIndex; // eslint-disable-next-line\n\n if (typeof startIndex === 'bigint') {\n endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n } else {\n endIndex = startIndex + size - 1;\n }\n\n const indexRange = `${startIndex}-${endIndex}`;\n const attributes = {\n baseUrl,\n timescale,\n timeline,\n periodStart,\n presentationTime,\n number,\n duration,\n sourceDuration,\n indexRange,\n type\n };\n const segment = segmentsFromBase(attributes)[0];\n\n if (initSegment) {\n segment.map = initSegment;\n }\n\n segments.push(segment);\n\n if (typeof startIndex === 'bigint') {\n startIndex += window.BigInt(size);\n } else {\n startIndex += size;\n }\n\n presentationTime += duration / timescale;\n number++;\n }\n\n playlist.segments = segments;\n return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nconst getUniqueTimelineStarts = timelineStarts => {\n return union(timelineStarts, ({\n timeline\n }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nconst findPlaylistWithName = (playlists, name) => {\n for (let i = 0; i < playlists.length; i++) {\n if (playlists[i].attributes.NAME === name) {\n return playlists[i];\n }\n }\n\n return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nconst getMediaGroupPlaylists = manifest => {\n let mediaGroupPlaylists = [];\n forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {\n mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n });\n return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nconst updateMediaSequenceForPlaylist = ({\n playlist,\n mediaSequence\n}) => {\n playlist.mediaSequence = mediaSequence;\n playlist.segments.forEach((segment, index) => {\n segment.number = playlist.mediaSequence + index;\n });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nconst updateSequenceNumbers = ({\n oldPlaylists,\n newPlaylists,\n timelineStarts\n}) => {\n newPlaylists.forEach(playlist => {\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n // (see ISO_23009-1-2012 5.3.5.2).\n //\n // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\n if (!oldPlaylist) {\n // Since this is a new playlist, the media sequence values can start from 0 without\n // consequence.\n return;\n } // TODO better support for live SIDX\n //\n // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n // not supported when the SIDX properties change on refreshes.\n //\n // In the future, if support needs to be added, the merging logic here can be called\n // after SIDX references are resolved. For now, exit early to prevent exceptions being\n // thrown due to undefined references.\n\n\n if (playlist.sidx) {\n return;\n } // Since we don't yet support early available timelines, we don't need to support\n // playlists with no segments.\n\n\n const firstNewSegment = playlist.segments[0];\n const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n }); // No matching segment from the old playlist means the entire playlist was refreshed.\n // In this case the media sequence should account for this update, and the new segments\n // should be marked as discontinuous from the prior content, since the last prior\n // timeline was removed.\n\n if (oldMatchingSegmentIndex === -1) {\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n });\n playlist.segments[0].discontinuity = true;\n playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n //\n // If the new playlist's timeline is the same as the last seen segment's timeline,\n // then a discontinuity can be added to identify that there's potentially missing\n // content. If there's no missing content, the discontinuity should still be rather\n // harmless. It's possible that if segment durations are accurate enough, that the\n // existence of a gap can be determined using the presentation times and durations,\n // but if the segment timing info is off, it may introduce more problems than simply\n // adding the discontinuity.\n //\n // If the new playlist's timeline is different from the last seen segment's timeline,\n // then a discontinuity can be added to identify that this is the first seen segment\n // of a new timeline. However, the logic at the start of this function that\n // determined the disconinuity sequence by timeline index is now off by one (the\n // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n // we added it), so the disconinuity sequence must be decremented.\n //\n // A period may also have a duration of zero, so the case of no segments is handled\n // here even though we don't yet support early available periods.\n\n if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n playlist.discontinuitySequence--;\n }\n\n return;\n } // If the first segment matched with a prior segment on a discontinuity (it's matching\n // on the first segment of a period), then the discontinuitySequence shouldn't be the\n // timeline's matching one, but instead should be the one prior, and the first segment\n // of the new manifest should be marked with a discontinuity.\n //\n // The reason for this special case is that discontinuity sequence shows how many\n // discontinuities have fallen off of the playlist, and discontinuities are marked on\n // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n // sequence, and that first segment is an indicator, but can be removed before that\n // timeline is gone.\n\n\n const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n firstNewSegment.discontinuity = true;\n playlist.discontinuityStarts.unshift(0);\n playlist.discontinuitySequence--;\n }\n\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n });\n });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nconst positionManifestOnTimeline = ({\n oldManifest,\n newManifest\n}) => {\n // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n //\n // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n //\n // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n //\n // Because of this change, and the difficulty of supporting periods with changing start\n // times, periods with changing start times are not supported. This makes the logic much\n // simpler, since periods with the same start time can be considerred the same period\n // across refreshes.\n //\n // To give an example as to the difficulty of handling periods where the start time may\n // change, if a single period manifest is refreshed with another manifest with a single\n // period, and both the start and end times are increased, then the only way to determine\n // if it's a new period or an old one that has changed is to look through the segments of\n // each playlist and determine the presentation time bounds to find a match. In addition,\n // if the period start changed to exceed the old period end, then there would be no\n // match, and it would not be possible to determine whether the refreshed period is a new\n // one or the old one.\n const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n // of properties are saved for each seen Period. Even long running live streams won't\n // generate too many Periods, unless the stream is watched for decades. In the future,\n // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n // but it may not become an issue, and the additional info can be useful for debugging.\n\n newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n updateSequenceNumbers({\n oldPlaylists,\n newPlaylists,\n timelineStarts: newManifest.timelineStarts\n });\n return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n // Break out playlists into groups based on their baseUrl\n const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n if (!acc[cur.attributes.baseUrl]) {\n acc[cur.attributes.baseUrl] = [];\n }\n\n acc[cur.attributes.baseUrl].push(cur);\n return acc;\n }, {});\n let allPlaylists = [];\n Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => {\n // assuming playlist IDs are the same across periods\n // TODO: handle multiperiod where representation sets are not the same\n // across periods\n const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\n if (!acc[name]) {\n // First Period\n acc[name] = playlist;\n acc[name].attributes.timelineStarts = [];\n } else {\n // Subsequent Periods\n if (playlist.segments) {\n // first segment of subsequent periods signal a discontinuity\n if (playlist.segments[0]) {\n playlist.segments[0].discontinuity = true;\n }\n\n acc[name].segments.push(...playlist.segments);\n } // bubble up contentProtection, this assumes all DRM content\n // has the same contentProtection\n\n\n if (playlist.attributes.contentProtection) {\n acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n }\n }\n\n acc[name].attributes.timelineStarts.push({\n // Although they represent the same number, it's important to have both to make it\n // compatible with HLS potentially having a similar attribute.\n start: playlist.attributes.periodStart,\n timeline: playlist.attributes.periodStart\n });\n return acc;\n }, {}));\n allPlaylists = allPlaylists.concat(mergedPlaylists);\n });\n return allPlaylists.map(playlist => {\n playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n return playlist;\n });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n const sidxKey = generateSidxKey(playlist.sidx);\n const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n if (sidxMatch) {\n addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n }\n\n return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n if (!Object.keys(sidxMapping).length) {\n return playlists;\n }\n\n for (const i in playlists) {\n playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n }\n\n return playlists;\n};\nconst formatAudioPlaylist = ({\n attributes,\n segments,\n sidx,\n mediaSequence,\n discontinuitySequence,\n discontinuityStarts\n}, isAudioOnly) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n CODECS: attributes.codecs,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuitySequence,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n mediaSequence,\n segments\n };\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n if (isAudioOnly) {\n playlist.attributes.AUDIO = 'audio';\n playlist.attributes.SUBTITLES = 'subs';\n }\n\n return playlist;\n};\nconst formatVttPlaylist = ({\n attributes,\n segments,\n mediaSequence,\n discontinuityStarts,\n discontinuitySequence\n}) => {\n if (typeof segments === 'undefined') {\n // vtt tracks may use single file in BaseURL\n segments = [{\n uri: attributes.baseUrl,\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n duration: attributes.sourceDuration,\n number: 0\n }]; // targetDuration should be the same duration as the only segment\n\n attributes.duration = attributes.sourceDuration;\n }\n\n const m3u8Attributes = {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n };\n\n if (attributes.codecs) {\n m3u8Attributes.CODECS = attributes.codecs;\n }\n\n const vttPlaylist = {\n attributes: m3u8Attributes,\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n timelineStarts: attributes.timelineStarts,\n discontinuityStarts,\n discontinuitySequence,\n mediaSequence,\n segments\n };\n\n if (attributes.serviceLocation) {\n vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n let mainPlaylist;\n const formattedPlaylists = playlists.reduce((a, playlist) => {\n const role = playlist.attributes.role && playlist.attributes.role.value || '';\n const language = playlist.attributes.lang || '';\n let label = playlist.attributes.label || 'main';\n\n if (language && !playlist.attributes.label) {\n const roleLabel = role ? ` (${role})` : '';\n label = `${playlist.attributes.lang}${roleLabel}`;\n }\n\n if (!a[label]) {\n a[label] = {\n language,\n autoselect: true,\n default: role === 'main',\n playlists: [],\n uri: ''\n };\n }\n\n const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n a[label].playlists.push(formatted);\n\n if (typeof mainPlaylist === 'undefined' && role === 'main') {\n mainPlaylist = playlist;\n mainPlaylist.default = true;\n }\n\n return a;\n }, {}); // if no playlists have role \"main\", mark the first as main\n\n if (!mainPlaylist) {\n const firstLabel = Object.keys(formattedPlaylists)[0];\n formattedPlaylists[firstLabel].default = true;\n }\n\n return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n return playlists.reduce((a, playlist) => {\n const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n\n if (!a[label]) {\n a[label] = {\n language: label,\n default: false,\n autoselect: false,\n playlists: [],\n uri: ''\n };\n }\n\n a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n return a;\n }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n if (!svc) {\n return svcObj;\n }\n\n svc.forEach(service => {\n const {\n channel,\n language\n } = service;\n svcObj[language] = {\n autoselect: false,\n default: false,\n instreamId: channel,\n language\n };\n\n if (service.hasOwnProperty('aspectRatio')) {\n svcObj[language].aspectRatio = service.aspectRatio;\n }\n\n if (service.hasOwnProperty('easyReader')) {\n svcObj[language].easyReader = service.easyReader;\n }\n\n if (service.hasOwnProperty('3D')) {\n svcObj[language]['3D'] = service['3D'];\n }\n });\n return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n attributes,\n segments,\n sidx,\n discontinuityStarts\n}) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n AUDIO: 'audio',\n SUBTITLES: 'subs',\n RESOLUTION: {\n width: attributes.width,\n height: attributes.height\n },\n CODECS: attributes.codecs,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n segments\n };\n\n if (attributes.frameRate) {\n playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n }\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n return playlist;\n};\n\nconst videoOnly = ({\n attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n // increment all segments sequentially\n playlists.forEach(playlist => {\n playlist.mediaSequence = 0;\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n });\n\n if (!playlist.segments) {\n return;\n }\n\n playlist.segments.forEach((segment, index) => {\n segment.number = index;\n });\n });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n * The media group playlists\n */\n\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n if (!mediaGroupObject) {\n return [];\n }\n\n return Object.keys(mediaGroupObject).reduce((acc, label) => {\n const labelContents = mediaGroupObject[label];\n return acc.concat(labelContents.playlists);\n }, []);\n};\nconst toM3u8 = ({\n dashPlaylists,\n locations,\n contentSteering,\n sidxMapping = {},\n previousManifest,\n eventStream\n}) => {\n if (!dashPlaylists.length) {\n return {};\n } // grab all main manifest attributes\n\n\n const {\n sourceDuration: duration,\n type,\n suggestedPresentationDelay,\n minimumUpdatePeriod\n } = dashPlaylists[0].attributes;\n const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n const manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: [],\n endList: true,\n mediaGroups: {\n AUDIO: {},\n VIDEO: {},\n ['CLOSED-CAPTIONS']: {},\n SUBTITLES: {}\n },\n uri: '',\n duration,\n playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n };\n\n if (minimumUpdatePeriod >= 0) {\n manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n }\n\n if (locations) {\n manifest.locations = locations;\n }\n\n if (contentSteering) {\n manifest.contentSteering = contentSteering;\n }\n\n if (type === 'dynamic') {\n manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n }\n\n if (eventStream && eventStream.length > 0) {\n manifest.eventStream = eventStream;\n }\n\n const isAudioOnly = manifest.playlists.length === 0;\n const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n const playlistTimelineStarts = formattedPlaylists.map(({\n timelineStarts\n }) => timelineStarts);\n manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n if (organizedAudioGroup) {\n manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n }\n\n if (organizedVttGroup) {\n manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n }\n\n if (captions.length) {\n manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n }\n\n if (previousManifest) {\n return positionManifestOnTimeline({\n oldManifest: previousManifest,\n newManifest: manifest\n });\n }\n\n return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {number} time\n * current time (typically the total time up until the final segment)\n * @param {number} duration\n * duration property for the given \n *\n * @return {number}\n * R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n periodStart = 0,\n minimumUpdatePeriod = 0\n } = attributes;\n const now = (NOW + clientOffset) / 1000;\n const periodStartWC = availabilityStartTime + periodStart;\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n const {\n type,\n minimumUpdatePeriod = 0,\n media = '',\n sourceDuration,\n timescale = 1,\n startNumber = 1,\n periodStart: timeline\n } = attributes;\n const segments = [];\n let time = -1;\n\n for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n const S = segmentTimeline[sIndex];\n const duration = S.d;\n const repeat = S.r || 0;\n const segmentTime = S.t || 0;\n\n if (time < 0) {\n // first segment\n time = segmentTime;\n }\n\n if (segmentTime && segmentTime > time) {\n // discontinuity\n // TODO: How to handle this type of discontinuity\n // timeline++ here would treat it like HLS discontuity and content would\n // get appended without gap\n // E.G.\n // \n // \n // \n // \n // would have $Time$ values of [0, 1, 2, 5]\n // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n // does the value of sourceDuration consider this when calculating arbitrary\n // negative @r repeat value?\n // E.G. Same elements as above with this added at the end\n // \n // with a sourceDuration of 10\n // Would the 2 gaps be included in the time duration calculations resulting in\n // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n time = segmentTime;\n }\n\n let count;\n\n if (repeat < 0) {\n const nextS = sIndex + 1;\n\n if (nextS === segmentTimeline.length) {\n // last segment\n if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n count = getLiveRValue(attributes, time, duration);\n } else {\n // TODO: This may be incorrect depending on conclusion of TODO above\n count = (sourceDuration * timescale - time) / duration;\n }\n } else {\n count = (segmentTimeline[nextS].t - time) / duration;\n }\n } else {\n count = repeat + 1;\n }\n\n const end = startNumber + segments.length + count;\n let number = startNumber + segments.length;\n\n while (number < end) {\n segments.push({\n number,\n duration: duration / timescale,\n time,\n timeline\n });\n time += duration;\n number++;\n }\n }\n\n return segments;\n};\n\nconst identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n * Entire match of identifier\n * @param {string} identifier\n * Name of matched identifier\n * @param {string} format\n * Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n * Desired length of the replaced value. Values less than this width shall be left\n * zero padded\n * @return {string}\n * Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {replaceCallback}\n * Callback to be used with String.prototype.replace to replace identifiers\n */\n\nconst identifierReplacement = values => (match, identifier, format, width) => {\n if (match === '$$') {\n // escape sequence\n return '$';\n }\n\n if (typeof values[identifier] === 'undefined') {\n return match;\n }\n\n const value = '' + values[identifier];\n\n if (identifier === 'RepresentationID') {\n // Format tag shall not be present with RepresentationID\n return value;\n }\n\n if (!format) {\n width = 1;\n } else {\n width = parseInt(width, 10);\n }\n\n if (value.length >= width) {\n return value;\n }\n\n return `${new Array(width - value.length + 1).join('0')}${value}`;\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n * Template string to construct url from\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {string}\n * Segment url with identifiers replaced\n */\n\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseTemplateInfo = (attributes, segmentTimeline) => {\n if (!attributes.duration && !segmentTimeline) {\n // if neither @duration or SegmentTimeline are present, then there shall be exactly\n // one media segment\n return [{\n number: attributes.startNumber || 1,\n duration: attributes.sourceDuration,\n time: 0,\n timeline: attributes.periodStart\n }];\n }\n\n if (attributes.duration) {\n return parseByDuration(attributes);\n }\n\n return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object[]}\n * List of segment objects\n */\n\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n const templateValues = {\n RepresentationID: attributes.id,\n Bandwidth: attributes.bandwidth || 0\n };\n const {\n initialization = {\n sourceURL: '',\n range: ''\n }\n } = attributes;\n const mapSegment = urlTypeToSegment({\n baseUrl: attributes.baseUrl,\n source: constructTemplateUrl(initialization.sourceURL, templateValues),\n range: initialization.range\n });\n const segments = parseTemplateInfo(attributes, segmentTimeline);\n return segments.map(segment => {\n templateValues.Number = segment.number;\n templateValues.Time = segment.time;\n const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is\n // calculated in mpd-parser prior to this, so it's assumed to be available.\n attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n const map = {\n uri,\n timeline: segment.timeline,\n duration: segment.duration,\n resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n map: mapSegment,\n number: segment.number,\n presentationTime\n };\n return map;\n });\n};\n\n/**\n * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object} segmentUrl\n * node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n const {\n baseUrl,\n initialization = {}\n } = attributes;\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: segmentUrl.media,\n range: segmentUrl.mediaRange\n });\n segment.map = initSegment;\n return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object.} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n const {\n duration,\n segmentUrls = [],\n periodStart\n } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n if (!duration && !segmentTimeline || duration && segmentTimeline) {\n throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n }\n\n const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n let segmentTimeInfo;\n\n if (duration) {\n segmentTimeInfo = parseByDuration(attributes);\n }\n\n if (segmentTimeline) {\n segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n }\n\n const segments = segmentTimeInfo.map((segmentTime, index) => {\n if (segmentUrlMap[index]) {\n const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n segment.timeline = segmentTime.timeline;\n segment.duration = segmentTime.duration;\n segment.number = segmentTime.number;\n segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n return segment;\n } // Since we're mapping we should get rid of any blank segments (in case\n // the given SegmentTimeline is handling for more elements than we have\n // SegmentURLs for).\n\n }).filter(segment => segment);\n return segments;\n};\n\nconst generateSegments = ({\n attributes,\n segmentInfo\n}) => {\n let segmentAttributes;\n let segmentsFn;\n\n if (segmentInfo.template) {\n segmentsFn = segmentsFromTemplate;\n segmentAttributes = merge(attributes, segmentInfo.template);\n } else if (segmentInfo.base) {\n segmentsFn = segmentsFromBase;\n segmentAttributes = merge(attributes, segmentInfo.base);\n } else if (segmentInfo.list) {\n segmentsFn = segmentsFromList;\n segmentAttributes = merge(attributes, segmentInfo.list);\n }\n\n const segmentsInfo = {\n attributes\n };\n\n if (!segmentsFn) {\n return segmentsInfo;\n }\n\n const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n // must be in seconds. Since we've generated the segment list, we no longer need\n // @duration to be in @timescale units, so we can convert it here.\n\n if (segmentAttributes.duration) {\n const {\n duration,\n timescale = 1\n } = segmentAttributes;\n segmentAttributes.duration = duration / timescale;\n } else if (segments.length) {\n // if there is no @duration attribute, use the largest segment duration as\n // as target duration\n segmentAttributes.duration = segments.reduce((max, segment) => {\n return Math.max(max, Math.ceil(segment.duration));\n }, 0);\n } else {\n segmentAttributes.duration = 0;\n }\n\n segmentsInfo.attributes = segmentAttributes;\n segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n if (segmentInfo.base && segmentAttributes.indexRange) {\n segmentsInfo.sidx = segments[0];\n segmentsInfo.segments = [];\n }\n\n return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nconst parseDivisionValue = value => {\n return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n const SECONDS_IN_DAY = 24 * 60 * 60;\n const SECONDS_IN_HOUR = 60 * 60;\n const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n const match = durationRegex.exec(str);\n\n if (!match) {\n return 0;\n }\n\n const [year, month, day, hour, minute, second] = match.slice(1);\n return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nconst parseDate = str => {\n // Date format without timezone according to ISO 8601\n // YYY-MM-DDThh:mm:ss.ssssss\n const dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n // expressed by ending with 'Z'\n\n if (dateRegex.test(str)) {\n str += 'Z';\n }\n\n return Date.parse(str);\n};\n\nconst parsers = {\n /**\n * Specifies the duration of the entire Media Presentation. Format is a duration string\n * as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n mediaPresentationDuration(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the Segment availability start time for all Segments referred to in this\n * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n * time. Format is a date string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The date as seconds from unix epoch\n */\n availabilityStartTime(value) {\n return parseDate(value) / 1000;\n },\n\n /**\n * Specifies the smallest period between potential changes to the MPD. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n minimumUpdatePeriod(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the suggested presentation delay. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n suggestedPresentationDelay(value) {\n return parseDuration(value);\n },\n\n /**\n * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n *\n * @param {string} value\n * value of attribute as a string\n *\n * @return {string}\n * The type as a string\n */\n type(value) {\n return value;\n },\n\n /**\n * Specifies the duration of the smallest time shifting buffer for any Representation\n * in the MPD. Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n timeShiftBufferDepth(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n * Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n start(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the width of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed width\n */\n width(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the height of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed height\n */\n height(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the bitrate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed bandwidth\n */\n bandwidth(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the frame rate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed frame rate\n */\n frameRate(value) {\n return parseDivisionValue(value);\n },\n\n /**\n * Specifies the number of the first Media Segment in this Representation in the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n startNumber(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the timescale in units per seconds\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed timescale\n */\n timescale(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTimeOffset.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTimeOffset\n */\n presentationTimeOffset(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the constant approximate Segment duration\n * NOTE: The element also contains an @duration attribute. This duration\n * specifies the duration of the Period. This attribute is currently not\n * supported by the rest of the parser, however we still check for it to prevent\n * errors.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n duration(value) {\n const parsedValue = parseInt(value, 10);\n\n if (isNaN(parsedValue)) {\n return parseDuration(value);\n }\n\n return parsedValue;\n },\n\n /**\n * Specifies the Segment duration, in units of the value of the @timescale.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n d(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the MPD start time, in @timescale units, the first Segment in the series\n * starts relative to the beginning of the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed time\n */\n t(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the repeat count of the number of following contiguous Segments with the\n * same duration expressed by the value of @d\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n r(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTime.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTime\n */\n presentationTime(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Default parser for all other attributes. Acts as a no-op and just returns the value\n * as a string\n *\n * @param {string} value\n * value of attribute as a string\n * @return {string}\n * Unparsed value\n */\n DEFAULT(value) {\n return value;\n }\n\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n * The node to parse attributes from\n * @return {Object}\n * Object with all attributes of el parsed\n */\n\nconst parseAttributes = el => {\n if (!(el && el.attributes)) {\n return {};\n }\n\n return from(el.attributes).reduce((a, e) => {\n const parseFn = parsers[e.name] || parsers.DEFAULT;\n a[e.name] = parseFn(e.value);\n return a;\n }, {});\n};\n\nconst keySystemsMap = {\n 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {Object[]} references\n * List of objects containing the reference URL as well as its attributes\n * @param {Node[]} baseUrlElements\n * List of BaseURL nodes from the mpd\n * @return {Object[]}\n * List of objects with resolved urls and attributes\n */\n\nconst buildBaseUrls = (references, baseUrlElements) => {\n if (!baseUrlElements.length) {\n return references;\n }\n\n return flatten(references.map(function (reference) {\n return baseUrlElements.map(function (baseUrlElement) {\n const initialBaseUrl = getContent(baseUrlElement);\n const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n const finalBaseUrl = merge(parseAttributes(baseUrlElement), {\n baseUrl: resolvedBaseUrl\n }); // If the URL is resolved, we want to get the serviceLocation from the reference\n // assuming there is no serviceLocation on the initialBaseUrl\n\n if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n finalBaseUrl.serviceLocation = reference.serviceLocation;\n }\n\n return finalBaseUrl;\n });\n }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n * Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n * Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n * Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n * Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n * The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n * The Segment information contained within the provided AdaptationSet\n */\n\nconst getSegmentInformation = adaptationSet => {\n const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n tag: 'SegmentURL'\n }, parseAttributes(s)));\n const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n const segmentTimelineParentNode = segmentList || segmentTemplate;\n const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n // @initialization and an node. @initialization can be templated,\n // while the node can have a url and range specified. If the has\n // both @initialization and an subelement we opt to override with\n // the node, as this interaction is not defined in the spec.\n\n const template = segmentTemplate && parseAttributes(segmentTemplate);\n\n if (template && segmentInitialization) {\n template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n } else if (template && template.initialization) {\n // If it is @initialization we convert it to an object since this is the format that\n // later functions will rely on for the initialization segment. This is only valid\n // for \n template.initialization = {\n sourceURL: template.initialization\n };\n }\n\n const segmentInfo = {\n template,\n segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n list: segmentList && merge(parseAttributes(segmentList), {\n segmentUrls,\n initialization: parseAttributes(segmentInitialization)\n }),\n base: segmentBase && merge(parseAttributes(segmentBase), {\n initialization: parseAttributes(segmentInitialization)\n })\n };\n Object.keys(segmentInfo).forEach(key => {\n if (!segmentInfo[key]) {\n delete segmentInfo[key];\n }\n });\n return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n * Segment information for this Representation\n * @property {Object} attributes\n * Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n * Representation node from the mpd\n * @return {RepresentationInformation}\n * Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n * Contains attributes inherited by the AdaptationSet\n * @param {Object[]} adaptationSetBaseUrls\n * List of objects containing resolved base URLs and attributes\n * inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n * Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n * Callback map function\n */\n\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n const repBaseUrlElements = findChildren(representation, 'BaseURL');\n const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n const representationSegmentInfo = getSegmentInformation(representation);\n return repBaseUrls.map(baseUrl => {\n return {\n segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n attributes: merge(attributes, baseUrl)\n };\n });\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n * Content protection nodes\n * @return {Object}\n * Object containing pssh data by key system\n */\n\nconst generateKeySystemInformation = contentProtectionNodes => {\n return contentProtectionNodes.reduce((acc, node) => {\n const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n if (attributes.schemeIdUri) {\n attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n }\n\n const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n if (keySystem) {\n acc[keySystem] = {\n attributes\n };\n const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n if (psshNode) {\n const pssh = getContent(psshNode);\n acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n }\n }\n\n return acc;\n }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n // 608 captions\n if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n let channel;\n let language; // default language to value\n\n language = value;\n\n if (/^CC\\d=/.test(value)) {\n [channel, language] = value.split('=');\n } else if (/^CC\\d$/.test(value)) {\n channel = value;\n }\n\n return {\n channel,\n language\n };\n });\n } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n const flags = {\n // service or channel number 1-63\n 'channel': undefined,\n // language is a 3ALPHA per ISO 639.2/B\n // field is required\n 'language': undefined,\n // BIT 1/0 or ?\n // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n 'aspectRatio': 1,\n // BIT 1/0\n // easy reader flag indicated the text is tailed to the needs of beginning readers\n // default 0, or off\n 'easyReader': 0,\n // BIT 1/0\n // If 3d metadata is present (CEA-708.1) then 1\n // default 0\n '3D': 0\n };\n\n if (/=/.test(value)) {\n const [channel, opts = ''] = value.split('=');\n flags.channel = channel;\n flags.language = value;\n opts.split(',').forEach(opt => {\n const [name, val] = opt.split(':');\n\n if (name === 'lang') {\n flags.language = val; // er for easyReadery\n } else if (name === 'er') {\n flags.easyReader = Number(val); // war for wide aspect ratio\n } else if (name === 'war') {\n flags.aspectRatio = Number(val);\n } else if (name === '3D') {\n flags['3D'] = Number(val);\n }\n });\n } else {\n flags.language = value;\n }\n\n if (flags.channel) {\n flags.channel = 'SERVICE' + flags.channel;\n }\n\n return flags;\n });\n }\n};\n/**\n * A map callback that will parse all event stream data for a collection of periods\n * DASH ISO_IEC_23009 5.10.2.2\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n *\n * @param {PeriodInformation} period object containing necessary period information\n * @return a collection of parsed eventstream event objects\n */\n\nconst toEventStream = period => {\n // get and flatten all EventStreams tags and parse attributes and children\n return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n const eventStreamAttributes = parseAttributes(eventStream);\n const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n return findChildren(eventStream, 'Event').map(event => {\n const eventAttributes = parseAttributes(event);\n const presentationTime = eventAttributes.presentationTime || 0;\n const timescale = eventStreamAttributes.timescale || 1;\n const duration = eventAttributes.duration || 0;\n const start = presentationTime / timescale + period.attributes.start;\n return {\n schemeIdUri,\n value: eventStreamAttributes.value,\n id: eventAttributes.id,\n start,\n end: start + duration / timescale,\n messageData: getContent(event) || eventAttributes.messageData,\n contentEncoding: eventStreamAttributes.contentEncoding,\n presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n };\n });\n }));\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n * AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n * Contains attributes inherited by the Period\n * @param {Object[]} periodBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the Period\n * @param {string[]} periodSegmentInfo\n * Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n * Callback map function\n */\n\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n const adaptationSetAttributes = parseAttributes(adaptationSet);\n const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n const role = findChildren(adaptationSet, 'Role')[0];\n const roleAttributes = {\n role: parseAttributes(role)\n };\n let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n if (captionServices) {\n attrs = merge(attrs, {\n captionServices\n });\n }\n\n const label = findChildren(adaptationSet, 'Label')[0];\n\n if (label && label.childNodes.length) {\n const labelVal = label.childNodes[0].nodeValue.trim();\n attrs = merge(attrs, {\n label: labelVal\n });\n }\n\n const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n if (Object.keys(contentProtection).length) {\n attrs = merge(attrs, {\n contentProtection\n });\n }\n\n const segmentInfo = getSegmentInformation(adaptationSet);\n const representations = findChildren(adaptationSet, 'Representation');\n const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n * Period node from the mpd\n * @property {Object} period.attributes\n * Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n * Period object containing necessary period information\n * @param {number} periodStart\n * Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n * Contains attributes inherited by the mpd\n * @param {Object[]} mpdBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the mpd\n * @return {toAdaptationSetsCallback}\n * Callback map function\n */\n\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n const periodAttributes = merge(mpdAttributes, {\n periodStart: period.attributes.start\n });\n\n if (typeof period.attributes.duration === 'number') {\n periodAttributes.periodDuration = period.attributes.duration;\n }\n\n const adaptationSets = findChildren(period.node, 'AdaptationSet');\n const periodSegmentInfo = getSegmentInformation(period.node);\n return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n};\n/**\n * Tranforms an array of content steering nodes into an object\n * containing CDN content steering information from the MPD manifest.\n *\n * For more information on the DASH spec for Content Steering parsing, see:\n * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {Node[]} contentSteeringNodes\n * Content steering nodes\n * @param {Function} eventHandler\n * The event handler passed into the parser options to handle warnings\n * @return {Object}\n * Object containing content steering data\n */\n\nconst generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => {\n // If there are more than one ContentSteering tags, throw an error\n if (contentSteeringNodes.length > 1) {\n eventHandler({\n type: 'warn',\n message: 'The MPD manifest should contain no more than one ContentSteering tag'\n });\n } // Return a null value if there are no ContentSteering tags\n\n\n if (!contentSteeringNodes.length) {\n return null;\n }\n\n const infoFromContentSteeringTag = merge({\n serverURL: getContent(contentSteeringNodes[0])\n }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n // to `false` if it doesn't exist\n\n infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n return infoFromContentSteeringTag;\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n * Options object\n * @param {Object} options.attributes\n * Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n * Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n * The MPD@type these periods came from\n * @return {number|null}\n * The period start, or null if it's an early available period or error\n */\n\nconst getPeriodStart = ({\n attributes,\n priorPeriodAttributes,\n mpdType\n}) => {\n // Summary of period start time calculation from DASH spec section 5.3.2.1\n //\n // A period's start is the first period's start + time elapsed after playing all\n // prior periods to this one. Periods continue one after the other in time (without\n // gaps) until the end of the presentation.\n //\n // The value of Period@start should be:\n // 1. if Period@start is present: value of Period@start\n // 2. if previous period exists and it has @duration: previous Period@start +\n // previous Period@duration\n // 3. if this is first period and MPD@type is 'static': 0\n // 4. in all other cases, consider the period an \"early available period\" (note: not\n // currently supported)\n // (1)\n if (typeof attributes.start === 'number') {\n return attributes.start;\n } // (2)\n\n\n if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n } // (3)\n\n\n if (!priorPeriodAttributes && mpdType === 'static') {\n return 0;\n } // (4)\n // There is currently no logic for calculating the Period@start value if there is\n // no Period@start or prior Period@start and Period@duration available. This is not made\n // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n // nothing about any other resolution strategies, it's implied. Thus, this case should\n // be considered an early available period, or error, and null should suffice for both\n // of those cases.\n\n\n return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n * The root node of the mpd\n * @param {Object} options\n * Available options for inheritAttributes\n * @param {string} options.manifestUri\n * The uri source of the mpd\n * @param {number} options.NOW\n * Current time per DASH IOP. Default is current time in ms since epoch\n * @param {number} options.clientOffset\n * Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n * List of objects containing Representation information\n */\n\nconst inheritAttributes = (mpd, options = {}) => {\n const {\n manifestUri = '',\n NOW = Date.now(),\n clientOffset = 0,\n // TODO: For now, we are expecting an eventHandler callback function\n // to be passed into the mpd parser as an option.\n // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n // This will support new features including a standardized event handler.\n // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n eventHandler = function () {}\n } = options;\n const periodNodes = findChildren(mpd, 'Period');\n\n if (!periodNodes.length) {\n throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n }\n\n const locations = findChildren(mpd, 'Location');\n const mpdAttributes = parseAttributes(mpd);\n const mpdBaseUrls = buildBaseUrls([{\n baseUrl: manifestUri\n }], findChildren(mpd, 'BaseURL'));\n const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n mpdAttributes.type = mpdAttributes.type || 'static';\n mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n mpdAttributes.NOW = NOW;\n mpdAttributes.clientOffset = clientOffset;\n\n if (locations.length) {\n mpdAttributes.locations = locations.map(getContent);\n }\n\n const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n // adding properties that require looking at prior periods is to parse attributes and add\n // missing ones before toAdaptationSets is called. If more such properties are added, it\n // may be better to refactor toAdaptationSets.\n\n periodNodes.forEach((node, index) => {\n const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n // for this period.\n\n const priorPeriod = periods[index - 1];\n attributes.start = getPeriodStart({\n attributes,\n priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n mpdType: mpdAttributes.type\n });\n periods.push({\n node,\n attributes\n });\n });\n return {\n locations: mpdAttributes.locations,\n contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n // TODO: There are occurences where this `representationInfo` array contains undesired\n // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n // parent BaseURL and a child BaseURL, and the value does not resolve,\n // we end up returning the child BaseURL multiple times.\n // We need to determine a way to remove these duplicates in a safe way.\n // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n eventStream: flatten(periods.map(toEventStream))\n };\n};\n\nconst stringToMpdXml = manifestString => {\n if (manifestString === '') {\n throw new Error(errors.DASH_EMPTY_MANIFEST);\n }\n\n const parser = new DOMParser();\n let xml;\n let mpd;\n\n try {\n xml = parser.parseFromString(manifestString, 'application/xml');\n mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n } catch (e) {// ie 11 throws on invalid xml\n }\n\n if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n throw new Error(errors.DASH_INVALID_XML);\n }\n\n return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nconst parseUTCTimingScheme = mpd => {\n const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n if (!UTCTimingNode) {\n return null;\n }\n\n const attributes = parseAttributes(UTCTimingNode);\n\n switch (attributes.schemeIdUri) {\n case 'urn:mpeg:dash:utc:http-head:2014':\n case 'urn:mpeg:dash:utc:http-head:2012':\n attributes.method = 'HEAD';\n break;\n\n case 'urn:mpeg:dash:utc:http-xsdate:2014':\n case 'urn:mpeg:dash:utc:http-iso:2014':\n case 'urn:mpeg:dash:utc:http-xsdate:2012':\n case 'urn:mpeg:dash:utc:http-iso:2012':\n attributes.method = 'GET';\n break;\n\n case 'urn:mpeg:dash:utc:direct:2014':\n case 'urn:mpeg:dash:utc:direct:2012':\n attributes.method = 'DIRECT';\n attributes.value = Date.parse(attributes.value);\n break;\n\n case 'urn:mpeg:dash:utc:http-ntp:2014':\n case 'urn:mpeg:dash:utc:ntp:2014':\n case 'urn:mpeg:dash:utc:sntp:2014':\n default:\n throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n }\n\n return attributes;\n};\n\nconst VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nconst parse = (manifestString, options = {}) => {\n const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n const playlists = toPlaylists(parsedManifestInfo.representationInfo);\n return toM3u8({\n dashPlaylists: playlists,\n locations: parsedManifestInfo.locations,\n contentSteering: parsedManifestInfo.contentSteeringInfo,\n sidxMapping: options.sidxMapping,\n previousManifest: options.previousManifest,\n eventStream: parsedManifestInfo.eventStream\n });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n","import window from 'global/window';\n\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {string[]} groups\n * The media groups to call the callback for\n * @param {Function} callback\n * Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n groups.forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","'use strict'\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n","var conventions = require(\"./conventions\");\nvar dom = require('./dom')\nvar entities = require('./entities');\nvar sax = require('./sax');\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.replace(/[\\r\\u0085\\u2028]/g, '\\n')\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax = new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n\tstartDocument : function() {\n \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n \tif (this.locator) {\n \tthis.doc.documentURI = this.locator.systemId;\n \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t var el = doc.createElementNS(namespaceURI, qName||localName);\n\t var len = attrs.length;\n\t appendElement(this, el);\n\t this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t for (var i = 0 ; i < len; i++) {\n\t var namespaceURI = attrs.getURI(i);\n\t var value = attrs.getValue(i);\n\t var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t var ins = this.doc.createProcessingInstruction(target, data);\n\t this.locator && position(this.locator,ins)\n\t appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t if(this.locator = locator){// && !('lineNumber' in locator)){\n\t \tlocator.lineNumber = 0;\n\t }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t var comm = this.doc.createComment(chars);\n\t this.locator && position(this.locator,comm)\n\t appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t //used in characters() methods\n\t this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t if (impl && impl.createDocumentType) {\n\t var dt = impl.createDocumentType(name, publicId, systemId);\n\t this.locator && position(this.locator,dt)\n\t appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n * #comment(chars, start, length)\n * #startCDATA()\n * #endCDATA()\n * #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n * #endDTD()\n * #startEntity(name)\n * #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n * #elementDecl(name, model)\n * #externalEntityDecl(name, publicId, systemId)\n * #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n * #resolveEntity(String name,String publicId,String baseURI,String systemId)\n * #resolveEntity(publicId, systemId)\n * #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n * #notationDecl(name, publicId, systemId) {};\n * #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;\n","var conventions = require(\"./conventions\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record} current\n * @param {string} element\n * @returns {Record}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\nvar ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\nvar TEXT_NODE = NodeType.TEXT_NODE = 3;\nvar CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\nvar ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\nvar ENTITY_NODE = NodeType.ENTITY_NODE = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE = NodeType.COMMENT_NODE = 8;\nvar DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\nvar NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR \t= ExceptionCode.INVALID_STATE_ERR \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR \t= ExceptionCode.SYNTAX_ERR \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR \t= ExceptionCode.NAMESPACE_ERR \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR \t= ExceptionCode.INVALID_ACCESS_ERR \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index unsigned long\n\t * Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI, qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n // Introduced in DOM Level 2:\n hasAttributes:function(){\n \treturn this.attributes.length>0;\n },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n lookupPrefix:function(namespaceURI){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n lookupNamespaceURI:function(prefix){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n \t\t\t\treturn map[prefix] ;\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n isDefaultNamespace:function(namespaceURI){\n \tvar prefix = this.lookupPrefix(namespaceURI);\n \treturn prefix == null;\n }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '<' ||\n c == '>' && '>' ||\n c == '&' && '&' ||\n c == '\"' && '"' ||\n '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n }while(node=node.nextSibling)\n }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName : '#document',\n\tnodeType : DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype : null,\n\tdocumentElement : null,\n\t_inc : 1,\n\n\tinsertBefore : function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild : function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&` and `<` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" > \", and must, for compatibility,\n\t\t * be escaped using either `>` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n","var dom = require('./dom')\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = require('./dom-parser').DOMParser\n","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4] \tNameStartChar\t ::= \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a] \tNameChar\t ::= \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5] \tName\t ::= \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t \t\t\tdoc.appendChild(text);\n\t \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t \t\tend = tagStart+1+tagName.length;\n\t \t}else if(tagName.match(/\\s\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退,有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName = el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart = source.indexOf('',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos = source.lastIndexOf('')\n\t\tif(pos',start+4);\n\t\t\t//append comment source.substring(4,end)//';\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parsing fields [ID3v2.4.0 section 4.14.]\n\n mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (mimeTypeEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Mime type field (terminated with \\0)\n\n frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n frame.pictureType = frame.data[i];\n i++;\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (descriptionEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Description field (terminated with \\0)\n\n frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n i = descriptionEndIndex + 1;\n if (frame.mimeType === LINK_MIME_TYPE) {\n // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n } else {\n // parsing Picture Data field as binary data\n frame.pictureData = frame.data.subarray(i, frame.data.length);\n }\n },\n 'T*': function (frame) {\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parse text field, do not include null terminator in the frame value\n // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n frame.values = frame.value.split('\\0');\n },\n 'TXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the text fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n // frames that allow different types of encoding contain terminated text\n // [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n frame.data = frame.value;\n },\n 'W*': function (frame) {\n // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n },\n 'WXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the description and URL fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information\n // should be ignored [ID3v2.4.0 section 4.3]\n\n frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n },\n 'PRIV': function (frame) {\n var i;\n for (i = 0; i < frame.data.length; i++) {\n if (frame.data[i] === 0) {\n // parse the description and URL fields\n frame.owner = parseIso88591$1(frame.data, 0, i);\n break;\n }\n }\n frame.privateData = frame.data.subarray(i + 1);\n frame.data = frame.privateData;\n }\n };\n var parseId3Frames$1 = function (data) {\n var frameSize,\n frameHeader,\n frameStart = 10,\n tagSize = 0,\n frames = []; // If we don't have enough data for a header, 10 bytes, \n // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n return;\n } // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n\n tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n var hasExtendedHeader = data[5] & 0x40;\n if (hasExtendedHeader) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n break;\n }\n frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n var frame = {\n id: frameHeader,\n data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (frameParsers[frame.id]) {\n // use frame specific parser\n frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n frameParsers['W*'](frame);\n }\n frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n return frames;\n };\n var parseId3 = {\n parseId3Frames: parseId3Frames$1,\n parseSyncSafeInteger: parseSyncSafeInteger$1,\n frameParsers: frameParsers\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n\n var Stream$5 = stream,\n StreamTypes$3 = streamTypes,\n id3 = parseId3,\n MetadataStream;\n MetadataStream = function (options) {\n var settings = {\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n this.trigger('log', {\n level: 'warn',\n message: 'Skipping unrecognized metadata packet'\n });\n return;\n } // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n this.trigger('log', {\n level: 'warn',\n message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n // to be sent along.\n\n break;\n }\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (id3.frameParsers[frame.id]) {\n // use frame specific parser\n id3.frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n id3.frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n id3.frameParsers['W*'](frame);\n } // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n this.trigger('timestamp', frame);\n }\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n };\n MetadataStream.prototype = new Stream$5();\n var metadataStream = MetadataStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$4 = stream,\n CaptionStream$1 = captionStream,\n StreamTypes$2 = streamTypes,\n TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n var MP2T_PACKET_LENGTH$1 = 188,\n // bytes\n SYNC_BYTE$1 = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n TransportPacketStream = function () {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n bytesInBuffer = 0;\n TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH$1,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH$1;\n endIndex += MP2T_PACKET_LENGTH$1;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n TransportPacketStream.prototype = new Stream$4();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n TransportParseStream = function () {\n var parsePsi, parsePat, parsePmt, self;\n TransportParseStream.prototype.init.call(this);\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n parsePsi = function (payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n parsePat = function (payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n parsePmt = function (payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n TransportParseStream.prototype = new Stream$4();\n TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n ElementaryStream = function () {\n var self = this,\n segmentHadPmt = false,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function (payload, pes) {\n var ptsDtsFlags;\n const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n // that are frame data that is continuing from the previous fragment. This\n // is to check that the pes data is the start of a new pes payload\n\n if (startPrefix !== 1) {\n return;\n } // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function (stream, type, forceFlush) {\n var packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream.data.length || stream.size < 9) {\n return;\n }\n event.trackId = stream.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream.data.length; i++) {\n fragment = stream.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream.size = 0;\n stream.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n this.push = function (data) {\n ({\n pat: function () {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function () {\n var stream, streamType;\n switch (data.streamType) {\n case StreamTypes$2.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes$2.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes$2.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function () {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n segmentHadPmt = true;\n self.trigger('data', event);\n }\n })[data.type]();\n };\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n this.flush = function () {\n // if on flush we haven't had a pmt emitted\n // and we have a pmt to emit. emit the pmt\n // so that we trigger a trackinfo downstream.\n if (!segmentHadPmt && programMapTable) {\n var pmt = {\n type: 'metadata',\n tracks: []\n }; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n self.trigger('data', pmt);\n }\n segmentHadPmt = false;\n this.flushStreams_();\n this.trigger('done');\n };\n };\n ElementaryStream.prototype = new Stream$4();\n var m2ts$1 = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n TransportPacketStream: TransportPacketStream,\n TransportParseStream: TransportParseStream,\n ElementaryStream: ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream$1.CaptionStream,\n Cea608Stream: CaptionStream$1.Cea608Stream,\n Cea708Stream: CaptionStream$1.Cea708Stream,\n MetadataStream: metadataStream\n };\n for (var type in StreamTypes$2) {\n if (StreamTypes$2.hasOwnProperty(type)) {\n m2ts$1[type] = StreamTypes$2[type];\n }\n }\n var m2ts_1 = m2ts$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$3 = stream;\n var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n var AdtsStream$1;\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n AdtsStream$1 = function (handlePartialSegments) {\n var buffer,\n frameNum = 0;\n AdtsStream$1.prototype.init.call(this);\n this.skipWarn_ = function (start, end) {\n this.trigger('log', {\n level: 'warn',\n message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n });\n };\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n if (buffer && buffer.length) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n var skip; // We use i + 7 here because we want to be able to parse the entire header.\n // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n while (i + 7 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n if (typeof skip !== 'number') {\n skip = i;\n } // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n\n i++;\n continue;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n // NOTE: frame length includes the size of the header\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n // then we have to wait for more data\n\n if (buffer.byteLength - i < frameLength) {\n break;\n } // Otherwise, deliver the complete AAC frame\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n // data is the frame without it's header\n data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n });\n frameNum++;\n i += frameLength;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // remove processed bytes from the buffer.\n\n buffer = buffer.subarray(i);\n };\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n AdtsStream$1.prototype = new Stream$3();\n var adts = AdtsStream$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb$1;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb$1 = function (workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n return valu;\n }; // ():uint\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n this.loadWord();\n };\n var expGolomb = ExpGolomb$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$2 = stream;\n var ExpGolomb = expGolomb;\n var H264Stream$1, NalByteStream;\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n NalByteStream = function () {\n var syncPoint = 0,\n i,\n buffer;\n NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n this.push = function (data) {\n var swapBuffer;\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n // TODO: the three profiles below don't\n // appear to have sps data in the specificiation anymore?\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n H264Stream$1 = function () {\n var nalByteStream = new NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n H264Stream$1.prototype.init.call(this);\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data,\n nalUnitTypeCode: data[0] & 0x1f\n };\n switch (event.nalUnitTypeCode) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n } // This triggers data on the H264Stream\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n this.flush = function () {\n nalByteStream.flush();\n };\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n this.reset = function () {\n nalByteStream.reset();\n };\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n skipScalingList = function (count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n discardEmulationPreventionBytes = function (data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n readSequenceParameterSet = function (data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio = [1, 1],\n aspectRatioIdc,\n i;\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n case 2:\n sarRatio = [12, 11];\n break;\n case 3:\n sarRatio = [10, 11];\n break;\n case 4:\n sarRatio = [16, 11];\n break;\n case 5:\n sarRatio = [40, 33];\n break;\n case 6:\n sarRatio = [24, 11];\n break;\n case 7:\n sarRatio = [20, 11];\n break;\n case 8:\n sarRatio = [32, 11];\n break;\n case 9:\n sarRatio = [80, 33];\n break;\n case 10:\n sarRatio = [18, 11];\n break;\n case 11:\n sarRatio = [15, 11];\n break;\n case 12:\n sarRatio = [64, 33];\n break;\n case 13:\n sarRatio = [160, 99];\n break;\n case 14:\n sarRatio = [4, 3];\n break;\n case 15:\n sarRatio = [3, 2];\n break;\n case 16:\n sarRatio = [2, 1];\n break;\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n if (sarRatio) {\n sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n // sar is sample aspect ratio\n sarRatio: sarRatio\n };\n };\n };\n H264Stream$1.prototype = new Stream$2();\n var h264 = {\n H264Stream: H264Stream$1,\n NalByteStream: NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n var parseId3TagSize = function (header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n returnSize = returnSize >= 0 ? returnSize : 0;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n var getId3Offset = function (data, offset) {\n if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n return offset;\n }\n offset += parseId3TagSize(data, offset);\n return getId3Offset(data, offset);\n }; // TODO: use vhs-utils\n\n var isLikelyAacData$1 = function (data) {\n var offset = getId3Offset(data, 0);\n return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n // verify that the 2 layer bits are 0, aka this\n // is not mp3 data but aac data.\n (data[offset + 1] & 0x16) === 0x10;\n };\n var parseSyncSafeInteger = function (data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n var percentEncode = function (bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n var parseIso88591 = function (bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n };\n\n var parseAdtsSize = function (header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n var parseType$4 = function (header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n return null;\n };\n var parseSampleRate = function (packet) {\n var i = 0;\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n return null;\n };\n var parseAacTimestamp = function (packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return null;\n }\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n break;\n }\n }\n }\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n return null;\n };\n var utils = {\n isLikelyAacData: isLikelyAacData$1,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType$4,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$1 = stream;\n var aacUtils = utils; // Constants\n\n var AacStream$1;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n AacStream$1 = function () {\n var everything = new Uint8Array(),\n timeStamp = 0;\n AacStream$1.prototype.init.call(this);\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n AacStream$1.prototype = new Stream$1();\n var aac = AacStream$1;\n var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var audioProperties = AUDIO_PROPERTIES$1;\n var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n var videoProperties = VIDEO_PROPERTIES$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream = stream;\n var mp4 = mp4Generator;\n var frameUtils = frameUtils$1;\n var audioFrameUtils = audioFrameUtils$1;\n var trackDecodeInfo = trackDecodeInfo$1;\n var m2ts = m2ts_1;\n var clock = clock$2;\n var AdtsStream = adts;\n var H264Stream = h264.H264Stream;\n var AacStream = aac;\n var isLikelyAacData = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n var AUDIO_PROPERTIES = audioProperties;\n var VIDEO_PROPERTIES = videoProperties; // object types\n\n var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n var retriggerForStream = function (key, event) {\n event.stream = key;\n this.trigger('log', event);\n };\n var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n var keys = Object.keys(pipeline);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i]; // skip non-stream keys and headOfPipeline\n // which is just a duplicate\n\n if (key === 'headOfPipeline' || !pipeline[key].on) {\n continue;\n }\n pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n }\n };\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n var arrayEquals = function (a, b) {\n var i;\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n AudioSegmentStream = function (track, options) {\n var adtsFrames = [],\n sequenceNumber,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n AudioSegmentStream.prototype.init.call(this);\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n adtsFrames.push(data);\n };\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts;\n };\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n segmentDuration = frames.length * frameDuration;\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n // frame info is in video clock cycles. Convert to match expectation of\n // listeners (that all timestamps will be based on video clock cycles).\n clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n // frame times are already in video clock, as is segment duration\n frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n this.trigger('timingInfo', {\n start: frames[0].pts,\n end: frames[0].pts + segmentDuration\n });\n }\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n AudioSegmentStream.prototype = new Stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n VideoSegmentStream = function (track, options) {\n var sequenceNumber,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n VideoSegmentStream.prototype.init.call(this);\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].pts,\n end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n break;\n }\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n gopIndex--;\n }\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n var trimIndex;\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n if (trimIndex === 0) {\n return gops;\n }\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n VideoSegmentStream.prototype = new Stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n CoalesceStream = function (options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.content || output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n CoalesceStream.prototype = new Stream();\n CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n Transmuxer = function (options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n Transmuxer.prototype.init.call(this);\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n return;\n }\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n };\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream(options);\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence. Do not do this if keepOriginalTimestamps is set,\n // because this is a particularly subtle form of timestamp alteration.\n if (audioTrack && !options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n }; // hook up the segment streams once track metadata is delivered\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n }\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n };\n this.getLogTrigger_ = function (key) {\n var self = this;\n return function (event) {\n event.stream = key;\n self.trigger('log', event);\n };\n }; // feed incoming data to the front of the parsing pipeline\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data);\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n Transmuxer.prototype = new Stream();\n var transmuxer = {\n Transmuxer: Transmuxer,\n VideoSegmentStream: VideoSegmentStream,\n AudioSegmentStream: AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateSegmentTimingInfo: generateSegmentTimingInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var toUnsigned$3 = function (value) {\n return value >>> 0;\n };\n var toHexString$1 = function (value) {\n return ('00' + value.toString(16)).slice(-2);\n };\n var bin = {\n toUnsigned: toUnsigned$3,\n toHexString: toHexString$1\n };\n var parseType$3 = function (buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n };\n var parseType_1 = parseType$3;\n var toUnsigned$2 = bin.toUnsigned;\n var parseType$2 = parseType_1;\n var findBox$2 = function (data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType$2(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = findBox$2(data.subarray(i + 8, end), path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = end;\n } // we've finished searching all of data\n\n return results;\n };\n var findBox_1 = findBox$2;\n var toUnsigned$1 = bin.toUnsigned;\n var getUint64$2 = numbers.getUint64;\n var tfdt = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n if (result.version === 1) {\n result.baseMediaDecodeTime = getUint64$2(data.subarray(4));\n } else {\n result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n }\n return result;\n };\n var parseTfdt$2 = tfdt;\n var parseSampleFlags$1 = function (flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n };\n var parseSampleFlags_1 = parseSampleFlags$1;\n var parseSampleFlags = parseSampleFlags_1;\n var trun = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n };\n var parseTrun$2 = trun;\n var tfhd = function (data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n return result;\n };\n var parseTfhd$2 = tfhd;\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n var CaptionStream = captionStream.CaptionStream;\n var findBox$1 = findBox_1;\n var parseTfdt$1 = parseTfdt$2;\n var parseTrun$1 = parseTrun$2;\n var parseTfhd$1 = parseTfhd$2;\n var window$2 = window_1;\n /**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var mapToSample = function (offset, samples) {\n var approximateOffset = offset;\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n if (approximateOffset < sample.size) {\n return sample;\n }\n approximateOffset -= sample.size;\n }\n return null;\n };\n /**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n var findSeiNals = function (avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = {\n logs: [],\n seiNals: []\n },\n seiNal,\n i,\n length,\n lastMatchedSample;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else if (lastMatchedSample) {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n } else {\n result.logs.push({\n level: 'warn',\n message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n });\n break;\n }\n result.seiNals.push(seiNal);\n break;\n }\n }\n return result;\n };\n /**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array} truns - The Trun Run boxes to be parsed\n * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var parseSamples = function (truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = parseTrun$1(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n sample.trackId = trackId;\n sample.dts = currentDts;\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n if (typeof currentDts === 'bigint') {\n sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset);\n currentDts += window$2.BigInt(sample.duration);\n } else {\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n }\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n };\n /**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n var parseCaptionNals = function (segment, videoTrackId) {\n // To get the samples\n var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = findBox$1(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = parseTfhd$1(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = findBox$1(traf, ['trun']);\n var samples;\n var result; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n result = findSeiNals(mdat, samples, trackId);\n if (!captionNals[trackId]) {\n captionNals[trackId] = {\n seiNals: [],\n logs: []\n };\n }\n captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n }\n });\n return captionNals;\n };\n /**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n **/\n\n var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n captionNals = parseCaptionNals(segment, trackId);\n var trackNals = captionNals[trackId] || {};\n return {\n seiNals: trackNals.seiNals,\n logs: trackNals.logs,\n timescale: timescale\n };\n };\n /**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n var CaptionParser = function () {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n captionStream.on('log', function (log) {\n parsedCaptions.logs.push(log);\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n if (parsedData && parsedData.logs) {\n parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n }\n if (parsedData === null || !parsedData.seiNals) {\n if (parsedCaptions.logs.length) {\n return {\n logs: parsedCaptions.logs,\n captions: [],\n captionStreams: []\n };\n }\n return null;\n }\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n parsedCaptions.logs = [];\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {},\n logs: []\n };\n } else {\n this.clearParsedCaptions();\n }\n this.resetCaptionStream();\n };\n this.reset();\n };\n var captionParser = CaptionParser;\n /**\n * Returns the first string in the data array ending with a null char '\\0'\n * @param {UInt8} data \n * @returns the string with the null char\n */\n\n var uint8ToCString$1 = function (data) {\n var index = 0;\n var curChar = String.fromCharCode(data[index]);\n var retString = '';\n while (curChar !== '\\0') {\n retString += curChar;\n index++;\n curChar = String.fromCharCode(data[index]);\n } // Add nullChar\n\n retString += curChar;\n return retString;\n };\n var string = {\n uint8ToCString: uint8ToCString$1\n };\n var uint8ToCString = string.uint8ToCString;\n var getUint64$1 = numbers.getUint64;\n /**\n * Based on: ISO/IEC 23009 Section: 5.10.3.3\n * References:\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n * https://aomediacodec.github.io/id3-emsg/\n * \n * Takes emsg box data as a uint8 array and returns a emsg box object\n * @param {UInt8Array} boxData data from emsg box\n * @returns A parsed emsg box object\n */\n\n var parseEmsgBox = function (boxData) {\n // version + flags\n var offset = 4;\n var version = boxData[0];\n var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n if (version === 0) {\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time_delta = dv.getUint32(offset);\n offset += 4;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n } else if (version === 1) {\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time = getUint64$1(boxData.subarray(offset));\n offset += 8;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n }\n message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n var emsgBox = {\n scheme_id_uri,\n value,\n // if timescale is undefined or 0 set to 1 \n timescale: timescale ? timescale : 1,\n presentation_time,\n presentation_time_delta,\n event_duration,\n id,\n message_data\n };\n return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n };\n /**\n * Scales a presentation time or time delta with an offset with a provided timescale\n * @param {number} presentationTime \n * @param {number} timescale \n * @param {number} timeDelta \n * @param {number} offset \n * @returns the scaled time as a number\n */\n\n var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n };\n /**\n * Checks the emsg box data for validity based on the version\n * @param {number} version of the emsg box to validate\n * @param {Object} emsg the emsg data to validate\n * @returns if the box is valid as a boolean\n */\n\n var isValidEmsgBox = function (version, emsg) {\n var hasScheme = emsg.scheme_id_uri !== '\\0';\n var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n return !(version > 1) && isValidV0Box || isValidV1Box;\n }; // Utility function to check if an object is defined\n\n var isDefined = function (data) {\n return data !== undefined || data !== null;\n };\n var emsg$1 = {\n parseEmsgBox: parseEmsgBox,\n scaleTime: scaleTime\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n\n var toUnsigned = bin.toUnsigned;\n var toHexString = bin.toHexString;\n var findBox = findBox_1;\n var parseType$1 = parseType_1;\n var emsg = emsg$1;\n var parseTfhd = parseTfhd$2;\n var parseTrun = parseTrun$2;\n var parseTfdt = parseTfdt$2;\n var getUint64 = numbers.getUint64;\n var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3;\n var window$1 = window_1;\n var parseId3Frames = parseId3.parseId3Frames;\n /**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n timescale = function (init) {\n var result = {},\n traks = findBox(init, ['moov', 'trak']); // mdhd timescale\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = findBox(trak, ['tkhd'])[0];\n if (!tkhd) {\n return null;\n }\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (!mdhd) {\n return null;\n }\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n };\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n startTime = function (timescale, fragment) {\n var trafs; // we need info from two childrend of each track fragment box\n\n trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n var lowestTime = trafs.reduce(function (acc, traf) {\n var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n var tfdt = findBox(traf, ['tfdt'])[0];\n var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n var baseTime; // version 1 is 64 bit\n\n if (tfdt[0] === 1) {\n baseTime = getUint64(tfdt.subarray(4, 12));\n } else {\n baseTime = dv.getUint32(4);\n } // convert base time to seconds if it is a valid number.\n\n let seconds;\n if (typeof baseTime === 'bigint') {\n seconds = baseTime / window$1.BigInt(scale);\n } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n seconds = baseTime / scale;\n }\n if (seconds < Number.MAX_SAFE_INTEGER) {\n seconds = Number(seconds);\n }\n if (seconds < acc) {\n acc = seconds;\n }\n return acc;\n }, Infinity);\n return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n };\n /**\n * Determine the composition start, in seconds, for an MP4\n * fragment.\n *\n * The composition start time of a fragment can be calculated using the base\n * media decode time, composition time offset, and timescale, as follows:\n *\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n *\n * All of the aforementioned information is contained within a media fragment's\n * `traf` box, except for timescale info, which comes from the initialization\n * segment, so a track id (also contained within a `traf`) is also necessary to\n * associate it with a timescale\n *\n *\n * @param timescales {object} - a hash of track ids to timescale values.\n * @param fragment {Unit8Array} - the bytes of a media segment\n * @return {number} the composition start time for the fragment, in seconds\n **/\n\n compositionStartTime = function (timescales, fragment) {\n var trafBoxes = findBox(fragment, ['moof', 'traf']);\n var baseMediaDecodeTime = 0;\n var compositionTimeOffset = 0;\n var trackId;\n if (trafBoxes && trafBoxes.length) {\n // The spec states that track run samples contained within a `traf` box are contiguous, but\n // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n // We will assume that they are, so we only need the first to calculate start time.\n var tfhd = findBox(trafBoxes[0], ['tfhd'])[0];\n var trun = findBox(trafBoxes[0], ['trun'])[0];\n var tfdt = findBox(trafBoxes[0], ['tfdt'])[0];\n if (tfhd) {\n var parsedTfhd = parseTfhd(tfhd);\n trackId = parsedTfhd.trackId;\n }\n if (tfdt) {\n var parsedTfdt = parseTfdt(tfdt);\n baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n }\n if (trun) {\n var parsedTrun = parseTrun(trun);\n if (parsedTrun.samples && parsedTrun.samples.length) {\n compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n }\n }\n } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n // specified.\n\n var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n if (typeof baseMediaDecodeTime === 'bigint') {\n compositionTimeOffset = window$1.BigInt(compositionTimeOffset);\n timescale = window$1.BigInt(timescale);\n }\n var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n result = Number(result);\n }\n return result;\n };\n /**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n getVideoTrackIds = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = findBox(trak, ['mdia', 'hdlr']);\n var tkhds = findBox(trak, ['tkhd']);\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType$1(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n };\n getTimescaleFromMediaHeader = function (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n };\n /**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n getTracks = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n var tkhd = findBox(trak, ['tkhd'])[0];\n var view, tkhdVersion; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n tkhdVersion = view.getUint8(0);\n track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n if (hdlr) {\n var type = parseType$1(hdlr.subarray(8, 12));\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n var codecBox = findBox(sampleDescriptions, [track.codec])[0];\n var codecConfig, codecConfigType;\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {\n // flac, opus, etc\n track.codec = track.codec.toLowerCase();\n }\n }\n }\n var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n track.timescale = getTimescaleFromMediaHeader(mdhd);\n }\n tracks.push(track);\n });\n return tracks;\n };\n /**\n * Returns an array of emsg ID3 data from the provided segmentData.\n * An offset can also be provided as the Latest Arrival Time to calculate \n * the Event Start Time of v0 EMSG boxes. \n * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n * \n * @param {Uint8Array} segmentData the segment byte array.\n * @param {number} offset the segment start time or Latest Arrival Time, \n * @return {Object[]} an array of ID3 parsed from EMSG boxes\n */\n\n getEmsgID3 = function (segmentData, offset = 0) {\n var emsgBoxes = findBox(segmentData, ['emsg']);\n return emsgBoxes.map(data => {\n var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n return {\n cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n frames: parsedId3Frames\n };\n });\n };\n var probe$2 = {\n // export mp4 inspector's findBox and parseType for backwards compatibility\n findBox: findBox,\n parseType: parseType$1,\n timescale: timescale,\n startTime: startTime,\n compositionStartTime: compositionStartTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks,\n getTimescaleFromMediaHeader: getTimescaleFromMediaHeader,\n getEmsgID3: getEmsgID3\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n\n var StreamTypes$1 = streamTypes;\n var parsePid = function (packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n };\n var parsePayloadUnitStartIndicator = function (packet) {\n return !!(packet[1] & 0x40);\n };\n var parseAdaptionField = function (packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n return offset;\n };\n var parseType = function (packet, pmtPid) {\n var pid = parsePid(packet);\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n return null;\n };\n var parsePat = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n if (pusi) {\n offset += packet[offset] + 1;\n }\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n };\n var parsePmt = function (packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n return programMapTable;\n };\n var parsePesType = function (packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n switch (type) {\n case StreamTypes$1.H264_STREAM_TYPE:\n return 'video';\n case StreamTypes$1.ADTS_STREAM_TYPE:\n return 'audio';\n case StreamTypes$1.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n default:\n return null;\n }\n };\n var parsePesTime = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n if (!pusi) {\n return null;\n }\n var offset = 4 + parseAdaptionField(packet);\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n\n return pes;\n };\n var parseNalUnitType = function (type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n case 0x06:\n return 'sei_rbsp';\n case 0x07:\n return 'seq_parameter_set_rbsp';\n case 0x08:\n return 'pic_parameter_set_rbsp';\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n default:\n return null;\n }\n };\n var videoPacketContainsKeyFrame = function (packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n return foundKeyFrame;\n };\n var probe$1 = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n\n var StreamTypes = streamTypes;\n var handleRollover = timestampRolloverStream.handleRollover;\n var probe = {};\n probe.ts = probe$1;\n probe.aac = utils;\n var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\n var parsePsi_ = function (bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pat':\n pmt.pid = probe.ts.parsePat(packet);\n break;\n case 'pmt':\n var table = probe.ts.parsePmt(packet);\n pmt.table = pmt.table || {};\n Object.keys(table).forEach(function (key) {\n pmt.table[key] = table[key];\n });\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n var parseAudioPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n var parseVideoPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n currentFrame.size = 0;\n }\n }\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n break;\n }\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n }\n }\n };\n /**\n * inspects the aac data stream for start and end time information\n */\n\n var inspectAac_ = function (bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n byteIndex += frameSize;\n break;\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n audioCount++;\n byteIndex += frameSize;\n break;\n default:\n byteIndex++;\n break;\n }\n if (endLoop) {\n return null;\n }\n }\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n };\n /**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n var inspectTs_ = function (bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n if (result.video.length === 0) {\n delete result.video;\n }\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n if (result.audio.length === 0) {\n delete result.audio;\n }\n break;\n }\n }\n }\n return result;\n };\n /**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n var inspect = function (bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n if (!result || !result.audio && !result.video) {\n return null;\n }\n adjustTimestamp_(result, baseTimestamp);\n return result;\n };\n var tsInspector = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n };\n /* global self */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n const wireTransmuxerEvents = function (self, transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n const initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n const typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n transmuxer.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo\n });\n });\n transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n const videoSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo\n });\n });\n transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n const audioSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'audioSegmentTimingInfo',\n audioSegmentTimingInfo\n });\n });\n transmuxer.on('id3Frame', function (id3Frame) {\n self.postMessage({\n action: 'id3Frame',\n id3Frame\n });\n });\n transmuxer.on('caption', function (caption) {\n self.postMessage({\n action: 'caption',\n caption\n });\n });\n transmuxer.on('trackinfo', function (trackInfo) {\n self.postMessage({\n action: 'trackinfo',\n trackInfo\n });\n });\n transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n // convert to video TS since we prioritize video time over audio\n self.postMessage({\n action: 'audioTimingInfo',\n audioTimingInfo: {\n start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n }\n });\n });\n transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n self.postMessage({\n action: 'videoTimingInfo',\n videoTimingInfo: {\n start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n }\n });\n });\n transmuxer.on('log', function (log) {\n self.postMessage({\n action: 'log',\n log\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\n class MessageHandlers {\n constructor(self, options) {\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n\n init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n pushMp4Captions(data) {\n if (!this.captionParser) {\n this.captionParser = new captionParser();\n this.captionParser.init();\n }\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n this.self.postMessage({\n action: 'mp4Captions',\n captions: parsed && parsed.captions || [],\n logs: parsed && parsed.logs || [],\n data: segment.buffer\n }, [segment.buffer]);\n }\n probeMp4StartTime({\n timescales,\n data\n }) {\n const startTime = probe$2.startTime(timescales, data);\n this.self.postMessage({\n action: 'probeMp4StartTime',\n startTime,\n data\n }, [data.buffer]);\n }\n probeMp4Tracks({\n data\n }) {\n const tracks = probe$2.tracks(data);\n this.self.postMessage({\n action: 'probeMp4Tracks',\n tracks,\n data\n }, [data.buffer]);\n }\n /**\n * Probes an mp4 segment for EMSG boxes containing ID3 data.\n * https://aomediacodec.github.io/id3-emsg/\n *\n * @param {Uint8Array} data segment data\n * @param {number} offset segment start time\n * @return {Object[]} an array of ID3 frames\n */\n\n probeEmsgID3({\n data,\n offset\n }) {\n const id3Frames = probe$2.getEmsgID3(data, offset);\n this.self.postMessage({\n action: 'probeEmsgID3',\n id3Frames,\n emsgData: data\n }, [data.buffer]);\n }\n /**\n * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n * internal \"media time,\" as well as whether it contains video and/or audio.\n *\n * @private\n * @param {Uint8Array} bytes - segment bytes\n * @param {number} baseStartTime\n * Relative reference timestamp used when adjusting frame timestamps for rollover.\n * This value should be in seconds, as it's converted to a 90khz clock within the\n * function body.\n * @return {Object} The start time of the current segment in \"media time\" as well as\n * whether it contains video and/or audio\n */\n\n probeTs({\n data,\n baseStartTime\n }) {\n const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n const timeInfo = tsInspector.inspect(data, tsStartTime);\n let result = null;\n if (timeInfo) {\n result = {\n // each type's time info comes back as an array of 2 times, start and end\n hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n };\n if (result.hasVideo) {\n result.videoStart = timeInfo.video[0].ptsTime;\n }\n if (result.hasAudio) {\n result.audioStart = timeInfo.audio[0].ptsTime;\n }\n }\n this.self.postMessage({\n action: 'probeTs',\n result,\n data\n }, [data.buffer]);\n }\n clearAllMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearAllCaptions();\n }\n }\n clearParsedMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearParsedCaptions();\n }\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n\n push(data) {\n // Cast array buffer to correct type for transmuxer\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n\n reset() {\n this.transmuxer.reset();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n\n setTimestampOffset(data) {\n const timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n }\n setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n }\n setRemux(data) {\n this.transmuxer.setRemux(data.remux);\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n\n flush(data) {\n this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n self.postMessage({\n action: 'done',\n type: 'transmuxed'\n });\n }\n endTimeline() {\n this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n // timelines\n\n self.postMessage({\n action: 'endedtimeline',\n type: 'transmuxed'\n });\n }\n alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }\n /**\n * Our web worker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nconst handleData_ = (event, transmuxedData, callback) => {\n const {\n type,\n initSegment,\n captions,\n captionStreams,\n metadata,\n videoFrameDtsTime,\n videoFramePtsTime\n } = event.data.segment;\n transmuxedData.buffer.push({\n captions,\n captionStreams,\n metadata\n });\n const boxes = event.data.segment.boxes || {\n data: event.data.segment.data\n };\n const result = {\n type,\n // cast ArrayBuffer to TypedArray\n data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n };\n if (typeof videoFrameDtsTime !== 'undefined') {\n result.videoFrameDtsTime = videoFrameDtsTime;\n }\n if (typeof videoFramePtsTime !== 'undefined') {\n result.videoFramePtsTime = videoFramePtsTime;\n }\n callback(result);\n};\nconst handleDone_ = ({\n transmuxedData,\n callback\n}) => {\n // Previously we only returned data on data events,\n // not on done events. Clear out the buffer to keep that consistent.\n transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n // have received\n\n callback(transmuxedData);\n};\nconst handleGopInfo_ = (event, transmuxedData) => {\n transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n const {\n transmuxer,\n bytes,\n audioAppendStart,\n gopsToAlignWith,\n remux,\n onData,\n onTrackInfo,\n onAudioTimingInfo,\n onVideoTimingInfo,\n onVideoSegmentTimingInfo,\n onAudioSegmentTimingInfo,\n onId3,\n onCaptions,\n onDone,\n onEndedTimeline,\n onTransmuxerLog,\n isEndOfTimeline\n } = options;\n const transmuxedData = {\n buffer: []\n };\n let waitForEndedTimelineEvent = isEndOfTimeline;\n const handleMessage = event => {\n if (transmuxer.currentTransmux !== options) {\n // disposed\n return;\n }\n if (event.data.action === 'data') {\n handleData_(event, transmuxedData, onData);\n }\n if (event.data.action === 'trackinfo') {\n onTrackInfo(event.data.trackInfo);\n }\n if (event.data.action === 'gopInfo') {\n handleGopInfo_(event, transmuxedData);\n }\n if (event.data.action === 'audioTimingInfo') {\n onAudioTimingInfo(event.data.audioTimingInfo);\n }\n if (event.data.action === 'videoTimingInfo') {\n onVideoTimingInfo(event.data.videoTimingInfo);\n }\n if (event.data.action === 'videoSegmentTimingInfo') {\n onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n }\n if (event.data.action === 'audioSegmentTimingInfo') {\n onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n }\n if (event.data.action === 'id3Frame') {\n onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n }\n if (event.data.action === 'caption') {\n onCaptions(event.data.caption);\n }\n if (event.data.action === 'endedtimeline') {\n waitForEndedTimelineEvent = false;\n onEndedTimeline();\n }\n if (event.data.action === 'log') {\n onTransmuxerLog(event.data.log);\n } // wait for the transmuxed event since we may have audio and video\n\n if (event.data.type !== 'transmuxed') {\n return;\n } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n // of a timeline, that means there may still be data events before the segment\n // processing can be considerred complete. In that case, the final event should be\n // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n if (waitForEndedTimelineEvent) {\n return;\n }\n transmuxer.onmessage = null;\n handleDone_({\n transmuxedData,\n callback: onDone\n });\n /* eslint-disable no-use-before-define */\n\n dequeue(transmuxer);\n /* eslint-enable */\n };\n\n transmuxer.onmessage = handleMessage;\n if (audioAppendStart) {\n transmuxer.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioAppendStart\n });\n } // allow empty arrays to be passed to clear out GOPs\n\n if (Array.isArray(gopsToAlignWith)) {\n transmuxer.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith\n });\n }\n if (typeof remux !== 'undefined') {\n transmuxer.postMessage({\n action: 'setRemux',\n remux\n });\n }\n if (bytes.byteLength) {\n const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n transmuxer.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset,\n byteLength: bytes.byteLength\n }, [buffer]);\n }\n if (isEndOfTimeline) {\n transmuxer.postMessage({\n action: 'endTimeline'\n });\n } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n // the end of the segment\n\n transmuxer.postMessage({\n action: 'flush'\n });\n};\nconst dequeue = transmuxer => {\n transmuxer.currentTransmux = null;\n if (transmuxer.transmuxQueue.length) {\n transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n if (typeof transmuxer.currentTransmux === 'function') {\n transmuxer.currentTransmux();\n } else {\n processTransmux(transmuxer.currentTransmux);\n }\n }\n};\nconst processAction = (transmuxer, action) => {\n transmuxer.postMessage({\n action\n });\n dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n if (!transmuxer.currentTransmux) {\n transmuxer.currentTransmux = action;\n processAction(transmuxer, action);\n return;\n }\n transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n if (!options.transmuxer.currentTransmux) {\n options.transmuxer.currentTransmux = options;\n processTransmux(options);\n return;\n }\n options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n const transmuxer = new TransmuxWorker();\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue = [];\n const term = transmuxer.terminate;\n transmuxer.terminate = () => {\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue.length = 0;\n return term.call(transmuxer);\n };\n transmuxer.postMessage({\n action: 'init',\n options\n });\n return transmuxer;\n};\nvar segmentTransmuxer = {\n reset,\n endTimeline,\n transmux,\n createTransmuxer\n};\nconst workerCallback = function (options) {\n const transmuxer = options.transmuxer;\n const endAction = options.endAction || options.action;\n const callback = options.callback;\n const message = _extends({}, options, {\n endAction: null,\n transmuxer: null,\n callback: null\n });\n const listenForEndEvent = event => {\n if (event.data.action !== endAction) {\n return;\n }\n transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n if (event.data.data) {\n event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n if (options.data) {\n options.data = event.data.data;\n }\n }\n callback(event.data);\n };\n transmuxer.addEventListener('message', listenForEndEvent);\n if (options.data) {\n const isArrayBuffer = options.data instanceof ArrayBuffer;\n message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n message.byteLength = options.data.byteLength;\n const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n transmuxer.postMessage(message, transfers);\n } else {\n transmuxer.postMessage(message);\n }\n};\nconst REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nconst abortAll = activeXhrs => {\n activeXhrs.forEach(xhr => {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nconst getRequestStats = request => {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nconst getProgressStats = progressEvent => {\n const request = progressEvent.target;\n const roundTripTime = Date.now() - request.requestTime;\n const stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\nconst handleErrors = (error, request) => {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n return {\n status: request.status,\n message: 'Empty HLS response at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n const response = request.response;\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n const view = new DataView(response);\n const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n for (let i = 0; i < objects.length; i++) {\n objects[i].bytes = bytes;\n }\n return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n // only know how to parse mp4 init segments at the moment\n\n if (type !== 'mp4') {\n const uri = segment.map.resolvedUri || segment.map.uri;\n return callback({\n internal: true,\n message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`,\n code: REQUEST_ERRORS.FAILURE\n });\n }\n workerCallback({\n action: 'probeMp4Tracks',\n data: segment.map.bytes,\n transmuxer: segment.transmuxer,\n callback: ({\n tracks,\n data\n }) => {\n // transfer bytes back to us\n segment.map.bytes = data;\n tracks.forEach(function (track) {\n segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n if (segment.map.tracks[track.type]) {\n return;\n }\n segment.map.tracks[track.type] = track;\n if (typeof track.id === 'number' && track.timescale) {\n segment.map.timescales = segment.map.timescales || {};\n segment.map.timescales[track.id] = track.timescale;\n }\n });\n return callback(null);\n }\n });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleInitSegmentResponse = ({\n segment,\n finishProcessingFn\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n // until the key request is done to decrypt.\n\n if (segment.map.key) {\n segment.map.encryptedBytes = bytes;\n return finishProcessingFn(null, segment);\n }\n segment.map.bytes = bytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n parseError.xhr = request;\n parseError.status = request.status;\n return finishProcessingFn(parseError, segment);\n }\n finishProcessingFn(null, segment);\n });\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleSegmentResponse = ({\n segment,\n finishProcessingFn,\n responseType\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const newBytes =\n // although responseText \"should\" exist, this guard serves to prevent an error being\n // thrown for two primary cases:\n // 1. the mime type override stops working, or is not implemented for a specific\n // browser\n // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n segment.stats = getRequestStats(request);\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(newBytes);\n } else {\n segment.bytes = new Uint8Array(newBytes);\n }\n return finishProcessingFn(null, segment);\n};\nconst transmuxAndNotify = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const fmp4Tracks = segment.map && segment.map.tracks || {};\n const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n // One reason for this is that in the case of full segments, we want to trust start\n // times from the probe, rather than the transmuxer.\n\n let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n const finish = () => transmux({\n bytes,\n transmuxer: segment.transmuxer,\n audioAppendStart: segment.audioAppendStart,\n gopsToAlignWith: segment.gopsToAlignWith,\n remux: isMuxed,\n onData: result => {\n result.type = result.type === 'combined' ? 'video' : result.type;\n dataFn(segment, result);\n },\n onTrackInfo: trackInfo => {\n if (trackInfoFn) {\n if (isMuxed) {\n trackInfo.isMuxed = true;\n }\n trackInfoFn(segment, trackInfo);\n }\n },\n onAudioTimingInfo: audioTimingInfo => {\n // we only want the first start value we encounter\n if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n audioStartFn(audioTimingInfo.start);\n audioStartFn = null;\n } // we want to continually update the end time\n\n if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n audioEndFn(audioTimingInfo.end);\n }\n },\n onVideoTimingInfo: videoTimingInfo => {\n // we only want the first start value we encounter\n if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n videoStartFn(videoTimingInfo.start);\n videoStartFn = null;\n } // we want to continually update the end time\n\n if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n videoEndFn(videoTimingInfo.end);\n }\n },\n onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n },\n onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n },\n onId3: (id3Frames, dispatchType) => {\n id3Fn(segment, id3Frames, dispatchType);\n },\n onCaptions: captions => {\n captionsFn(segment, [captions]);\n },\n isEndOfTimeline,\n onEndedTimeline: () => {\n endedTimelineFn();\n },\n onTransmuxerLog,\n onDone: result => {\n if (!doneFn) {\n return;\n }\n result.type = result.type === 'combined' ? 'video' : result.type;\n doneFn(null, segment, result);\n }\n }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n // Meaning cached frame data may corrupt our notion of where this segment\n // really starts. To get around this, probe for the info needed.\n\n workerCallback({\n action: 'probeTs',\n transmuxer: segment.transmuxer,\n data: bytes,\n baseStartTime: segment.baseStartTime,\n callback: data => {\n segment.bytes = bytes = data.data;\n const probeResult = data.result;\n if (probeResult) {\n trackInfoFn(segment, {\n hasAudio: probeResult.hasAudio,\n hasVideo: probeResult.hasVideo,\n isMuxed\n });\n trackInfoFn = null;\n }\n finish();\n }\n });\n};\nconst handleSegmentBytes = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n // We should have a handler that fetches the number of bytes required\n // to check if something is fmp4. This will allow us to save bandwidth\n // because we can only exclude a playlist and abort requests\n // by codec after trackinfo triggers.\n\n if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n segment.isFmp4 = true;\n const {\n tracks\n } = segment.map;\n const trackInfo = {\n isFmp4: true,\n hasVideo: !!tracks.video,\n hasAudio: !!tracks.audio\n }; // if we have a audio track, with a codec that is not set to\n // encrypted audio\n\n if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n trackInfo.audioCodec = tracks.audio.codec;\n } // if we have a video track, with a codec that is not set to\n // encrypted video\n\n if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n trackInfo.videoCodec = tracks.video.codec;\n }\n if (tracks.video && tracks.audio) {\n trackInfo.isMuxed = true;\n } // since we don't support appending fmp4 data on progress, we know we have the full\n // segment here\n\n trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n // time. The end time can be roughly calculated by the receiver using the duration.\n //\n // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n // that is the true start of the segment (where the playback engine should begin\n // decoding).\n\n const finishLoading = (captions, id3Frames) => {\n // if the track still has audio at this point it is only possible\n // for it to be audio only. See `tracks.video && tracks.audio` if statement\n // above.\n // we make sure to use segment.bytes here as that\n dataFn(segment, {\n data: bytesAsUint8Array,\n type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n });\n if (id3Frames && id3Frames.length) {\n id3Fn(segment, id3Frames);\n }\n if (captions && captions.length) {\n captionsFn(segment, captions);\n }\n doneFn(null, segment, {});\n };\n workerCallback({\n action: 'probeMp4StartTime',\n timescales: segment.map.timescales,\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n callback: ({\n data,\n startTime\n }) => {\n // transfer bytes back to us\n bytes = data.buffer;\n segment.bytes = bytesAsUint8Array = data;\n if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n timingInfoFn(segment, 'audio', 'start', startTime);\n }\n if (trackInfo.hasVideo) {\n timingInfoFn(segment, 'video', 'start', startTime);\n }\n workerCallback({\n action: 'probeEmsgID3',\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n offset: startTime,\n callback: ({\n emsgData,\n id3Frames\n }) => {\n // transfer bytes back to us\n bytes = emsgData.buffer;\n segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n // Initialize CaptionParser if it hasn't been yet\n\n if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n finishLoading(undefined, id3Frames);\n return;\n }\n workerCallback({\n action: 'pushMp4Captions',\n endAction: 'mp4Captions',\n transmuxer: segment.transmuxer,\n data: bytesAsUint8Array,\n timescales: segment.map.timescales,\n trackIds: [tracks.video.id],\n callback: message => {\n // transfer bytes back to us\n bytes = message.data.buffer;\n segment.bytes = bytesAsUint8Array = message.data;\n message.logs.forEach(function (log) {\n onTransmuxerLog(merge(log, {\n stream: 'mp4CaptionParser'\n }));\n });\n finishLoading(message.captions, id3Frames);\n }\n });\n }\n });\n }\n });\n return;\n } // VTT or other segments that don't need processing\n\n if (!segment.transmuxer) {\n doneFn(null, segment, {});\n return;\n }\n if (typeof segment.container === 'undefined') {\n segment.container = detectContainerForBytes(bytesAsUint8Array);\n }\n if (segment.container !== 'ts' && segment.container !== 'aac') {\n trackInfoFn(segment, {\n hasAudio: false,\n hasVideo: false\n });\n doneFn(null, segment, {});\n return;\n } // ts or aac\n\n transmuxAndNotify({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n};\nconst decrypt = function ({\n id,\n key,\n encryptedBytes,\n decryptionWorker\n}, callback) {\n const decryptionHandler = event => {\n if (event.data.source === id) {\n decryptionWorker.removeEventListener('message', decryptionHandler);\n const decrypted = event.data.decrypted;\n callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n }\n };\n decryptionWorker.addEventListener('message', decryptionHandler);\n let keyBytes;\n if (key.bytes.slice) {\n keyBytes = key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n } // incrementally decrypt the bytes\n\n decryptionWorker.postMessage(createTransferableMessage({\n source: id,\n encrypted: encryptedBytes,\n key: keyBytes,\n iv: key.iv\n }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nconst decryptSegment = ({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n decrypt({\n id: segment.requestId,\n key: segment.key,\n encryptedBytes: segment.encryptedBytes,\n decryptionWorker\n }, decryptedBytes => {\n segment.bytes = decryptedBytes;\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\nconst waitForCompletion = ({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let count = 0;\n let didError = false;\n return (error, segment) => {\n if (didError) {\n return;\n }\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n count += 1;\n if (count === activeXhrs.length) {\n const segmentFinish = function () {\n if (segment.encryptedBytes) {\n return decryptSegment({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n } // Otherwise, everything is ready just continue\n\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n }; // Keep track of when *all* of the requests have completed\n\n segment.endOfAllRequests = Date.now();\n if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n return decrypt({\n decryptionWorker,\n // add -init to the \"id\" to differentiate between segment\n // and init segment decryption, just in case they happen\n // at the same time at some point in the future.\n id: segment.requestId + '-init',\n encryptedBytes: segment.map.encryptedBytes,\n key: segment.map.key\n }, decryptedBytes => {\n segment.map.bytes = decryptedBytes;\n parseInitSegment(segment, parseError => {\n if (parseError) {\n abortAll(activeXhrs);\n return doneFn(parseError, segment);\n }\n segmentFinish();\n });\n });\n }\n segmentFinish();\n }\n };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nconst handleLoadEnd = ({\n loadendState,\n abortFn\n}) => event => {\n const request = event.target;\n if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n abortFn();\n loadendState.calledAbortFn = true;\n }\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nconst handleProgress = ({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n}) => event => {\n const request = event.target;\n if (request.aborted) {\n return;\n }\n segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n return progressFn(event, segment);\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [transmuxer]: Object,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n * aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n * request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\nconst mediaSegmentRequest = ({\n xhr,\n xhrOptions,\n decryptionWorker,\n segment,\n abortFn,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const activeXhrs = [];\n const finishProcessingFn = waitForCompletion({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n }); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n const objects = [segment.key];\n if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n objects.push(segment.map.key);\n }\n const keyRequestOptions = merge(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n if (segment.map && !segment.map.bytes) {\n const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n if (differentMapKey) {\n const mapKeyRequestOptions = merge(xhrOptions, {\n uri: segment.map.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n activeXhrs.push(mapKeyXhr);\n }\n const initSegmentOptions = merge(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map)\n });\n const initSegmentRequestCallback = handleInitSegmentResponse({\n segment,\n finishProcessingFn\n });\n const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n const segmentRequestOptions = merge(xhrOptions, {\n uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment)\n });\n const segmentRequestCallback = handleSegmentResponse({\n segment,\n finishProcessingFn,\n responseType: segmentRequestOptions.responseType\n });\n const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n }));\n activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n // multiple times, provide a shared state object\n\n const loadendState = {};\n activeXhrs.forEach(activeXhr => {\n activeXhr.addEventListener('loadend', handleLoadEnd({\n loadendState,\n abortFn\n }));\n });\n return () => abortAll(activeXhrs);\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nconst logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nconst getCodecs = function (media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n const mediaAttributes = media.attributes || {};\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n};\nconst isMaat = (main, media) => {\n const mediaAttributes = media.attributes || {};\n return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n if (!isMaat(main, media)) {\n return true;\n }\n const mediaAttributes = media.attributes || {};\n const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n for (const groupId in audioGroup) {\n // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n // or there are listed playlists (the case for DASH, as the manifest will have already\n // provided all of the details necessary to generate the audio playlist, as opposed to\n // HLS' externally requested playlists), then the content is demuxed.\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n return true;\n }\n }\n return false;\n};\nconst unwrapCodecList = function (codecList) {\n const codecs = {};\n codecList.forEach(({\n mediaType,\n type,\n details\n }) => {\n codecs[mediaType] = codecs[mediaType] || [];\n codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n });\n Object.keys(codecs).forEach(function (mediaType) {\n if (codecs[mediaType].length > 1) {\n logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n codecs[mediaType] = null;\n return;\n }\n codecs[mediaType] = codecs[mediaType][0];\n });\n return codecs;\n};\nconst codecCount = function (codecObj) {\n let count = 0;\n if (codecObj.audio) {\n count++;\n }\n if (codecObj.video) {\n count++;\n }\n return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nconst codecsForPlaylist = function (main, media) {\n const mediaAttributes = media.attributes || {};\n const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n if (isMaat(main, media) && !codecInfo.audio) {\n if (!isMuxed(main, media)) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n if (defaultCodecs.audio) {\n codecInfo.audio = defaultCodecs.audio;\n }\n }\n }\n return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n if (!representation || !representation.playlist) {\n return;\n }\n const playlist = representation.playlist;\n return JSON.stringify({\n id: playlist.id,\n bandwidth: representation.bandwidth,\n width: representation.width,\n height: representation.height,\n codecs: playlist.attributes && playlist.attributes.CODECS || ''\n });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nconst safeGetComputedStyle = function (el, property) {\n if (!el) {\n return '';\n }\n const result = window$1.getComputedStyle(el);\n if (!result) {\n return '';\n }\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nconst stableSort = function (array, sortFn) {\n const newArray = array.slice();\n array.sort(function (left, right) {\n const cmp = sortFn(left, right);\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistBandwidth = function (left, right) {\n let leftBandwidth;\n let rightBandwidth;\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistResolution = function (left, right) {\n let leftWidth;\n let rightWidth;\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} main\n * Object representation of the main manifest\n * @param {number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {number} playerWidth\n * Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n * Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @param {Object} playlistController\n * the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nlet simpleSelector = function (main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) {\n // If we end up getting called before `main` is available, exit early\n if (!main) {\n return;\n }\n const options = {\n bandwidth: playerBandwidth,\n width: playerWidth,\n height: playerHeight,\n limitRenditionByPlayerDimensions\n };\n let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n if (Playlist.isAudioOnly(main)) {\n playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n // at the buttom of this function for debugging.\n\n options.audioOnly = true;\n } // convert the playlists to an intermediary representation to make comparisons easier\n\n let sortedPlaylistReps = playlists.map(playlist => {\n let bandwidth;\n const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth,\n width,\n height,\n playlist\n };\n });\n stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n }\n if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n } // filter out playlists without resolution information\n\n const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n let resolutionPlusOneList;\n let resolutionPlusOneSmallest;\n let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n }\n let leastPixelDiffRep; // If this selector proves to be better than others,\n // resolutionPlusOneRep and resolutionBestRep and all\n // the code involving them should be removed.\n\n if (playlistController.leastPixelDiffSelector) {\n // find the variant that is closest to the player's pixel size\n const leastPixelDiffList = haveResolution.map(rep => {\n rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n return rep;\n }); // get the highest bandwidth, closest resolution playlist\n\n stableSort(leastPixelDiffList, (left, right) => {\n // sort by highest bandwidth if pixelDiff is the same\n if (left.pixelDiff === right.pixelDiff) {\n return right.bandwidth - left.bandwidth;\n }\n return left.pixelDiff - right.pixelDiff;\n });\n leastPixelDiffRep = leastPixelDiffList[0];\n } // fallback chain of variants\n\n const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (leastPixelDiffRep) {\n type = 'leastPixelDiffRep';\n } else if (resolutionPlusOneRep) {\n type = 'resolutionPlusOneRep';\n } else if (resolutionBestRep) {\n type = 'resolutionBestRep';\n } else if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n } else if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nconst lastBandwidthSelector = function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nconst movingAverageBandwidthSelector = function (decay) {\n let average = -1;\n let lastSystemBandwidth = -1;\n if (decay < 0 || decay > 1) {\n throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n }\n return function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n if (average < 0) {\n average = this.systemBandwidth;\n lastSystemBandwidth = this.systemBandwidth;\n } // stop the average value from decaying for every 250ms\n // when the systemBandwidth is constant\n // and\n // stop average from setting to a very low value when the\n // systemBandwidth becomes 0 in case of chunk cancellation\n\n if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n average = decay * this.systemBandwidth + (1 - decay) * average;\n lastSystemBandwidth = this.systemBandwidth;\n }\n return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.main\n * Object representation of the main manifest\n * @param {number} settings.currentTime\n * The current time of the player\n * @param {number} settings.bandwidth\n * Current measured bandwidth\n * @param {number} settings.duration\n * Duration of the media\n * @param {number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\nconst minRebufferMaxBandwidthSelector = function (settings) {\n const {\n main,\n currentTime,\n bandwidth,\n duration,\n segmentDuration,\n timeUntilRebuffer,\n currentTimeline,\n syncController\n } = settings; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n }\n const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n const numRequests = syncPoint ? 1 : 2;\n const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist,\n rebufferingImpact\n };\n });\n const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\nconst lowestBitrateCompatibleVariantSelector = function () {\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nconst concatSegments = segmentObj => {\n let offset = 0;\n let tempBuffer;\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(segment => {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n }\n return tempBuffer;\n};\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n if (!inbandTextTracks[captionStream]) {\n tech.trigger({\n type: 'usage',\n name: 'vhs-608'\n });\n let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n if (/^cc708_/.test(captionStream)) {\n instreamId = 'SERVICE' + captionStream.split('_')[1];\n }\n const track = tech.textTracks().getTrackById(instreamId);\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[captionStream] = track;\n } else {\n // This section gets called when we have caption services that aren't specified in the manifest.\n // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let label = captionStream;\n let language = captionStream;\n let def = false;\n const captionService = captionServices[instreamId];\n if (captionService) {\n label = captionService.label;\n language = captionService.language;\n def = captionService.default;\n } // Otherwise, create a track with the default `CC#` label and\n // without a language\n\n inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: instreamId,\n // TODO: investigate why this doesn't seem to turn the caption on by default\n default: def,\n label,\n language\n }, false).track;\n }\n }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {Array} captionArray an array of caption data\n * @private\n */\n\nconst addCaptionData = function ({\n inbandTextTracks,\n captionArray,\n timestampOffset\n}) {\n if (!captionArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n captionArray.forEach(caption => {\n const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n // with positioning data\n\n if (caption.content) {\n caption.content.forEach(value => {\n const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n cue.line = value.line;\n cue.align = 'left';\n cue.position = value.position;\n cue.positionAlign = 'line-left';\n inbandTextTracks[track].addCue(cue);\n });\n } else {\n // otherwise, a text value with combined captions is sent\n inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n }\n });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nconst deprecateOldCue = function (cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get() {\n videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get() {\n videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get() {\n videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} metadataArray an array of meta data\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {number} videoDuration the duration of the video\n * @private\n */\n\nconst addMetadata = ({\n inbandTextTracks,\n metadataArray,\n timestampOffset,\n videoDuration\n}) => {\n if (!metadataArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n metadataArray.forEach(metadata => {\n const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n } // If we have no frames, we can't create a cue.\n\n if (!metadata.frames || !metadata.frames.length) {\n return;\n }\n metadata.frames.forEach(frame => {\n const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n metadataTrack.addCue(cue);\n });\n });\n if (!metadataTrack.cues || !metadataTrack.cues.length) {\n return;\n } // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n const cues = metadataTrack.cues;\n const cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (let i = 0; i < cues.length; i++) {\n if (cues[i]) {\n cuesArray.push(cues[i]);\n }\n } // Group cues by their startTime value\n\n const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n const timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach((startTime, idx) => {\n const cueGroup = cuesGroupedByStartTime[startTime];\n const finiteDuration = isFinite(videoDuration) ? videoDuration : 0;\n const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(cue => {\n cue.endTime = nextTime;\n });\n });\n}; // object for mapping daterange attributes\n\nconst dateRangeAttr = {\n id: 'ID',\n class: 'CLASS',\n startDate: 'START-DATE',\n duration: 'DURATION',\n endDate: 'END-DATE',\n endOnNext: 'END-ON-NEXT',\n plannedDuration: 'PLANNED-DURATION',\n scte35Out: 'SCTE35-OUT',\n scte35In: 'SCTE35-IN'\n};\nconst dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nconst addDateRangeMetadata = ({\n inbandTextTracks,\n dateRanges\n}) => {\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n dateRanges.forEach(dateRange => {\n // we generate multiple cues for each date range with different attributes\n for (const key of Object.keys(dateRange)) {\n if (dateRangeKeysToOmit.has(key)) {\n continue;\n }\n const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n cue.id = dateRange.id;\n cue.type = 'com.apple.quicktime.HLS';\n cue.value = {\n key: dateRangeAttr[key],\n data: dateRange[key]\n };\n if (key === 'scte35Out' || key === 'scte35In') {\n cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n }\n metadataTrack.addCue(cue);\n }\n dateRange.processDateRange();\n });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n if (inbandTextTracks.metadataTrack_) {\n return;\n }\n inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n if (!videojs.browser.IS_ANY_SAFARI) {\n inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nconst removeCuesFromTrack = function (start, end, track) {\n let i;\n let cue;\n if (!track) {\n return;\n }\n if (!track.cues) {\n return;\n }\n i = track.cues.length;\n while (i--) {\n cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n if (cue.startTime >= start && cue.endTime <= end) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nconst removeDuplicateCuesFromTrack = function (track) {\n const cues = track.cues;\n if (!cues) {\n return;\n }\n const uniqueCues = {};\n for (let i = cues.length - 1; i >= 0; i--) {\n const cue = cues[i];\n const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n if (uniqueCues[cueKey]) {\n track.removeCue(cue);\n } else {\n uniqueCues[cueKey] = cue;\n }\n }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\nconst gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n let i;\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\nconst updateGopBuffer = (buffer, gops, replace) => {\n if (!gops.length) {\n return buffer;\n }\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n const start = gops[0].pts;\n let i = 0;\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n const updatedBuffer = buffer.slice();\n let i = buffer.length;\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n let j = i + 1;\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\nconst shallowEqual = function (a, b) {\n // if both are undefined\n // or one or the other is undefined\n // they are not equal\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // they are the same object and thus, equal\n\n if (a === b) {\n return true;\n } // sort keys so we can make sure they have\n // all the same keys later.\n\n const akeys = Object.keys(a).sort();\n const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (let i = 0; i < akeys.length; i++) {\n const key = akeys[i]; // different sorted keys, not equal\n\n if (key !== bkeys[i]) {\n return false;\n } // different values, not equal\n\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nconst QUOTA_EXCEEDED_ERR = 22;\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n segments = segments || [];\n const timelineSegments = [];\n let time = 0;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (currentTimeline === segment.timeline) {\n timelineSegments.push(i);\n time += segment.duration;\n if (time > targetTime) {\n return i;\n }\n }\n }\n if (timelineSegments.length === 0) {\n return 0;\n } // default to the last timeline segment\n\n return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n return null;\n }\n if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n return 'Neither audio nor video found in segment.';\n }\n if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {number} currentTime\n * The current time of the player\n * @param {number} targetDuration\n * The target duration of the current playlist\n * @return {number}\n * Time that is safe to remove from the back buffer without interrupting playback\n */\n\nconst safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n // 30 seconds before the playhead provides a safe default for trimming.\n //\n // Choosing a reasonable default is particularly important for high bitrate content and\n // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n // throw an APPEND_BUFFER_ERR.\n let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n if (seekable.length) {\n // Some live playlists may have a shorter window of content than the full allowed back\n // buffer. For these playlists, don't save content that's no longer within the window.\n trimTime = Math.max(trimTime, seekable.start(0));\n } // Don't remove within target duration of the current time to avoid the possibility of\n // removing the GOP currently being played, as removing it can cause playback stalls.\n\n const maxTrimTime = currentTime - targetDuration;\n return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n const {\n startOfSegment,\n duration,\n segment,\n part,\n playlist: {\n mediaSequence: seq,\n id,\n segments = []\n },\n mediaIndex: index,\n partIndex,\n timeline\n } = segmentInfo;\n const segmentLen = segments.length - 1;\n let selection = 'mediaIndex/partIndex increment';\n if (segmentInfo.getMediaInfoForTime) {\n selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n } else if (segmentInfo.isSyncRequest) {\n selection = 'getSyncSegmentCandidate (isSyncRequest)';\n }\n if (segmentInfo.independent) {\n selection += ` with independent ${segmentInfo.independent}`;\n }\n const hasPartIndex = typeof partIndex === 'number';\n const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n preloadSegment: segment\n }) - 1 : 0;\n return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\nconst getBufferedEndOrFallback = (buffered, fallback) => buffered.length ? buffered.end(buffered.length - 1) : fallback;\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n * The timeline of the segment\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} startOfSegment\n * The estimated segment start\n * @param {TimeRange[]} buffered\n * The loader's buffer\n * @param {boolean} calculateTimestampOffsetForEachSegment\n * Feature flag to always calculate timestampOffset\n * @param {boolean} overrideCheck\n * If true, no checks are made to see if the timestamp offset value should be set,\n * but sets it directly to a value.\n *\n * @return {number|null}\n * Either a number representing a new timestamp offset, or null if the segment is\n * part of the same timeline\n */\n\nconst timestampOffsetForSegment = ({\n segmentTimeline,\n currentTimeline,\n startOfSegment,\n buffered,\n calculateTimestampOffsetForEachSegment,\n overrideCheck\n}) => {\n if (calculateTimestampOffsetForEachSegment) {\n return getBufferedEndOrFallback(buffered, startOfSegment);\n } // Check to see if we are crossing a discontinuity to see if we need to set the\n // timestamp offset on the transmuxer and source buffer.\n //\n // Previously, we changed the timestampOffset if the start of this segment was less than\n // the currently set timestampOffset, but this isn't desirable as it can produce bad\n // behavior, especially around long running live streams.\n\n if (!overrideCheck && segmentTimeline === currentTimeline) {\n return null;\n } // When changing renditions, it's possible to request a segment on an older timeline. For\n // instance, given two renditions with the following:\n //\n // #EXTINF:10\n // segment1\n // #EXT-X-DISCONTINUITY\n // #EXTINF:10\n // segment2\n // #EXTINF:10\n // segment3\n //\n // And the current player state:\n //\n // current time: 8\n // buffer: 0 => 20\n //\n // The next segment on the current rendition would be segment3, filling the buffer from\n // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n // then the next segment to be requested will be segment1 from the new rendition in\n // order to fill time 8 and onwards. Using the buffered end would result in repeated\n // content (since it would position segment1 of the new rendition starting at 20s). This\n // case can be identified when the new segment's timeline is a prior value. Instead of\n // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n // more accurate to the actual start time of the segment.\n\n if (segmentTimeline < currentTimeline) {\n return startOfSegment;\n } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n // value uses the end of the last segment if it is available. While this value\n // should often be correct, it's better to rely on the buffered end, as the new\n // content post discontinuity should line up with the buffered end as if it were\n // time 0 for the new content.\n\n return getBufferedEndOrFallback(buffered, startOfSegment);\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n * The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n * The loader type\n * @param {boolean} audioDisabled\n * Whether the audio is disabled for the loader. This should only be true when the\n * loader may have muxed audio in its segment, but should not append it, e.g., for\n * the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n * Whether the loader should wait for a timeline change from the timeline change\n * controller before processing the segment\n */\n\nconst shouldWaitForTimelineChange = ({\n timelineChangeController,\n currentTimeline,\n segmentTimeline,\n loaderType,\n audioDisabled\n}) => {\n if (currentTimeline === segmentTimeline) {\n return false;\n }\n if (loaderType === 'audio') {\n const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n type: 'main'\n }); // Audio loader should wait if:\n //\n // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n // * main hasn't yet changed to the timeline audio is looking to load\n\n return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n // loader's segments (or the content is audio/video only and handled by the main\n // loader).\n\n if (loaderType === 'main' && audioDisabled) {\n const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n type: 'audio'\n }); // Main loader should wait for the audio loader if audio is not pending a timeline\n // change to the current timeline.\n //\n // Since the main loader is responsible for setting the timestamp offset for both\n // audio and video, the main loader must wait for audio to be about to change to its\n // timeline before setting the offset, otherwise, if audio is behind in loading,\n // segments from the previous timeline would be adjusted by the new timestamp offset.\n //\n // This requirement means that video will not cross a timeline until the audio is\n // about to cross to it, so that way audio and video will always cross the timeline\n // together.\n //\n // In addition to normal timeline changes, these rules also apply to the start of a\n // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n // that these rules apply to the first timeline change because if they did not, it's\n // possible that the main loader will cross two timelines before the audio loader has\n // crossed one. Logic may be implemented to handle the startup as a special case, but\n // it's easier to simply treat all timeline changes the same.\n\n if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n return false;\n }\n return true;\n }\n return false;\n};\nconst mediaDuration = timingInfos => {\n let maxDuration = 0;\n ['video', 'audio'].forEach(function (type) {\n const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n if (!typeTimingInfo) {\n return;\n }\n const {\n start,\n end\n } = typeTimingInfo;\n let duration;\n if (typeof start === 'bigint' || typeof end === 'bigint') {\n duration = window$1.BigInt(end) - window$1.BigInt(start);\n } else if (typeof start === 'number' && typeof end === 'number') {\n duration = end - start;\n }\n if (typeof duration !== 'undefined' && duration > maxDuration) {\n maxDuration = duration;\n }\n }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n // as we only need BigInt when we are above that.\n\n if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n maxDuration = Number(maxDuration);\n }\n return maxDuration;\n};\nconst segmentTooLong = ({\n segmentDuration,\n maxDuration\n}) => {\n // 0 duration segments are most likely due to metadata only segments or a lack of\n // information.\n if (!segmentDuration) {\n return false;\n } // For HLS:\n //\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n // The EXTINF duration of each Media Segment in the Playlist\n // file, when rounded to the nearest integer, MUST be less than or equal\n // to the target duration; longer segments can trigger playback stalls\n // or other errors.\n //\n // For DASH, the mpd-parser uses the largest reported segment duration as the target\n // duration. Although that reported duration is occasionally approximate (i.e., not\n // exact), a strict check may report that a segment is too long more often in DASH.\n\n return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n // Right now we aren't following DASH's timing model exactly, so only perform\n // this check for HLS content.\n if (sourceType !== 'hls') {\n return null;\n }\n const segmentDuration = mediaDuration({\n audioTimingInfo: segmentInfo.audioTimingInfo,\n videoTimingInfo: segmentInfo.videoTimingInfo\n }); // Don't report if we lack information.\n //\n // If the segment has a duration of 0 it is either a lack of information or a\n // metadata only segment and shouldn't be reported here.\n\n if (!segmentDuration) {\n return null;\n }\n const targetDuration = segmentInfo.playlist.targetDuration;\n const isSegmentWayTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration * 2\n });\n const isSegmentSlightlyTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration\n });\n const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n return {\n severity: isSegmentWayTooLong ? 'warn' : 'info',\n message: segmentTooLongMessage\n };\n }\n return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass SegmentLoader extends videojs.EventTarget {\n constructor(settings, options = {}) {\n super(); // check pre-conditions\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n this.bandwidth = settings.bandwidth;\n this.throughput = {\n rate: 0,\n count: 0\n };\n this.roundTrip = NaN;\n this.resetStats_();\n this.mediaIndex = null;\n this.partIndex = null; // private settings\n\n this.hasPlayed_ = settings.hasPlayed;\n this.currentTime_ = settings.currentTime;\n this.seekable_ = settings.seekable;\n this.seeking_ = settings.seeking;\n this.duration_ = settings.duration;\n this.mediaSource_ = settings.mediaSource;\n this.vhs_ = settings.vhs;\n this.loaderType_ = settings.loaderType;\n this.currentMediaInfo_ = void 0;\n this.startingMediaInfo_ = void 0;\n this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n this.goalBufferLength_ = settings.goalBufferLength;\n this.sourceType_ = settings.sourceType;\n this.sourceUpdater_ = settings.sourceUpdater;\n this.inbandTextTracks_ = settings.inbandTextTracks;\n this.state_ = 'INIT';\n this.timelineChangeController_ = settings.timelineChangeController;\n this.shouldSaveSegmentTimingInfo_ = true;\n this.parse708captions_ = settings.parse708captions;\n this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n this.calculateTimestampOffsetForEachSegment_ = settings.calculateTimestampOffsetForEachSegment;\n this.captionServices_ = settings.captionServices;\n this.exactManifestTimings = settings.exactManifestTimings;\n this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n this.checkBufferTimeout_ = null;\n this.error_ = void 0;\n this.currentTimeline_ = -1;\n this.pendingSegment_ = null;\n this.xhrOptions_ = null;\n this.pendingSegments_ = [];\n this.audioDisabled_ = false;\n this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n this.gopBuffer_ = [];\n this.timeMapping_ = 0;\n this.safeAppend_ = false;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.playlistOfLastInitSegment_ = {\n audio: null,\n video: null\n };\n this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n // information yet to start the loading process (e.g., if the audio loader wants to\n // load a segment from the next timeline but the main loader hasn't yet crossed that\n // timeline), then the load call will be added to the queue until it is ready to be\n // processed.\n\n this.loadQueue_ = [];\n this.metadataQueue_ = {\n id3: [],\n caption: []\n };\n this.waitingOnRemove_ = false;\n this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n this.activeInitSegmentId_ = null;\n this.initSegments_ = {}; // HLSe playback\n\n this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n this.keyCache_ = {};\n this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n this.syncController_ = settings.syncController;\n this.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n this.transmuxer_ = this.createTransmuxer_();\n this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n this.mediaSource_.addEventListener('sourceopen', () => {\n if (!this.isEndOfStream_()) {\n this.ended_ = false;\n }\n }); // ...for determining the fetch location\n\n this.fetchAtBuffer_ = false; // For comparing with currentTime when overwriting segments on fastQualityChange_ changes. Use -1 as the inactive flag.\n\n this.replaceSegmentsUntil_ = -1;\n this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n Object.defineProperty(this, 'state', {\n get() {\n return this.state_;\n },\n set(newState) {\n if (newState !== this.state_) {\n this.logger_(`${this.state_} -> ${newState}`);\n this.state_ = newState;\n this.trigger('statechange');\n }\n }\n });\n this.sourceUpdater_.on('ready', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }); // Only the main loader needs to listen for pending timeline changes, as the main\n // loader should wait for audio to be ready to change its timeline so that both main\n // and audio timelines change together. For more details, see the\n // shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'main') {\n this.timelineChangeController_.on('pendingtimelinechange', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n } // The main loader only listens on pending timeline changes, but the audio loader,\n // since its loads follow main, needs to listen on timeline changes. For more details,\n // see the shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'audio') {\n this.timelineChangeController_.on('timelinechange', () => {\n if (this.hasEnoughInfoToLoad_()) {\n this.processLoadQueue_();\n }\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n }\n }\n createTransmuxer_() {\n return segmentTransmuxer.createTransmuxer({\n remux: false,\n alignGopsAtEnd: this.safeAppend_,\n keepOriginalTimestamps: true,\n parse708captions: this.parse708captions_,\n captionServices: this.captionServices_\n });\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n\n resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n this.mediaAppends = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n\n dispose() {\n this.trigger('dispose');\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n if (this.transmuxer_) {\n this.transmuxer_.terminate();\n }\n this.resetStats_();\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n }\n this.off();\n }\n setAudio(enable) {\n this.audioDisabled_ = !enable;\n if (enable) {\n this.appendInitSegment_.audio = true;\n } else {\n // remove current track audio if it gets disabled\n this.sourceUpdater_.removeAudio(0, this.duration_());\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n\n abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n return;\n }\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n\n abort_() {\n if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n this.pendingSegment_ = null;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n this.waitingOnRemove_ = false;\n window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n this.quotaExceededErrorRetryTimeout_ = null;\n }\n checkForAbort_(requestId) {\n // If the state is APPENDING, then aborts will not modify the state, meaning the first\n // callback that happens should reset the state to READY so that loading can continue.\n if (this.state === 'APPENDING' && !this.pendingSegment_) {\n this.state = 'READY';\n return true;\n }\n if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n return true;\n }\n return false;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n\n error(error) {\n if (typeof error !== 'undefined') {\n this.logger_('error occurred:', error);\n this.error_ = error;\n }\n this.pendingSegment_ = null;\n return this.error_;\n }\n endOfStream() {\n this.ended_ = true;\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.gopBuffer_.length = 0;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n const trackInfo = this.getMediaInfo_();\n if (!this.sourceUpdater_ || !trackInfo) {\n return createTimeRanges();\n }\n if (this.loaderType_ === 'main') {\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n return this.sourceUpdater_.buffered();\n }\n if (hasVideo) {\n return this.sourceUpdater_.videoBuffered();\n }\n } // One case that can be ignored for now is audio only with alt audio,\n // as we don't yet have proper support for that.\n\n return this.sourceUpdater_.audioBuffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n tracks: map.tracks,\n timescales: map.timescales\n };\n }\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n\n segmentKey(key, set = false) {\n if (!key) {\n return null;\n }\n const id = segmentKeyId(key);\n let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n const result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n\n load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n // audio data from the muxed content should be removed\n\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n\n playlist(newPlaylist, options = {}) {\n if (!newPlaylist) {\n return;\n }\n const oldPlaylist = this.playlist_;\n const segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n //\n // Use the INIT state to determine if playback has started, as the playlist sync info\n // should be fixed once requests begin (as sync points are generated based on sync\n // info), but not before then.\n\n if (this.state === 'INIT') {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n }; // Setting the date time mapping means mapping the program date time (if available)\n // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n // be updated as the playlist is refreshed before the loader starts loading, the\n // program date time mapping needs to be updated as well.\n //\n // This mapping is only done for the main loader because a program date time should\n // map equivalently between playlists.\n\n if (this.loaderType_ === 'main') {\n this.syncController_.setDateTimeMappingForStart(newPlaylist);\n }\n }\n let oldId = null;\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must reset/resync the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n // to false, resulting in fetching segments at currentTime and causing repeated\n // same-segment requests on playlist change. This erroneously drives up the playback watcher\n // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n // will not change the buffer.\n // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n if (isLLHLS) {\n this.resetLoader();\n } else {\n this.resyncLoader();\n }\n }\n this.currentMediaInfo_ = void 0;\n this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n // new playlist was incremented by 1.\n\n if (this.mediaIndex < 0) {\n this.mediaIndex = null;\n this.partIndex = null;\n } else {\n const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n // unless parts fell off of the playlist for this segment.\n // In that case we need to reset partIndex and resync\n\n if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n const mediaIndex = this.mediaIndex;\n this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n // as the part was dropped from our current playlists segment.\n // The mediaIndex will still be valid so keep that around.\n\n this.mediaIndex = mediaIndex;\n }\n }\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleAppendsDone_` after the segment has been successfully appended\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff;\n if (segmentInfo.mediaIndex < 0) {\n segmentInfo.mediaIndex = null;\n segmentInfo.partIndex = null;\n } else {\n // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n }\n }\n }\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n\n pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n\n paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * Resets the segment loader ended and init properties.\n */\n\n resetLoaderProperties() {\n this.ended_ = false;\n this.activeInitSegmentId_ = null;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n *\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n\n resetEverything(done) {\n this.resetLoaderProperties();\n this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n // we then clamp the value to duration if necessary.\n\n this.remove(0, Infinity, done); // clears fmp4 captions\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n }); // reset the cache in the transmuxer\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n\n resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n\n resyncLoader() {\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.mediaIndex = null;\n this.partIndex = null;\n this.syncPoint_ = null;\n this.isPendingTimestampOffset_ = false;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.abort();\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * @param {boolean} force - force all remove operations to happen\n * operation is complete\n */\n\n remove(start, end, done = () => {}, force = false) {\n // clamp end to duration if we need to remove everything.\n // This is due to a browser bug that causes issues if we remove to Infinity.\n // videojs/videojs-contrib-hls#1225\n if (end === Infinity) {\n end = this.duration_();\n } // skip removes that would throw an error\n // commonly happens during a rendition switch at the start of a video\n // from start 0 to end 0\n\n if (end <= start) {\n this.logger_('skipping remove because end ${end} is <= start ${start}');\n return;\n }\n if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n return;\n } // set it to one to complete this function's removes\n\n let removesRemaining = 1;\n const removeFinished = () => {\n removesRemaining--;\n if (removesRemaining === 0) {\n done();\n }\n };\n if (force || !this.audioDisabled_) {\n removesRemaining++;\n this.sourceUpdater_.removeAudio(start, end, removeFinished);\n } // While it would be better to only remove video if the main loader has video, this\n // should be safe with audio only as removeVideo will call back even if there's no\n // video buffer.\n //\n // In theory we can check to see if there's video before calling the remove, but in\n // the event that we're switching between renditions and from video to audio only\n // (when we add support for that), we may need to clear the video contents despite\n // what the new media will contain.\n\n if (force || this.loaderType_ === 'main') {\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n removesRemaining++;\n this.sourceUpdater_.removeVideo(start, end, removeFinished);\n } // remove any captions and ID3 tags\n\n for (const track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n removeFinished();\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n\n monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n\n monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // TODO since the source buffer maintains a queue, and we shouldn't call this function\n // except when we're ready for the next segment, this check can most likely be removed\n if (this.sourceUpdater_.updating()) {\n return;\n } // see if we need to begin loading immediately\n\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (typeof segmentInfo.timestampOffset === 'number') {\n this.isPendingTimestampOffset_ = false;\n this.timelineChangeController_.pendingTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {number} [mediaIndex] the media index of segment we last appended\n * @param {Object} [playlist] a media playlist object\n * @return {boolean} do we need to call endOfStream on the MediaSource\n */\n\n isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n if (!playlist || !this.mediaSource_) {\n return false;\n }\n const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n }\n /**\n * Determines what request should be made given current segment loader state.\n *\n * @return {Object} a request object that describes the segment/part to load\n */\n\n chooseNextRequest_() {\n const buffered = this.buffered_();\n const bufferedEnd = lastBufferedEnd(buffered) || 0;\n const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n const segments = this.playlist_.segments; // return no segment if:\n // 1. we don't have segments\n // 2. The video has not yet played and we already downloaded a segment\n // 3. we already have enough buffered time\n\n if (!segments.length || preloaded || haveEnoughBuffer) {\n return null;\n }\n this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n const next = {\n partIndex: null,\n mediaIndex: null,\n startOfSegment: null,\n playlist: this.playlist_,\n isSyncRequest: Boolean(!this.syncPoint_)\n };\n if (next.isSyncRequest) {\n next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n } else if (this.mediaIndex !== null) {\n const segment = segments[this.mediaIndex];\n const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n if (segment.parts && segment.parts[partIndex + 1]) {\n next.mediaIndex = this.mediaIndex;\n next.partIndex = partIndex + 1;\n } else {\n next.mediaIndex = this.mediaIndex + 1;\n }\n } else {\n // Find the segment containing the end of the buffer or current time.\n const {\n segmentIndex,\n startTime,\n partIndex\n } = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n });\n next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n next.mediaIndex = segmentIndex;\n next.startOfSegment = startTime;\n next.partIndex = partIndex;\n }\n const nextSegment = segments[next.mediaIndex];\n let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n // the next partIndex is invalid do not choose a next segment.\n\n if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n return null;\n } // if the next segment has parts, and we don't have a partIndex.\n // Set partIndex to 0\n\n if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n next.partIndex = 0;\n nextPart = nextSegment.parts[0];\n } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n // it applies to each segment in each media playlist.\n // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n // that the next part we append is \"independent\" if possible.\n // So we check if the previous part is independent, and request\n // it if it is.\n\n if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n if (next.partIndex === 0) {\n const lastSegment = segments[next.mediaIndex - 1];\n const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n next.mediaIndex -= 1;\n next.partIndex = lastSegment.parts.length - 1;\n next.independent = 'previous segment';\n }\n } else if (nextSegment.parts[next.partIndex - 1].independent) {\n next.partIndex -= 1;\n next.independent = 'previous part';\n }\n }\n const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n // 1. this is the last segment in the playlist\n // 2. end of stream has been called on the media source already\n // 3. the player is not seeking\n\n if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n return null;\n }\n return this.generateSegmentInfo_(next);\n }\n generateSegmentInfo_(options) {\n const {\n independent,\n playlist,\n mediaIndex,\n startOfSegment,\n isSyncRequest,\n partIndex,\n forceTimestampOffset,\n getMediaInfoForTime\n } = options;\n const segment = playlist.segments[mediaIndex];\n const part = typeof partIndex === 'number' && segment.parts[partIndex];\n const segmentInfo = {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: part && part.resolvedUri || segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex,\n partIndex: part ? partIndex : null,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest,\n startOfSegment,\n // the segment's playlist\n playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: part && part.duration || segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment,\n part,\n byteLength: 0,\n transmuxer: this.transmuxer_,\n // type of getMediaInfoForTime that was used to get this segment\n getMediaInfoForTime,\n independent\n };\n const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n segmentTimeline: segment.timeline,\n currentTimeline: this.currentTimeline_,\n startOfSegment,\n buffered: this.buffered_(),\n calculateTimestampOffsetForEachSegment: this.calculateTimestampOffsetForEachSegment_,\n overrideCheck\n });\n const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n if (typeof audioBufferedEnd === 'number') {\n // since the transmuxer is using the actual timing values, but the buffer is\n // adjusted by the timestamp offset, we must adjust the value here\n segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n }\n if (this.sourceUpdater_.videoBuffered().length) {\n segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n // since the transmuxer is using the actual timing values, but the time is\n // adjusted by the timestmap offset, we must adjust the value here\n this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n }\n return segmentInfo;\n } // get the timestampoffset for a segment,\n // added so that vtt segment loader can override and prevent\n // adding timestamp offsets.\n\n timestampOffsetForSegment_(options) {\n return timestampOffsetForSegment(options);\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @private\n */\n\n earlyAbortWhenNeeded_(stats) {\n if (this.vhs_.tech_.paused() ||\n // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout ||\n // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return;\n }\n const currentTime = this.currentTime_();\n const measuredBandwidth = stats.bandwidth;\n const segmentDuration = this.pendingSegment_.duration;\n const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$1) {\n return;\n }\n const switchCandidate = minRebufferMaxBandwidthSelector({\n main: this.vhs_.playlists.main,\n currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n if (!switchCandidate) {\n return;\n }\n const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.trigger('earlyabort');\n }\n handleAbort_(segmentInfo) {\n this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n this.mediaRequestsAborted += 1;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n\n handleProgress_(event, simpleSegment) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n this.trigger('progress');\n }\n handleTrackInfo_(simpleSegment, trackInfo) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n if (this.checkForIllegalMediaSwitch(trackInfo)) {\n return;\n }\n trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n // Guard against cases where we're not getting track info at all until we are\n // certain that all streams will provide it.\n\n if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.startingMediaInfo_ = trackInfo;\n this.currentMediaInfo_ = trackInfo;\n this.logger_('trackinfo update', trackInfo);\n this.trigger('trackinfo');\n } // trackinfo may cause an abort if the trackinfo\n // causes a codec change to an unsupported codec.\n\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // set trackinfo on the pending segment so that\n // it can append.\n\n this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_;\n const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n segmentInfo[timingInfoProperty][timeType] = time;\n this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleCaptions_(simpleSegment, captionData) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // This could only happen with fmp4 segments, but\n // should still not happen in general\n\n if (captionData.length === 0) {\n this.logger_('SegmentLoader received no captions from a caption event');\n return;\n }\n const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n // can be adjusted by the timestamp offset\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n return;\n }\n const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n const captionTracks = {}; // get total start/end and captions for each track/stream\n\n captionData.forEach(caption => {\n // caption.stream is actually a track name...\n // set to the existing values in tracks or default values\n captionTracks[caption.stream] = captionTracks[caption.stream] || {\n // Infinity, as any other value will be less than this\n startTime: Infinity,\n captions: [],\n // 0 as an other value will be more than this\n endTime: 0\n };\n const captionTrack = captionTracks[caption.stream];\n captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n captionTrack.captions.push(caption);\n });\n Object.keys(captionTracks).forEach(trackName => {\n const {\n startTime,\n endTime,\n captions\n } = captionTracks[trackName];\n const inbandTextTracks = this.inbandTextTracks_;\n this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n // We do this because a rendition change that also changes the timescale for captions\n // will result in captions being re-parsed for certain segments. If we add them again\n // without clearing we will have two of the same captions visible.\n\n removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n addCaptionData({\n captionArray: captions,\n inbandTextTracks,\n timestampOffset\n });\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n handleId3_(simpleSegment, id3Frames, dispatchType) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n return;\n }\n this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n }\n processMetadataQueue_() {\n this.metadataQueue_.id3.forEach(fn => fn());\n this.metadataQueue_.caption.forEach(fn => fn());\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n }\n processCallQueue_() {\n const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.callQueue_ = [];\n callQueue.forEach(fun => fun());\n }\n processLoadQueue_() {\n const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.loadQueue_ = [];\n loadQueue.forEach(fun => fun());\n }\n /**\n * Determines whether the loader has enough info to load the next segment.\n *\n * @return {boolean}\n * Whether or not the loader has enough info to load the next segment\n */\n\n hasEnoughInfoToLoad_() {\n // Since primary timing goes by video, only the audio loader potentially needs to wait\n // to load.\n if (this.loaderType_ !== 'audio') {\n return true;\n }\n const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n // enough info to load.\n\n if (!segmentInfo) {\n return false;\n } // The first segment can and should be loaded immediately so that source buffers are\n // created together (before appending). Source buffer creation uses the presence of\n // audio and video data to determine whether to create audio/video source buffers, and\n // uses processed (transmuxed or parsed) media to determine the types required.\n\n if (!this.getCurrentMediaInfo_()) {\n return true;\n }\n if (\n // Technically, instead of waiting to load a segment on timeline changes, a segment\n // can be requested and downloaded and only wait before it is transmuxed or parsed.\n // But in practice, there are a few reasons why it is better to wait until a loader\n // is ready to append that segment before requesting and downloading:\n //\n // 1. Because audio and main loaders cross discontinuities together, if this loader\n // is waiting for the other to catch up, then instead of requesting another\n // segment and using up more bandwidth, by not yet loading, more bandwidth is\n // allotted to the loader currently behind.\n // 2. media-segment-request doesn't have to have logic to consider whether a segment\n // is ready to be processed or not, isolating the queueing behavior to the loader.\n // 3. The audio loader bases some of its segment properties on timing information\n // provided by the main loader, meaning that, if the logic for waiting on\n // processing was in media-segment-request, then it would also need to know how\n // to re-generate the segment information after the main loader caught up.\n shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n }\n getMediaInfo_(segmentInfo = this.pendingSegment_) {\n return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n }\n getPendingSegmentPlaylist() {\n return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n }\n hasEnoughInfoToAppend_() {\n if (!this.sourceUpdater_.ready()) {\n return false;\n } // If content needs to be removed or the loader is waiting on an append reattempt,\n // then no additional content should be appended until the prior append is resolved.\n\n if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n return false;\n }\n const segmentInfo = this.pendingSegment_;\n const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n // we do not have information on this specific\n // segment yet\n\n if (!segmentInfo || !trackInfo) {\n return false;\n }\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && !segmentInfo.videoTimingInfo) {\n return false;\n } // muxed content only relies on video timing information for now.\n\n if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n return false;\n }\n if (shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n handleData_(simpleSegment, result) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // If there's anything in the call queue, then this data came later and should be\n // executed after the calls currently queued.\n\n if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n return;\n }\n const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n // logic may change behavior depending on the state, and changing state too early may\n // inflate our estimates of bandwidth. In the future this should be re-examined to\n // note more granular states.\n // don't process and append data if the mediaSource is closed\n\n if (this.mediaSource_.readyState === 'closed') {\n return;\n } // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n segmentInfo.segment.map = simpleSegment.map;\n } // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n segmentInfo.isFmp4 = simpleSegment.isFmp4;\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n if (segmentInfo.isFmp4) {\n this.trigger('fmp4');\n segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n } else {\n const trackInfo = this.getCurrentMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n let firstVideoFrameTimeForData;\n if (useVideoTimingInfo) {\n firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n } // Segment loader knows more about segment timing than the transmuxer (in certain\n // aspects), so make any changes required for a more accurate start time.\n // Don't set the end time yet, as the segment may not be finished processing.\n\n segmentInfo.timingInfo.start = this.trueSegmentStart_({\n currentStart: segmentInfo.timingInfo.start,\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex,\n currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n useVideoTimingInfo,\n firstVideoFrameTimeForData,\n videoTimingInfo: segmentInfo.videoTimingInfo,\n audioTimingInfo: segmentInfo.audioTimingInfo\n });\n } // Init segments for audio and video only need to be appended in certain cases. Now\n // that data is about to be appended, we can check the final cases to determine\n // whether we should append an init segment.\n\n this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n // as we use the start of the segment to offset the best guess (playlist provided)\n // timestamp offset.\n\n this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n // be appended or not.\n\n if (segmentInfo.isSyncRequest) {\n // first save/update our timing info for this segment.\n // this is what allows us to choose an accurate segment\n // and the main reason we make a sync request.\n this.updateTimingInfoEnd_(segmentInfo);\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n // after taking into account its timing info, do not append it.\n\n if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n this.logger_('sync segment was incorrect, not appending');\n return;\n } // otherwise append it like any other segment as our guess was correct.\n\n this.logger_('sync segment was correct, appending');\n } // Save some state so that in the future anything waiting on first append (and/or\n // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n // we need some notion of whether the timestamp offset or other relevant information\n // has had a chance to be set.\n\n segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n this.processMetadataQueue_();\n this.appendData_(segmentInfo, result);\n }\n updateAppendInitSegmentStatus(segmentInfo, type) {\n // alt audio doesn't manage timestamp offset\n if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n // in the case that we're handling partial data, we don't want to append an init\n // segment for each chunk\n !segmentInfo.changedTimestampOffset) {\n // if the timestamp offset changed, the timeline may have changed, so we have to re-\n // append init segments\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n // make sure we append init segment on playlist changes, in case the media config\n // changed\n this.appendInitSegment_[type] = true;\n }\n }\n getInitSegmentAndUpdateState_({\n type,\n initSegment,\n map,\n playlist\n }) {\n // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n // (Section 3) required to parse the applicable Media Segments. It applies to every\n // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n // or until the end of the playlist.\"\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n if (map) {\n const id = initSegmentId(map);\n if (this.activeInitSegmentId_ === id) {\n // don't need to re-append the init segment if the ID matches\n return null;\n } // a map-specified init segment takes priority over any transmuxed (or otherwise\n // obtained) init segment\n //\n // this also caches the init segment for later use\n\n initSegment = this.initSegmentForMap(map, true).bytes;\n this.activeInitSegmentId_ = id;\n } // We used to always prepend init segments for video, however, that shouldn't be\n // necessary. Instead, we should only append on changes, similar to what we've always\n // done for audio. This is more important (though may not be that important) for\n // frame-by-frame appending for LHLS, simply because of the increased quantity of\n // appends.\n\n if (initSegment && this.appendInitSegment_[type]) {\n // Make sure we track the playlist that we last used for the init segment, so that\n // we can re-append the init segment in the event that we get data from a new\n // playlist. Discontinuities and track changes are handled in other sections.\n this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n // we are appending the muxer init segment\n\n this.activeInitSegmentId_ = null;\n return initSegment;\n }\n return null;\n }\n handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n const audioBuffered = this.sourceUpdater_.audioBuffered();\n const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n // should be cleared out during the buffer removals. However, log in case it helps\n // debug.\n\n if (audioBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n }\n if (videoBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n }\n const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n // Can't remove enough buffer to make room for new segment (or the browser doesn't\n // allow for appends of segments this size). In the future, it may be possible to\n // split up the segment and append in pieces, but for now, error out this playlist\n // in an attempt to switch to a more manageable rendition.\n this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n this.error({\n message: 'Quota exceeded error with append of a single segment of content',\n excludeUntil: Infinity\n });\n this.trigger('error');\n return;\n } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n // that the segment-loader should block on future events until this one is handled, so\n // that it doesn't keep moving onto further segments. Adding the call to the call\n // queue will prevent further appends until waitingOnRemove_ and\n // quotaExceededErrorRetryTimeout_ are cleared.\n //\n // Note that this will only block the current loader. In the case of demuxed content,\n // the other load may keep filling as fast as possible. In practice, this should be\n // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n // source buffer, or video fills without enough room for audio to append (and without\n // the availability of clearing out seconds of back buffer to make room for audio).\n // But it might still be good to handle this case in the future as a TODO.\n\n this.waitingOnRemove_ = true;\n this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n // before retrying.\n\n const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n this.remove(0, timeToRemoveUntil, () => {\n this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n // attempts (since we can't clear less than the minimum)\n\n this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n this.quotaExceededErrorRetryTimeout_ = null;\n this.processCallQueue_();\n }, MIN_BACK_BUFFER * 1000);\n }, true);\n }\n handleAppendError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n // if there's no error, nothing to do\n if (!error) {\n return;\n }\n if (error.code === QUOTA_EXCEEDED_ERR) {\n this.handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }); // A quota exceeded error should be recoverable with a future re-append, so no need\n // to trigger an append error.\n\n return;\n }\n this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n this.error(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`); // If an append errors, we often can't recover.\n // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n //\n // Trigger a special error so that it can be handled separately from normal,\n // recoverable errors.\n\n this.trigger('appenderror');\n }\n appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data,\n bytes\n }) {\n // If this is a re-append, bytes were already created and don't need to be recreated\n if (!bytes) {\n const segments = [data];\n let byteLength = data.byteLength;\n if (initSegment) {\n // if the media initialization segment is changing, append it before the content\n // segment\n segments.unshift(initSegment);\n byteLength += initSegment.byteLength;\n } // Technically we should be OK appending the init segment separately, however, we\n // haven't yet tested that, and prepending is how we have always done things.\n\n bytes = concatSegments({\n bytes: byteLength,\n segments\n });\n }\n this.sourceUpdater_.appendBuffer({\n segmentInfo,\n type,\n bytes\n }, this.handleAppendError_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n }\n handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n const segment = this.pendingSegment_.segment;\n const timingInfoProperty = `${type}TimingInfo`;\n if (!segment[timingInfoProperty]) {\n segment[timingInfoProperty] = {};\n }\n segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n }\n appendData_(segmentInfo, result) {\n const {\n type,\n data\n } = result;\n if (!data || !data.byteLength) {\n return;\n }\n if (type === 'audio' && this.audioDisabled_) {\n return;\n }\n const initSegment = this.getInitSegmentAndUpdateState_({\n type,\n initSegment: result.initSegment,\n playlist: segmentInfo.playlist,\n map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n });\n this.appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data\n });\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n\n loadSegment_(segmentInfo) {\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n if (typeof segmentInfo.timestampOffset === 'number') {\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n });\n }\n }\n if (!this.hasEnoughInfoToLoad_()) {\n this.loadQueue_.push(() => {\n // regenerate the audioAppendStart, timestampOffset, etc as they\n // may have changed since this function was added to the queue.\n const options = _extends({}, segmentInfo, {\n forceTimestampOffset: true\n });\n _extends(segmentInfo, this.generateSegmentInfo_(options));\n this.isPendingTimestampOffset_ = false;\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n });\n return;\n }\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n }\n updateTransmuxerAndRequestSegment_(segmentInfo) {\n // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n // the transmuxer still needs to be updated before then.\n //\n // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n // offset must be passed to the transmuxer for stream correcting adjustments.\n if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n segmentInfo.gopsToAlignWith = [];\n this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: segmentInfo.timestampOffset\n });\n }\n const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n const isWalkingForward = this.mediaIndex !== null;\n const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n // the first timeline\n segmentInfo.timeline > 0;\n const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n this.logger_(`Requesting ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n // then this init segment has never been seen before and should be appended.\n //\n // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n // both to true and leave the decision of whether to append the init segment to append time.\n\n if (simpleSegment.map && !simpleSegment.map.bytes) {\n this.logger_('going to request init segment.');\n this.appendInitSegment_ = {\n video: true,\n audio: true\n };\n }\n segmentInfo.abortRequests = mediaSegmentRequest({\n xhr: this.vhs_.xhr,\n xhrOptions: this.xhrOptions_,\n decryptionWorker: this.decrypter_,\n segment: simpleSegment,\n abortFn: this.handleAbort_.bind(this, segmentInfo),\n progressFn: this.handleProgress_.bind(this),\n trackInfoFn: this.handleTrackInfo_.bind(this),\n timingInfoFn: this.handleTimingInfo_.bind(this),\n videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n captionsFn: this.handleCaptions_.bind(this),\n isEndOfTimeline,\n endedTimelineFn: () => {\n this.logger_('received endedtimeline callback');\n },\n id3Fn: this.handleId3_.bind(this),\n dataFn: this.handleData_.bind(this),\n doneFn: this.segmentRequestFinished_.bind(this),\n onTransmuxerLog: ({\n message,\n level,\n stream\n }) => {\n this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n }\n });\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n\n trimBackBuffer_(segmentInfo) {\n const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @return {Object} a simplified segment object copy\n */\n\n createSimplifiedSegmentObj_(segmentInfo) {\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const simpleSegment = {\n resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n byterange: part ? part.byterange : segment.byterange,\n requestId: segmentInfo.requestId,\n transmuxer: segmentInfo.transmuxer,\n audioAppendStart: segmentInfo.audioAppendStart,\n gopsToAlignWith: segmentInfo.gopsToAlignWith,\n part: segmentInfo.part\n };\n const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n if (previousSegment && previousSegment.timeline === segment.timeline) {\n // The baseStartTime of a segment is used to handle rollover when probing the TS\n // segment to retrieve timing information. Since the probe only looks at the media's\n // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n // seconds of media time, so should be used here. The previous segment is used since\n // the end of the previous segment should represent the beginning of the current\n // segment, so long as they are on the same timeline.\n if (previousSegment.videoTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n } else if (previousSegment.audioTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n }\n }\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n if (segment.map) {\n simpleSegment.map = this.initSegmentForMap(segment.map);\n }\n return simpleSegment;\n }\n saveTransferStats_(stats) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n if (stats) {\n this.mediaBytesTransferred += stats.bytesReceived;\n this.mediaTransferDuration += stats.roundTripTime;\n }\n }\n saveBandwidthRelatedStats_(duration, stats) {\n // byteLength will be used for throughput, and should be based on bytes receieved,\n // which we only know at the end of the request and should reflect total bytes\n // downloaded rather than just bytes processed from components of the segment\n this.pendingSegment_.byteLength = stats.bytesReceived;\n if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n this.bandwidth = stats.bandwidth;\n this.roundTrip = stats.roundTripTime;\n }\n handleTimeout_() {\n // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functinality between segment loaders\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n this.trigger('timeout');\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n // check the call queue directly since this function doesn't need to deal with any\n // data, and can continue even if the source buffers are not set up and we didn't get\n // any data from the segment\n if (this.callQueue_.length) {\n this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n if (!this.pendingSegment_) {\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n return;\n }\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to exclude the current playlist\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n }\n const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n if (result.gopInfo) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n } // Although we may have already started appending on progress, we shouldn't switch the\n // state away from loading until we are officially done loading the segment data.\n\n this.state = 'APPENDING'; // used for testing\n\n this.trigger('appending');\n this.waitForAppendsToComplete_(segmentInfo);\n }\n setTimeMapping_(timeline) {\n const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n if (timelineMapping !== null) {\n this.timeMapping_ = timelineMapping;\n }\n }\n updateMediaSecondsLoaded_(segment) {\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n }\n shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n if (timestampOffset === null) {\n return false;\n } // note that we're potentially using the same timestamp offset for both video and\n // audio\n\n if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n return true;\n }\n if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n return true;\n }\n return false;\n }\n trueSegmentStart_({\n currentStart,\n playlist,\n mediaIndex,\n firstVideoFrameTimeForData,\n currentVideoTimestampOffset,\n useVideoTimingInfo,\n videoTimingInfo,\n audioTimingInfo\n }) {\n if (typeof currentStart !== 'undefined') {\n // if start was set once, keep using it\n return currentStart;\n }\n if (!useVideoTimingInfo) {\n return audioTimingInfo.start;\n }\n const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n // within that segment. Since the transmuxer maintains a cache of incomplete data\n // from and/or the last frame seen, the start time may reflect a frame that starts\n // in the previous segment. Check for that case and ensure the start time is\n // accurate for the segment.\n\n if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n return firstVideoFrameTimeForData;\n }\n return videoTimingInfo.start;\n }\n waitForAppendsToComplete_(segmentInfo) {\n const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n if (!trackInfo) {\n this.error({\n message: 'No starting media returned, likely due to an unsupported media format.',\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return;\n } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n // on each queue this loader is responsible for to ensure that the appends are\n // complete.\n\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n segmentInfo.waitingOnAppends = 0; // segments with no data\n\n if (!segmentInfo.hasAppendedData_) {\n if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n // When there's no audio or video data in the segment, there's no audio or video\n // timing information.\n //\n // If there's no audio or video timing information, then the timestamp offset\n // can't be adjusted to the appropriate value for the transmuxer and source\n // buffers.\n //\n // Therefore, the next segment should be used to set the timestamp offset.\n this.isPendingTimestampOffset_ = true;\n } // override settings for metadata only segments\n\n segmentInfo.timingInfo = {\n start: 0\n };\n segmentInfo.waitingOnAppends++;\n if (!this.isPendingTimestampOffset_) {\n // update the timestampoffset\n this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n // no video/audio data.\n\n this.processMetadataQueue_();\n } // append is \"done\" instantly with no data.\n\n this.checkAppendsDone_(segmentInfo);\n return;\n } // Since source updater could call back synchronously, do the increments first.\n\n if (waitForVideo) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForAudio) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForVideo) {\n this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n if (waitForAudio) {\n this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n }\n checkAppendsDone_(segmentInfo) {\n if (this.checkForAbort_(segmentInfo.requestId)) {\n return;\n }\n segmentInfo.waitingOnAppends--;\n if (segmentInfo.waitingOnAppends === 0) {\n this.handleAppendsDone_();\n }\n }\n checkForIllegalMediaSwitch(trackInfo) {\n const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return true;\n }\n return false;\n }\n updateSourceBufferTimestampOffset_(segmentInfo) {\n if (segmentInfo.timestampOffset === null ||\n // we don't yet have the start for whatever media type (video or audio) has\n // priority, timing-wise, so we must wait\n typeof segmentInfo.timingInfo.start !== 'number' ||\n // already updated the timestamp offset for this segment\n segmentInfo.changedTimestampOffset ||\n // the alt audio loader should not be responsible for setting the timestamp offset\n this.loaderType_ !== 'main') {\n return;\n }\n let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n // the timing info here comes from video. In the event that the audio is longer than\n // the video, this will trim the start of the audio.\n // This also trims any offset from 0 at the beginning of the media\n\n segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n timingInfo: segmentInfo.timingInfo\n }); // In the event that there are part segment downloads, each will try to update the\n // timestamp offset. Retaining this bit of state prevents us from updating in the\n // future (within the same segment), however, there may be a better way to handle it.\n\n segmentInfo.changedTimestampOffset = true;\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (didChange) {\n this.trigger('timestampoffset');\n }\n }\n getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo,\n audioTimingInfo,\n timingInfo\n }) {\n if (!this.useDtsForTimestampOffset_) {\n return timingInfo.start;\n }\n if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n return videoTimingInfo.transmuxedDecodeStart;\n } // handle audio only\n\n if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n return audioTimingInfo.transmuxedDecodeStart;\n } // handle content not transmuxed (e.g., MP4)\n\n return timingInfo.start;\n }\n updateTimingInfoEnd_(segmentInfo) {\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n const trackInfo = this.getMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n if (!prioritizedTimingInfo) {\n return;\n }\n segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n // End time may not exist in a case where we aren't parsing the full segment (one\n // current example is the case of fmp4), so use the rough duration to calculate an\n // end time.\n prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n\n handleAppendsDone_() {\n // appendsdone can cause an abort\n if (this.pendingSegment_) {\n this.trigger('appendsdone');\n }\n if (!this.pendingSegment_) {\n this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n // all appending cases?\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n return;\n }\n const segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n // best to wait until all appends are done so we're sure that the primary media is\n // finished (and we have its end time).\n\n this.updateTimingInfoEnd_(segmentInfo);\n if (this.shouldSaveSegmentTimingInfo_) {\n // Timeline mappings should only be saved for the main loader. This is for multiple\n // reasons:\n //\n // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n // and the main loader try to save the timeline mapping, whichever comes later\n // will overwrite the first. In theory this is OK, as the mappings should be the\n // same, however, it breaks for (2)\n // 2) In the event of a live stream, the initial live point will make for a somewhat\n // arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n // the mapping will be off for one of the streams, dependent on which one was\n // first saved (see (1)).\n // 3) Primary timing goes by video in VHS, so the mapping should be video.\n //\n // Since the audio loader will wait for the main loader to load the first segment,\n // the main loader will save the first timeline mapping, and ensure that there won't\n // be a case where audio loads two segments without saving a mapping (thus leading\n // to missing segment timing info).\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n }\n const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n if (segmentDurationMessage) {\n if (segmentDurationMessage.severity === 'warn') {\n videojs.log.warn(segmentDurationMessage.message);\n } else {\n this.logger_(segmentDurationMessage.message);\n }\n }\n this.recordThroughput_(segmentInfo);\n this.pendingSegment_ = null;\n this.state = 'READY';\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate'); // if the sync request was not appended\n // then it was not the correct segment.\n // throw it away and use the data it gave us\n // to get the correct one.\n\n if (!segmentInfo.hasAppendedData_) {\n this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n return;\n }\n }\n this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n this.addSegmentMetadataCue_(segmentInfo);\n if (this.currentTime_() >= this.replaceSegmentsUntil_) {\n this.replaceSegmentsUntil_ = -1;\n this.fetchAtBuffer_ = true;\n }\n if (this.currentTimeline_ !== segmentInfo.timeline) {\n this.timelineChangeController_.lastTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n }); // If audio is not disabled, the main segment loader is responsible for updating\n // the audio timeline as well. If the content is video only, this won't have any\n // impact.\n\n if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n this.timelineChangeController_.lastTimelineChange({\n type: 'audio',\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n }\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate');\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (badSegmentGuess || badPartGuess) {\n this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n this.resetEverything();\n return;\n }\n const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n this.trigger('progress');\n this.mediaIndex = segmentInfo.mediaIndex;\n this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n this.endOfStream();\n } // used for testing\n\n this.trigger('appended');\n if (segmentInfo.hasAppendedData_) {\n this.mediaAppends++;\n }\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n\n recordThroughput_(segmentInfo) {\n if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n\n addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n const segment = segmentInfo.segment;\n const start = segment.start;\n const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n programDateTime: segment.programDateTime,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.id,\n start,\n end\n };\n const data = JSON.stringify(value);\n const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n /**\n * Public setter for defining the private replaceSegmentsUntil_ property, which\n * determines when we can return fetchAtBuffer to true if overwriting the buffer.\n *\n * @param {number} bufferedEnd the end of the buffered range to replace segments\n * until currentTime reaches this time.\n */\n\n set replaceSegmentsUntil(bufferedEnd) {\n this.logger_(`Replacing currently buffered segments until ${bufferedEnd}`);\n this.replaceSegmentsUntil_ = bufferedEnd;\n }\n}\nfunction noop() {}\nconst toTitleCase = function (string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n for (let i = 0; i < queue.length; i++) {\n const queueEntry = queue[i];\n if (queueEntry.type === 'mediaSource') {\n // If the next entry is a media source entry (uses multiple source buffers), block\n // processing to allow it to go through first.\n return null;\n }\n if (queueEntry.type === type) {\n return i;\n }\n }\n return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n if (sourceUpdater.queue.length === 0) {\n return;\n }\n let queueIndex = 0;\n let queueEntry = sourceUpdater.queue[queueIndex];\n if (queueEntry.type === 'mediaSource') {\n if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n sourceUpdater.queue.shift();\n queueEntry.action(sourceUpdater);\n if (queueEntry.doneFn) {\n queueEntry.doneFn();\n } // Only specific source buffer actions must wait for async updateend events. Media\n // Source actions process synchronously. Therefore, both audio and video source\n // buffers are now clear to process the next queue entries.\n\n shiftQueue('audio', sourceUpdater);\n shiftQueue('video', sourceUpdater);\n } // Media Source actions require both source buffers, so if the media source action\n // couldn't process yet (because one or both source buffers are busy), block other\n // queue actions until both are available and the media source action can process.\n\n return;\n }\n if (type === 'mediaSource') {\n // If the queue was shifted by a media source action (this happens when pushing a\n // media source action onto the queue), then it wasn't from an updateend event from an\n // audio or video source buffer, so there's no change from previous state, and no\n // processing should be done.\n return;\n } // Media source queue entries don't need to consider whether the source updater is\n // started (i.e., source buffers are created) as they don't need the source buffers, but\n // source buffer queue entries do.\n\n if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n return;\n }\n if (queueEntry.type !== type) {\n queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n if (queueIndex === null) {\n // Either there's no queue entry that uses this source buffer type in the queue, or\n // there's a media source queue entry before the next entry of this type, in which\n // case wait for that action to process first.\n return;\n }\n queueEntry = sourceUpdater.queue[queueIndex];\n }\n sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n //\n // The queue pending operation must be set before the action is performed in the event\n // that the action results in a synchronous event that is acted upon. For instance, if\n // an exception is thrown that can be handled, it's possible that new actions will be\n // appended to an empty queue and immediately executed, but would not have the correct\n // pending information if this property was set after the action was performed.\n\n sourceUpdater.queuePending[type] = queueEntry;\n queueEntry.action(type, sourceUpdater);\n if (!queueEntry.doneFn) {\n // synchronous operation, process next entry\n sourceUpdater.queuePending[type] = null;\n shiftQueue(type, sourceUpdater);\n return;\n }\n};\nconst cleanupBuffer = (type, sourceUpdater) => {\n const buffer = sourceUpdater[`${type}Buffer`];\n const titleType = toTitleCase(type);\n if (!buffer) {\n return;\n }\n buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = null;\n sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n try {\n sourceBuffer.appendBuffer(bytes);\n } catch (e) {\n sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n sourceUpdater.queuePending[type] = null;\n onError(e);\n }\n },\n remove: (start, end) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n try {\n sourceBuffer.remove(start, end);\n } catch (e) {\n sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n }\n },\n timestampOffset: offset => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n sourceBuffer.timestampOffset = offset;\n },\n callback: callback => (type, sourceUpdater) => {\n callback();\n },\n endOfStream: error => sourceUpdater => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n try {\n sourceUpdater.mediaSource.endOfStream(error);\n } catch (e) {\n videojs.log.warn('Failed to call media source endOfStream', e);\n }\n },\n duration: duration => sourceUpdater => {\n sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n try {\n sourceUpdater.mediaSource.duration = duration;\n } catch (e) {\n videojs.log.warn('Failed to set media source duration', e);\n }\n },\n abort: () => (type, sourceUpdater) => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n try {\n sourceBuffer.abort();\n } catch (e) {\n videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n }\n },\n addSourceBuffer: (type, codec) => sourceUpdater => {\n const titleType = toTitleCase(type);\n const mime = getMimeForCodec(codec);\n sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = codec;\n sourceUpdater[`${type}Buffer`] = sourceBuffer;\n },\n removeSourceBuffer: type => sourceUpdater => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n try {\n sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n } catch (e) {\n videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n }\n },\n changeType: codec => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n } // do not update codec if we don't need to.\n\n if (sourceUpdater.codecs[type] === codec) {\n return;\n }\n sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`);\n sourceBuffer.changeType(mime);\n sourceUpdater.codecs[type] = codec;\n }\n};\nconst pushQueue = ({\n type,\n sourceUpdater,\n action,\n doneFn,\n name\n}) => {\n sourceUpdater.queue.push({\n type,\n action,\n doneFn,\n name\n });\n shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n const buffered = sourceUpdater[`${type}Buffered`]();\n const bufferedAsString = prettyBuffered(buffered);\n sourceUpdater.logger_(`${type} source buffer update end. Buffered: \\n`, bufferedAsString); // Although there should, in theory, be a pending action for any updateend receieved,\n // there are some actions that may trigger updateend events without set definitions in\n // the w3c spec. For instance, setting the duration on the media source may trigger\n // updateend events on source buffers. This does not appear to be in the spec. As such,\n // if we encounter an updateend without a corresponding pending action from our queue\n // for that source buffer type, process the next action.\n\n if (sourceUpdater.queuePending[type]) {\n const doneFn = sourceUpdater.queuePending[type].doneFn;\n sourceUpdater.queuePending[type] = null;\n if (doneFn) {\n // if there's an error, report it\n doneFn(sourceUpdater[`${type}Error_`]);\n }\n }\n shiftQueue(type, sourceUpdater);\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\nclass SourceUpdater extends videojs.EventTarget {\n constructor(mediaSource) {\n super();\n this.mediaSource = mediaSource;\n this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n this.audioTimestampOffset_ = 0;\n this.videoTimestampOffset_ = 0;\n this.queue = [];\n this.queuePending = {\n audio: null,\n video: null\n };\n this.delayedAudioAppendQueue_ = [];\n this.videoAppendQueued_ = false;\n this.codecs = {};\n this.onVideoUpdateEnd_ = onUpdateend('video', this);\n this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n this.onVideoError_ = e => {\n // used for debugging\n this.videoError_ = e;\n };\n this.onAudioError_ = e => {\n // used for debugging\n this.audioError_ = e;\n };\n this.createdSourceBuffers_ = false;\n this.initializedEme_ = false;\n this.triggeredReady_ = false;\n }\n initializedEme() {\n this.initializedEme_ = true;\n this.triggerReady();\n }\n hasCreatedSourceBuffers() {\n // if false, likely waiting on one of the segment loaders to get enough data to create\n // source buffers\n return this.createdSourceBuffers_;\n }\n hasInitializedAnyEme() {\n return this.initializedEme_;\n }\n ready() {\n return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n }\n createSourceBuffers(codecs) {\n if (this.hasCreatedSourceBuffers()) {\n // already created them before\n return;\n } // the intial addOrChangeSourceBuffers will always be\n // two add buffers.\n\n this.addOrChangeSourceBuffers(codecs);\n this.createdSourceBuffers_ = true;\n this.trigger('createdsourcebuffers');\n this.triggerReady();\n }\n triggerReady() {\n // only allow ready to be triggered once, this prevents the case\n // where:\n // 1. we trigger createdsourcebuffers\n // 2. ie 11 synchronously initializates eme\n // 3. the synchronous initialization causes us to trigger ready\n // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n if (this.ready() && !this.triggeredReady_) {\n this.triggeredReady_ = true;\n this.trigger('ready');\n }\n }\n /**\n * Add a type of source buffer to the media source.\n *\n * @param {string} type\n * The type of source buffer to add.\n *\n * @param {string} codec\n * The codec to add the source buffer with.\n */\n\n addSourceBuffer(type, codec) {\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.addSourceBuffer(type, codec),\n name: 'addSourceBuffer'\n });\n }\n /**\n * call abort on a source buffer.\n *\n * @param {string} type\n * The type of source buffer to call abort on.\n */\n\n abort(type) {\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.abort(type),\n name: 'abort'\n });\n }\n /**\n * Call removeSourceBuffer and remove a specific type\n * of source buffer on the mediaSource.\n *\n * @param {string} type\n * The type of source buffer to remove.\n */\n\n removeSourceBuffer(type) {\n if (!this.canRemoveSourceBuffer()) {\n videojs.log.error('removeSourceBuffer is not supported!');\n return;\n }\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.removeSourceBuffer(type),\n name: 'removeSourceBuffer'\n });\n }\n /**\n * Whether or not the removeSourceBuffer function is supported\n * on the mediaSource.\n *\n * @return {boolean}\n * if removeSourceBuffer can be called.\n */\n\n canRemoveSourceBuffer() {\n // As of Firefox 83 removeSourceBuffer\n // throws errors, so we report that it does not support this.\n return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n static canChangeType() {\n return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n canChangeType() {\n return this.constructor.canChangeType();\n }\n /**\n * Call the changeType function on a source buffer, given the code and type.\n *\n * @param {string} type\n * The type of source buffer to call changeType on.\n *\n * @param {string} codec\n * The codec string to change type with on the source buffer.\n */\n\n changeType(type, codec) {\n if (!this.canChangeType()) {\n videojs.log.error('changeType is not supported!');\n return;\n }\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.changeType(codec),\n name: 'changeType'\n });\n }\n /**\n * Add source buffers with a codec or, if they are already created,\n * call changeType on source buffers using changeType.\n *\n * @param {Object} codecs\n * Codecs to switch to\n */\n\n addOrChangeSourceBuffers(codecs) {\n if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n }\n Object.keys(codecs).forEach(type => {\n const codec = codecs[type];\n if (!this.hasCreatedSourceBuffers()) {\n return this.addSourceBuffer(type, codec);\n }\n if (this.canChangeType()) {\n this.changeType(type, codec);\n }\n });\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {MediaObject} object containing audioBytes and/or videoBytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n\n appendBuffer(options, doneFn) {\n const {\n segmentInfo,\n type,\n bytes\n } = options;\n this.processedAppend_ = true;\n if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n this.delayedAudioAppendQueue_.push([options, doneFn]);\n this.logger_(`delayed audio append of ${bytes.length} until video append`);\n return;\n } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n // not be fired. This means that the queue will be blocked until the next action\n // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n // these errors by calling the doneFn with the specific error.\n\n const onError = doneFn;\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.appendBuffer(bytes, segmentInfo || {\n mediaIndex: -1\n }, onError),\n doneFn,\n name: 'appendBuffer'\n });\n if (type === 'video') {\n this.videoAppendQueued_ = true;\n if (!this.delayedAudioAppendQueue_.length) {\n return;\n }\n const queue = this.delayedAudioAppendQueue_.slice();\n this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n this.delayedAudioAppendQueue_.length = 0;\n queue.forEach(que => {\n this.appendBuffer.apply(this, que);\n });\n }\n }\n /**\n * Get the audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The audio buffer's buffered time range\n */\n\n audioBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n return createTimeRanges();\n }\n return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n }\n /**\n * Get the video buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The video buffer's buffered time range\n */\n\n videoBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n return createTimeRanges();\n }\n return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n }\n /**\n * Get a combined video/audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * the combined time range\n */\n\n buffered() {\n const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n if (audio && !video) {\n return this.audioBuffered();\n }\n if (video && !audio) {\n return this.videoBuffered();\n }\n return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n }\n /**\n * Add a callback to the queue that will set duration on the mediaSource.\n *\n * @param {number} duration\n * The duration to set\n *\n * @param {Function} [doneFn]\n * function to run after duration has been set.\n */\n\n setDuration(duration, doneFn = noop) {\n // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.duration(duration),\n name: 'duration',\n doneFn\n });\n }\n /**\n * Add a mediaSource endOfStream call to the queue\n *\n * @param {Error} [error]\n * Call endOfStream with an error\n *\n * @param {Function} [doneFn]\n * A function that should be called when the\n * endOfStream call has finished.\n */\n\n endOfStream(error = null, doneFn = noop) {\n if (typeof error !== 'string') {\n error = undefined;\n } // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.endOfStream(error),\n name: 'endOfStream',\n doneFn\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeAudio(start, end, done = noop) {\n if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeVideo(start, end, done = noop) {\n if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {boolean} the updating status of the SourceBuffer\n */\n\n updating() {\n // the audio/video source buffer is updating\n if (updating('audio', this) || updating('video', this)) {\n return true;\n }\n return false;\n }\n /**\n * Set/get the timestampoffset on the audio SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n audioTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.audioBuffer &&\n // no point in updating if it's the same\n this.audioTimestampOffset_ !== offset) {\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.audioTimestampOffset_ = offset;\n }\n return this.audioTimestampOffset_;\n }\n /**\n * Set/get the timestampoffset on the video SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n videoTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.videoBuffer &&\n // no point in updating if it's the same\n this.videoTimestampOffset !== offset) {\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.videoTimestampOffset_ = offset;\n }\n return this.videoTimestampOffset_;\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the audio queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n audioQueueCallback(callback) {\n if (!this.audioBuffer) {\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the video queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n videoQueueCallback(callback) {\n if (!this.videoBuffer) {\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n\n dispose() {\n this.trigger('dispose');\n bufferTypes.forEach(type => {\n this.abort(type);\n if (this.canRemoveSourceBuffer()) {\n this.removeSourceBuffer(type);\n } else {\n this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n }\n });\n this.videoAppendQueued_ = false;\n this.delayedAudioAppendQueue_.length = 0;\n if (this.sourceopenListener_) {\n this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n }\n this.off();\n }\n}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n constructor() {\n super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n }\n}\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass VTTSegmentLoader extends SegmentLoader {\n constructor(settings, options = {}) {\n super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n this.mediaSource_ = null;\n this.subtitlesTrack_ = null;\n this.loaderType_ = 'subtitle';\n this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n // the sync controller leads to improper behavior.\n\n this.shouldSaveSegmentTimingInfo_ = false;\n }\n createTransmuxer_() {\n // don't need to transmux any subtitles\n return null;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n return createTimeRanges();\n }\n const cues = this.subtitlesTrack_.cues;\n const start = cues[0].startTime;\n const end = cues[cues.length - 1].startTime;\n return createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n const combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n\n track(track) {\n if (typeof track === 'undefined') {\n return this.subtitlesTrack_;\n }\n this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n */\n\n remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // see if we need to begin loading immediately\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n const checkTimestampOffset = () => {\n this.state = 'READY';\n if (!this.paused()) {\n // if not paused, queue a buffer check as soon as possible\n this.monitorBuffer_();\n }\n };\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n this.loadSegment_(segmentInfo);\n } // never set a timestamp offset for vtt segments.\n\n timestampOffsetForSegment_() {\n return null;\n }\n chooseNextRequest_() {\n return this.skipEmptySegments_(super.chooseNextRequest_());\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n\n skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n // stop at the last possible segmentInfo\n if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n segmentInfo = null;\n break;\n }\n segmentInfo = this.generateSegmentInfo_({\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex + 1,\n startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n isSyncRequest: segmentInfo.isSyncRequest\n });\n }\n return segmentInfo;\n }\n stopForError(error) {\n this.error(error);\n this.state = 'READY';\n this.pause();\n this.trigger('error');\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n if (!this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n this.mediaRequestsAborted += 1;\n return;\n }\n if (error) {\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n }\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n } else {\n this.mediaRequestsErrored += 1;\n }\n this.stopForError(error);\n return;\n }\n const segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functionality between segment loaders\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n this.state = 'APPENDING'; // used for tests\n\n this.trigger('appending');\n const segment = segmentInfo.segment;\n if (segment.map) {\n segment.map.bytes = simpleSegment.map.bytes;\n }\n segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n message: 'Error loading vtt.js'\n }));\n return;\n }\n segment.requested = true;\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.stopForError({\n message: e.message\n });\n return;\n }\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n if (segmentInfo.cues.length) {\n segmentInfo.timingInfo = {\n start: segmentInfo.cues[0].startTime,\n end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n };\n } else {\n segmentInfo.timingInfo = {\n start: segmentInfo.startOfSegment,\n end: segmentInfo.startOfSegment + segmentInfo.duration\n };\n }\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n // the subtitle track\n\n segmentInfo.cues.forEach(cue => {\n this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n // cues to have identical time-intervals, but if the text is also identical\n // we can safely assume it is a duplicate that can be removed (ex. when a cue\n // \"overlaps\" VTT segments)\n\n removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n this.handleAppendsDone_();\n }\n handleData_() {// noop as we shouldn't be getting video/audio data captions\n // that we do not support here.\n }\n updateTimingInfoEnd_() {// noop\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @throws NoVttJsError\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n\n parseVTTCues_(segmentInfo) {\n let decoder;\n let decodeBytesToString = false;\n if (typeof window$1.WebVTT !== 'function') {\n // caller is responsible for exception handling.\n throw new NoVttJsError();\n }\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n parser.ontimestampmap = map => {\n segmentInfo.timestampmap = map;\n };\n parser.onparsingerror = error => {\n videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n if (segmentInfo.segment.map) {\n let mapData = segmentInfo.segment.map.bytes;\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n parser.parse(mapData);\n }\n let segmentData = segmentInfo.bytes;\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n\n updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n const segment = segmentInfo.segment;\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n const timestampmap = segmentInfo.timestampmap;\n const diff = timestampmap.MPEGTS / ONE_SECOND_IN_TS - timestampmap.LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(cue => {\n // First convert cue time to TS time using the timestamp-map provided within the vtt\n cue.startTime += diff;\n cue.endTime += diff;\n });\n if (!playlist.syncInfo) {\n const firstStart = segmentInfo.cues[0].startTime;\n const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n}\n\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n * the track to find the cue for\n *\n * @param {number} mediaTime\n * the time to find the cue at\n *\n * @return {Object|null}\n * the found cue or null\n */\n\nconst findAdCue = function (track, mediaTime) {\n const cues = track.cues;\n for (let i = 0; i < cues.length; i++) {\n const cue = cues[i];\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n if (!media.segments) {\n return;\n }\n let mediaTime = offset;\n let cue;\n for (let i = 0; i < media.segments.length; i++) {\n const segment = media.segments[i];\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n mediaTime += segment.duration;\n }\n};\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (duration !== Infinity) {\n const syncPoint = {\n time: 0,\n segmentIndex: 0,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n return null;\n }\n let syncPoint = null;\n let lastDistance = null;\n const partsAndSegments = getPartsAndSegments(playlist);\n currentTime = currentTime || 0;\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n if (!datetimeMapping || !segment.dateTimeObject) {\n continue;\n }\n const segmentTime = segment.dateTimeObject.getTime() / 1000;\n let start = segmentTime + datetimeMapping; // take part duration into account.\n\n if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n for (let z = 0; z < partAndSegment.partIndex; z++) {\n start += segment.parts[z].duration;\n }\n }\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n return syncPoint;\n }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n let lastDistance = null;\n currentTime = currentTime || 0;\n const partsAndSegments = getPartsAndSegments(playlist);\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n currentTime = currentTime || 0;\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n let lastDistance = null;\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const discontinuitySync = syncController.discontinuities[discontinuity];\n if (discontinuitySync) {\n const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex,\n partIndex: null\n };\n }\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (playlist.syncInfo) {\n const syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}];\nclass SyncController extends videojs.EventTarget {\n constructor(options = {}) {\n super(); // ...for synching across variants\n\n this.timelines = [];\n this.discontinuities = [];\n this.timelineToDatetimeMappings = {};\n this.logger_ = logger('SyncController');\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Object}\n * A sync-point object\n */\n\n getSyncPoint(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime);\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @return {number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n\n getExpiredTime(playlist, duration) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n const syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n return Math.abs(syncPoint.time + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: syncPoint.segmentIndex,\n endIndex: 0\n }));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Array}\n * A list of sync-point objects\n */\n\n runStrategies_(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (let i = 0; i < syncPointStrategies.length; i++) {\n const strategy = syncPointStrategies[i];\n const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime);\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint\n });\n }\n }\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {string} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {number} target.value\n * The value to target for the specified key.\n * @return {Object}\n * The sync-point nearest the target\n */\n\n selectSyncPoint_(syncPoints, target) {\n let bestSyncPoint = syncPoints[0].syncPoint;\n let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n let bestStrategy = syncPoints[0].strategy;\n for (let i = 1; i < syncPoints.length; i++) {\n const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[i].syncPoint;\n bestStrategy = syncPoints[i].strategy;\n }\n }\n this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n\n saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n return;\n } // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n const lastRemovedSegment = oldPlaylist.segments[i];\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + i,\n time: lastRemovedSegment.start\n };\n this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n * before segments start to load.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n\n setDateTimeMappingForStart(playlist) {\n // It's possible for the playlist to be updated before playback starts, meaning time\n // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n // crossed, then the old time zero mapping (for the prior timeline) would be retained\n // unless the mappings are cleared.\n this.timelineToDatetimeMappings = {};\n if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n const firstSegment = playlist.segments[0];\n const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n }\n }\n /**\n * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n * based on the latest timing information.\n *\n * @param {Object} options\n * Options object\n * @param {SegmentInfo} options.segmentInfo\n * The current active request information\n * @param {boolean} options.shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved for timeline mapping and program date time mappings.\n */\n\n saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping\n }) {\n const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n const segment = segmentInfo.segment;\n if (didCalculateSegmentTimeMapping) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!segmentInfo.playlist.syncInfo) {\n segmentInfo.playlist.syncInfo = {\n mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n const dateTime = segment.dateTimeObject;\n if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n }\n }\n timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].time;\n }\n mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {Object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @param {boolean} shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved in timelines.\n * @return {boolean}\n * Returns false if segment time mapping could not be calculated\n */\n\n calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n // TODO: remove side effects\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n let mappingObj = this.timelines[segmentInfo.timeline];\n let start;\n let end;\n if (typeof segmentInfo.timestampOffset === 'number') {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n if (shouldSaveTimelineMapping) {\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n }\n start = segmentInfo.startOfSegment;\n end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n start = timingInfo.start + mappingObj.mapping;\n end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n if (part) {\n part.start = start;\n part.end = end;\n } // If we don't have a segment start yet or the start value we got\n // is less than our current segment.start value, save a new start value.\n // We have to do this because parts will have segment timing info saved\n // multiple times and we want segment start to be the earliest part start\n // value for that segment.\n\n if (!segment.start || start < segment.start) {\n segment.start = start;\n }\n segment.end = end;\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n saveDiscontinuitySyncInfo_(segmentInfo) {\n const playlist = segmentInfo.playlist;\n const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n const accuracy = Math.abs(mediaIndexDiff);\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n let time;\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex,\n endIndex: segmentIndex\n });\n } else {\n time = segment.end + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex + 1,\n endIndex: segmentIndex\n });\n }\n this.discontinuities[discontinuity] = {\n time,\n accuracy\n };\n }\n }\n }\n }\n dispose() {\n this.trigger('dispose');\n this.off();\n }\n}\n\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\nclass TimelineChangeController extends videojs.EventTarget {\n constructor() {\n super();\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n }\n clearPendingTimelineChange(type) {\n this.pendingTimelineChanges_[type] = null;\n this.trigger('pendingtimelinechange');\n }\n pendingTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.pendingTimelineChanges_[type] = {\n type,\n from,\n to\n };\n this.trigger('pendingtimelinechange');\n }\n return this.pendingTimelineChanges_[type];\n }\n lastTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.lastTimelineChanges_[type] = {\n type,\n from,\n to\n };\n delete this.pendingTimelineChanges_[type];\n this.trigger('timelinechange');\n }\n return this.lastTimelineChanges_[type];\n }\n dispose() {\n this.trigger('dispose');\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n this.off();\n }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst workerCode = transform(getWorkerString(function () {\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n var Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n }();\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n *\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */\n\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n const precompute = function () {\n const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n const encTable = tables[0];\n const decTable = tables[1];\n const sbox = encTable[4];\n const sboxInv = decTable[4];\n let i;\n let x;\n let xInv;\n const d = [];\n const th = [];\n let x2;\n let x4;\n let x8;\n let s;\n let tEnc;\n let tDec; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n return tables;\n };\n let aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n class AES {\n constructor(key) {\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n let i;\n let j;\n let tmp;\n const sbox = this._tables[0][4];\n const decTable = this._tables[1];\n const keyLen = key.length;\n let rcon = 1;\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n const encKey = key.slice(0);\n const decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {number} encrypted0 the first word to decrypt\n * @param {number} encrypted1 the second word to decrypt\n * @param {number} encrypted2 the third word to decrypt\n * @param {number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n let a = encrypted0 ^ key[0];\n let b = encrypted3 ^ key[1];\n let c = encrypted2 ^ key[2];\n let d = encrypted1 ^ key[3];\n let a2;\n let b2;\n let c2; // key.length === 2 ?\n\n const nInnerRounds = key.length / 4 - 2;\n let i;\n let kIndex = 4;\n const table = this._tables[1]; // load up the tables\n\n const table0 = table[0];\n const table1 = table[1];\n const table2 = table[2];\n const table3 = table[3];\n const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n }\n }\n /**\n * @file async-stream.js\n */\n\n /**\n * A wrapper around the Stream class to use setTimeout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n class AsyncStream extends Stream {\n constructor() {\n super(Stream);\n this.jobs = [];\n this.delay = 1;\n this.timeout_ = null;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n processJob_() {\n this.jobs.shift()();\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n }\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n push(job) {\n this.jobs.push(job);\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n }\n }\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n const ntoh = function (word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n const decrypt = function (encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n const decrypted = new Uint8Array(encrypted.byteLength);\n const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n let init0;\n let init1;\n let init2;\n let init3;\n let encrypted0;\n let encrypted1;\n let encrypted2;\n let encrypted3; // iteration variable\n\n let wordIx; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n class Decrypter {\n constructor(encrypted, key, initVector, done) {\n const step = Decrypter.STEP;\n const encrypted32 = new Int32Array(encrypted.buffer);\n const decrypted = new Uint8Array(encrypted.byteLength);\n let i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {number} the value of step 32000\n */\n\n static get STEP() {\n // 4 * 8000;\n return 32000;\n }\n /**\n * @private\n */\n\n decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n const bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n }\n }\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n };\n var BigInt = window_1.BigInt || Number;\n [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n (function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n })();\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n const createTransferableMessage = function (message) {\n const transferable = {};\n Object.keys(message).forEach(key => {\n const value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /* global self */\n\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n */\n\n self.onmessage = function (event) {\n const data = event.data;\n const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n}));\n\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nconst audioTrackKind_ = properties => {\n let kind = properties.default ? 'main' : 'alternative';\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n segmentLoader.abort();\n segmentLoader.pause();\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\nconst startLoaders = (playlistLoader, mediaType) => {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\nconst onGroupChanged = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup || activeGroup.isMainPlaylist) {\n // there is no group active or active group is a main playlist and won't change\n return;\n }\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n return;\n } // Non-destructive resync\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n mediaType.lastGroup_ = null;\n segmentLoader.abort();\n segmentLoader.pause();\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\nconst onTrackChanged = (type, settings) => () => {\n const {\n mainPlaylistLoader,\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n if (activeGroup.isMainPlaylist) {\n // track did not change, do nothing\n if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n return;\n }\n const pc = settings.vhs.playlistController_;\n const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n if (pc.media() === newPlaylist) {\n return;\n }\n mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n mainPlaylistLoader.pause();\n mainSegmentLoader.resetEverything();\n pc.fastQualityChange_(newPlaylist);\n return;\n }\n if (type === 'AUDIO') {\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no\n // playlist loader for the audio group), we want to do a destructive reset of the\n // main segment loader and not restart the audio loaders\n mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n // it should be stopped\n\n mainSegmentLoader.resetEverything();\n return;\n } // although the segment loader is an audio segment loader, call the setAudio\n // function to ensure it is prepared to re-append the init segment (or handle other\n // config changes)\n\n segmentLoader.setAudio(true);\n mainSegmentLoader.setAudio(false);\n }\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is excluded) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n },\n excludePlaylist\n } = settings; // switch back to default audio track\n\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.activeGroup();\n const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n const defaultTrack = mediaType.tracks[id];\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is exclude the current\n // rendition and hope another will switch audio groups\n excludePlaylist({\n error: {\n message: 'Problem encountered loading the default audio track.'\n }\n });\n return;\n }\n videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n for (const trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n mediaType.onTrackChanged();\n },\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n const track = mediaType.activeTrack();\n if (track) {\n track.mode = 'disabled';\n }\n mediaType.onTrackChanged();\n }\n};\nconst setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: (type, playlistLoader, settings) => {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: (type, playlistLoader, settings) => {\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nconst initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': (type, settings) => {\n const {\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks,\n logger_\n }\n },\n mainPlaylistLoader\n } = settings;\n const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n default: {\n default: true\n }\n }\n };\n if (audioOnlyMain) {\n mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n }\n }\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (audioOnlyMain) {\n logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n properties.isMainPlaylist = true;\n playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n // use the resolved media playlist object\n } else if (sourceType === 'vhs-json' && properties.playlists) {\n playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n } else if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n // should we even have properties.playlists in this check.\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = new videojs.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n default: properties.default,\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': (type, settings) => {\n const {\n tech,\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n },\n mainPlaylistLoader\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n } else if (sourceType === 'dash') {\n const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n if (!playlists.length) {\n return;\n }\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else if (sourceType === 'vhs-json') {\n playlistLoader = new PlaylistLoader(\n // if the vhs-json object included the media playlist, use the media playlist\n // as provided, otherwise use the resolved URI to load the playlist\n properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n default: properties.default && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': (type, settings) => {\n const {\n tech,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n }\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n continue;\n }\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let newProps = {\n label: variantLabel,\n language: properties.language,\n instreamId: properties.instreamId,\n default: properties.default && properties.autoselect\n };\n if (captionServices[newProps.instreamId]) {\n newProps = merge(newProps, captionServices[newProps.instreamId]);\n }\n if (newProps.default === undefined) {\n delete newProps.default;\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n groups[groupId].push(merge({\n id: variantLabel\n }, properties));\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: newProps.instreamId,\n kind: 'captions',\n default: newProps.default,\n language: newProps.language,\n label: newProps.label\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\nconst groupMatch = (list, media) => {\n for (let i = 0; i < list.length; i++) {\n if (playlistMatch(media, list[i])) {\n return true;\n }\n if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nconst activeGroup = (type, settings) => track => {\n const {\n mainPlaylistLoader,\n mediaTypes: {\n [type]: {\n groups\n }\n }\n } = settings;\n const media = mainPlaylistLoader.media();\n if (!media) {\n return null;\n }\n let variants = null; // set to variants to main media active group\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n const groupKeys = Object.keys(groups);\n if (!variants) {\n // find the mainPlaylistLoader media\n // that is in a media group if we are dealing\n // with audio only\n if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n for (let i = 0; i < groupKeys.length; i++) {\n const groupPropertyList = groups[groupKeys[i]];\n if (groupMatch(groupPropertyList, media)) {\n variants = groupPropertyList;\n break;\n }\n } // use the main group if it exists\n } else if (groups.main) {\n variants = groups.main; // only one group, use that one\n } else if (groupKeys.length === 1) {\n variants = groups[groupKeys[0]];\n }\n }\n if (typeof track === 'undefined') {\n return variants;\n }\n if (track === null || !variants) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n return null;\n },\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n return tracks[id];\n }\n }\n return null;\n }\n};\nconst getActiveGroup = (type, {\n mediaTypes\n}) => () => {\n const activeTrack_ = mediaTypes[type].activeTrack();\n if (!activeTrack_) {\n return null;\n }\n return mediaTypes[type].activeGroup(activeTrack_);\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n * PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n * VHS SourceHandler\n * @param {Object} settings.main\n * The parsed main manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n * Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nconst setupMediaGroups = settings => {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n initialize[type](type, settings);\n });\n const {\n mediaTypes,\n mainPlaylistLoader,\n tech,\n vhs,\n segmentLoaders: {\n ['AUDIO']: audioSegmentLoader,\n main: mainSegmentLoader\n }\n } = settings; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n const audioGroup = mediaTypes.AUDIO.activeGroup();\n if (audioGroup) {\n const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onGroupChanged();\n mediaTypes.AUDIO.onTrackChanged();\n const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n // track is changed, but needs to be handled here since the track may not be considered\n // changed on the first call to onTrackChanged\n\n if (!activeAudioGroup.playlistLoader) {\n // either audio is muxed with video or the stream is audio only\n mainSegmentLoader.setAudio(true);\n } else {\n // audio is demuxed\n mainSegmentLoader.setAudio(false);\n audioSegmentLoader.setAudio(true);\n }\n }\n mainPlaylistLoader.on('mediachange', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n });\n mainPlaylistLoader.on('mediachanging', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n }); // custom audio track change event handler for usage event\n\n const onAudioTrackChanged = () => {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'vhs-audio-change'\n });\n };\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n vhs.on('dispose', () => {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n for (const id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nconst createMediaTypes = () => {\n const mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n getActiveGroup: noop,\n onGroupChanged: noop,\n onTrackChanged: noop,\n lastTrack_: null,\n logger_: logger(`MediaGroups[${type}]`)\n };\n });\n return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n */\n\nclass SteeringManifest {\n constructor() {\n this.priority_ = [];\n }\n set version(number) {\n // Only version 1 is currently supported for both DASH and HLS.\n if (number === 1) {\n this.version_ = number;\n }\n }\n set ttl(seconds) {\n // TTL = time-to-live, default = 300 seconds.\n this.ttl_ = seconds || 300;\n }\n set reloadUri(uri) {\n if (uri) {\n // reload URI can be relative to the previous reloadUri.\n this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n }\n }\n set priority(array) {\n // priority must be non-empty and unique values.\n if (array && array.length) {\n this.priority_ = array;\n }\n }\n get version() {\n return this.version_;\n }\n get ttl() {\n return this.ttl_;\n }\n get reloadUri() {\n return this.reloadUri_;\n }\n get priority() {\n return this.priority_;\n }\n}\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\n\nclass ContentSteeringController extends videojs.EventTarget {\n constructor(xhr, bandwidth) {\n super();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.logger_ = logger('Content Steering');\n this.xhr_ = xhr;\n this.getBandwidth_ = bandwidth;\n }\n /**\n * Assigns the content steering tag properties to the steering controller\n *\n * @param {string} baseUrl the baseURL from the manifest for resolving the steering manifest url\n * @param {Object} steeringTag the content steering tag from the main manifest\n */\n\n assignTagProperties(baseUrl, steeringTag) {\n this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n if (!steeringUri) {\n this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n this.trigger('error');\n return;\n } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n if (steeringUri.startsWith('data:')) {\n this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n return;\n } // With DASH queryBeforeStart, we want to use the steeringUri as soon as possible for the request.\n\n this.steeringManifest.reloadUri = this.queryBeforeStart ? steeringUri : resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on tags.\n\n this.queryBeforeStart = steeringTag.queryBeforeStart || false;\n this.proxyServerUrl_ = steeringTag.proxyServerURL || null; // trigger a steering event if we have a pathway from the content steering tag.\n // this tells VHS which segment pathway to start with.\n // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n if (this.defaultPathway && !this.queryBeforeStart) {\n this.trigger('content-steering');\n }\n if (this.queryBeforeStart) {\n this.requestSteeringManifest(this.steeringManifest.reloadUri);\n }\n }\n /**\n * Requests the content steering manifest and parse the response. This should only be called after\n * assignTagProperties was called with a content steering tag.\n *\n * @param {string} initialUri The optional uri to make the request with.\n * If set, the request should be made with exactly what is passed in this variable.\n * This scenario is specific to DASH when the queryBeforeStart parameter is true.\n * This scenario should only happen once on initalization.\n */\n\n requestSteeringManifest(initialUri) {\n const reloadUri = this.steeringManifest.reloadUri;\n if (!initialUri && !reloadUri) {\n return;\n } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n // This request URI accounts for manifest URIs that have been excluded.\n\n const uri = initialUri || this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n if (!uri) {\n this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n this.trigger('error');\n this.dispose();\n return;\n }\n this.request_ = this.xhr_({\n uri\n }, (error, errorInfo) => {\n if (error) {\n // If the client receives HTTP 410 Gone in response to a manifest request,\n // it MUST NOT issue another request for that URI for the remainder of the\n // playback session. It MAY continue to use the most-recently obtained set\n // of Pathways.\n if (errorInfo.status === 410) {\n this.logger_(`manifest request 410 ${error}.`);\n this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n this.excludedSteeringManifestURLs.add(uri);\n return;\n } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n // header in response to a manifest request, it SHOULD wait until the time\n // specified by the Retry-After header to reissue the request.\n\n if (errorInfo.status === 429) {\n const retrySeconds = errorInfo.responseHeaders['retry-after'];\n this.logger_(`manifest request 429 ${error}.`);\n this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n this.startTTLTimeout_(parseInt(retrySeconds, 10));\n return;\n } // If the Steering Manifest cannot be loaded and parsed correctly, the\n // client SHOULD continue to use the previous values and attempt to reload\n // it after waiting for the previously-specified TTL (or 5 minutes if\n // none).\n\n this.logger_(`manifest failed to load ${error}.`);\n this.startTTLTimeout_();\n return;\n }\n const steeringManifestJson = JSON.parse(this.request_.responseText);\n this.startTTLTimeout_();\n this.assignSteeringProperties_(steeringManifestJson);\n });\n }\n /**\n * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n *\n * @param {string} steeringUrl the steering manifest url\n * @return the steering manifest url to a proxy server with all parameters set\n */\n\n setProxyServerUrl_(steeringUrl) {\n const steeringUrlObject = new window$1.URL(steeringUrl);\n const proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n return this.setSteeringParams_(proxyServerUrlObject.toString());\n }\n /**\n * Decodes and parses the data uri encoded steering manifest\n *\n * @param {string} dataUri the data uri to be decoded and parsed.\n */\n\n decodeDataUriManifest_(dataUri) {\n const steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n this.assignSteeringProperties_(steeringManifestJson);\n }\n /**\n * Set the HLS or DASH content steering manifest request query parameters. For example:\n * _HLS_pathway=\"\" and _HLS_throughput=\n * _DASH_pathway and _DASH_throughput\n *\n * @param {string} uri to add content steering server parameters to.\n * @return a new uri as a string with the added steering query parameters.\n */\n\n setSteeringParams_(url) {\n const urlObject = new window$1.URL(url);\n const path = this.getPathway();\n const networkThroughput = this.getBandwidth_();\n if (path) {\n const pathwayKey = `_${this.manifestType_}_pathway`;\n urlObject.searchParams.set(pathwayKey, path);\n }\n if (networkThroughput) {\n const throughputKey = `_${this.manifestType_}_throughput`;\n urlObject.searchParams.set(throughputKey, networkThroughput);\n }\n return urlObject.toString();\n }\n /**\n * Assigns the current steering manifest properties and to the SteeringManifest object\n *\n * @param {Object} steeringJson the raw JSON steering manifest\n */\n\n assignSteeringProperties_(steeringJson) {\n this.steeringManifest.version = steeringJson.VERSION;\n if (!this.steeringManifest.version) {\n this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n this.trigger('error');\n return;\n }\n this.steeringManifest.ttl = steeringJson.TTL;\n this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // TODO: HLS handle PATHWAY-CLONES. See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n // 1. apply first pathway from the array.\n // 2. if first pathway doesn't exist in manifest, try next pathway.\n // a. if all pathways are exhausted, ignore the steering manifest priority.\n // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n // the excluded pathway will be ignored.\n // See excludePathway usage in excludePlaylist().\n // If there are no available pathways, we need to stop content steering.\n\n if (!this.availablePathways_.size) {\n this.logger_('There are no available pathways for content steering. Ending content steering.');\n this.trigger('error');\n this.dispose();\n }\n const chooseNextPathway = pathwaysByPriority => {\n for (const path of pathwaysByPriority) {\n if (this.availablePathways_.has(path)) {\n return path;\n }\n } // If no pathway matches, ignore the manifest and choose the first available.\n\n return [...this.availablePathways_][0];\n };\n const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n if (this.currentPathway !== nextPathway) {\n this.currentPathway = nextPathway;\n this.trigger('content-steering');\n }\n }\n /**\n * Returns the pathway to use for steering decisions\n *\n * @return {string} returns the current pathway or the default\n */\n\n getPathway() {\n return this.currentPathway || this.defaultPathway;\n }\n /**\n * Chooses the manifest request URI based on proxy URIs and server URLs.\n * Also accounts for exclusion on certain manifest URIs.\n *\n * @param {string} reloadUri the base uri before parameters\n *\n * @return {string} the final URI for the request to the manifest server.\n */\n\n getRequestURI(reloadUri) {\n if (!reloadUri) {\n return null;\n }\n const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n if (this.proxyServerUrl_) {\n const proxyURI = this.setProxyServerUrl_(reloadUri);\n if (!isExcluded(proxyURI)) {\n return proxyURI;\n }\n }\n const steeringURI = this.setSteeringParams_(reloadUri);\n if (!isExcluded(steeringURI)) {\n return steeringURI;\n } // Return nothing if all valid manifest URIs are excluded.\n\n return null;\n }\n /**\n * Start the timeout for re-requesting the steering manifest at the TTL interval.\n *\n * @param {number} ttl time in seconds of the timeout. Defaults to the\n * ttl interval in the steering manifest\n */\n\n startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n // 300 (5 minutes) is the default value.\n const ttlMS = ttl * 1000;\n this.ttlTimeout_ = window$1.setTimeout(() => {\n this.requestSteeringManifest();\n }, ttlMS);\n }\n /**\n * Clear the TTL timeout if necessary.\n */\n\n clearTTLTimeout_() {\n window$1.clearTimeout(this.ttlTimeout_);\n this.ttlTimeout_ = null;\n }\n /**\n * aborts any current steering xhr and sets the current request object to null\n */\n\n abort() {\n if (this.request_) {\n this.request_.abort();\n }\n this.request_ = null;\n }\n /**\n * aborts steering requests clears the ttl timeout and resets all properties.\n */\n\n dispose() {\n this.off('content-steering');\n this.off('error');\n this.abort();\n this.clearTTLTimeout_();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n }\n /**\n * adds a pathway to the available pathways set\n *\n * @param {string} pathway the pathway string to add\n */\n\n addAvailablePathway(pathway) {\n if (pathway) {\n this.availablePathways_.add(pathway);\n }\n }\n /**\n * clears all pathways from the available pathways set\n */\n\n clearAvailablePathways() {\n this.availablePathways_.clear();\n }\n excludePathway(pathway) {\n return this.availablePathways_.delete(pathway);\n }\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n currentPlaylist,\n buffered,\n currentTime,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration,\n bufferBasedABR,\n log\n}) {\n // we have no other playlist to switch to\n if (!nextPlaylist) {\n videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n return false;\n }\n const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n if (!currentPlaylist) {\n log(`${sharedLogLine} as current playlist is not set`);\n return true;\n } // no need to switch if playlist is the same\n\n if (nextPlaylist.id === currentPlaylist.id) {\n return false;\n } // determine if current time is in a buffered range.\n\n const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n if (!currentPlaylist.endList) {\n // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n // doubles the time to first playback.\n if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n return false;\n }\n log(`${sharedLogLine} as current playlist is live`);\n return true;\n }\n const forwardBuffer = timeAheadOf(buffered, currentTime);\n const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n\n if (duration < maxBufferLowWaterLine) {\n log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n return true;\n }\n const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n // we can switch down\n\n if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n if (bufferBasedABR) {\n logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n }\n log(logLine);\n return true;\n } // and if our buffer is higher than the low water line,\n // we can switch up\n\n if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n if (bufferBasedABR) {\n logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n }\n log(logLine);\n return true;\n }\n log(`not ${sharedLogLine} as no switching criteria met`);\n return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\n\nclass PlaylistController extends videojs.EventTarget {\n constructor(options) {\n super();\n const {\n src,\n withCredentials,\n tech,\n bandwidth,\n externVhs,\n useCueTags,\n playlistExclusionDuration,\n enableLowInitialPlaylist,\n sourceType,\n cacheEncryptionKeys,\n bufferBasedABR,\n leastPixelDiffSelector,\n captionServices\n } = options;\n if (!src) {\n throw new Error('A non-empty playlist URL or JSON manifest string is required');\n }\n let {\n maxPlaylistRetries\n } = options;\n if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n maxPlaylistRetries = Infinity;\n }\n Vhs$1 = externVhs;\n this.bufferBasedABR = Boolean(bufferBasedABR);\n this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n this.withCredentials = withCredentials;\n this.tech_ = tech;\n this.vhs_ = tech.vhs;\n this.sourceType_ = sourceType;\n this.useCueTags_ = useCueTags;\n this.playlistExclusionDuration = playlistExclusionDuration;\n this.maxPlaylistRetries = maxPlaylistRetries;\n this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n if (this.useCueTags_) {\n this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n this.requestOptions_ = {\n withCredentials,\n maxPlaylistRetries,\n timeout: null\n };\n this.on('error', this.pauseLoading);\n this.mediaTypes_ = createMediaTypes();\n this.mediaSource = new window$1.MediaSource();\n this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n // everything, and the MediaSource should not be detached without a proper disposal\n\n this.seekable_ = createTimeRanges();\n this.hasPlayed_ = false;\n this.syncController_ = new SyncController(options);\n this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n this.decrypter_ = new Decrypter();\n this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n this.inbandTextTracks_ = {};\n this.timelineChangeController_ = new TimelineChangeController();\n const segmentLoaderSettings = {\n vhs: this.vhs_,\n parse708captions: options.parse708captions,\n useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n calculateTimestampOffsetForEachSegment: options.calculateTimestampOffsetForEachSegment,\n captionServices,\n mediaSource: this.mediaSource,\n currentTime: this.tech_.currentTime.bind(this.tech_),\n seekable: () => this.seekable(),\n seeking: () => this.tech_.seeking(),\n duration: () => this.duration(),\n hasPlayed: () => this.hasPlayed_,\n goalBufferLength: () => this.goalBufferLength(),\n bandwidth,\n syncController: this.syncController_,\n decrypter: this.decrypter_,\n sourceType: this.sourceType_,\n inbandTextTracks: this.inbandTextTracks_,\n cacheEncryptionKeys,\n sourceUpdater: this.sourceUpdater_,\n timelineChangeController: this.timelineChangeController_,\n exactManifestTimings: options.exactManifestTimings,\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n }; // The source type check not only determines whether a special DASH playlist loader\n // should be used, but also covers the case where the provided src is a vhs-json\n // manifest object (instead of a URL). In the case of vhs-json, the default\n // PlaylistLoader should be used.\n\n this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n }));\n this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n segmentMetadataTrack: this.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'vtt',\n featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n loadVttJs: () => new Promise((resolve, reject) => {\n function onLoad() {\n tech.off('vttjserror', onError);\n resolve();\n }\n function onError() {\n tech.off('vttjsloaded', onLoad);\n reject();\n }\n tech.one('vttjsloaded', onLoad);\n tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n tech.addWebVttScript_();\n })\n }), options);\n const getBandwidth = () => {\n return this.mainSegmentLoader_.bandwidth;\n };\n this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n this.setupSegmentLoaderListeners_();\n if (this.bufferBasedABR) {\n this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n this.tech_.on('pause', () => this.stopABRTimer_());\n this.tech_.on('play', () => this.startABRTimer_());\n } // Create SegmentLoader stat-getters\n // mediaRequests_\n // mediaRequestsAborted_\n // mediaRequestsTimedout_\n // mediaRequestsErrored_\n // mediaTransferDuration_\n // mediaBytesTransferred_\n // mediaAppends_\n\n loaderStats.forEach(stat => {\n this[stat + '_'] = sumLoaderStat.bind(this, stat);\n });\n this.logger_ = logger('pc');\n this.triggeredFmp4Usage = false;\n if (this.tech_.preload() === 'none') {\n this.loadOnPlay_ = () => {\n this.loadOnPlay_ = null;\n this.mainPlaylistLoader_.load();\n };\n this.tech_.one('play', this.loadOnPlay_);\n } else {\n this.mainPlaylistLoader_.load();\n }\n this.timeToLoadedData__ = -1;\n this.mainAppendsToLoadedData__ = -1;\n this.audioAppendsToLoadedData__ = -1;\n const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n this.tech_.one(event, () => {\n const timeToLoadedDataStart = Date.now();\n this.tech_.one('loadeddata', () => {\n this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n });\n });\n }\n mainAppendsToLoadedData_() {\n return this.mainAppendsToLoadedData__;\n }\n audioAppendsToLoadedData_() {\n return this.audioAppendsToLoadedData__;\n }\n appendsToLoadedData_() {\n const main = this.mainAppendsToLoadedData_();\n const audio = this.audioAppendsToLoadedData_();\n if (main === -1 || audio === -1) {\n return -1;\n }\n return main + audio;\n }\n timeToLoadedData_() {\n return this.timeToLoadedData__;\n }\n /**\n * Run selectPlaylist and switch to the new playlist if we should\n *\n * @param {string} [reason=abr] a reason for why the ABR check is made\n * @private\n */\n\n checkABR_(reason = 'abr') {\n const nextPlaylist = this.selectPlaylist();\n if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n this.switchMedia_(nextPlaylist, reason);\n }\n }\n switchMedia_(playlist, cause, delay) {\n const oldMedia = this.media();\n const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n const newId = playlist.id || playlist.uri;\n if (oldId && oldId !== newId) {\n this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-rendition-change-${cause}`\n });\n }\n this.mainPlaylistLoader_.media(playlist, delay);\n }\n /**\n * A function that ensures we switch our playlists inside of `mediaTypes`\n * to match the current `serviceLocation` provided by the contentSteering controller.\n * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n *\n * This should only be called on a DASH playback scenario while using content steering.\n * This is necessary due to differences in how media in HLS manifests are generally tied to\n * a video playlist, where in DASH that is not always the case.\n */\n\n switchMediaForDASHContentSteering_() {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n const mediaType = this.mediaTypes_[type];\n const activeGroup = mediaType ? mediaType.activeGroup() : null;\n const pathway = this.contentSteeringController_.getPathway();\n if (activeGroup && pathway) {\n // activeGroup can be an array or a single group\n const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n if (dashMediaPlaylists.length) {\n this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n }\n }\n });\n }\n /**\n * Start a timer that periodically calls checkABR_\n *\n * @private\n */\n\n startABRTimer_() {\n this.stopABRTimer_();\n this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n }\n /**\n * Stop the timer that periodically calls checkABR_\n *\n * @private\n */\n\n stopABRTimer_() {\n // if we're scrubbing, we don't need to pause.\n // This getter will be added to Video.js in version 7.11.\n if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n return;\n }\n window$1.clearInterval(this.abrTimer_);\n this.abrTimer_ = null;\n }\n /**\n * Get a list of playlists for the currently selected audio playlist\n *\n * @return {Array} the array of audio playlists\n */\n\n getAudioTrackPlaylists_() {\n const main = this.main();\n const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n // assume that the audio tracks are contained in main\n // playlist array, use that or an empty array.\n\n if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n return defaultPlaylists;\n }\n const AUDIO = main.mediaGroups.AUDIO;\n const groupKeys = Object.keys(AUDIO);\n let track; // get the current active track\n\n if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n } else {\n // default group is `main` or just the first group.\n const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n for (const label in defaultGroup) {\n if (defaultGroup[label].default) {\n track = {\n label\n };\n break;\n }\n }\n } // no active track no playlists.\n\n if (!track) {\n return defaultPlaylists;\n }\n const playlists = []; // get all of the playlists that are possible for the\n // active track.\n\n for (const group in AUDIO) {\n if (AUDIO[group][track.label]) {\n const properties = AUDIO[group][track.label];\n if (properties.playlists && properties.playlists.length) {\n playlists.push.apply(playlists, properties.playlists);\n } else if (properties.uri) {\n playlists.push(properties);\n } else if (main.playlists.length) {\n // if an audio group does not have a uri\n // see if we have main playlists that use it as a group.\n // if we do then add those to the playlists list.\n for (let i = 0; i < main.playlists.length; i++) {\n const playlist = main.playlists[i];\n if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n playlists.push(playlist);\n }\n }\n }\n }\n }\n if (!playlists.length) {\n return defaultPlaylists;\n }\n return playlists;\n }\n /**\n * Register event handlers on the main playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n\n setupMainPlaylistLoaderListeners_() {\n this.mainPlaylistLoader_.on('loadedmetadata', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n if (media.endList && this.tech_.preload() !== 'none') {\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n }\n setupMediaGroups({\n sourceType: this.sourceType_,\n segmentLoaders: {\n AUDIO: this.audioSegmentLoader_,\n SUBTITLES: this.subtitleSegmentLoader_,\n main: this.mainSegmentLoader_\n },\n tech: this.tech_,\n requestOptions: this.requestOptions_,\n mainPlaylistLoader: this.mainPlaylistLoader_,\n vhs: this.vhs_,\n main: this.main(),\n mediaTypes: this.mediaTypes_,\n excludePlaylist: this.excludePlaylist.bind(this)\n });\n this.triggerPresenceUsage_(this.main(), media);\n this.setupFirstPlay();\n if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n this.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n this.trigger('selectedinitialmedia');\n });\n }\n });\n this.mainPlaylistLoader_.on('loadedplaylist', () => {\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n let updatedPlaylist = this.mainPlaylistLoader_.media();\n if (!updatedPlaylist) {\n this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n\n this.excludeUnsupportedVariants_();\n let selectedMedia;\n if (this.enableLowInitialPlaylist) {\n selectedMedia = this.selectInitialPlaylist();\n }\n if (!selectedMedia) {\n selectedMedia = this.selectPlaylist();\n }\n if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n return;\n }\n this.initialMedia_ = selectedMedia;\n this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n // fire again since the playlist will be requested. In the case of vhs-json\n // (where the manifest object is provided as the source), when the media\n // playlist's `segments` list is already available, a media playlist won't be\n // requested, and loadedplaylist won't fire again, so the playlist handler must be\n // called on its own here.\n\n const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n if (!haveJsonSource) {\n return;\n }\n updatedPlaylist = this.initialMedia_;\n }\n this.handleUpdatedMediaPlaylist(updatedPlaylist);\n });\n this.mainPlaylistLoader_.on('error', () => {\n const error = this.mainPlaylistLoader_.error;\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainPlaylistLoader_.on('mediachanging', () => {\n this.mainSegmentLoader_.abort();\n this.mainSegmentLoader_.pause();\n });\n this.mainPlaylistLoader_.on('mediachange', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n }\n this.mainPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n this.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.mainPlaylistLoader_.on('playlistunchanged', () => {\n const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n // excluded for not-changing. We likely just have a really slowly updating\n // playlist.\n\n if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n return;\n }\n const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // exclude it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n this.excludePlaylist({\n error: {\n message: 'Playlist no longer updating.',\n reason: 'playlist-unchanged'\n }\n }); // useful for monitoring QoS\n\n this.tech_.trigger('playliststuck');\n }\n });\n this.mainPlaylistLoader_.on('renditiondisabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-disabled'\n });\n });\n this.mainPlaylistLoader_.on('renditionenabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-enabled'\n });\n });\n }\n /**\n * Given an updated media playlist (whether it was loaded for the first time, or\n * refreshed for live playlists), update any relevant properties and state to reflect\n * changes in the media that should be accounted for (e.g., cues and duration).\n *\n * @param {Object} updatedPlaylist the updated media playlist object\n *\n * @private\n */\n\n handleUpdatedMediaPlaylist(updatedPlaylist) {\n if (this.useCueTags_) {\n this.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n if (!this.tech_.paused()) {\n this.mainSegmentLoader_.load();\n if (this.audioSegmentLoader_) {\n this.audioSegmentLoader_.load();\n }\n }\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n\n triggerPresenceUsage_(main, media) {\n const mediaGroups = main.mediaGroups || {};\n let defaultDemuxed = true;\n const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n for (const mediaGroup in mediaGroups.AUDIO) {\n for (const label in mediaGroups.AUDIO[mediaGroup]) {\n const properties = mediaGroups.AUDIO[mediaGroup][label];\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-demuxed'\n });\n }\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-webvtt'\n });\n }\n if (Vhs$1.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-aes'\n });\n }\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-alternate-audio'\n });\n }\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-playlist-cue-tags'\n });\n }\n }\n shouldSwitchToMedia_(nextPlaylist) {\n const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n const currentTime = this.tech_.currentTime();\n const bufferLowWaterLine = this.bufferLowWaterLine();\n const bufferHighWaterLine = this.bufferHighWaterLine();\n const buffered = this.tech_.buffered();\n return shouldSwitchToMedia({\n buffered,\n currentTime,\n currentPlaylist,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration: this.duration(),\n bufferBasedABR: this.bufferBasedABR,\n log: this.logger_\n });\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n\n setupSegmentLoaderListeners_() {\n this.mainSegmentLoader_.on('bandwidthupdate', () => {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n this.checkABR_('bandwidthupdate');\n this.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('timeout', () => {\n if (this.bufferBasedABR) {\n // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n // Here the only consideration is that for buffer based ABR there's no guarantee\n // of an immediate switch (since the bandwidth is averaged with a timeout\n // bandwidth value of 1), so force a load on the segment loader to keep it going.\n this.mainSegmentLoader_.load();\n }\n }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n // based ABR.\n\n if (!this.bufferBasedABR) {\n this.mainSegmentLoader_.on('progress', () => {\n this.trigger('progress');\n });\n }\n this.mainSegmentLoader_.on('error', () => {\n const error = this.mainSegmentLoader_.error();\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainSegmentLoader_.on('appenderror', () => {\n this.error = this.mainSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.audioSegmentLoader_.on('appenderror', () => {\n this.error = this.audioSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('ended', () => {\n this.logger_('main segment loader ended');\n this.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', event => {\n // never try to early abort with the new ABR algorithm\n if (this.bufferBasedABR) {\n return;\n }\n this.delegateLoaders_('all', ['abort']);\n this.excludePlaylist({\n error: {\n message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n },\n playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n });\n });\n const updateCodecs = () => {\n if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return this.tryToCreateSourceBuffers_();\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n };\n this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n this.mainSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('ended', () => {\n this.logger_('audioSegmentLoader ended');\n this.onEndOfStream();\n });\n }\n mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n\n load() {\n this.mainSegmentLoader_.load();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This will reset the main segment loader\n * and the next segment position to the currentTime.\n * This is good for manual quality changes.\n *\n * @private\n */\n\n fastQualityChange_(media = this.selectPlaylist()) {\n if (media === this.mainPlaylistLoader_.media()) {\n this.logger_('skipping fastQualityChange because new media is same as old');\n return;\n }\n this.switchMedia_(media, 'fast-quality'); // Reset main segment loader properties and next segment position information.\n // Don't need to reset audio as it is reset when media changes.\n // We resetLoaderProperties separately here as we want to fetch init segments if\n // necessary and ensure we're not in an ended state when we switch playlists.\n\n this.resetMainLoaderReplaceSegments();\n }\n /**\n * Sets the replaceUntil flag on the main segment soader to the buffered end\n * and resets the main segment loaders properties.\n */\n\n resetMainLoaderReplaceSegments() {\n const buffered = this.tech_.buffered();\n const bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer\n // on the main loader to remain, false after the resetLoader call, until we have\n // replaced all content buffered ahead of the currentTime.\n\n this.mainSegmentLoader_.replaceSegmentsUntil = bufferedEnd;\n this.mainSegmentLoader_.resetLoaderProperties();\n this.mainSegmentLoader_.resetLoader();\n }\n /**\n * Begin playback.\n */\n\n play() {\n if (this.setupFirstPlay()) {\n return;\n }\n if (this.tech_.ended()) {\n this.tech_.setCurrentTime(0);\n }\n if (this.hasPlayed_) {\n this.load();\n }\n const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable.start(0)) {\n return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n\n setupFirstPlay() {\n const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_) {\n return false;\n } // when the video is a live stream and/or has a start time\n\n if (!media.endList || media.start) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // without a seekable range, the player cannot seek to begin buffering at the\n // live or start point\n return false;\n }\n const seekableEnd = seekable.end(0);\n let startPoint = seekableEnd;\n if (media.start) {\n const offset = media.start.timeOffset;\n if (offset < 0) {\n startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n } else {\n startPoint = Math.min(seekableEnd, offset);\n }\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n this.trigger('firstplay'); // seek to the live point\n\n this.tech_.setCurrentTime(startPoint);\n }\n this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n\n handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n if (this.tech_.autoplay()) {\n const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, e => {});\n }\n }\n this.trigger('sourceopen');\n }\n /**\n * handle the sourceended event on the MediaSource\n *\n * @private\n */\n\n handleSourceEnded_() {\n if (!this.inbandTextTracks_.metadataTrack_) {\n return;\n }\n const cues = this.inbandTextTracks_.metadataTrack_.cues;\n if (!cues || !cues.length) {\n return;\n }\n const duration = this.duration();\n cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n }\n /**\n * handle the durationchange event on the MediaSource\n *\n * @private\n */\n\n handleDurationChange_() {\n this.tech_.trigger('durationchange');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n\n onEndOfStream() {\n let isEndOfStream = this.mainSegmentLoader_.ended_;\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n if (!isEndOfStream) {\n return;\n }\n this.stopABRTimer_();\n this.sourceUpdater_.endOfStream();\n }\n /**\n * Check if a playlist has stopped being updated\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n\n stuckAtPlaylistEnd_(playlist) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Exclude a playlist for a set amount of time, making it unavailable for selection by\n * the rendition selection algorithm, then force a new playlist (rendition) selection.\n *\n * @param {Object=} playlistToExclude\n * the playlist to exclude, defaults to the currently selected playlist\n * @param {Object=} error\n * an optional error\n * @param {number=} playlistExclusionDuration\n * an optional number of seconds to exclude the playlist\n */\n\n excludePlaylist({\n playlistToExclude = this.mainPlaylistLoader_.media(),\n error = {},\n playlistExclusionDuration\n }) {\n // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // excluded instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the main OR while we were disposing of the tech\n\n if (!playlistToExclude) {\n this.error = error;\n if (this.mediaSource.readyState !== 'open') {\n this.trigger('error');\n } else {\n this.sourceUpdater_.endOfStream('network');\n }\n return;\n }\n playlistToExclude.playlistErrors_++;\n const playlists = this.mainPlaylistLoader_.main.playlists;\n const enabledPlaylists = playlists.filter(isEnabled);\n const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n // forever\n\n if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n return this.mainPlaylistLoader_.load(isFinalRendition);\n }\n if (isFinalRendition) {\n // If we're content steering, try other pathways.\n if (this.main().contentSteering) {\n const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n this.contentSteeringController_.excludePathway(pathway);\n this.excludeThenChangePathway_();\n setTimeout(() => {\n this.contentSteeringController_.addAvailablePathway(pathway);\n }, reIncludeDelay);\n return;\n } // Since we're on the final non-excluded playlist, and we're about to exclude\n // it, instead of erring the player or retrying this playlist, clear out the current\n // exclusion list. This allows other playlists to be attempted in case any have been\n // fixed.\n\n let reincluded = false;\n playlists.forEach(playlist => {\n // skip current playlist which is about to be excluded\n if (playlist === playlistToExclude) {\n return;\n }\n const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n reincluded = true;\n delete playlist.excludeUntil;\n }\n });\n if (reincluded) {\n videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n }\n } // Exclude this playlist\n\n let excludeUntil;\n if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n excludeUntil = Infinity;\n } else {\n excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n }\n playlistToExclude.excludeUntil = excludeUntil;\n if (error.reason) {\n playlistToExclude.lastExcludeReason_ = error.reason;\n }\n this.tech_.trigger('excludeplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-excluded'\n }); // TODO: only load a new playlist if we're excluding the current playlist\n // If this function was called with a playlist that's not the current active playlist\n // (e.g., media().id !== playlistToExclude.id),\n // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n const nextPlaylist = this.selectPlaylist();\n if (!nextPlaylist) {\n this.error = 'Playback cannot continue. No available working or supported playlists.';\n this.trigger('error');\n return;\n }\n const logFn = error.internal ? this.logger_ : videojs.log.warn;\n const errorMessage = error.message ? ' ' + error.message : '';\n logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n this.delegateLoaders_('audio', ['abort', 'pause']);\n } // if subtitle group changed reset subtitle loaders\n\n if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n this.delegateLoaders_('subtitle', ['abort', 'pause']);\n }\n this.delegateLoaders_('main', ['abort', 'pause']);\n const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n }\n /**\n * Pause all segment/playlist loaders\n */\n\n pauseLoading() {\n this.delegateLoaders_('all', ['abort', 'pause']);\n this.stopABRTimer_();\n }\n /**\n * Call a set of functions in order on playlist loaders, segment loaders,\n * or both types of loaders.\n *\n * @param {string} filter\n * Filter loaders that should call fnNames using a string. Can be:\n * * all - run on all loaders\n * * audio - run on all audio loaders\n * * subtitle - run on all subtitle loaders\n * * main - run on the main loaders\n *\n * @param {Array|string} fnNames\n * A string or array of function names to call.\n */\n\n delegateLoaders_(filter, fnNames) {\n const loaders = [];\n const dontFilterPlaylist = filter === 'all';\n if (dontFilterPlaylist || filter === 'main') {\n loaders.push(this.mainPlaylistLoader_);\n }\n const mediaTypes = [];\n if (dontFilterPlaylist || filter === 'audio') {\n mediaTypes.push('AUDIO');\n }\n if (dontFilterPlaylist || filter === 'subtitle') {\n mediaTypes.push('CLOSED-CAPTIONS');\n mediaTypes.push('SUBTITLES');\n }\n mediaTypes.forEach(mediaType => {\n const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n if (loader) {\n loaders.push(loader);\n }\n });\n ['main', 'audio', 'subtitle'].forEach(name => {\n const loader = this[`${name}SegmentLoader_`];\n if (loader && (filter === name || filter === 'all')) {\n loaders.push(loader);\n }\n });\n loaders.forEach(loader => fnNames.forEach(fnName => {\n if (typeof loader[fnName] === 'function') {\n loader[fnName]();\n }\n }));\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n\n setCurrentTime(currentTime) {\n const buffered = findRange(this.tech_.buffered(), currentTime);\n if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n if (!this.mainPlaylistLoader_.media().segments) {\n return 0;\n } // if the seek location is already buffered, continue buffering as usual\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n this.mainSegmentLoader_.resetEverything();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.resetEverything();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.resetEverything();\n } // start segment loader loading in case they are paused\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n\n duration() {\n if (!this.mainPlaylistLoader_) {\n return 0;\n }\n const media = this.mainPlaylistLoader_.media();\n if (!media) {\n // no playlists loaded yet, so can't determine a duration\n return 0;\n } // Don't rely on the media source for duration in the case of a live playlist since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, just return Infinity.\n\n if (!media.endList) {\n return Infinity;\n } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n // available). If it's not available, fall back to a playlist-calculated estimate.\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n return Vhs$1.Playlist.duration(media);\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n\n seekable() {\n return this.seekable_;\n }\n onSyncInfoUpdate_() {\n let audioSeekable; // TODO check for creation of both source buffers before updating seekable\n //\n // A fix was made to this function where a check for\n // this.sourceUpdater_.hasCreatedSourceBuffers\n // was added to ensure that both source buffers were created before seekable was\n // updated. However, it originally had a bug where it was checking for a true and\n // returning early instead of checking for false. Setting it to check for false to\n // return early though created other issues. A call to play() would check for seekable\n // end without verifying that a seekable range was present. In addition, even checking\n // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n // due to a media update calling load on the segment loaders, skipping a seek to live,\n // thereby starting live streams at the beginning of the stream rather than at the end.\n //\n // This conditional should be fixed to wait for the creation of two source buffers at\n // the same time as the other sections of code are fixed to properly seek to live and\n // not throw an error due to checking for a seekable end when no seekable range exists.\n //\n // For now, fall back to the older behavior, with the understanding that the seekable\n // range may not be completely correct, leading to a suboptimal initial live point.\n\n if (!this.mainPlaylistLoader_) {\n return;\n }\n let media = this.mainPlaylistLoader_.media();\n if (!media) {\n return;\n }\n let expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n const main = this.mainPlaylistLoader_.main;\n const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (mainSeekable.length === 0) {\n return;\n }\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n return;\n }\n audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (audioSeekable.length === 0) {\n return;\n }\n }\n let oldEnd;\n let oldStart;\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n\n updateDuration(isLive) {\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n this.updateDuration_ = null;\n }\n if (this.mediaSource.readyState !== 'open') {\n this.updateDuration_ = this.updateDuration.bind(this, isLive);\n this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n return;\n }\n if (isLive) {\n const seekable = this.seekable();\n if (!seekable.length) {\n return;\n } // Even in the case of a live playlist, the native MediaSource's duration should not\n // be set to Infinity (even though this would be expected for a live playlist), since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, the duration should be greater than or\n // equal to the last possible seekable value.\n // MediaSource duration starts as NaN\n // It is possible (and probable) that this case will never be reached for many\n // sources, since the MediaSource reports duration as the highest value without\n // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n // we buffered times 0 to 100 with real times of 100 to 200, even though current\n // time will be between 0 and 100, the native media source may report the duration\n // as 200. However, since we report duration separate from the media source (as\n // Infinity), and as long as the native media source duration value is greater than\n // our reported seekable range, seeks will work as expected. The large number as\n // duration for live is actually a strategy used by some players to work around the\n // issue of live seekable ranges cited above.\n\n if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n }\n return;\n }\n const buffered = this.tech_.buffered();\n let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n if (buffered.length > 0) {\n duration = Math.max(duration, buffered.end(buffered.length - 1));\n }\n if (this.mediaSource.duration !== duration) {\n this.sourceUpdater_.setDuration(duration);\n }\n }\n /**\n * dispose of the PlaylistController and everything\n * that it controls\n */\n\n dispose() {\n this.trigger('dispose');\n this.decrypter_.terminate();\n this.mainPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n this.contentSteeringController_.dispose();\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n const groups = this.mediaTypes_[type].groups;\n for (const id in groups) {\n groups[id].forEach(group => {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n this.sourceUpdater_.dispose();\n this.timelineChangeController_.dispose();\n this.stopABRTimer_();\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n }\n this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n this.off();\n }\n /**\n * return the main playlist object if we have one\n *\n * @return {Object} the main playlist object that we parsed\n */\n\n main() {\n return this.mainPlaylistLoader_.main;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n\n media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.mainPlaylistLoader_.media() || this.initialMedia_;\n }\n areMediaTypesKnown_() {\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n // otherwise check on the segment loader.\n\n const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n return false;\n }\n return true;\n }\n getCodecsOrExclude_() {\n const media = {\n main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n };\n const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n media.video = media.main;\n const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n const codecs = {};\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n if (media.main.hasVideo) {\n codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n }\n if (media.main.isMuxed) {\n codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n }\n if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n } // no codecs, no playback.\n\n if (!codecs.audio && !codecs.video) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: 'Could not determine codecs for playlist.'\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // fmp4 relies on browser support, while ts relies on muxer support\n\n const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n const unsupportedCodecs = {};\n let unsupportedAudio;\n ['video', 'audio'].forEach(function (type) {\n if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n unsupportedCodecs[supporter].push(codecs[type]);\n if (type === 'audio') {\n unsupportedAudio = supporter;\n }\n }\n });\n if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n const audioGroup = playlist.attributes.AUDIO;\n this.main().playlists.forEach(variant => {\n const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n if (variantAudioGroup === audioGroup && variant !== playlist) {\n variant.excludeUntil = Infinity;\n }\n });\n this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n } // if we have any unsupported codecs exclude this playlist.\n\n if (Object.keys(unsupportedCodecs).length) {\n const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n if (acc) {\n acc += ', ';\n }\n acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n return acc;\n }, '') + '.';\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n internal: true,\n message\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // check if codec switching is happening\n\n if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n const switchMessages = [];\n ['video', 'audio'].forEach(type => {\n const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n }\n });\n if (switchMessages.length) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n internal: true\n },\n playlistExclusionDuration: Infinity\n });\n return;\n }\n } // TODO: when using the muxer shouldn't we just return\n // the codecs that the muxer outputs?\n\n return codecs;\n }\n /**\n * Create source buffers and exlude any incompatible renditions.\n *\n * @private\n */\n\n tryToCreateSourceBuffers_() {\n // media source is not ready yet or sourceBuffers are already\n // created.\n if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return;\n }\n if (!this.areMediaTypesKnown_()) {\n return;\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.createSourceBuffers(codecs);\n const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n this.excludeIncompatibleVariants_(codecString);\n }\n /**\n * Excludes playlists with codecs that are unsupported by the muxer and browser.\n */\n\n excludeUnsupportedVariants_() {\n const playlists = this.main().playlists;\n const ids = []; // TODO: why don't we have a property to loop through all\n // playlist? Why did we ever mix indexes and keys?\n\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n\n if (ids.indexOf(variant.id) !== -1) {\n return;\n }\n ids.push(variant.id);\n const codecs = codecsForPlaylist(this.main, variant);\n const unsupported = [];\n if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n unsupported.push(`audio codec ${codecs.audio}`);\n }\n if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n unsupported.push(`video codec ${codecs.video}`);\n }\n if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n unsupported.push(`text codec ${codecs.text}`);\n }\n if (unsupported.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n }\n });\n }\n /**\n * Exclude playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current main playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n\n excludeIncompatibleVariants_(codecString) {\n const ids = [];\n const playlists = this.main().playlists;\n const codecs = unwrapCodecList(parseCodecs(codecString));\n const codecCount_ = codecCount(codecs);\n const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n // or it if it is already excluded forever.\n\n if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n return;\n }\n ids.push(variant.id);\n const exclusionReasons = []; // get codecs from the playlist for this variant\n\n const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n // variant is incompatible. Wait for mux.js to probe\n\n if (!variantCodecs.audio && !variantCodecs.video) {\n return;\n } // TODO: we can support this by removing the\n // old media source and creating a new one, but it will take some work.\n // The number of streams cannot change\n\n if (variantCodecCount !== codecCount_) {\n exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n } // only exclude playlists by codec change, if codecs cannot switch\n // during playback.\n\n if (!this.sourceUpdater_.canChangeType()) {\n const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n } // the audio codec cannot change\n\n if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n }\n }\n if (exclusionReasons.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n }\n });\n }\n updateAdCues_(media) {\n let offset = 0;\n const seekable = this.seekable();\n if (seekable.length) {\n offset = seekable.start(0);\n }\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {number} Desired forward buffer length in seconds\n */\n\n goalBufferLength() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.GOAL_BUFFER_LENGTH;\n const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {number} Desired buffer low water line in seconds\n */\n\n bufferLowWaterLine() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.BUFFER_LOW_WATER_LINE;\n const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n }\n bufferHighWaterLine() {\n return Config.BUFFER_HIGH_WATER_LINE;\n }\n addDateRangesToTextTrack_(dateRanges) {\n createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n addDateRangeMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n dateRanges\n });\n }\n addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n // audio/video source with a metadata track, and an alt audio with a metadata track.\n // However, this probably won't happen, and if it does it can be handled then.\n\n createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n addMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n metadataArray,\n timestampOffset,\n videoDuration\n });\n }\n pathwayAttribute_(playlist) {\n return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n }\n /**\n * Initialize content steering listeners and apply the tag properties.\n */\n\n initContentSteeringController_() {\n const initialMain = this.main();\n if (!initialMain.contentSteering) {\n return;\n }\n const updateSteeringValues = main => {\n for (const playlist of main.playlists) {\n this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n }\n this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering);\n };\n updateSteeringValues(initialMain);\n this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new\n // manifest is loaded in live DASH with content steering.\n\n if (this.sourceType_ === 'dash') {\n this.mainPlaylistLoader_.on('mediaupdatetimeout', () => {\n this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id); // clear past values\n\n this.contentSteeringController_.abort();\n this.contentSteeringController_.clearTTLTimeout_();\n this.contentSteeringController_.clearAvailablePathways();\n updateSteeringValues(this.main());\n });\n } // Do this at startup only, after that the steering requests are managed by the Content Steering class.\n // DASH queryBeforeStart scenarios will be handled by the Content Steering class.\n\n if (!this.contentSteeringController_.queryBeforeStart) {\n this.tech_.one('canplay', () => {\n this.contentSteeringController_.requestSteeringManifest();\n });\n }\n }\n /**\n * Simple exclude and change playlist logic for content steering.\n */\n\n excludeThenChangePathway_() {\n const currentPathway = this.contentSteeringController_.getPathway();\n if (!currentPathway) {\n return;\n }\n const main = this.main();\n const playlists = main.playlists;\n const ids = new Set();\n let didEnablePlaylists = false;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key];\n const pathwayId = this.pathwayAttribute_(variant);\n const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n if (steeringExclusion && !differentPathwayId) {\n delete variant.excludeUntil;\n delete variant.lastExcludeReason_;\n didEnablePlaylists = true;\n }\n const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n if (!shouldExclude) {\n return;\n }\n ids.add(variant.id);\n variant.excludeUntil = Infinity;\n variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n });\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n Object.keys(this.mediaTypes_).forEach(key => {\n const type = this.mediaTypes_[key];\n if (type.activePlaylistLoader) {\n const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n didEnablePlaylists = true;\n }\n }\n });\n }\n if (didEnablePlaylists) {\n this.changeSegmentPathway_();\n }\n }\n /**\n * Changes the current playlists for audio, video and subtitles after a new pathway\n * is chosen from content steering.\n */\n\n changeSegmentPathway_() {\n const nextPlaylist = this.selectPlaylist();\n this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n this.switchMediaForDASHContentSteering_();\n }\n this.switchMedia_(nextPlaylist, 'content-steering');\n }\n}\n\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n const playlist = loader.main.playlists[playlistID];\n const incompatible = isIncompatible(playlist);\n const currentlyEnabled = isEnabled(playlist);\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n return enable;\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\nclass Representation {\n constructor(vhsHandler, playlist, id) {\n const {\n playlistController_: pc\n } = vhsHandler;\n const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n if (playlist.attributes) {\n const resolution = playlist.attributes.RESOLUTION;\n this.width = resolution && resolution.width;\n this.height = resolution && resolution.height;\n this.bandwidth = playlist.attributes.BANDWIDTH;\n this.frameRate = playlist.attributes['FRAME-RATE'];\n }\n this.codecs = codecsForPlaylist(pc.main(), playlist);\n this.playlist = playlist; // The id is simply the ordinality of the media playlist\n // within the main playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n }\n}\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n // Add a single API-specific function to the VhsHandler instance\n vhsHandler.representations = () => {\n const main = vhsHandler.playlistController_.main();\n const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n if (!playlists) {\n return [];\n }\n return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n /**\n * Represents an PlaybackWatcher object.\n *\n * @class\n * @param {Object} options an object that includes the tech and settings\n */\n constructor(options) {\n this.playlistController_ = options.playlistController;\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n const playHandler = () => this.monitorCurrentTime_();\n const canPlayHandler = () => this.monitorCurrentTime_();\n const waitingHandler = () => this.techWaiting_();\n const cancelTimerHandler = () => this.resetTimeUpdate_();\n const pc = this.playlistController_;\n const loaderTypes = ['main', 'subtitle', 'audio'];\n const loaderChecks = {};\n loaderTypes.forEach(type => {\n loaderChecks[type] = {\n reset: () => this.resetSegmentDownloads_(type),\n updateend: () => this.checkSegmentDownloads_(type)\n };\n pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n // isn't changing we want to reset. We cannot assume that the new rendition\n // will also be stalled, until after new appends.\n\n pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n // This prevents one segment playlists (single vtt or single segment content)\n // from being detected as stalling. As the buffer will not change in those cases, since\n // the buffer is the entire video duration.\n\n this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n /**\n * We check if a seek was into a gap through the following steps:\n * 1. We get a seeking event and we do not get a seeked event. This means that\n * a seek was attempted but not completed.\n * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n * removed everything from our buffer and appended a segment, and should be ready\n * to check for gaps.\n */\n\n const setSeekingHandlers = fn => {\n ['main', 'audio'].forEach(type => {\n pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n });\n };\n this.seekingAppendCheck_ = () => {\n if (this.fixesBadSeeks_()) {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = this.tech_.currentTime();\n setSeekingHandlers('off');\n }\n };\n this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n this.watchForBadSeeking_ = () => {\n this.clearSeekingAppendCheck_();\n setSeekingHandlers('on');\n };\n this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n this.tech_.on('seeking', this.watchForBadSeeking_);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler);\n /*\n An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n is surfaced in one of two ways:\n 1) The `waiting` event is fired before the player has buffered content, making it impossible\n to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n we can check if playback is stalled due to a gap, and skip the gap if necessary.\n 2) A source with a gap at the beginning of the stream is loaded programatically while the player\n is in a playing state. To catch this case, it's important that our one-time play listener is setup\n even if the player is in a playing state\n */\n\n this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n this.dispose = () => {\n this.clearSeekingAppendCheck_();\n this.logger_('dispose');\n this.tech_.off('waiting', waitingHandler);\n this.tech_.off(timerCancelEvents, cancelTimerHandler);\n this.tech_.off('canplay', canPlayHandler);\n this.tech_.off('play', playHandler);\n this.tech_.off('seeking', this.watchForBadSeeking_);\n this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n loaderTypes.forEach(type => {\n pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n }\n this.resetTimeUpdate_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n\n monitorCurrentTime_() {\n this.checkCurrentTime_();\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * Reset stalled download stats for a specific type of loader\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#playlistupdate\n * @listens Tech#seeking\n * @listens Tech#seeked\n */\n\n resetSegmentDownloads_(type) {\n const loader = this.playlistController_[`${type}SegmentLoader_`];\n if (this[`${type}StalledDownloads_`] > 0) {\n this.logger_(`resetting possible stalled download count for ${type} loader`);\n }\n this[`${type}StalledDownloads_`] = 0;\n this[`${type}Buffered_`] = loader.buffered_();\n }\n /**\n * Checks on every segment `appendsdone` to see\n * if segment appends are making progress. If they are not\n * and we are still downloading bytes. We exclude the playlist.\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#appendsdone\n */\n\n checkSegmentDownloads_(type) {\n const pc = this.playlistController_;\n const loader = pc[`${type}SegmentLoader_`];\n const buffered = loader.buffered_();\n const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n // the buffered value for this loader changed\n // appends are working\n\n if (isBufferedDifferent) {\n this.resetSegmentDownloads_(type);\n return;\n }\n this[`${type}StalledDownloads_`]++;\n this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n playlistId: loader.playlist_ && loader.playlist_.id,\n buffered: timeRangesToArray(buffered)\n }); // after 10 possibly stalled appends with no reset, exclude\n\n if (this[`${type}StalledDownloads_`] < 10) {\n return;\n }\n this.logger_(`${type} loader stalled download exclusion`);\n this.resetSegmentDownloads_(type);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-${type}-download-exclusion`\n });\n if (type === 'subtitle') {\n return;\n } // TODO: should we exclude audio tracks rather than main tracks\n // when type is audio?\n\n pc.excludePlaylist({\n error: {\n message: `Excessive ${type} segment downloading detected.`\n },\n playlistExclusionDuration: Infinity\n });\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n\n checkCurrentTime_() {\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n *\n * @private\n */\n\n resetTimeUpdate_() {\n this.consecutiveUpdates = 0;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {boolean} whether an action was taken to fix the seek\n * @private\n */\n\n fixesBadSeeks_() {\n const seeking = this.tech_.seeking();\n if (!seeking) {\n return false;\n } // TODO: It's possible that these seekable checks should be moved out of this function\n // and into a function that runs on seekablechange. It's also possible that we only need\n // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n // seekable range.\n\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n let seekTo;\n if (isAfterSeekableRange) {\n const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + (\n // if the playlist is too short and the seekable range is an exact time (can\n // happen in live with a 3 segment playlist), then don't use a time delta\n seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n }\n if (typeof seekTo !== 'undefined') {\n this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n const sourceUpdater = this.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n const media = this.media(); // verify that at least two segment durations or one part duration have been\n // appended before checking for a gap.\n\n const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n // appended before checking for a gap.\n\n const bufferedToCheck = [audioBuffered, videoBuffered];\n for (let i = 0; i < bufferedToCheck.length; i++) {\n // skip null buffered\n if (!bufferedToCheck[i]) {\n continue;\n }\n const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n // duration behind we haven't appended enough to call this a bad seek.\n\n if (timeAhead < minAppendedDuration) {\n return false;\n }\n }\n const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n // to seek over the gap\n\n if (nextRange.length === 0) {\n return false;\n }\n seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n\n waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime);\n this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n\n techWaiting_() {\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n if (this.tech_.seeking()) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const livePoint = seekable.end(seekable.length - 1);\n this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-live-resync'\n });\n return true;\n }\n const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const videoUnderflow = this.videoUnderflow_({\n audioBuffered: sourceUpdater.audioBuffered(),\n videoBuffered: sourceUpdater.videoBuffered(),\n currentTime\n });\n if (videoUnderflow) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-video-underflow'\n });\n return true;\n }\n const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n if (nextRange.length > 0) {\n this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n this.resetTimeUpdate_();\n this.skipTheGap_(currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n return false;\n }\n afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n const isLive = !playlist.endList;\n const isLLHLS = typeof playlist.partTargetDuration === 'number';\n if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n if (currentTime > allowedEnd) {\n return true;\n }\n return false;\n }\n beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length &&\n // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n return true;\n }\n return false;\n }\n videoUnderflow_({\n videoBuffered,\n audioBuffered,\n currentTime\n }) {\n // audio only content will not have video underflow :)\n if (!videoBuffered) {\n return;\n }\n let gap; // find a gap in demuxed content.\n\n if (videoBuffered.length && audioBuffered.length) {\n // in Chrome audio will continue to play for ~3s when we run out of video\n // so we have to check that the video buffer did have some buffer in the\n // past.\n const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n const videoRange = findRange(videoBuffered, currentTime);\n const audioRange = findRange(audioBuffered, currentTime);\n if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n gap = {\n start: lastVideoRange.end(0),\n end: audioRange.end(0)\n };\n } // find a gap in muxed content.\n } else {\n const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n\n if (!nextRange.length) {\n gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n }\n }\n if (gap) {\n this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n return true;\n }\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n\n skipTheGap_(scheduledCurrentTime) {\n const buffered = this.tech_.buffered();\n const currentTime = this.tech_.currentTime();\n const nextRange = findNextRange(buffered, currentTime);\n this.resetTimeUpdate_();\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-gap-skip'\n });\n }\n gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n const gaps = findGaps(buffered);\n for (let i = 0; i < gaps.length; i++) {\n const start = gaps.start(i);\n const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start,\n end\n };\n }\n }\n return null;\n }\n}\nconst defaultOptions = {\n errorInterval: 30,\n getSource(next) {\n const tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n const sourceObj = tech.currentSource_ || this.currentSource();\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nconst initPlugin = function (player, options) {\n let lastCalled = 0;\n let seekTo = 0;\n const localOptions = merge(defaultOptions, options);\n player.ready(() => {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n const loadedMetadataHandler = function () {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n const setSource = function (sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n const errorHandler = function () {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-canceled'\n });\n return;\n }\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n const cleanupEvents = function () {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n const reinitPlugin = function (newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nconst reloadSourceOnError = function (options) {\n initPlugin(this, options);\n};\nvar version$4 = \"3.7.0\";\nvar version$3 = \"7.0.1\";\nvar version$2 = \"1.2.2\";\nvar version$1 = \"7.1.0\";\nvar version = \"4.0.1\";\n\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the VHS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE\n */\nconst Vhs = {\n PlaylistLoader,\n Playlist,\n utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n lastBandwidthSelector,\n movingAverageBandwidthSelector,\n comparePlaylistBandwidth,\n comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n Object.defineProperty(Vhs, prop, {\n get() {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n return Config[prop];\n },\n set(value) {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n if (typeof value !== 'number' || value < 0) {\n videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n return;\n }\n Config[prop] = value;\n }\n });\n});\nconst LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n const newPlaylist = playlistLoader.media();\n let selectedIndex = -1;\n for (let i = 0; i < qualityLevels.length; i++) {\n if (qualityLevels[i].id === newPlaylist.id) {\n selectedIndex = i;\n break;\n }\n }\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n vhs.representations().forEach(rep => {\n qualityLevels.addQualityLevel(rep);\n });\n handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n if (!keySystemOptions) {\n return keySystemOptions;\n }\n let codecs = {};\n if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n }\n if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n codecs.audio = audioPlaylist.attributes.CODECS;\n }\n const videoContentType = getMimeForCodec(codecs.video);\n const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n const keySystemContentTypes = {};\n for (const keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {};\n if (audioContentType) {\n keySystemContentTypes[keySystem].audioContentType = audioContentType;\n }\n if (videoContentType) {\n keySystemContentTypes[keySystem].videoContentType = videoContentType;\n } // Default to using the video playlist's PSSH even though they may be different, as\n // videojs-contrib-eme will only accept one in the options.\n //\n // This shouldn't be an issue for most cases as early intialization will handle all\n // unique PSSH values, and if they aren't, then encrypted events should have the\n // specific information needed for the unique license.\n\n if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n * Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n * The playlists to look through\n * @param {string[]} keySystems\n * The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n * An array of KeySystems objects containing available key systems and their\n * pssh values\n */\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n return playlists.reduce((keySystemsArr, playlist) => {\n if (!playlist.contentProtection) {\n return keySystemsArr;\n }\n const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n const keySystemOptions = playlist.contentProtection[keySystem];\n if (keySystemOptions && keySystemOptions.pssh) {\n keySystemsObj[keySystem] = {\n pssh: keySystemOptions.pssh\n };\n }\n return keySystemsObj;\n }, {});\n if (Object.keys(keySystemsOptions).length) {\n keySystemsArr.push(keySystemsOptions);\n }\n return keySystemsArr;\n }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n * The playlists found on the main playlist object\n *\n * @return {Object}\n * Promise that resolves when the key session has been created\n */\n\nconst waitForKeySessionCreation = ({\n player,\n sourceKeySystems,\n audioMedia,\n mainPlaylists\n}) => {\n if (!player.eme.initializeMediaKeys) {\n return Promise.resolve();\n } // TODO should all audio PSSH values be initialized for DRM?\n //\n // All unique video rendition pssh values are initialized for DRM, but here only\n // the initial audio playlist license is initialized. In theory, an encrypted\n // event should be fired if the user switches to an alternative audio playlist\n // where a license is required, but this case hasn't yet been tested. In addition, there\n // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n // languages).\n\n const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n const initializationFinishedPromises = [];\n const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n // only place where it should not be deduped is for ms-prefixed APIs, but\n // the existence of modern EME APIs in addition to\n // ms-prefixed APIs on Edge should prevent this from being a concern.\n // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n keySystemsOptionsArr.forEach(keySystemsOptions => {\n keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n player.tech_.one('keysessioncreated', resolve);\n }));\n initializationFinishedPromises.push(new Promise((resolve, reject) => {\n player.eme.initializeMediaKeys({\n keySystems: keySystemsOptions\n }, err => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n }));\n }); // The reasons Promise.race is chosen over Promise.any:\n //\n // * Promise.any is only available in Safari 14+.\n // * None of these promises are expected to reject. If they do reject, it might be\n // better here for the race to surface the rejection, rather than mask it by using\n // Promise.any.\n\n return Promise.race([\n // If a session was previously created, these will all finish resolving without\n // creating a new session, otherwise it will take until the end of all license\n // requests, which is why the key session check is used (to make setup much faster).\n Promise.all(initializationFinishedPromises),\n // Once a single session is created, the browser knows DRM will be used.\n Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} media\n * The active media playlist\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n *\n * @return {boolean}\n * Whether or not options were configured and EME is available\n */\n\nconst setupEmeOptions = ({\n player,\n sourceKeySystems,\n media,\n audioMedia\n}) => {\n const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n if (!sourceOptions) {\n return false;\n }\n player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n // do nothing.\n\n if (sourceOptions && !player.eme) {\n videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n return false;\n }\n return true;\n};\nconst getVhsLocalStorage = () => {\n if (!window$1.localStorage) {\n return null;\n }\n const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedObject) {\n return null;\n }\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\nconst updateVhsLocalStorage = options => {\n if (!window$1.localStorage) {\n return false;\n }\n let objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? merge(objectToStore, options) : options;\n try {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n * The data URI\n *\n * @return {string|Object}\n * The parsed object/string, or the original string if no supported media type\n * was found\n */\n\nconst expandDataUri = dataUri => {\n if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n } // no known case for this data URI, return the string as-is\n\n return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nconst addOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n xhr._requestCallbackSet = new Set();\n }\n xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nconst addOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n xhr._responseCallbackSet = new Set();\n }\n xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n return;\n }\n xhr._requestCallbackSet.delete(callback);\n if (!xhr._requestCallbackSet.size) {\n delete xhr._requestCallbackSet;\n }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n return;\n }\n xhr._responseCallbackSet.delete(callback);\n if (!xhr._responseCallbackSet.size) {\n delete xhr._responseCallbackSet;\n }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n if (!document || !document.createElement) {\n return false;\n }\n const video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n const canPlay = [\n // Apple santioned\n 'application/vnd.apple.mpegurl',\n // Apple sanctioned for backwards compatibility\n 'audio/mpegurl',\n // Very common\n 'audio/x-mpegurl',\n // Very common\n 'application/x-mpegurl',\n // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\nVhs.supportsNativeDash = function () {\n if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n return false;\n }\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = type => {\n if (type === 'hls') {\n return Vhs.supportsNativeHls;\n }\n if (type === 'dash') {\n return Vhs.supportsNativeDash;\n }\n return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n removeOnResponseHook(Vhs.xhr, callback);\n};\nconst Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nclass VhsHandler extends Component {\n constructor(source, tech, options) {\n super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n // use that over the VHS level `bandwidth` option\n\n if (typeof options.initialBandwidth === 'number') {\n this.options_.bandwidth = options.initialBandwidth;\n }\n this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n // so, get it from Video.js via the `playerId`\n\n if (tech.options_ && tech.options_.playerId) {\n const _player = videojs.getPlayer(tech.options_.playerId);\n this.player_ = _player;\n }\n this.tech_ = tech;\n this.source_ = source;\n this.stats = {};\n this.ignoreNextSeekingEvent_ = false;\n this.setOptions_();\n if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native VHS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n this.playlistController_.fastQualityChange_();\n } else {\n // When leaving fullscreen, since the in page pixel dimensions should be smaller\n // than full screen, see if there should be a rendition switch down to preserve\n // bandwidth.\n this.playlistController_.checkABR_();\n }\n });\n this.on(this.tech_, 'seeking', function () {\n if (this.ignoreNextSeekingEvent_) {\n this.ignoreNextSeekingEvent_ = false;\n return;\n }\n this.setCurrentTime(this.tech_.currentTime());\n });\n this.on(this.tech_, 'error', function () {\n // verify that the error was real and we are loaded\n // enough to have pc loaded.\n if (this.tech_.error() && this.playlistController_) {\n this.playlistController_.pauseLoading();\n }\n });\n this.on(this.tech_, 'play', this.play);\n }\n setOptions_() {\n // defaults\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n this.options_.llhls = this.options_.llhls === false ? false : true;\n this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n if (typeof this.options_.playlistExclusionDuration !== 'number') {\n this.options_.playlistExclusionDuration = 60;\n }\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n const storedObject = getVhsLocalStorage();\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-bandwidth-from-local-storage'\n });\n }\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n if (typeof this.source_[option] !== 'undefined') {\n this.options_[option] = this.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n\n src(src, type) {\n // do nothing if the src is falsey\n if (!src) {\n return;\n }\n this.setOptions_(); // add main playlist controller options\n\n this.options_.src = expandDataUri(this.source_.src);\n this.options_.tech = this.tech_;\n this.options_.externVhs = Vhs;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n this.options_.seekTo = time => {\n this.tech_.setCurrentTime(time);\n };\n this.playlistController_ = new PlaylistController(this.options_);\n const playbackWatcherOptions = merge({\n liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n }, this.options_, {\n seekable: () => this.seekable(),\n media: () => this.playlistController_.media(),\n playlistController: this.playlistController_\n });\n this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n this.playlistController_.on('error', () => {\n const player = videojs.players[this.tech_.options_.playerId];\n let error = this.playlistController_.error;\n if (typeof error === 'object' && !error.code) {\n error.code = 3;\n } else if (typeof error === 'string') {\n error = {\n message: error,\n code: 3\n };\n }\n player.error(error);\n });\n const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n // compatibility with < v2\n\n this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.playlistController_.mainPlaylistLoader_;\n this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get() {\n return this.playlistController_.selectPlaylist;\n },\n set(selectPlaylist) {\n this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get() {\n return this.playlistController_.mainSegmentLoader_.throughput.rate;\n },\n set(throughput) {\n this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get() {\n let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n const tenMbpsAsBitsPerSecond = 10e6;\n if (this.options_.useNetworkInformationApi && networkInformation) {\n // downlink returns Mbps\n // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n // high quality streams are not filtered out.\n\n if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n } else {\n playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n }\n }\n return playerBandwidthEst;\n },\n set(bandwidth) {\n this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get() {\n const invBandwidth = 1 / (this.bandwidth || 1);\n let invThroughput;\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set() {\n videojs.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: () => this.bandwidth || 0,\n enumerable: true\n },\n mediaRequests: {\n get: () => this.playlistController_.mediaRequests_() || 0,\n enumerable: true\n },\n mediaRequestsAborted: {\n get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n enumerable: true\n },\n mediaRequestsErrored: {\n get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n enumerable: true\n },\n mediaTransferDuration: {\n get: () => this.playlistController_.mediaTransferDuration_() || 0,\n enumerable: true\n },\n mediaBytesTransferred: {\n get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n enumerable: true\n },\n mediaAppends: {\n get: () => this.playlistController_.mediaAppends_() || 0,\n enumerable: true\n },\n mainAppendsToLoadedData: {\n get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n enumerable: true\n },\n audioAppendsToLoadedData: {\n get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n enumerable: true\n },\n appendsToLoadedData: {\n get: () => this.playlistController_.appendsToLoadedData_() || 0,\n enumerable: true\n },\n timeToLoadedData: {\n get: () => this.playlistController_.timeToLoadedData_() || 0,\n enumerable: true\n },\n buffered: {\n get: () => timeRangesToArray(this.tech_.buffered()),\n enumerable: true\n },\n currentTime: {\n get: () => this.tech_.currentTime(),\n enumerable: true\n },\n currentSource: {\n get: () => this.tech_.currentSource_,\n enumerable: true\n },\n currentTech: {\n get: () => this.tech_.name_,\n enumerable: true\n },\n duration: {\n get: () => this.tech_.duration(),\n enumerable: true\n },\n main: {\n get: () => this.playlists.main,\n enumerable: true\n },\n playerDimensions: {\n get: () => this.tech_.currentDimensions(),\n enumerable: true\n },\n seekable: {\n get: () => timeRangesToArray(this.tech_.seekable()),\n enumerable: true\n },\n timestamp: {\n get: () => Date.now(),\n enumerable: true\n },\n videoPlaybackQuality: {\n get: () => this.tech_.getVideoPlaybackQuality(),\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n this.tech_.on('bandwidthupdate', () => {\n if (this.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: this.bandwidth,\n throughput: Math.round(this.throughput)\n });\n }\n });\n this.playlistController_.on('selectedinitialmedia', () => {\n // Add the manual rendition mix-in to VhsHandler\n renditionSelectionMixin(this);\n });\n this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n this.setupEme_();\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.playlistController_, 'progress', function () {\n this.tech_.trigger('progress');\n }); // In the live case, we need to ignore the very first `seeking` event since\n // that will be the result of the seek-to-live behavior\n\n this.on(this.playlistController_, 'firstplay', function () {\n this.ignoreNextSeekingEvent_ = true;\n });\n this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n this.tech_.src(this.mediaSourceUrl_);\n }\n createKeySessions_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n this.logger_('waiting for EME key session creation');\n waitForKeySessionCreation({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n mainPlaylists: this.playlists.main.playlists\n }).then(() => {\n this.logger_('created EME key session');\n this.playlistController_.sourceUpdater_.initializedEme();\n }).catch(err => {\n this.logger_('error while creating EME key session', err);\n this.player_.error({\n message: 'Failed to initialize media keys for EME',\n code: 3\n });\n });\n }\n handleWaitingForKey_() {\n // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n // the key is in the manifest. While this should've happened on initial source load, it\n // may happen again in live streams where the keys change, and the manifest info\n // reflects the update.\n //\n // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n // already requested keys for, we don't have to worry about this generating extraneous\n // requests.\n this.logger_('waitingforkey fired, attempting to create any new key sessions');\n this.createKeySessions_();\n }\n /**\n * If necessary and EME is available, sets up EME options and waits for key session\n * creation.\n *\n * This function also updates the source updater so taht it can be used, as for some\n * browsers, EME must be configured before content is appended (if appending unencrypted\n * content before encrypted content).\n */\n\n setupEme_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n const didSetupEmeOptions = setupEmeOptions({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n media: this.playlists.media(),\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n });\n this.player_.tech_.on('keystatuschange', e => {\n if (e.status !== 'output-restricted') {\n return;\n }\n const mainPlaylist = this.playlistController_.main();\n if (!mainPlaylist || !mainPlaylist.playlists) {\n return;\n }\n const excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection\n\n mainPlaylist.playlists.forEach(playlist => {\n if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) {\n if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {\n playlist.excludeUntil = Infinity;\n excludedHDPlaylists.push(playlist);\n }\n }\n });\n if (excludedHDPlaylists.length) {\n videojs.log.warn('DRM keystatus changed to \"output-restricted.\" Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.', ...excludedHDPlaylists); // Clear the buffer before switching playlists, since it may already contain unplayable segments\n\n this.playlistController_.mainSegmentLoader_.resetEverything();\n this.playlistController_.fastQualityChange_();\n }\n });\n this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n if (!didSetupEmeOptions) {\n // If EME options were not set up, we've done all we could to initialize EME.\n this.playlistController_.sourceUpdater_.initializedEme();\n return;\n }\n this.createKeySessions_();\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n\n setupQualityLevels_() {\n const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n // or qualityLevels_ listeners have already been setup, do nothing.\n\n if (!player || !player.qualityLevels || this.qualityLevels_) {\n return;\n }\n this.qualityLevels_ = player.qualityLevels();\n this.playlistController_.on('selectedinitialmedia', () => {\n handleVhsLoadedMetadata(this.qualityLevels_, this);\n });\n this.playlists.on('mediachange', () => {\n handleVhsMediaChange(this.qualityLevels_, this.playlists);\n });\n }\n /**\n * return the version\n */\n\n static version() {\n return {\n '@videojs/http-streaming': version$4,\n 'mux.js': version$3,\n 'mpd-parser': version$2,\n 'm3u8-parser': version$1,\n 'aes-decrypter': version\n };\n }\n /**\n * return the version\n */\n\n version() {\n return this.constructor.version();\n }\n canChangeType() {\n return SourceUpdater.canChangeType();\n }\n /**\n * Begin playing the video.\n */\n\n play() {\n this.playlistController_.play();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n setCurrentTime(currentTime) {\n this.playlistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n duration() {\n return this.playlistController_.duration();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n seekable() {\n return this.playlistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n\n dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n if (this.playlistController_) {\n this.playlistController_.dispose();\n }\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n if (this.tech_ && this.tech_.vhs) {\n delete this.tech_.vhs;\n }\n if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n this.mediaSourceUrl_ = null;\n }\n if (this.tech_) {\n this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n }\n super.dispose();\n }\n convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.playlistController_.media(),\n time,\n callback\n });\n } // the player must be playing before calling this\n\n seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n return seekToProgramTime({\n programTime,\n playlist: this.playlistController_.media(),\n retryCount,\n pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback\n });\n }\n /**\n * Adds the onRequest, onResponse, offRequest and offResponse functions\n * to the VhsHandler xhr Object.\n */\n\n setupXhrHooks_() {\n /**\n * A player function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n this.xhr.onRequest = callback => {\n addOnRequestHook(this.xhr, callback);\n };\n /**\n * A player function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\n this.xhr.onResponse = callback => {\n addOnResponseHook(this.xhr, callback);\n };\n /**\n * Deletes a player onRequest callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offRequest = callback => {\n removeOnRequestHook(this.xhr, callback);\n };\n /**\n * Deletes a player onResponse callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offResponse = callback => {\n removeOnResponseHook(this.xhr, callback);\n }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n this.player_.trigger('xhr-hooks-ready');\n }\n}\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\nconst VhsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$4,\n canHandleSource(srcObj, options = {}) {\n const localOptions = merge(videojs.options, options);\n return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource(source, tech, options = {}) {\n const localOptions = merge(videojs.options, options);\n tech.vhs = new VhsHandler(source, tech, localOptions);\n tech.vhs.xhr = xhrFactory();\n tech.vhs.setupXhrHooks_();\n tech.vhs.src(source.src, source.type);\n return tech.vhs;\n },\n canPlayType(type, options) {\n const simpleType = simpleTypeFromSourceType(type);\n if (!simpleType) {\n return '';\n }\n const overrideNative = VhsSourceHandler.getOverrideNative(options);\n const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n return canUseMsePlayback ? 'maybe' : '';\n },\n getOverrideNative(options = {}) {\n const {\n vhs = {}\n } = options;\n const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n const {\n overrideNative = defaultOverrideNative\n } = vhs;\n return overrideNative;\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { videojs as default };\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n WebVTT: require(\"./vtt.js\"),\n VTTCue: require(\"./vttcue.js\"),\n VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n window.VTTCue = cueShim;\n window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n window.VTTCue = nativeVTTCue;\n window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n vttjs.shim();\n}\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\n\nvar _objCreate = Object.create || (function() {\n function F() {}\n return function(o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function(k, v) {\n if (/^-?\\d+$/.test(v)) { // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function(k, v) {\n var m;\n if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n var kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n var k = kv[0].trim();\n var v = kv[1].trim();\n callback(k, v);\n }\n}\n\nfunction parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed timestamp: \" + oInput);\n }\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"size\":\n settings.percent(k, v);\n break;\n case \"align\":\n settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n try {\n cue.line = settings.get(\"line\", \"auto\");\n } catch (e) {}\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n // Safari still uses the old middle value and won't accept center\n try {\n cue.align = settings.get(\"align\", \"center\");\n } catch (e) {\n cue.align = settings.get(\"align\", \"middle\");\n }\n try {\n cue.position = settings.get(\"position\", \"auto\");\n } catch (e) {\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n center: 50,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n }\n\n\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n center: \"center\",\n middle: \"center\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== \"-->\") { // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n white: 'rgba(255,255,255,1)',\n lime: 'rgba(0,255,0,1)',\n cyan: 'rgba(0,255,255,1)',\n red: 'rgba(255,0,0,1)',\n yellow: 'rgba(255,255,0,1)',\n magenta: 'rgba(255,0,255,1)',\n blue: 'rgba(0,0,255,1)',\n black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n }\n\n // Consume 'n' characters from the input.\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n\n var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n // If there is some text before the next tag, return it, otherwise return\n // the tag.\n return consume(m[1] ? m[1] : m[2]);\n }\n\n function unescape(s) {\n TEXTAREA_ELEMENT.innerHTML = s;\n s = TEXTAREA_ELEMENT.textContent;\n TEXTAREA_ELEMENT.textContent = \"\";\n return s;\n }\n\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] ||\n NEEDS_PARENT[element.localName] === current.localName;\n }\n\n // Create an element for this tag.\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n if (!tagName) {\n return null;\n }\n var element = window.document.createElement(tagName);\n var name = TAG_ANNOTATION[type];\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n return element;\n }\n\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length &&\n tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n }\n // Otherwise just ignore the end tag.\n continue;\n }\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n // If we can't parse the tag, skip to the next tag.\n if (!m) {\n continue;\n }\n // Try to construct an element, and ignore the tag if we couldn't.\n node = createElement(m[1], m[3]);\n if (!node) {\n continue;\n }\n // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n if (!shouldAdd(current, node)) {\n continue;\n }\n // Set the class list (as a list of classes, separated by space).\n if (m[2]) {\n var classes = m[2].split('.');\n\n classes.forEach(function(cl) {\n var bgColor = /^bg_/.test(cl);\n // slice out `bg_` if it's a background color\n var colorName = bgColor ? cl.slice(3) : cl;\n\n if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n var propName = bgColor ? 'background-color' : 'color';\n var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n node.style[propName] = propValue;\n }\n });\n\n node.className = classes.join(' ');\n }\n // Append the node to the current node, and enter the scope of the new\n // node.\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n }\n\n // Text nodes are leaf nodes.\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n\n return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n for (var i = 0; i < strongRTLRanges.length; i++) {\n var currentRange = strongRTLRanges[i];\n if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n return text;\n }\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n\n pushNodes(nodeStack, cueDiv);\n while ((text = nextTextNode(nodeStack))) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n if (isStrongRTLChar(charCode)) {\n return \"rtl\";\n }\n }\n }\n return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n if (typeof cue.line === \"number\" &&\n (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n return cue.line;\n }\n if (!cue.track || !cue.track.textTrackList ||\n !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n div = div || this.div;\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n StyleBox.call(this);\n this.cue = cue;\n\n // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: \"rgba(255, 255, 255, 1)\",\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\",\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\"\n };\n\n this.applyStyles(styles, this.cueDiv);\n\n // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except middle instead of center on Safari.\n this.div = window.document.createElement(\"div\");\n styles = {\n direction: determineBidi(this.cueDiv),\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\",\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n\n this.applyStyles(styles);\n this.div.appendChild(this.cueDiv);\n\n // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n var textPos = 0;\n switch (cue.positionAlign) {\n case \"start\":\n case \"line-left\":\n textPos = cue.position;\n break;\n case \"center\":\n textPos = cue.position - (cue.size / 2);\n break;\n case \"end\":\n case \"line-right\":\n textPos = cue.position - cue.size;\n break;\n }\n\n // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\")\n });\n // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n\n this.move = function(box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\")\n });\n };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect();\n // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n : 0;\n\n }\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || (top + (obj.height || height));\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n return this.left < b2.right &&\n this.right > b2.left &&\n this.top < b2.bottom &&\n this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n return this.top >= container.top &&\n this.bottom <= container.bottom &&\n this.left >= container.left &&\n this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n case \"-x\":\n return this.right > container.right;\n case \"+y\":\n return this.top < container.top;\n case \"-y\":\n return this.bottom > container.bottom;\n }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n obj = obj.div ? obj.div.getBoundingClientRect() :\n obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || (top + (obj.height || height)),\n width: obj.width || width\n };\n return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n b.move(axis[i]);\n }\n // We found a spot where we aren't overlapping anything. This is our\n // best position.\n if (b.within(containerBox)) {\n return b;\n }\n var p = b.intersectPercentage(containerBox);\n // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n }\n // Reset the box position to the specified position.\n b = new BoxPosition(specifiedPosition);\n }\n return bestPosition || specifiedPosition;\n }\n\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = [];\n\n // If we have a line number to align the cue to.\n if (cue.snapToLines) {\n var size;\n switch (cue.vertical) {\n case \"\":\n axis = [ \"+y\", \"-y\" ];\n size = \"height\";\n break;\n case \"rl\":\n axis = [ \"+x\", \"-x\" ];\n size = \"width\";\n break;\n case \"lr\":\n axis = [ \"-x\", \"+x\" ];\n size = \"width\";\n break;\n }\n\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0];\n\n // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n }\n\n // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n }\n\n // Move the box to the specified position. This may not be its best\n // position.\n boxPosition.move(initialAxis, position);\n\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n switch (cue.lineAlign) {\n case \"center\":\n linePos -= (calculatedPercentage / 2);\n break;\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n }\n\n // Apply initial line position to the cue box.\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n\n axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n // Get the box position again after we've applied the specified positioning\n // to it.\n boxPosition = new BoxPosition(styleBox);\n }\n\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n return {\n decode: function(data) {\n if (!data) {\n return \"\";\n }\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n// and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n }\n\n // Remove all previous children.\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay);\n\n // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }\n\n // We don't need to recompute the cues' display states. Just reuse them.\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n return;\n }\n\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n\n (function() {\n var styleBox, cue;\n\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i];\n\n // Compute the intial position and styles of the cue div.\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div);\n\n // Move the cue div to it's correct line position.\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n cue.displayState = styleBox.div;\n\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n if (!vttjs) {\n vttjs = {};\n }\n\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function (data) {\n var self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {stream: true});\n }\n\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n var line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.4 WebVTT region and WebVTT region settings syntax\n function parseRegion(input) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n case \"width\":\n settings.percent(k, v);\n break;\n case \"lines\":\n settings.integer(k, v);\n break;\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n if (xy.length !== 2) {\n break;\n }\n // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/);\n\n // Create the region, using default values for any values that were not\n // specified.\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\");\n // Register the region.\n self.onregion && self.onregion(region);\n // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n }\n\n // draft-pantos-http-live-streaming-20\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n // 3.5 WebVTT\n function parseTimestampMap(input) {\n var settings = new Settings();\n\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"MPEGT\":\n settings.integer(k + 'S', v);\n break;\n case \"LOCA\":\n settings.set(k + 'L', parseTimeStamp(v));\n break;\n }\n }, /[^\\d]:/, /,/);\n\n self.ontimestampmap && self.ontimestampmap({\n \"MPEGTS\": settings.get(\"MPEGTS\"),\n \"LOCAL\": settings.get(\"LOCAL\")\n });\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader(input) {\n if (input.match(/X-TIMESTAMP-MAP/)) {\n // This line contains HLS X-TIMESTAMP-MAP metadata\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"X-TIMESTAMP-MAP\":\n parseTimestampMap(v);\n break;\n }\n }, /=/);\n } else {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n\n }\n\n // 5.1 WebVTT file parsing.\n try {\n var line;\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n\n self.state = \"HEADER\";\n }\n\n var alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n continue;\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n // Safari still uses the old middle value and won't accept center\n try {\n self.cue.align = \"center\";\n } catch (e) {\n self.cue.align = \"middle\";\n }\n self.state = \"CUE\";\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /*falls through*/\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e);\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n self.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n continue;\n case \"BADCUE\": // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e);\n\n // If we are currently parsing a cue, report what we have.\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n },\n flush: function () {\n var self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch(e) {\n self.reportOrThrowError(e);\n }\n self.onflush && self.onflush();\n return this;\n }\n};\n\nmodule.exports = WebVTT;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n \"\": 1,\n \"lr\": 1,\n \"rl\": 1\n};\nvar alignSetting = {\n \"start\": 1,\n \"center\": 1,\n \"end\": 1,\n \"left\": 1,\n \"right\": 1,\n \"auto\": 1,\n \"line-left\": 1,\n \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n this.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = \"auto\";\n var _positionAlign = \"auto\";\n var _size = 100;\n var _align = \"center\";\n\n Object.defineProperties(this, {\n \"id\": {\n enumerable: true,\n get: function() {\n return _id;\n },\n set: function(value) {\n _id = \"\" + value;\n }\n },\n\n \"pauseOnExit\": {\n enumerable: true,\n get: function() {\n return _pauseOnExit;\n },\n set: function(value) {\n _pauseOnExit = !!value;\n }\n },\n\n \"startTime\": {\n enumerable: true,\n get: function() {\n return _startTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n _startTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"endTime\": {\n enumerable: true,\n get: function() {\n return _endTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n _endTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"text\": {\n enumerable: true,\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n },\n\n \"region\": {\n enumerable: true,\n get: function() {\n return _region;\n },\n set: function(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n },\n\n \"vertical\": {\n enumerable: true,\n get: function() {\n return _vertical;\n },\n set: function(value) {\n var setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n }\n _vertical = setting;\n this.hasBeenReset = true;\n }\n },\n\n \"snapToLines\": {\n enumerable: true,\n get: function() {\n return _snapToLines;\n },\n set: function(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n },\n\n \"line\": {\n enumerable: true,\n get: function() {\n return _line;\n },\n set: function(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n }\n _line = value;\n this.hasBeenReset = true;\n }\n },\n\n \"lineAlign\": {\n enumerable: true,\n get: function() {\n return _lineAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n } else {\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"position\": {\n enumerable: true,\n get: function() {\n return _position;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n _position = value;\n this.hasBeenReset = true;\n }\n },\n\n \"positionAlign\": {\n enumerable: true,\n get: function() {\n return _positionAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n } else {\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"size\": {\n enumerable: true,\n get: function() {\n return _size;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n _size = value;\n this.hasBeenReset = true;\n }\n },\n\n \"align\": {\n enumerable: true,\n get: function() {\n return _align;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n }\n _align = setting;\n this.hasBeenReset = true;\n }\n }\n });\n\n /**\n * Other spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n \"\": true,\n \"up\": true\n};\n\nfunction findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function() {\n return _lines;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function() {\n return _regionAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function() {\n return _regionAnchorX;\n },\n set: function(value) {\n if(!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorX;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function() {\n return _scroll;\n },\n set: function(value) {\n var setting = findScrollSetting(value);\n // Have to check for false as an empty string is a legal value.\n if (setting === false) {\n console.warn(\"Scroll: an invalid or illegal string was specified.\");\n } else {\n _scroll = setting;\n }\n }\n }\n });\n}\n\nmodule.exports = VTTRegion;\n","/* (ignored) */","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * Dom7 4.0.6\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2023, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: February 2, 2023\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n if (typeof items === 'number') {\n super(items);\n } else {\n super(...(items || []));\n makeReactive(this);\n }\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionStart(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionstart', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionstart', fireCallBack);\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, transitionStart, trigger, val, value, width };\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","import { getWindow } from 'ssr-window';\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n\n return breakpoint || 'max';\n}","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\nexport default {\n setBreakpoint,\n getBreakpoint\n};","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const {\n activeIndex,\n initialized,\n loopedSlides = 0,\n params,\n $el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters\n\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n\n swiper.emitContainerClasses();\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}","function checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\n\nexport default {\n checkOverflow\n};","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n $el,\n device,\n support\n } = swiper; // prettier-ignore\n\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'pointer-events': !support.touch\n }, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\nexport default {\n addClasses,\n removeClasses\n};","export default function removeClasses() {\n const swiper = this;\n const {\n $el,\n classNames\n } = swiper;\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\nimport eventsEmitter from './events-emitter.js';\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images\n};\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n } // Swiper Instance\n\n\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n }); // Extend defaults with modules params\n\n const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params\n\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params); // add event listeners\n\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n } // Save Dom lib\n\n\n swiper.$ = $; // Extend Swiper\n\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEvents: function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3]\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2]\n };\n return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper'); // Init\n\n if (swiper.params.init) {\n swiper.init();\n } // Return app instance\n\n\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n let translated;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (!translated) {\n setTranslate();\n }\n }\n\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n\n swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.each(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true; // Find el\n\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items\n\n res.children = options => $el.children(options);\n\n return res;\n }\n\n return $el.children(getWrapperSelector());\n }; // Find Wrapper\n\n\n let $wrapperEl = getWrapper();\n\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each(slideEl => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box'\n });\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit'); // Set breakpoint\n\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n } // Add Classes\n\n\n swiper.addClasses(); // Create loop\n\n if (swiper.params.loop) {\n swiper.loopCreate();\n } // Update size\n\n\n swiper.updateSize(); // Update slides\n\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n } // Set Grab Cursor\n\n\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n } // Slide To Initial Slide\n\n\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n } // Attach events\n\n\n swiper.attachEvents(); // Init Flag\n\n swiper.initialized = true; // Emit\n\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n $el,\n $wrapperEl,\n slides\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy'); // Init Flag\n\n swiper.initialized = false; // Detach events\n\n swiper.detachEvents(); // Destroy loop\n\n if (params.loop) {\n swiper.loopDestroy();\n } // Cleanup styles\n\n\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n\n if (slides && slides.length) {\n slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy'); // Detach emitter events\n\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n\n swiper.destroyed = true;\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n\n Swiper.installModule(module);\n return Swiper;\n }\n\n}\n\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\nexport default Swiper;","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};","/* eslint-disable no-underscore-dangle */\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n\n function onceHandler(...args) {\n self.off(events, onceHandler);\n\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n\n handler.apply(self, args);\n }\n\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n};","import { getDocument } from 'ssr-window';\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\nlet dummyEventAttached = false;\n\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n touchEvents,\n el,\n wrapperEl,\n device,\n support\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method; // Touch Events\n\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? {\n passive: false,\n capture\n } : capture);\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n } // Prevent Links Clicks\n\n\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n } // Resize handler\n\n\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n support\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents\n};","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}","export default function onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n } // Save locks\n\n\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper; // Disable locks on resize\n\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n } // Return locks after resize\n\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}","export default function onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n } // eslint-disable-next-line\n\n\n if (swiper.translate === -0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}","import { now, nextTick } from '../../shared/utils.js';\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n\n data.allowTouchCallbacks = false;\n\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n\n data.isMoved = false;\n data.startMoving = false;\n return;\n } // Return Grab Cursor\n\n\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n } // Time diff\n\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click\n\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);\n swiper.emit('tap click', e);\n\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n } // Find current slide\n\n\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n } // Find current slide size\n\n\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n return;\n }\n\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n\n return;\n }\n\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n\n if (!data.startMoving) {\n return;\n }\n\n swiper.allowClick = false;\n\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n\n data.allowMomentumBounce = false; // Grab Cursor\n\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n\n swiper.emit('sliderFirstMove', e);\n }\n\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n } // Directions locks\n\n\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n } // Threshold\n\n\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return; // Update active index in free mode\n\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n } // Update progress\n\n\n swiper.updateProgress(data.currentTranslate); // Update translate\n\n swiper.setTranslate(data.currentTranslate);\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js'; // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\n\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return; // change target el for shadow root component\n\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element\n\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n\n if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) {\n e.preventDefault();\n }\n }\n\n swiper.emit('touchStart', e);\n}","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\nexport default {\n setGrabCursor,\n unsetGrabCursor\n};","export default function setGrabCursor(moving) {\n const swiper = this;\n if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}","export default function unsetGrabCursor() {\n const swiper = this;\n\n if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\nexport default {\n loadImage,\n preloadImages\n};","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n\n function onReady() {\n if (callback) callback();\n }\n\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n\n if (sizes) {\n image.sizes = sizes;\n }\n\n if (srcset) {\n image.srcset = srcset;\n }\n\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n }\n}","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\nexport default {\n loopCreate,\n loopFix,\n loopDestroy\n};","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n $wrapperEl\n } = swiper; // Remove duplicated slides\n\n const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl;\n $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n let slides = $selector.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $selector.append(blankNode);\n }\n\n slides = $selector.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n\n slide.attr('data-swiper-slide-index', index);\n });\n\n for (let i = 0; i < appendSlides.length; i += 1) {\n $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}","export default function loopDestroy() {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n slides\n } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}","export default function loopFix() {\n const swiper = this;\n swiper.emit('beforeLoopFix');\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding\n\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n}","import { extend } from '../shared/utils.js';\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) {\n params[moduleParamName] = {\n auto: true\n };\n }\n\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}","import { getWindow } from 'ssr-window';\nexport default function Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n\n const init = () => {\n if (!swiper.params.observer) return;\n\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n } // Observe container\n\n\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren\n }); // Observe wrapper\n\n attach(swiper.$wrapperEl[0], {\n attributes: false\n });\n };\n\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}","import { getWindow } from 'ssr-window';\nexport default function Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n animating,\n enabled,\n params\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n animating,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n\n let prevIndex = 0;\n\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n\n if (params.rewind && swiper.isBeginning) {\n return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);\n } // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n\n\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex]; // Update progress\n\n swiper.updateProgress(translate); // Normalize slideIndex\n\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n } // Directions locks\n\n\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index\n\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex); // Update Height\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n swiper.updateSlidesClasses();\n\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n\n return false;\n }\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._swiperImmediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n\n return true;\n}","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nexport default function slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n $wrapperEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}","export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\nexport default {\n setTransition,\n transitionStart,\n transitionEnd\n};","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}","export default function transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n\n swiper.emit(`slideChangeTransition${step}`);\n\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}","import { getTranslate } from '../../shared/utils.js';\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n $wrapperEl\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}","export default function minTranslate() {\n return -this.snapGrid[0];\n}","export default function setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n $wrapperEl,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress\n\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n } // Normalize slideIndex\n\n\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n\n return;\n } // Get real index\n\n\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];\n }\n\n return swiper.slides.eq(index)[0];\n }; // Find slides currently in view\n\n\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n } // Find new height from highest slide in view\n\n\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n } // Update Height\n\n\n if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}","import $ from '../../shared/dom.js';\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}","export default function updateProgress(translate) {\n const swiper = this;\n\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line\n\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n } // Subtract paddings\n\n\n width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10);\n height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}","import { setCSSProperty } from '../../shared/utils.js';\nexport default function updateSlides() {\n const swiper = this;\n\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n } // prettier-ignore\n\n\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n const {\n $wrapperEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n\n if (typeof swiperSize === 'undefined') {\n return;\n }\n\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween; // reset margins\n\n if (rtl) slides.css({\n marginLeft: '',\n marginBottom: '',\n marginTop: ''\n });else slides.css({\n marginRight: '',\n marginBottom: '',\n marginTop: ''\n }); // reset cssMode offsets\n\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n } // Calc slides\n\n\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide[0];\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({\n width: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n } // Remove last grid elements depending on width\n\n\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n\n snapGrid = newSlidesGrid;\n\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n\n if (slideIndex === slides.length - 1) {\n return false;\n }\n\n return true;\n }).css({\n [key]: `${spaceBetween}px`\n });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}","export default function updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n $wrapperEl,\n activeIndex,\n realIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n let activeSlide;\n\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n } // Active classes\n\n\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n }\n } // Next Slide\n\n\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n } // Prev Slide\n\n\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n }\n\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n }\n }\n\n swiper.emitSlidesClasses();\n}","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate; // Visible Slides\n\n slides.removeClass(params.slideVisibleClass);\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n\n swiper.visibleSlides = $(swiper.visibleSlides);\n}","import classesToSelector from '../../shared/classes-to-selector.js';\nimport $ from '../../shared/dom.js';\nexport default function A11y({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n a11y: {\n enabled: true,\n notificationClass: 'swiper-notification',\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n slideLabelMessage: '{{index}} / {{slidesLength}}',\n containerMessage: null,\n containerRoleDescriptionMessage: null,\n itemRoleDescriptionMessage: null,\n slideRole: 'group'\n }\n });\n let liveRegion = null;\n\n function notify(message) {\n const notification = liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n }\n\n function getRandomNumber(size = 16) {\n const randomChar = () => Math.round(16 * Math.random()).toString(16);\n\n return 'x'.repeat(size).replace(/x/g, randomChar);\n }\n\n function makeElFocusable($el) {\n $el.attr('tabIndex', '0');\n }\n\n function makeElNotFocusable($el) {\n $el.attr('tabIndex', '-1');\n }\n\n function addElRole($el, role) {\n $el.attr('role', role);\n }\n\n function addElRoleDescription($el, description) {\n $el.attr('aria-roledescription', description);\n }\n\n function addElControls($el, controls) {\n $el.attr('aria-controls', controls);\n }\n\n function addElLabel($el, label) {\n $el.attr('aria-label', label);\n }\n\n function addElId($el, id) {\n $el.attr('id', id);\n }\n\n function addElLive($el, live) {\n $el.attr('aria-live', live);\n }\n\n function disableEl($el) {\n $el.attr('aria-disabled', true);\n }\n\n function enableEl($el) {\n $el.attr('aria-disabled', false);\n }\n\n function onEnterOrSpaceKey(e) {\n if (e.keyCode !== 13 && e.keyCode !== 32) return;\n const params = swiper.params.a11y;\n const $targetEl = $(e.target);\n\n if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n if (!(swiper.isEnd && !swiper.params.loop)) {\n swiper.slideNext();\n }\n\n if (swiper.isEnd) {\n notify(params.lastSlideMessage);\n } else {\n notify(params.nextSlideMessage);\n }\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n if (!(swiper.isBeginning && !swiper.params.loop)) {\n swiper.slidePrev();\n }\n\n if (swiper.isBeginning) {\n notify(params.firstSlideMessage);\n } else {\n notify(params.prevSlideMessage);\n }\n }\n\n if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) {\n $targetEl[0].click();\n }\n }\n\n function updateNavigation() {\n if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($prevEl && $prevEl.length > 0) {\n if (swiper.isBeginning) {\n disableEl($prevEl);\n makeElNotFocusable($prevEl);\n } else {\n enableEl($prevEl);\n makeElFocusable($prevEl);\n }\n }\n\n if ($nextEl && $nextEl.length > 0) {\n if (swiper.isEnd) {\n disableEl($nextEl);\n makeElNotFocusable($nextEl);\n } else {\n enableEl($nextEl);\n makeElFocusable($nextEl);\n }\n }\n }\n\n function hasPagination() {\n return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;\n }\n\n function hasClickablePagination() {\n return hasPagination() && swiper.params.pagination.clickable;\n }\n\n function updatePagination() {\n const params = swiper.params.a11y;\n if (!hasPagination()) return;\n swiper.pagination.bullets.each(bulletEl => {\n const $bulletEl = $(bulletEl);\n\n if (swiper.params.pagination.clickable) {\n makeElFocusable($bulletEl);\n\n if (!swiper.params.pagination.renderBullet) {\n addElRole($bulletEl, 'button');\n addElLabel($bulletEl, params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1));\n }\n }\n\n if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {\n $bulletEl.attr('aria-current', 'true');\n } else {\n $bulletEl.removeAttr('aria-current');\n }\n });\n }\n\n const initNavEl = ($el, wrapperId, message) => {\n makeElFocusable($el);\n\n if ($el[0].tagName !== 'BUTTON') {\n addElRole($el, 'button');\n $el.on('keydown', onEnterOrSpaceKey);\n }\n\n addElLabel($el, message);\n addElControls($el, wrapperId);\n };\n\n function init() {\n const params = swiper.params.a11y;\n swiper.$el.append(liveRegion); // Container\n\n const $containerEl = swiper.$el;\n\n if (params.containerRoleDescriptionMessage) {\n addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);\n }\n\n if (params.containerMessage) {\n addElLabel($containerEl, params.containerMessage);\n } // Wrapper\n\n\n const $wrapperEl = swiper.$wrapperEl;\n const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;\n const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';\n addElId($wrapperEl, wrapperId);\n addElLive($wrapperEl, live); // Slide\n\n if (params.itemRoleDescriptionMessage) {\n addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);\n }\n\n addElRole($(swiper.slides), params.slideRole);\n const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length;\n swiper.slides.each((slideEl, index) => {\n const $slideEl = $(slideEl);\n const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index;\n const ariaLabelMessage = params.slideLabelMessage.replace(/\\{\\{index\\}\\}/, slideIndex + 1).replace(/\\{\\{slidesLength\\}\\}/, slidesLength);\n addElLabel($slideEl, ariaLabelMessage);\n }); // Navigation\n\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl && $nextEl.length) {\n initNavEl($nextEl, wrapperId, params.nextSlideMessage);\n }\n\n if ($prevEl && $prevEl.length) {\n initNavEl($prevEl, wrapperId, params.prevSlideMessage);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n function destroy() {\n if (liveRegion && liveRegion.length > 0) liveRegion.remove();\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl) {\n $nextEl.off('keydown', onEnterOrSpaceKey);\n }\n\n if ($prevEl) {\n $prevEl.off('keydown', onEnterOrSpaceKey);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n on('beforeInit', () => {\n liveRegion = $(``);\n });\n on('afterInit', () => {\n if (!swiper.params.a11y.enabled) return;\n init();\n updateNavigation();\n });\n on('toEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('fromEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('paginationUpdate', () => {\n if (!swiper.params.a11y.enabled) return;\n updatePagination();\n });\n on('destroy', () => {\n if (!swiper.params.a11y.enabled) return;\n destroy();\n });\n}","/* eslint no-underscore-dangle: \"off\" */\n\n/* eslint no-use-before-define: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport { nextTick } from '../../shared/utils.js';\nexport default function Autoplay({\n swiper,\n extendParams,\n on,\n emit\n}) {\n let timeout;\n swiper.autoplay = {\n running: false,\n paused: false\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n\n function run() {\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n\n clearTimeout(timeout);\n timeout = nextTick(() => {\n let autoplayResult;\n\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isBeginning) {\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isEnd) {\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n\n if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) {\n run();\n }\n }, delay);\n }\n\n function start() {\n if (typeof timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n emit('autoplayStart');\n run();\n return true;\n }\n\n function stop() {\n if (!swiper.autoplay.running) return false;\n if (typeof timeout === 'undefined') return false;\n\n if (timeout) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n\n swiper.autoplay.running = false;\n emit('autoplayStop');\n return true;\n }\n\n function pause(speed) {\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (timeout) clearTimeout(timeout);\n swiper.autoplay.paused = true;\n\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n run();\n } else {\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd);\n });\n }\n }\n\n function onVisibilityChange() {\n const document = getDocument();\n\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n pause();\n }\n\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n run();\n swiper.autoplay.paused = false;\n }\n }\n\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== swiper.$wrapperEl[0]) return;\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n swiper.autoplay.paused = false;\n\n if (!swiper.autoplay.running) {\n stop();\n } else {\n run();\n }\n }\n\n function onMouseEnter() {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n }\n\n function onMouseLeave() {\n if (swiper.params.autoplay.disableOnInteraction) {\n return;\n }\n\n swiper.autoplay.paused = false;\n run();\n }\n\n function attachMouseEvents() {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.$el.on('mouseenter', onMouseEnter);\n swiper.$el.on('mouseleave', onMouseLeave);\n }\n }\n\n function detachMouseEvents() {\n swiper.$el.off('mouseenter', onMouseEnter);\n swiper.$el.off('mouseleave', onMouseLeave);\n }\n\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n start();\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n attachMouseEvents();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n stop();\n }\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n }\n });\n on('touchEnd', () => {\n if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n run();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n\n if (swiper.autoplay.running) {\n stop();\n }\n\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n });\n Object.assign(swiper.autoplay, {\n pause,\n run,\n start,\n stop\n });\n}","/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\nimport { nextTick } from '../../shared/utils.js';\nexport default function Controller({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n controller: {\n control: undefined,\n inverse: false,\n by: 'slide' // or 'container'\n\n }\n });\n swiper.controller = {\n control: undefined\n };\n\n function LinearSpline(x, y) {\n const binarySearch = function search() {\n let maxIndex;\n let minIndex;\n let guess;\n return (array, val) => {\n minIndex = -1;\n maxIndex = array.length;\n\n while (maxIndex - minIndex > 1) {\n guess = maxIndex + minIndex >> 1;\n\n if (array[guess] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n }\n\n return maxIndex;\n };\n }();\n\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n\n let i1;\n let i3;\n\n this.interpolate = function interpolate(x2) {\n if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n\n return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n\n return this;\n } // xxx: for now i will just save one spline function to to\n\n\n function getInterpolateFunction(c) {\n if (!swiper.controller.spline) {\n swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);\n }\n }\n\n function setTranslate(_t, byController) {\n const controlled = swiper.controller.control;\n let multiplier;\n let controlledTranslate;\n const Swiper = swiper.constructor;\n\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n\n if (swiper.params.controller.by === 'slide') {\n getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n\n controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n }\n\n if (!controlledTranslate || swiper.params.controller.by === 'container') {\n multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n }\n\n if (swiper.params.controller.inverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n\n c.updateProgress(controlledTranslate);\n c.setTranslate(controlledTranslate, swiper);\n c.updateActiveIndex();\n c.updateSlidesClasses();\n }\n\n if (Array.isArray(controlled)) {\n for (let i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTranslate(controlled);\n }\n }\n\n function setTransition(duration, byController) {\n const Swiper = swiper.constructor;\n const controlled = swiper.controller.control;\n let i;\n\n function setControlledTransition(c) {\n c.setTransition(duration, swiper);\n\n if (duration !== 0) {\n c.transitionStart();\n\n if (c.params.autoHeight) {\n nextTick(() => {\n c.updateAutoHeight();\n });\n }\n\n c.$wrapperEl.transitionEnd(() => {\n if (!controlled) return;\n\n if (c.params.loop && swiper.params.controller.by === 'slide') {\n c.loopFix();\n }\n\n c.transitionEnd();\n });\n }\n }\n\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n\n function removeSpline() {\n if (!swiper.controller.control) return;\n\n if (swiper.controller.spline) {\n swiper.controller.spline = undefined;\n delete swiper.controller.spline;\n }\n }\n\n on('beforeInit', () => {\n swiper.controller.control = swiper.params.controller.control;\n });\n on('update', () => {\n removeSpline();\n });\n on('resize', () => {\n removeSpline();\n });\n on('observerUpdate', () => {\n removeSpline();\n });\n on('setTranslate', (_s, translate, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTranslate(translate, byController);\n });\n on('setTransition', (_s, duration, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTransition(duration, byController);\n });\n Object.assign(swiper.controller, {\n setTranslate,\n setTransition\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCards({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cardsEffect: {\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n activeIndex\n } = swiper;\n const params = swiper.params.cardsEffect;\n const {\n startTranslate,\n isTouched\n } = swiper.touchEventsData;\n const currentTranslate = swiper.translate;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max(slideProgress, -4), 4);\n let offset = $slideEl[0].swiperSlideOffset;\n\n if (swiper.params.centeredSlides && !swiper.params.cssMode) {\n swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`);\n }\n\n if (swiper.params.centeredSlides && swiper.params.cssMode) {\n offset -= slides[0].swiperSlideOffset;\n }\n\n let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let tY = 0;\n const tZ = -100 * Math.abs(progress);\n let scale = 1;\n let rotate = -2 * progress;\n let tXAdd = 8 - Math.abs(progress) * 0.75;\n const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;\n const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;\n\n if (isSwipeToNext || isSwipeToPrev) {\n const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;\n rotate += -28 * progress * subProgress;\n scale += -0.5 * subProgress;\n tXAdd += 96 * subProgress;\n tY = `${-25 * subProgress * Math.abs(progress)}%`;\n }\n\n if (progress < 0) {\n // next\n tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`;\n } else if (progress > 0) {\n // prev\n tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`;\n } else {\n tX = `${tX}px`;\n }\n\n if (!swiper.isHorizontal()) {\n const prevY = tY;\n tY = tX;\n tX = prevY;\n }\n\n const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;\n const transform = `\n translate3d(${tX}, ${tY}, ${tZ}px)\n rotateZ(${rotate}deg)\n scale(${scaleString})\n `;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowEl = $slideEl.find('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.cardsEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'cards',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nexport default function EffectCoverflow({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n scale: 1,\n modifier: 1,\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n width: swiperWidth,\n height: swiperHeight,\n slides,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform = swiper.translate;\n const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth; // Each slide offset from center\n\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier;\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0\n\n let translateZ = -translate * Math.abs(offsetMultiplier);\n let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders\n\n if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n stretch = parseFloat(params.stretch) / 100 * slideSize;\n }\n\n let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n let translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values\n\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n if (Math.abs(scale) < 0.001) scale = 0;\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(slideTransform);\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top');\n }\n\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom');\n }\n\n if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.coverflowEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n };\n\n effectInit({\n effect: 'coverflow',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCreative({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n creativeEffect: {\n transformEl: null,\n limitProgress: 1,\n shadowPerProgress: false,\n progressMultiplier: 1,\n perspective: true,\n prev: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n },\n next: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n }\n }\n });\n\n const getTranslateValue = value => {\n if (typeof value === 'string') return value;\n return `${value}px`;\n };\n\n const setTranslate = () => {\n const {\n slides,\n $wrapperEl,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.creativeEffect;\n const {\n progressMultiplier: multiplier\n } = params;\n const isCenteredSlides = swiper.params.centeredSlides;\n\n if (isCenteredSlides) {\n const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;\n $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`);\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress);\n let originalProgress = progress;\n\n if (!isCenteredSlides) {\n originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];\n const r = [0, 0, 0];\n let custom = false;\n\n if (!swiper.isHorizontal()) {\n t[1] = t[0];\n t[0] = 0;\n }\n\n let data = {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n scale: 1,\n opacity: 1\n };\n\n if (progress < 0) {\n data = params.next;\n custom = true;\n } else if (progress > 0) {\n data = params.prev;\n custom = true;\n } // set translate\n\n\n t.forEach((value, index) => {\n t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;\n }); // set rotates\n\n r.forEach((value, index) => {\n r[index] = data.rotate[index] * Math.abs(progress * multiplier);\n });\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const translateString = t.join(', ');\n const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;\n const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;\n const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;\n const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows\n\n if (custom && data.shadow || !custom) {\n let $shadowEl = $slideEl.children('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0 && data.shadow) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) {\n const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;\n $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);\n }\n }\n\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform).css({\n opacity: opacityString\n });\n\n if (data.origin) {\n $targetEl.css('transform-origin', data.origin);\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.creativeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'creative',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => swiper.params.creativeEffect.perspective,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import $ from '../../shared/dom.js';\nimport effectInit from '../../shared/effect-init.js';\nexport default function EffectCube({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cubeEffect: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n }\n });\n\n const setTranslate = () => {\n const {\n $el,\n $wrapperEl,\n slides,\n width: swiperWidth,\n height: swiperHeight,\n rtlTranslate: rtl,\n size: swiperSize,\n browser\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $wrapperEl.append($cubeShadowEl);\n }\n\n $cubeShadowEl.css({\n height: `${swiperWidth}px`\n });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + round * 4 * swiperSize;\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = 3 * swiperSize + swiperSize * 4 * round;\n }\n\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n\n if (progress <= 1 && progress > -1) {\n wrapperRotate = slideIndex * 90 + progress * 90;\n if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n }\n\n $slideEl.transform(transform);\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = $(`
`);\n $slideEl.append(shadowBefore);\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = $(`
`);\n $slideEl.append(shadowAfter);\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset = params.shadowOffset;\n $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);\n }\n }\n\n const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;\n $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);\n };\n\n const setTransition = duration => {\n const {\n $el,\n slides\n } = swiper;\n slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n };\n\n effectInit({\n effect: 'cube',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true\n })\n });\n}","import effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFade({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n fadeEffect: {\n crossFade: false,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides\n } = swiper;\n const params = swiper.params.fadeEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = swiper.slides.eq(i);\n const offset = $slideEl[0].swiperSlideOffset;\n let tx = -offset;\n if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n\n const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.css({\n opacity: slideOpacity\n }).transform(`translate3d(${tx}px, ${ty}px, 0px)`);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.fadeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'fade',\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFlip({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n flipEffect: {\n slideShadows: true,\n limitRotation: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n rtlTranslate: rtl\n } = swiper;\n const params = swiper.params.flipEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top');\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom');\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n\n const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.flipEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'flip',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import { now } from '../../shared/utils.js';\nexport default function freeMode({\n swiper,\n extendParams,\n emit,\n once\n}) {\n extendParams({\n freeMode: {\n enabled: false,\n momentum: true,\n momentumRatio: 1,\n momentumBounce: true,\n momentumBounceRatio: 1,\n momentumVelocityRatio: 1,\n sticky: false,\n minimumVelocity: 0.02\n }\n });\n\n function onTouchMove() {\n const {\n touchEventsData: data,\n touches\n } = swiper; // Velocity\n\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime\n });\n }\n\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: now()\n });\n }\n\n function onTouchEnd({\n currentPos\n }) {\n const {\n params,\n $wrapperEl,\n rtlTranslate: rtl,\n snapGrid,\n touchEventsData: data\n } = swiper; // Time diff\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n\n return;\n }\n\n if (params.freeMode.momentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n\n if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {\n swiper.velocity = 0;\n } // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n\n\n if (time > 150 || now() - lastMoveEvent.time > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n\n swiper.velocity *= params.freeMode.momentumVelocityRatio;\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeMode.momentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;\n let needsLoopFix;\n\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeMode.sticky) {\n let nextSlide;\n\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n\n newPosition = -newPosition;\n }\n\n if (needsLoopFix) {\n once('transitionEnd', () => {\n swiper.loopFix();\n });\n } // Fix duration\n\n\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n\n if (params.freeMode.sticky) {\n // If freeMode.sticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeMode.momentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n emit('_freeModeNoMomentumRelease');\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n } else if (params.freeMode) {\n emit('_freeModeNoMomentumRelease');\n }\n\n if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n }\n\n Object.assign(swiper, {\n freeMode: {\n onTouchMove,\n onTouchEnd\n }\n });\n}","export default function Grid({\n swiper,\n extendParams\n}) {\n extendParams({\n grid: {\n rows: 1,\n fill: 'column'\n }\n });\n let slidesNumberEvenToRows;\n let slidesPerRow;\n let numFullColumns;\n\n const initSlides = slidesLength => {\n const {\n slidesPerView\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid;\n slidesPerRow = slidesNumberEvenToRows / rows;\n numFullColumns = Math.floor(slidesLength / rows);\n\n if (Math.floor(slidesLength / rows) === slidesLength / rows) {\n slidesNumberEvenToRows = slidesLength;\n } else {\n slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;\n }\n\n if (slidesPerView !== 'auto' && fill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);\n }\n };\n\n const updateSlide = (i, slide, slidesLength, getDirectionLabel) => {\n const {\n slidesPerGroup,\n spaceBetween\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid; // Set slides order\n\n let newSlideOrderIndex;\n let column;\n let row;\n\n if (fill === 'row' && slidesPerGroup > 1) {\n const groupIndex = Math.floor(i / (slidesPerGroup * rows));\n const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;\n const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup);\n row = Math.floor(slideIndexInGroup / columnsInGroup);\n column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows;\n slide.css({\n '-webkit-order': newSlideOrderIndex,\n order: newSlideOrderIndex\n });\n } else if (fill === 'column') {\n column = Math.floor(i / rows);\n row = i - column * rows;\n\n if (column > numFullColumns || column === numFullColumns && row === rows - 1) {\n row += 1;\n\n if (row >= rows) {\n row = 0;\n column += 1;\n }\n }\n } else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n\n slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : '');\n };\n\n const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => {\n const {\n spaceBetween,\n centeredSlides,\n roundLengths\n } = swiper.params;\n const {\n rows\n } = swiper.params.grid;\n swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;\n swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;\n swiper.$wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px`\n });\n\n if (centeredSlides) {\n snapGrid.splice(0, snapGrid.length);\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n }\n\n snapGrid.push(...newSlidesGrid);\n }\n };\n\n swiper.grid = {\n initSlides,\n updateSlide,\n updateWrapperSize\n };\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function HashNavigation({\n swiper,\n extendParams,\n emit,\n on\n}) {\n let initialized = false;\n const document = getDocument();\n const window = getWindow();\n extendParams({\n hashNavigation: {\n enabled: false,\n replaceState: false,\n watchState: false\n }\n });\n\n const onHashChange = () => {\n emit('hashChange');\n const newHash = document.location.hash.replace('#', '');\n const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n\n if (newHash !== activeSlideHash) {\n const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash=\"${newHash}\"]`).index();\n if (typeof newIndex === 'undefined') return;\n swiper.slideTo(newIndex);\n }\n };\n\n const setHash = () => {\n if (!initialized || !swiper.params.hashNavigation.enabled) return;\n\n if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {\n window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '');\n emit('hashSet');\n } else {\n const slide = swiper.slides.eq(swiper.activeIndex);\n const hash = slide.attr('data-hash') || slide.attr('data-history');\n document.location.hash = hash || '';\n emit('hashSet');\n }\n };\n\n const init = () => {\n if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;\n initialized = true;\n const hash = document.location.hash.replace('#', '');\n\n if (hash) {\n const speed = 0;\n\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHash = slide.attr('data-hash') || slide.attr('data-history');\n\n if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n }\n }\n }\n\n if (swiper.params.hashNavigation.watchState) {\n $(window).on('hashchange', onHashChange);\n }\n };\n\n const destroy = () => {\n if (swiper.params.hashNavigation.watchState) {\n $(window).off('hashchange', onHashChange);\n }\n };\n\n on('init', () => {\n if (swiper.params.hashNavigation.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.hashNavigation.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHash();\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHash();\n }\n });\n}","import { getWindow } from 'ssr-window';\nexport default function History({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n history: {\n enabled: false,\n root: '',\n replaceState: false,\n key: 'slides'\n }\n });\n let initialized = false;\n let paths = {};\n\n const slugify = text => {\n return text.toString().replace(/\\s+/g, '-').replace(/[^\\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n };\n\n const getPathValues = urlOverride => {\n const window = getWindow();\n let location;\n\n if (urlOverride) {\n location = new URL(urlOverride);\n } else {\n location = window.location;\n }\n\n const pathArray = location.pathname.slice(1).split('/').filter(part => part !== '');\n const total = pathArray.length;\n const key = pathArray[total - 2];\n const value = pathArray[total - 1];\n return {\n key,\n value\n };\n };\n\n const setHistory = (key, index) => {\n const window = getWindow();\n if (!initialized || !swiper.params.history.enabled) return;\n let location;\n\n if (swiper.params.url) {\n location = new URL(swiper.params.url);\n } else {\n location = window.location;\n }\n\n const slide = swiper.slides.eq(index);\n let value = slugify(slide.attr('data-history'));\n\n if (swiper.params.history.root.length > 0) {\n let root = swiper.params.history.root;\n if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);\n value = `${root}/${key}/${value}`;\n } else if (!location.pathname.includes(key)) {\n value = `${key}/${value}`;\n }\n\n const currentState = window.history.state;\n\n if (currentState && currentState.value === value) {\n return;\n }\n\n if (swiper.params.history.replaceState) {\n window.history.replaceState({\n value\n }, null, value);\n } else {\n window.history.pushState({\n value\n }, null, value);\n }\n };\n\n const scrollToSlide = (speed, value, runCallbacks) => {\n if (value) {\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHistory = slugify(slide.attr('data-history'));\n\n if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, runCallbacks);\n }\n }\n } else {\n swiper.slideTo(0, speed, runCallbacks);\n }\n };\n\n const setHistoryPopState = () => {\n paths = getPathValues(swiper.params.url);\n scrollToSlide(swiper.params.speed, swiper.paths.value, false);\n };\n\n const init = () => {\n const window = getWindow();\n if (!swiper.params.history) return;\n\n if (!window.history || !window.history.pushState) {\n swiper.params.history.enabled = false;\n swiper.params.hashNavigation.enabled = true;\n return;\n }\n\n initialized = true;\n paths = getPathValues(swiper.params.url);\n if (!paths.key && !paths.value) return;\n scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);\n\n if (!swiper.params.history.replaceState) {\n window.addEventListener('popstate', setHistoryPopState);\n }\n };\n\n const destroy = () => {\n const window = getWindow();\n\n if (!swiper.params.history.replaceState) {\n window.removeEventListener('popstate', setHistoryPopState);\n }\n };\n\n on('init', () => {\n if (swiper.params.history.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.history.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n}","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Keyboard({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: false\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true\n }\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n const {\n rtlTranslate: rtl\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40; // Directions locks\n\n if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {\n return false;\n }\n\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n\n if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n\n if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {\n let inView = false; // Check that swiper should be inside of visible area of window\n\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n if (!inView) return undefined;\n }\n\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();\n if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n\n emit('keyPress', kc);\n return undefined;\n }\n\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n Object.assign(swiper.keyboard, {\n enable,\n disable\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Lazy({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n lazy: {\n checkInView: false,\n enabled: false,\n loadPrevNext: false,\n loadPrevNextAmount: 1,\n loadOnTransitionStart: false,\n scrollingElement: '',\n elementClass: 'swiper-lazy',\n loadingClass: 'swiper-lazy-loading',\n loadedClass: 'swiper-lazy-loaded',\n preloaderClass: 'swiper-lazy-preloader'\n }\n });\n swiper.lazy = {};\n let scrollHandlerAttached = false;\n let initialImageLoaded = false;\n\n function loadInSlide(index, loadInDuplicate = true) {\n const params = swiper.params.lazy;\n if (typeof index === 'undefined') return;\n if (swiper.slides.length === 0) return;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${index}\"]`) : swiper.slides.eq(index);\n const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);\n\n if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {\n $images.push($slideEl[0]);\n }\n\n if ($images.length === 0) return;\n $images.each(imageEl => {\n const $imageEl = $(imageEl);\n $imageEl.addClass(params.loadingClass);\n const background = $imageEl.attr('data-background');\n const src = $imageEl.attr('data-src');\n const srcset = $imageEl.attr('data-srcset');\n const sizes = $imageEl.attr('data-sizes');\n const $pictureEl = $imageEl.parent('picture');\n swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return;\n\n if (background) {\n $imageEl.css('background-image', `url(\"${background}\")`);\n $imageEl.removeAttr('data-background');\n } else {\n if (srcset) {\n $imageEl.attr('srcset', srcset);\n $imageEl.removeAttr('data-srcset');\n }\n\n if (sizes) {\n $imageEl.attr('sizes', sizes);\n $imageEl.removeAttr('data-sizes');\n }\n\n if ($pictureEl.length) {\n $pictureEl.children('source').each(sourceEl => {\n const $source = $(sourceEl);\n\n if ($source.attr('data-srcset')) {\n $source.attr('srcset', $source.attr('data-srcset'));\n $source.removeAttr('data-srcset');\n }\n });\n }\n\n if (src) {\n $imageEl.attr('src', src);\n $imageEl.removeAttr('data-src');\n }\n }\n\n $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n $slideEl.find(`.${params.preloaderClass}`).remove();\n\n if (swiper.params.loop && loadInDuplicate) {\n const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n\n if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index=\"${slideOriginalIndex}\"]:not(.${swiper.params.slideDuplicateClass})`);\n loadInSlide(originalSlide.index(), false);\n } else {\n const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index=\"${slideOriginalIndex}\"]`);\n loadInSlide(duplicatedSlide.index(), false);\n }\n }\n\n emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n });\n emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n });\n }\n\n function load() {\n const {\n $wrapperEl,\n params: swiperParams,\n slides,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n const params = swiperParams.lazy;\n let slidesPerView = swiperParams.slidesPerView;\n\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n\n function slideExist(index) {\n if (isVirtual) {\n if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index=\"${index}\"]`).length) {\n return true;\n }\n } else if (slides[index]) return true;\n\n return false;\n }\n\n function slideIndex(slideEl) {\n if (isVirtual) {\n return $(slideEl).attr('data-swiper-slide-index');\n }\n\n return $(slideEl).index();\n }\n\n if (!initialImageLoaded) initialImageLoaded = true;\n\n if (swiper.params.watchSlidesProgress) {\n $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => {\n const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();\n loadInSlide(index);\n });\n } else if (slidesPerView > 1) {\n for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n loadInSlide(activeIndex);\n }\n\n if (params.loadPrevNext) {\n if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) {\n const amount = params.loadPrevNextAmount;\n const spv = slidesPerView;\n const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides\n\n for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n } // Prev Slides\n\n\n for (let i = minIndex; i < activeIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);\n if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide));\n const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);\n if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide));\n }\n }\n }\n\n function checkInViewOnLoad() {\n const window = getWindow();\n if (!swiper || swiper.destroyed) return;\n const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window);\n const isWindow = $scrollElement[0] === window;\n const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth;\n const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight;\n const swiperOffset = swiper.$el.offset();\n const {\n rtlTranslate: rtl\n } = swiper;\n let inView = false;\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n\n if (inView) {\n load();\n $scrollElement.off('scroll', checkInViewOnLoad, passiveListener);\n } else if (!scrollHandlerAttached) {\n scrollHandlerAttached = true;\n $scrollElement.on('scroll', checkInViewOnLoad, passiveListener);\n }\n }\n\n on('beforeInit', () => {\n if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n swiper.params.preloadImages = false;\n }\n });\n on('init', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('scroll', () => {\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) {\n load();\n }\n });\n on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('transitionStart', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n }\n });\n on('transitionEnd', () => {\n if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('slideChange', () => {\n const {\n lazy,\n cssMode,\n watchSlidesProgress,\n touchReleaseOnEdges,\n resistanceRatio\n } = swiper.params;\n\n if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) {\n load();\n }\n });\n Object.assign(swiper.lazy, {\n load,\n loadInSlide\n });\n}","import appendSlide from './methods/appendSlide.js';\nimport prependSlide from './methods/prependSlide.js';\nimport addSlide from './methods/addSlide.js';\nimport removeSlide from './methods/removeSlide.js';\nimport removeAllSlides from './methods/removeAllSlides.js';\nexport default function Manipulation({\n swiper\n}) {\n Object.assign(swiper, {\n appendSlide: appendSlide.bind(swiper),\n prependSlide: prependSlide.bind(swiper),\n addSlide: addSlide.bind(swiper),\n removeSlide: removeSlide.bind(swiper),\n removeAllSlides: removeAllSlides.bind(swiper)\n });\n}","export default function addSlide(index, slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n const baseLength = swiper.slides.length;\n\n if (index <= 0) {\n swiper.prependSlide(slides);\n return;\n }\n\n if (index >= baseLength) {\n swiper.appendSlide(slides);\n return;\n }\n\n let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n const slidesBuffer = [];\n\n for (let i = baseLength - 1; i >= index; i -= 1) {\n const currentSlide = swiper.slides.eq(i);\n currentSlide.remove();\n slidesBuffer.unshift(currentSlide);\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n\n newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n } else {\n $wrapperEl.append(slides);\n }\n\n for (let i = 0; i < slidesBuffer.length; i += 1) {\n $wrapperEl.append(slidesBuffer[i]);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","export default function appendSlide(slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n } else {\n $wrapperEl.append(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n}","export default function prependSlide(slides) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n let newActiveIndex = activeIndex + 1;\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.prepend(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n } else {\n $wrapperEl.prepend(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n swiper.slideTo(newActiveIndex, 0, false);\n}","export default function removeAllSlides() {\n const swiper = this;\n const slidesIndexes = [];\n\n for (let i = 0; i < swiper.slides.length; i += 1) {\n slidesIndexes.push(i);\n }\n\n swiper.removeSlide(slidesIndexes);\n}","export default function removeSlide(slidesIndexes) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n let newActiveIndex = activeIndexBuffer;\n let indexToRemove;\n\n if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {\n for (let i = 0; i < slidesIndexes.length; i += 1) {\n indexToRemove = slidesIndexes[i];\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n }\n\n newActiveIndex = Math.max(newActiveIndex, 0);\n } else {\n indexToRemove = slidesIndexes;\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","/* eslint-disable consistent-return */\nimport { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now, nextTick } from '../../shared/utils.js';\nexport default function Mousewheel({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n mousewheel: {\n enabled: false,\n releaseOnEdges: false,\n invert: false,\n forceToAxis: false,\n sensitivity: 1,\n eventsTarget: 'container',\n thresholdDelta: null,\n thresholdTime: null\n }\n });\n swiper.mousewheel = {\n enabled: false\n };\n let timeout;\n let lastScrollTime = now();\n let lastEventBeforeSnap;\n const recentWheelEvents = [];\n\n function normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n let sX = 0;\n let sY = 0; // spinX, spinY\n\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n // Legacy\n\n if ('detail' in e) {\n sY = e.detail;\n }\n\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n } // side scrolling on FF with DOMMouseScroll\n\n\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) {\n // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n } // Fall-back if spin cannot be determined\n\n\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }\n\n function handleMouseEnter() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = true;\n }\n\n function handleMouseLeave() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = false;\n }\n\n function animateSlider(newEvent) {\n if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) {\n // Prevent if delta of wheel scroll delta is below configured threshold\n return false;\n }\n\n if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {\n // Prevent if time between scrolls is below configured threshold\n return false;\n } // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n\n\n if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {\n // Return false as a default\n return true;\n } // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n\n\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n emit('scroll', newEvent.raw);\n } // If you got here is because an animation has been triggered so store the current time\n\n\n lastScrollTime = new window.Date().getTime(); // Return false as a default\n\n return false;\n }\n\n function releaseScroll(newEvent) {\n const params = swiper.params.mousewheel;\n\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n\n return false;\n }\n\n function handle(event) {\n let e = event;\n let disableParentSwiper = true;\n if (!swiper.enabled) return;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n const data = normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true;\n } else {\n delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n if (params.invert) delta = -delta; // Get the scroll positions\n\n let positions = swiper.getTranslate() + delta * params.sensitivity;\n if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();\n if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true:\n // the disableParentSwiper will be true.\n // When loop is false:\n // if the scroll positions is not on edge,\n // then the disableParentSwiper will be true.\n // if the scroll on edge positions,\n // then the disableParentSwiper will be false.\n\n disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());\n if (disableParentSwiper && swiper.params.nested) e.stopPropagation();\n\n if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event\n }; // Keep the most recent events\n\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n recentWheelEvents.push(newEvent); // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n\n if (prevEvent) {\n if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n animateSlider(newEvent);\n }\n } else {\n animateSlider(newEvent);\n } // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n\n\n if (releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta)\n };\n const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;\n\n if (!ignoreWheelEvents) {\n lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n\n let position = swiper.getTranslate() + delta * params.sensitivity;\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode.sticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momentum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(timeout);\n timeout = undefined;\n\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n\n if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n timeout = nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n\n if (!timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n timeout = nextTick(() => {\n const snapToThreshold = 0.5;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n } // Emit event\n\n\n if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay\n\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions\n\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n return false;\n }\n\n function events(method) {\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n target[method]('mouseenter', handleMouseEnter);\n target[method]('mouseleave', handleMouseLeave);\n target[method]('wheel', handle);\n }\n\n function enable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener('wheel', handle);\n return true;\n }\n\n if (swiper.mousewheel.enabled) return false;\n events('on');\n swiper.mousewheel.enabled = true;\n return true;\n }\n\n function disable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, handle);\n return true;\n }\n\n if (!swiper.mousewheel.enabled) return false;\n events('off');\n swiper.mousewheel.enabled = false;\n return true;\n }\n\n on('init', () => {\n if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n disable();\n }\n\n if (swiper.params.mousewheel.enabled) enable();\n });\n on('destroy', () => {\n if (swiper.params.cssMode) {\n enable();\n }\n\n if (swiper.mousewheel.enabled) disable();\n });\n Object.assign(swiper.mousewheel, {\n enable,\n disable\n });\n}","import createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nimport $ from '../../shared/dom.js';\nexport default function Navigation({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock'\n }\n });\n swiper.navigation = {\n nextEl: null,\n $nextEl: null,\n prevEl: null,\n $prevEl: null\n };\n\n function getEl(el) {\n let $el;\n\n if (el) {\n $el = $(el);\n\n if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) {\n $el = swiper.$el.find(el);\n }\n }\n\n return $el;\n }\n\n function toggleEl($el, disabled) {\n const params = swiper.params.navigation;\n\n if ($el && $el.length > 0) {\n $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass);\n if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled;\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n }\n\n function update() {\n // Update Navigation Buttons\n if (swiper.params.loop) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n }\n\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n }\n\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n const $nextEl = getEl(params.nextEl);\n const $prevEl = getEl(params.prevEl);\n\n if ($nextEl && $nextEl.length > 0) {\n $nextEl.on('click', onNextClick);\n }\n\n if ($prevEl && $prevEl.length > 0) {\n $prevEl.on('click', onPrevClick);\n }\n\n Object.assign(swiper.navigation, {\n $nextEl,\n nextEl: $nextEl && $nextEl[0],\n $prevEl,\n prevEl: $prevEl && $prevEl[0]\n });\n\n if (!swiper.enabled) {\n if ($nextEl) $nextEl.addClass(params.lockClass);\n if ($prevEl) $prevEl.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl && $nextEl.length) {\n $nextEl.off('click', onNextClick);\n $nextEl.removeClass(swiper.params.navigation.disabledClass);\n }\n\n if ($prevEl && $prevEl.length) {\n $prevEl.off('click', onPrevClick);\n $prevEl.removeClass(swiper.params.navigation.disabledClass);\n }\n }\n\n on('init', () => {\n init();\n update();\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl) {\n $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n\n if ($prevEl) {\n $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n });\n on('click', (_s, e) => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n const targetEl = e.target;\n\n if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n\n if ($nextEl) {\n isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n } else if ($prevEl) {\n isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n }\n\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n\n if ($nextEl) {\n $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n\n if ($prevEl) {\n $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n }\n });\n Object.assign(swiper.navigation, {\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nimport classesToSelector from '../../shared/classes-to-selector.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Pagination({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`\n }\n });\n swiper.pagination = {\n el: null,\n $el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0;\n }\n\n function setSideBullets($bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`);\n }\n\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el; // Current/Total\n\n let current;\n const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.loop) {\n current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n\n if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n current -= slidesLength - swiper.loopedSlides * 2;\n }\n\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n } // Types\n\n\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n\n if (params.dynamicBullets) {\n bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);\n\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);\n\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n\n bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' '));\n\n if ($el.length > 1) {\n bullets.each(bullet => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (bulletIndex === firstIndex) {\n setSideBullets($bullet, 'prev');\n }\n\n if (bulletIndex === lastIndex) {\n setSideBullets($bullet, 'next');\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n }\n }\n\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n\n if (params.type === 'fraction') {\n $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1));\n $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total));\n }\n\n if (params.type === 'progressbar') {\n let progressbarDirection;\n\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n\n $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);\n }\n\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n emit('paginationRender', $el[0]);\n } else {\n emit('paginationUpdate', $el[0]);\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\">`;\n }\n }\n\n $el.html(paginationHTML);\n swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass));\n }\n\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type !== 'custom') {\n emit('paginationRender', swiper.pagination.$el[0]);\n }\n }\n\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) {\n $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper\n\n if ($el.length > 1) {\n $el = $el.filter(el => {\n if ($(el).parents('.swiper')[0] !== swiper.el) return false;\n return true;\n });\n }\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n $el.addClass(params.modifierClass + swiper.params.direction);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', classesToSelector(params.bulletClass), function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Object.assign(swiper.pagination, {\n $el,\n el: $el[0]\n });\n\n if (!swiper.enabled) {\n $el.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const $el = swiper.pagination.$el;\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n $el.removeClass(params.modifierClass + swiper.params.direction);\n if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n\n if (params.clickable) {\n $el.off('click', classesToSelector(params.bulletClass));\n }\n }\n\n on('init', () => {\n init();\n render();\n update();\n });\n on('activeIndexChange', () => {\n if (swiper.params.loop) {\n update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n if (!swiper.params.loop) {\n update();\n }\n });\n on('slidesLengthChange', () => {\n if (swiper.params.loop) {\n render();\n update();\n }\n });\n on('snapGridLengthChange', () => {\n if (!swiper.params.loop) {\n render();\n update();\n }\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.pagination;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass);\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const {\n $el\n } = swiper.pagination;\n\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass);\n\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n\n $el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n });\n Object.assign(swiper.pagination, {\n render,\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nexport default function Parallax({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n parallax: {\n enabled: false\n }\n });\n\n const setTransform = (el, progress) => {\n const {\n rtl\n } = swiper;\n const $el = $(el);\n const rtlFactor = rtl ? -1 : 1;\n const p = $el.attr('data-swiper-parallax') || '0';\n let x = $el.attr('data-swiper-parallax-x');\n let y = $el.attr('data-swiper-parallax-y');\n const scale = $el.attr('data-swiper-parallax-scale');\n const opacity = $el.attr('data-swiper-parallax-opacity');\n\n if (x || y) {\n x = x || '0';\n y = y || '0';\n } else if (swiper.isHorizontal()) {\n x = p;\n y = '0';\n } else {\n y = p;\n x = '0';\n }\n\n if (x.indexOf('%') >= 0) {\n x = `${parseInt(x, 10) * progress * rtlFactor}%`;\n } else {\n x = `${x * progress * rtlFactor}px`;\n }\n\n if (y.indexOf('%') >= 0) {\n y = `${parseInt(y, 10) * progress}%`;\n } else {\n y = `${y * progress}px`;\n }\n\n if (typeof opacity !== 'undefined' && opacity !== null) {\n const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n $el[0].style.opacity = currentOpacity;\n }\n\n if (typeof scale === 'undefined' || scale === null) {\n $el.transform(`translate3d(${x}, ${y}, 0px)`);\n } else {\n const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);\n }\n };\n\n const setTranslate = () => {\n const {\n $el,\n slides,\n progress,\n snapGrid\n } = swiper;\n $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, progress);\n });\n slides.each((slideEl, slideIndex) => {\n let slideProgress = slideEl.progress;\n\n if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n }\n\n slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, slideProgress);\n });\n });\n };\n\n const setTransition = (duration = swiper.params.speed) => {\n const {\n $el\n } = swiper;\n $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => {\n const $parallaxEl = $(parallaxEl);\n let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n $parallaxEl.transition(parallaxDuration);\n });\n };\n\n on('beforeInit', () => {\n if (!swiper.params.parallax.enabled) return;\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('init', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTranslate', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTransition', (_swiper, duration) => {\n if (!swiper.params.parallax.enabled) return;\n setTransition(duration);\n });\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Scrollbar({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag'\n }\n });\n swiper.scrollbar = {\n el: null,\n dragEl: null,\n $el: null,\n $dragEl: null\n };\n\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar,\n rtlTranslate: rtl,\n progress\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n const params = swiper.params.scrollbar;\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n\n if (rtl) {\n newPos = -newPos;\n\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n\n if (params.hide) {\n clearTimeout(timeout);\n $el[0].style.opacity = 1;\n timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n }\n\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n }\n\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));\n\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function getPointerPosition(e) {\n if (swiper.isHorizontal()) {\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX;\n }\n\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY;\n }\n\n function setDragPosition(e) {\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n $el\n } = scrollbar;\n let positionRatio;\n positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n isTouched = true;\n dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n setDragPosition(e);\n clearTimeout(dragTimeout);\n $el.transition(0);\n\n if (params.hide) {\n $el.css('opacity', 1);\n }\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n\n emit('scrollbarDragStart', e);\n }\n\n function onDragMove(e) {\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n emit('scrollbarDragMove', e);\n }\n\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el\n } = scrollbar;\n if (!isTouched) return;\n isTouched = false;\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n\n emit('scrollbarDragEnd', e);\n\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n\n function events(method) {\n const {\n scrollbar,\n touchEventsTouch,\n touchEventsDesktop,\n params,\n support\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = support.passiveListener && params.passiveListeners ? {\n passive: false,\n capture: false\n } : false;\n const passiveListener = support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n\n if (!support.touch) {\n target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener);\n document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener);\n document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener);\n } else {\n target[eventMethod](touchEventsTouch.start, onDragStart, activeListener);\n target[eventMethod](touchEventsTouch.move, onDragMove, activeListener);\n target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener);\n }\n }\n\n function enableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('on');\n }\n\n function disableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('off');\n }\n\n function init() {\n const {\n scrollbar,\n $el: $swiperEl\n } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {\n el: 'swiper-scrollbar'\n });\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n let $el = $(params.el);\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n\n if ($dragEl.length === 0) {\n $dragEl = $(`
`);\n $el.append($dragEl);\n }\n\n Object.assign(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0]\n });\n\n if (params.draggable) {\n enableDraggable();\n }\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function destroy() {\n disableDraggable();\n }\n\n on('init', () => {\n init();\n updateSize();\n setTranslate();\n });\n on('update resize observerUpdate lock unlock', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.scrollbar;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n Object.assign(swiper.scrollbar, {\n updateSize,\n setTranslate,\n init,\n destroy\n });\n}","import { isObject } from '../../shared/utils.js';\nimport $ from '../../shared/dom.js';\nexport default function Thumb({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-thumbs'\n }\n });\n let initialized = false;\n let swiperCreated = false;\n swiper.thumbs = {\n swiper: null\n };\n\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n\n if (swiper.params.loop) {\n let currentIndex = swiper.activeIndex;\n\n if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n currentIndex = swiper.activeIndex;\n }\n\n const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;\n }\n\n swiper.slideTo(slideToIndex);\n }\n\n function init() {\n const {\n thumbs: thumbsParams\n } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n\n swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n let currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n\n if (thumbsSwiper.params.loop) {\n if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {\n thumbsSwiper.loopFix(); // eslint-disable-next-line\n\n thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n currentThumbsIndex = thumbsSwiper.activeIndex;\n } // Find actual thumbs index to slide to\n\n\n const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n\n if (typeof prevThumbsIndex === 'undefined') {\n newThumbsIndex = nextThumbsIndex;\n } else if (typeof nextThumbsIndex === 'undefined') {\n newThumbsIndex = prevThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = nextThumbsIndex;\n } else {\n newThumbsIndex = prevThumbsIndex;\n }\n\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n\n if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n }\n\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n } // Activate thumbs\n\n\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n\n thumbsToActivate = Math.floor(thumbsToActivate);\n thumbsSwiper.slides.removeClass(thumbActiveClass);\n\n if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`).addClass(thumbActiveClass);\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);\n }\n }\n }\n\n on('beforeInit', () => {\n const {\n thumbs\n } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n init();\n update(true);\n });\n on('slideChange update resize observerUpdate', () => {\n if (!swiper.thumbs.swiper) return;\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n\n if (swiperCreated && thumbsSwiper) {\n thumbsSwiper.destroy();\n }\n });\n Object.assign(swiper.thumbs, {\n init,\n update\n });\n}","import $ from '../../shared/dom.js';\nimport { setCSSProperty } from '../../shared/utils.js';\nexport default function Virtual({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n virtual: {\n enabled: false,\n slides: [],\n cache: true,\n renderSlide: null,\n renderExternal: null,\n renderExternalUpdate: true,\n addSlidesBefore: 0,\n addSlidesAfter: 0\n }\n });\n let cssModeTimeout;\n swiper.virtual = {\n cache: {},\n from: undefined,\n to: undefined,\n slides: [],\n offset: 0,\n slidesGrid: []\n };\n\n function renderSlide(slide, index) {\n const params = swiper.params.virtual;\n\n if (params.cache && swiper.virtual.cache[index]) {\n return swiper.virtual.cache[index];\n }\n\n const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
${slide}
`);\n if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n if (params.cache) swiper.virtual.cache[index] = $slideEl;\n return $slideEl;\n }\n\n function update(force) {\n const {\n slidesPerView,\n slidesPerGroup,\n centeredSlides\n } = swiper.params;\n const {\n addSlidesBefore,\n addSlidesAfter\n } = swiper.params.virtual;\n const {\n from: previousFrom,\n to: previousTo,\n slides,\n slidesGrid: previousSlidesGrid,\n offset: previousOffset\n } = swiper.virtual;\n\n if (!swiper.params.cssMode) {\n swiper.updateActiveIndex();\n }\n\n const activeIndex = swiper.activeIndex || 0;\n let offsetProp;\n if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n let slidesAfter;\n let slidesBefore;\n\n if (centeredSlides) {\n slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n } else {\n slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;\n slidesBefore = slidesPerGroup + addSlidesBefore;\n }\n\n const from = Math.max((activeIndex || 0) - slidesBefore, 0);\n const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n Object.assign(swiper.virtual, {\n from,\n to,\n offset,\n slidesGrid: swiper.slidesGrid\n });\n\n function onRendered() {\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n if (swiper.lazy && swiper.params.lazy.enabled) {\n swiper.lazy.load();\n }\n }\n\n if (previousFrom === from && previousTo === to && !force) {\n if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n swiper.slides.css(offsetProp, `${offset}px`);\n }\n\n swiper.updateProgress();\n return;\n }\n\n if (swiper.params.virtual.renderExternal) {\n swiper.params.virtual.renderExternal.call(swiper, {\n offset,\n from,\n to,\n slides: function getSlides() {\n const slidesToRender = [];\n\n for (let i = from; i <= to; i += 1) {\n slidesToRender.push(slides[i]);\n }\n\n return slidesToRender;\n }()\n });\n\n if (swiper.params.virtual.renderExternalUpdate) {\n onRendered();\n }\n\n return;\n }\n\n const prependIndexes = [];\n const appendIndexes = [];\n\n if (force) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();\n } else {\n for (let i = previousFrom; i <= previousTo; i += 1) {\n if (i < from || i > to) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${i}\"]`).remove();\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n if (i >= from && i <= to) {\n if (typeof previousTo === 'undefined' || force) {\n appendIndexes.push(i);\n } else {\n if (i > previousTo) appendIndexes.push(i);\n if (i < previousFrom) prependIndexes.push(i);\n }\n }\n }\n\n appendIndexes.forEach(index => {\n swiper.$wrapperEl.append(renderSlide(slides[index], index));\n });\n prependIndexes.sort((a, b) => b - a).forEach(index => {\n swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n });\n swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);\n onRendered();\n }\n\n function appendSlide(slides) {\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.push(slides[i]);\n }\n } else {\n swiper.virtual.slides.push(slides);\n }\n\n update(true);\n }\n\n function prependSlide(slides) {\n const activeIndex = swiper.activeIndex;\n let newActiveIndex = activeIndex + 1;\n let numberOfNewSlides = 1;\n\n if (Array.isArray(slides)) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n numberOfNewSlides = slides.length;\n } else {\n swiper.virtual.slides.unshift(slides);\n }\n\n if (swiper.params.virtual.cache) {\n const cache = swiper.virtual.cache;\n const newCache = {};\n Object.keys(cache).forEach(cachedIndex => {\n const $cachedEl = cache[cachedIndex];\n const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n\n if (cachedElIndex) {\n $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides);\n }\n\n newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n });\n swiper.virtual.cache = newCache;\n }\n\n update(true);\n swiper.slideTo(newActiveIndex, 0);\n }\n\n function removeSlide(slidesIndexes) {\n if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n let activeIndex = swiper.activeIndex;\n\n if (Array.isArray(slidesIndexes)) {\n for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n swiper.virtual.slides.splice(slidesIndexes[i], 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes[i]];\n }\n\n if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n } else {\n swiper.virtual.slides.splice(slidesIndexes, 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes];\n }\n\n if (slidesIndexes < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n\n update(true);\n swiper.slideTo(activeIndex, 0);\n }\n\n function removeAllSlides() {\n swiper.virtual.slides = [];\n\n if (swiper.params.virtual.cache) {\n swiper.virtual.cache = {};\n }\n\n update(true);\n swiper.slideTo(0, 0);\n }\n\n on('beforeInit', () => {\n if (!swiper.params.virtual.enabled) return;\n swiper.virtual.slides = swiper.params.virtual.slides;\n swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n\n if (!swiper.params.initialSlide) {\n update();\n }\n });\n on('setTranslate', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode && !swiper._immediateVirtual) {\n clearTimeout(cssModeTimeout);\n cssModeTimeout = setTimeout(() => {\n update();\n }, 100);\n } else {\n update();\n }\n });\n on('init update resize', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`);\n }\n });\n Object.assign(swiper.virtual, {\n appendSlide,\n prependSlide,\n removeSlide,\n removeAllSlides,\n update\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { getTranslate } from '../../shared/utils.js';\nexport default function Zoom({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed'\n }\n });\n swiper.zoom = {\n enabled: false\n };\n let currentScale = 1;\n let isScaling = false;\n let gesturesEnabled;\n let fakeGestureTouched;\n let fakeGestureMoved;\n const gesture = {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3\n };\n const image = {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n };\n const velocity = {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n };\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n\n set(value) {\n if (scale !== value) {\n const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined;\n const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined;\n emit('zoomChange', value, imageEl, slideEl);\n }\n\n scale = value;\n }\n\n });\n\n function getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n return distance;\n } // Events\n\n\n function onGestureStart(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n\n if (!support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureTouched = true;\n gesture.scaleStart = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n\n isScaling = true;\n }\n\n function onGestureChange(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureMoved = true;\n gesture.scaleMove = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) {\n if (e.type === 'gesturechange') onGestureStart(e);\n return;\n }\n\n if (support.gestures) {\n zoom.scale = e.scale * currentScale;\n } else {\n zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale;\n }\n\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;\n }\n\n if (zoom.scale < params.minRatio) {\n zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;\n }\n\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function onGestureEnd(e) {\n const device = swiper.device;\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (!fakeGestureTouched || !fakeGestureMoved) {\n return;\n }\n\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) {\n return;\n }\n\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n currentScale = zoom.scale;\n isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n }\n\n function onTouchStart(e) {\n const device = swiper.device;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n }\n\n function onTouchMove(e) {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n } // Define if we need image drag\n\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !isScaling) {\n if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {\n image.isTouched = false;\n return;\n }\n\n if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {\n image.isTouched = false;\n return;\n }\n }\n\n if (e.cancelable) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n image.isMoved = true;\n image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;\n }\n\n if (image.currentX > image.maxX) {\n image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;\n }\n\n if (image.currentY < image.minY) {\n image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;\n }\n\n if (image.currentY > image.maxY) {\n image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;\n } // Velocity\n\n\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTouchEnd() {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY; // Fix duration\n\n if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n image.currentX = newPositionX;\n image.currentY = newPositionY; // Define if we need image drag\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTransitionEnd() {\n const zoom = swiper.zoom;\n\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n }\n\n function zoomIn(e) {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (e && e.target) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n }\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.touchAction = 'none';\n }\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left + window.scrollX;\n offsetY = gesture.$slideEl.offset().top + window.scrollY;\n diffX = offsetX + slideWidth / 2 - touchX;\n diffY = offsetY + slideHeight / 2 - touchY;\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n\n gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function zoomOut() {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.style.touchAction = '';\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n } // Toggle Zoom\n\n\n function zoomToggle(e) {\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoomOut();\n } else {\n // Zoom In\n zoomIn(e);\n }\n }\n\n function getListeners() {\n const support = swiper.support;\n const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n const activeListenerWithCapture = support.passiveListener ? {\n passive: false,\n capture: true\n } : true;\n return {\n passiveListener,\n activeListenerWithCapture\n };\n }\n\n function getSlideSelector() {\n return `.${swiper.params.slideClass}`;\n }\n\n function toggleGestures(method) {\n const {\n passiveListener\n } = getListeners();\n const slideSelector = getSlideSelector();\n swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener);\n swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener);\n }\n\n function enableGestures() {\n if (gesturesEnabled) return;\n gesturesEnabled = true;\n toggleGestures('on');\n }\n\n function disableGestures() {\n if (!gesturesEnabled) return;\n gesturesEnabled = false;\n toggleGestures('off');\n } // Attach/Detach Events\n\n\n function enable() {\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n const support = swiper.support;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n function disable() {\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n const support = swiper.support;\n zoom.enabled = false;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n on('init', () => {\n if (swiper.params.zoom.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n disable();\n });\n on('touchStart', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchStart(e);\n });\n on('touchEnd', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchEnd(e);\n });\n on('doubleTap', (_s, e) => {\n if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n zoomToggle(e);\n }\n });\n on('transitionEnd', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n onTransitionEnd();\n }\n });\n on('slideChange', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n onTransitionEnd();\n }\n });\n Object.assign(swiper.zoom, {\n enable,\n disable,\n in: zoomIn,\n out: zoomOut,\n toggle: zoomToggle\n });\n}","export default function classesToSelector(classes = '') {\n return `.${classes.trim().replace(/([\\.:!\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}","import { getDocument } from 'ssr-window';\nexport default function createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n const document = getDocument();\n\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = swiper.$el.children(`.${checkProps[key]}`)[0];\n\n if (!element) {\n element = document.createElement('div');\n element.className = checkProps[key];\n swiper.$el.append(element);\n }\n\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n\n return params;\n}","import $ from './dom.js';\nexport default function createShadow(params, $slideEl, side) {\n const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`;\n const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;\n let $shadowEl = $shadowContainer.children(`.${shadowClass}`);\n\n if (!$shadowEl.length) {\n $shadowEl = $(`
`);\n $shadowContainer.append($shadowEl);\n }\n\n return $shadowEl;\n}","import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, styles, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove } from 'dom7';\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove\n};\nObject.keys(Methods).forEach(methodName => {\n Object.defineProperty($.fn, methodName, {\n value: Methods[methodName],\n writable: true\n });\n});\nexport default $;","export default function effectInit(params) {\n const {\n effect,\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams,\n perspective\n } = params;\n on('beforeInit', () => {\n if (swiper.params.effect !== effect) return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`);\n\n if (perspective && perspective()) {\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n }\n\n const overwriteParamsResult = overwriteParams ? overwriteParams() : {};\n Object.assign(swiper.params, overwriteParamsResult);\n Object.assign(swiper.originalParams, overwriteParamsResult);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== effect) return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== effect) return;\n setTransition(duration);\n });\n}","export default function effectTarget(effectParams, $slideEl) {\n if (effectParams.transformEl) {\n return $slideEl.find(effectParams.transformEl).css({\n 'backface-visibility': 'hidden',\n '-webkit-backface-visibility': 'hidden'\n });\n }\n\n return $slideEl;\n}","export default function effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides\n}) {\n const {\n slides,\n activeIndex,\n $wrapperEl\n } = swiper;\n\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n let $transitionEndTarget;\n\n if (allSlides) {\n $transitionEndTarget = transformEl ? slides.find(transformEl) : slides;\n } else {\n $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex);\n }\n\n $transitionEndTarget.transitionEnd(() => {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n}","import { getWindow } from 'ssr-window';\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n\n return browser;\n}\n\nexport { getBrowser };","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\nlet deviceCached;\n\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel'; // iPadOs 13 fix\n\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n } // Android\n\n\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n } // Export object\n\n\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n\n return deviceCached;\n}\n\nexport { getDevice };","import { getWindow, getDocument } from 'ssr-window';\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),\n passiveListener: function checkPassiveListener() {\n let supportsPassive = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n }\n\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {// No support\n }\n\n return supportsPassive;\n }(),\n gestures: function checkGestures() {\n return 'ongesturestart' in window;\n }()\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n\n return support;\n}\n\nexport { getSupport };","import { getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {// no getter for object\n }\n\n try {\n delete object[key];\n } catch (e) {// something got wrong\n }\n });\n}\n\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\n\nfunction now() {\n return Date.now();\n}\n\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\n\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n } // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n\n\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n\n return curTransform || 0;\n}\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\n\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\n\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n\n return to;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n\n const animate = () => {\n time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n\n animate();\n}\n\nexport { animateCSSModeScroll, deleteProps, nextTick, now, getTranslate, isObject, extend, getComputedStyle, setCSSProperty };","/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n\nexport { default as Swiper, default } from './core/core.js';\nexport { default as Virtual } from './modules/virtual/virtual.js';\nexport { default as Keyboard } from './modules/keyboard/keyboard.js';\nexport { default as Mousewheel } from './modules/mousewheel/mousewheel.js';\nexport { default as Navigation } from './modules/navigation/navigation.js';\nexport { default as Pagination } from './modules/pagination/pagination.js';\nexport { default as Scrollbar } from './modules/scrollbar/scrollbar.js';\nexport { default as Parallax } from './modules/parallax/parallax.js';\nexport { default as Zoom } from './modules/zoom/zoom.js';\nexport { default as Lazy } from './modules/lazy/lazy.js';\nexport { default as Controller } from './modules/controller/controller.js';\nexport { default as A11y } from './modules/a11y/a11y.js';\nexport { default as History } from './modules/history/history.js';\nexport { default as HashNavigation } from './modules/hash-navigation/hash-navigation.js';\nexport { default as Autoplay } from './modules/autoplay/autoplay.js';\nexport { default as Thumbs } from './modules/thumbs/thumbs.js';\nexport { default as FreeMode } from './modules/free-mode/free-mode.js';\nexport { default as Grid } from './modules/grid/grid.js';\nexport { default as Manipulation } from './modules/manipulation/manipulation.js';\nexport { default as EffectFade } from './modules/effect-fade/effect-fade.js';\nexport { default as EffectCube } from './modules/effect-cube/effect-cube.js';\nexport { default as EffectFlip } from './modules/effect-flip/effect-flip.js';\nexport { default as EffectCoverflow } from './modules/effect-coverflow/effect-coverflow.js';\nexport { default as EffectCreative } from './modules/effect-creative/effect-creative.js';\nexport { default as EffectCards } from './modules/effect-cards/effect-cards.js';","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Fancybox } from '@fancyapps/ui'\r\n\r\nimport { changeMenu } from './components/burger-menu'\r\nimport { addSmoothScroll } from '../js/components/scroll-smooth'\r\nimport { initializationSliders } from '../js/components/sliders'\r\nimport { toggleAccordion } from '../js/components/accordion'\r\nimport { addVideoPlayer } from '../js/components/video-player'\r\nimport { paintBtn } from '../js/components/paint-btn'\r\n\r\nchangeMenu()\r\naddVideoPlayer()\r\ninitializationSliders()\r\naddSmoothScroll()\r\ntoggleAccordion()\r\npaintBtn()\r\n"],"names":["items","document","querySelectorAll","title","toggleAccordion","forEach","question","addEventListener","thisItem","parentNode","item","classList","toggle","remove","burger","querySelector","menu","menuLinks","changeMenu","contains","body","style","overflowY","el","btnNext","paintBtn","scrollToTop","top","window","scrollY","add","e","console","log","SmoothScroll","header","btnUpWrapper","addSmoothScroll","scroll","speed","Swiper","Navigation","Pagination","Autoplay","use","initializationSliders","recomendationsSlider","slidesPerView","navigation","nextEl","prevEl","loop","goodsSlider","pagination","clickable","breakpoints","professionalSlider","paginationClickable","initialSlide","centeredSlides","zoom","maxRatio","spaceBetween","allowTouchMove","interviewSlider","partnersSlider","freeMode","grabCursor","autoplay","enabled","delay","disableOnInteraction","freeModeMomentum","stop","start","running","error","videojs","playBtn","videoTitle","videoText","videoLink","videoGradient","videoIntro","videoMask","videoJsTech","addVideoPlayer","isPreviewVideo","videoPlayer","getElementById","muted","controls","playToggle","loadMainVideo","desktopUrl","mobileUrl","screen","width","src","type","volume","changePlayerStatus","play","addClass","on","played","removeClass","pause","fluid","objectFit","currentTime","Fancybox"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA,kIAAkI,SAAS,sCAAsC,WAAW,wEAAwE,8BAA8B,YAAY,IAAI,KAAK,aAAa,uCAAuC,aAAa,gCAAgC,+BAA+B,wCAAwC,aAAa,SAAS,oFAAoF,sGAAsG,4NAA4N,YAAY,wBAAwB,4DAA4D,eAAe,4FAA4F,WAAW,+CAA+C,SAAS,WAAW,4CAA4C,yBAAyB,aAAa,wDAAwD,aAAa,oBAAoB,QAAQ,qCAAqC,6CAA6C,gFAAgF,kBAAkB,6EAA6E,QAAQ,eAAe,4IAA4I,4FAA4F,gEAAgE,GAAG,QAAQ,eAAe,+BAA+B,eAAe,EAAE,GAAG,EAAE,qFAAqF,oCAAoC,iBAAiB,mLAAmL,sBAAsB,sFAAsF,gBAAgB,+HAA+H,kBAAkB,yDAAyD,iCAAiC,qDAAqD,iCAAiC,yDAAyD,0GAA0G,sBAAsB,oHAAoH,WAAW,yDAAyD,WAAW,GAAG,oBAAoB,oFAAoF,+HAA+H,WAAW,gEAAgE,WAAW,yDAAyD,WAAW,yHAAyH,OAAO,kEAAkE,WAAW,mEAAmE,WAAW,4DAA4D,WAAW,yOAAyO,0BAA0B,gGAAgG,QAAQ,gBAAgB,EAAE,oBAAoB,mCAAmC,6EAA6E,gBAAgB,iBAAiB,YAAY,6DAA6D,eAAe,MAAM,QAAQ,sEAAsE,iBAAiB,iCAAiC,EAAE,eAAe,EAAE,cAAc,SAAS,mBAAmB,kCAAkC,QAAQ,EAAE,6BAA6B,EAAE,aAAa,YAAY,WAAW,qCAAqC,SAAS,eAAe,EAAE,MAAM,EAAE,cAAc,QAAQ,SAAS,+CAA+C,YAAY,yCAAyC,0CAA0C,4BAA4B,QAAQ,UAAU,SAAS,iDAAiD,YAAY,yCAAyC,iBAAiB,sCAAsC,mBAAmB,QAAQ,SAAS,0CAA0C,uBAAuB,6BAA6B,SAAS,uBAAuB,IAAI,KAAK,aAAa,wBAAwB,IAAI,OAAO,qBAAqB,QAAQ,gDAAgD,gBAAgB,yFAAyF,6FAA6F,SAAS,iBAAiB,WAAW,qCAAqC,8DAA8D,eAAe,oCAAoC,kDAAkD,oCAAoC,sBAAsB,gBAAgB,6BAA6B,MAAM,iEAAiE,sBAAsB,OAAO,SAAS,sTAAsT,kBAAkB,kBAAkB,EAAE,aAAa,2CAA2C,wEAAwE,wNAAwN,WAAW,mBAAmB,aAAa,wBAAwB,+EAA+E,qEAAqE,oDAAoD,gBAAgB,qEAAqE,mLAAmL,cAAc,uHAAuH,iBAAiB,gBAAgB,iBAAiB,eAAe,mHAAmH,iBAAiB,gBAAgB,0BAA0B,UAAU,iCAAiC,0CAA0C,yBAAyB,WAAW,6BAA6B,sFAAsF,qKAAqK,0CAA0C,iMAAiM,uJAAuJ,WAAW,+FAA+F,iBAAiB,kDAAkD,oGAAoG,+CAA+C,oRAAoR,mCAAmC,mFAAmF,eAAe,QAAQ,EAAE,iBAAiB,+EAA+E,iBAAiB,QAAQ,EAAE,eAAe,0GAA0G,WAAW,yDAAyD,WAAW,sBAAsB,+BAA+B,cAAc,kCAAkC,kCAAkC,4BAA4B,8BAA8B,6FAA6F,4CAA4C,8CAA8C,YAAY,WAAW,KAAK,aAAa,wCAAwC,wBAAwB,kCAAkC,yDAAyD,SAAS,kCAAkC,oNAAoN,gBAAgB,qCAAqC,mEAAmE,4LAA4L,8EAA8E,2HAA2H,0HAA0H,0DAA0D,sBAAsB,+FAA+F,8EAA8E,kCAAkC,kCAAkC,ghBAAghB,sHAAsH,kBAAkB,iEAAiE,2EAA2E,8BAA8B,gBAAgB,0EAA0E,wBAAwB,aAAa,qCAAqC,qBAAqB,mBAAmB,+DAA+D,mMAAmM,+BAA+B,gCAAgC,qDAAqD,aAAa,EAAE,gCAAgC,+BAA+B,0EAA0E,eAAe,kDAAkD,EAAE,OAAO,EAAE,sBAAsB,eAAe,sDAAsD,qDAAqD,gDAAgD,uLAAuL,4EAA4E,gDAAgD,oBAAoB,iDAAiD,oBAAoB,wEAAwE,iBAAiB,MAAM,gBAAgB,cAAc,gBAAgB,2DAA2D,oBAAoB,qCAAqC,kBAAkB,wBAAwB,iBAAiB,qCAAqC,+IAA+I,+NAA+N,MAAM,wLAAwL,uBAAuB,WAAW,EAAE,mBAAmB,EAAE,gCAAgC,4BAA4B,mBAAmB,EAAE,6BAA6B,0BAA0B,iGAAiG,6GAA6G,mKAAmK,oDAAoD,qBAAqB,6BAA6B,OAAO,4BAA4B,gDAAgD,2BAA2B,uBAAuB,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAA8B,SAAS,EAAE,cAAc,EAAE,IAAI,iBAAiB,kCAAkC,kDAAkD,gCAAgC,iCAAiC,yGAAyG,cAAc,sGAAsG,iBAAiB,8BAA8B,qCAAqC,UAAU,yDAAyD,WAAW,yDAAyD,eAAe,EAAE,+FAA+F,iBAAiB,mCAAmC,kBAAkB,GAAG,EAAE,wEAAwE,6EAA6E,6EAA6E,MAAM,kBAAkB,0BAA0B,kDAAkD,qDAAqD,EAAE,wBAAwB,2HAA2H,OAAO,4EAA4E,OAAO,mGAAmG,GAAG,EAAE,kCAAkC,MAAM,kBAAkB,mBAAmB,kFAAkF,gCAAgC,kCAAkC,wCAAwC,mIAAmI,4CAA4C,iBAAiB,4HAA4H,UAAU,2RAA2R,mEAAmE,qDAAqD,aAAa,gCAAgC,iCAAiC,mBAAmB,GAAG,YAAY,IAAI,YAAY,2BAA2B,wGAAwG,QAAQ,oBAAoB,gBAAgB,mBAAmB,QAAQ,iBAAiB,gBAAgB,mBAAmB,OAAO,mBAAmB,eAAe,+BAA+B,oCAAoC,kBAAkB,mEAAmE,YAAY,+GAA+G,yCAAyC,yDAAyD,uFAAuF,SAAS,yCAAyC,yDAAyD,wFAAwF,oBAAoB,qCAAqC,MAAM,kBAAkB,yCAAyC,YAAY,+IAA+I,8CAA8C,2BAA2B,qBAAqB,8CAA8C,4BAA4B,eAAe,mMAAmM,uBAAuB,wNAAwN,cAAc,4HAA4H,gBAAgB,UAAU,uFAAuF,gCAAgC,yHAAyH,wBAAwB,kGAAkG,QAAQ,sHAAsH,2CAA2C,oCAAoC,SAAS,EAAE,cAAc,EAAE,8DAA8D,EAAE,MAAM,EAAE,iBAAiB,EAAE,kDAAkD,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,+BAA+B,gBAAgB,4DAA4D,gBAAgB,mGAAmG,eAAe,sCAAsC,oQAAoQ,eAAe,gHAAgH,WAAW,4DAA4D,WAAW,8JAA8J,UAAU,oNAAoN,gCAAgC,gBAAgB,QAAQ,sBAAsB,6BAA6B,iCAAiC,QAAQ,eAAe,8GAA8G,UAAU,0CAA0C,EAAE,GAAG,gBAAgB,yCAAyC,iDAAiD,EAAE,kBAAkB,IAAI,uEAAuE,EAAE,GAAG,yHAAyH,EAAE,uCAAuC,2FAA2F,KAAK,QAAQ,yXAAyX,YAAY,mCAAmC,2aAA2a,UAAU,+JAA+J,SAAS,kDAAkD,SAAS,mEAAmE,YAAY,oPAAoP,+EAA+E,QAAQ,eAAe,wPAAwP,kBAAkB,yDAAyD,eAAe,yDAAyD,eAAe,wSAAwS,aAAa,wBAAwB,kBAAkB,6CAA6C,aAAa,oBAAoB,uEAAuE,6CAA6C,uBAAuB,4BAA4B,sBAAsB,8DAA8D,iBAAiB,sFAAsF,8CAA8C,qBAAqB,wGAAwG,2BAA2B,iDAAiD,UAAU,uBAAuB,oHAAoH,SAAS,2QAA2Q,YAAY,cAAc,SAAS,wBAAwB,eAAe,6CAA6C,mEAAmE,YAAY,gFAAgF,qCAAqC,yEAAyE,uCAAuC,uCAAuC,2DAA2D,oGAAoG,6GAA6G,aAAa,kIAAkI,cAAc,iBAAiB,yCAAyC,yCAAyC,wBAAwB,mCAAmC,mBAAmB,IAAI,iDAAiD,KAAK,YAAY,IAAI,KAAK,qCAAqC,kKAAkK,MAAM,mDAAmD,eAAe,MAAM,wHAAwH,6BAA6B,qBAAqB,eAAe,sBAAsB,mCAAmC,kCAAkC,GAAG,kDAAkD,kCAAkC,WAAW,oBAAoB,YAAY,mBAAmB,SAAS,8BAA8B,SAAS,qEAAqE,SAAS,SAAS,yJAAyJ,0GAA0G,OAAO,iEAAiE,kBAAkB,kBAAkB,EAAE,kBAAkB,iIAAiI,8HAA8H,OAAO,0QAA0Q,8BAA8B,+GAA+G,aAAa,0DAA0D,0EAA0E,EAAE,EAAE,WAAW,kSAAkS,EAAE,EAAE,QAAQ,0MAA0M,aAAa,eAAe,oCAAoC,sBAAsB,EAAE,gCAAgC,gBAAgB,SAAS,gBAAgB,qEAAqE,gGAAgG,gBAAgB,eAAe,6BAA6B,sDAAsD,gDAAgD,GAAG,qHAAqH,iGAAiG,0CAA0C,wCAAwC,qBAAqB,aAAa,uDAAuD,EAAE,KAAK,YAAY,YAAY,qBAAqB,MAAM,qBAAqB,mCAAmC,qBAAqB,yEAAyE,oDAAoD,mBAAmB,kOAAkO,GAAG,WAAW,MAAM,eAAe,SAAS,MAAM,gJAAgJ,gBAAgB,gBAAgB,aAAa,oCAAoC,mKAAmK,6CAA6C,mBAAmB,OAAO,uBAAuB,2PAA2P,iEAAiE,mDAAmD,yGAAyG,oBAAoB,oBAAoB,sDAAsD,sBAAsB,YAAY,+BAA+B,YAAY,+BAA+B,cAAc,EAAE,MAAM,mEAAmE,GAAG,8EAA8E,mCAAmC,8EAA8E,cAAc,qCAAqC,eAAe,EAAE,+NAA+N,gDAAgD,yBAAyB,uDAAuD,sCAAsC,EAAE,yBAAyB,kBAAkB,yGAAyG,wBAAwB,mDAAmD,gBAAgB,qCAAqC,uGAAuG,yIAAyI,sEAAsE,iGAAiG,YAAY,8BAA8B,uBAAuB,+CAA+C,4FAA4F,6PAA6P,yBAAyB,YAAY,wCAAwC,mCAAmC,+BAA+B,sCAAsC,+BAA+B,sCAAsC,qIAAqI,GAAG,YAAY,6BAA6B,QAAQ,+EAA+E,cAAc,uBAAuB,6BAA6B,iBAAiB,aAAa,UAAU,0BAA0B,iCAAiC,MAAM,sFAAsF,8BAA8B,0DAA0D,wBAAwB,sEAAsE,EAAE,IAAI,mEAAmE,EAAE,qBAAqB,OAAO,sCAAsC,wMAAwM,WAAW,6BAA6B,iBAAiB,GAAG,gBAAgB,WAAW,aAAa,yDAAyD,iBAAiB,mIAAmI,iBAAiB,2EAA2E,qBAAqB,gEAAgE,6BAA6B,cAAc,aAAa,8BAA8B,wPAAwP,GAAG,aAAa,6CAA6C,WAAW,EAAE,oBAAoB,yGAAyG,sBAAsB,+CAA+C,sFAAsF,qBAAqB,SAAS,4OAA4O,gBAAgB,gCAAgC,2JAA2J,WAAW,qDAAqD,gBAAgB,2BAA2B,mBAAmB,EAAE,4DAA4D,kBAAkB,uBAAuB,0BAA0B,kDAAkD,wCAAwC,uBAAuB,yDAAyD,MAAM,qCAAqC,gBAAgB,YAAY,aAAa,4BAA4B,gGAAgG,sEAAsE,+BAA+B,yCAAyC,gCAAgC,kEAAkE,2CAA2C,8EAA8E,yHAAyH,UAAU,8CAA8C,sBAAsB,+DAA+D,+BAA+B,wFAAwF,WAAW,gXAAgX,SAAS,+CAA+C,oBAAoB,gBAAgB,EAAE,IAAI,6BAA6B,mBAAmB,iBAAiB,EAAE,KAAK,mGAAmG,kCAAkC,6BAA6B,GAAG,aAAa,SAAS,oEAAoE,mEAAmE,KAAK,cAAc,QAAQ,eAAe,uDAAuD,+EAA+E,aAAa,sEAAsE,YAAY,sPAAsP,YAAY,oDAAoD,eAAe,0CAA0C,QAAQ,0BAA0B,sCAAsC,uJAAuJ,4BAA4B,WAAW,qEAAqE,0CAA0C,MAAM,8BAA8B,yBAAyB,6CAA6C,6DAA6D,0CAA0C,YAAY,WAAW,oCAAoC,gBAAgB,WAAW,mDAAmD,EAAE,KAAK,EAAE,oCAAoC,gBAAgB,EAAE,EAAE,SAAS,SAAS,kFAAkF,OAAO,oHAAoH,OAAO,wHAAwH,UAAU,+IAA+I,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,gBAAgB,mDAAmD,0BAA0B,0FAA0F,eAAe,gCAAgC,oBAAoB,KAAK,KAAK,IAAI,OAAO,uBAAuB,UAAU,qEAAqE,QAAQ,6DAA6D,aAAa,kGAAkG,QAAQ,qBAAqB,KAAK,UAAU,QAAQ,+EAA+E,QAAQ,eAAe,gBAAgB,wJAAwJ,aAAa,mPAAmP,SAAS,uDAAuD,eAAe,+DAA+D,kBAAkB,gDAAgD,2BAA2B,wIAAwI,GAAG,0CAA0C,6EAA6E,4DAA4D,EAAE,GAAG,EAAE,6CAA6C,EAAE,6CAA6C,wDAAwD,2EAA2E,oDAAoD,EAAE,GAAG,EAAE,6BAA6B,0CAA0C,IAAI,WAAW,EAAE,0GAA0G,KAAK,OAAO,+FAA+F,UAAU,kDAAkD,iDAAiD,IAAI,WAAW,EAAE,yDAAyD,KAAK,UAAU,gDAAgD,wBAAwB,iZAAiZ,oKAAoK,UAAU,2CAA2C,wFAAwF,GAAG,qBAAqB,kDAAkD,qBAAqB,MAAM,wCAAwC,gCAAgC,+DAA+D,6BAA6B,MAAM,qCAAqC,kBAAkB,2BAA2B,OAAO,EAAE,kBAAkB,iBAAiB,GAAG,QAAQ,yBAAyB,KAAK,sCAAsC,wFAAwF,8BAA8B,iCAAiC,mBAAmB,GAAG,mBAAmB,2CAA2C,iDAAiD,sJAAsJ,gBAAgB,KAAK,gBAAgB,KAAK,qBAAqB,8KAA8K,qBAAqB,yDAAyD,0EAA0E,KAAK,GAAG,QAAQ,qCAAqC,yLAAyL,iBAAiB,sCAAsC,0FAA0F,gBAAgB,cAAc,GAAG,eAAe,iBAAiB,SAAS,2HAA2H,6BAA6B,kBAAkB,6BAA6B,aAAa,2BAA2B,YAAY,uBAAuB,oEAAoE,EAAE,qCAAqC,2BAA2B,wBAAwB,UAAU,gEAAgE,SAAS,EAAE,cAAc,EAAE,IAAI,GAAG,gBAAgB,kBAAkB,aAAa,iCAAiC,sBAAsB,kCAAkC,0CAA0C,yNAAyN,qEAAqE,EAAE,sDAAsD,eAAe,uBAAuB,UAAU,SAAS,SAAS,iBAAiB,eAAe,EAAE,qBAAqB,EAAE,yBAAyB,eAAe,sBAAsB,yEAAyE,GAAG,cAAc,gBAAgB,eAAe,6CAA6C,MAAM,mGAAmG,EAAE,KAAK,EAAE,sBAAsB,QAAQ,8DAA8D,QAAQ,0BAA0B,MAAM,mDAAmD,MAAM,mCAAmC,MAAM,6CAA6C,uCAAuC,iCAAiC,qBAAqB,qCAAqC,aAAa,+CAA+C,qCAAqC,MAAM,iBAAiB,0BAA0B,cAAc,oBAAoB,IAAI,UAAU,iEAAiE,aAAa,yDAAyD,MAAM,+EAA+E,iCAAiC,EAAE,2BAA2B,sEAAsE,0BAA0B,kDAAkD,6DAA6D,4BAA4B,IAAI,uBAAuB,0BAA0B,IAAI,qCAAqC,UAAU,OAAO,SAAS,qBAAqB,4BAA4B,2BAA2B,kCAAkC,2HAA2H,qBAAqB,oIAAoI,mBAAmB,iLAAiL,0BAA0B,mEAAmE,aAAa,IAAI,yBAAyB,0CAA0C,gIAAgI,kHAAkH,WAAW,SAAS,mFAAmF,SAAS,wFAAwF,aAAa,QAAQ,eAAe,gBAAgB,+IAA+I,aAAa,oLAAoL,UAAU,2CAA2C,0BAA0B,GAAG,YAAY,qBAAqB,aAAa,kFAAkF,kEAAkE,+EAA+E,qBAAqB,kDAAkD,qBAAqB,yMAAyM,cAAc,oDAAoD,mBAAmB,iCAAiC,sCAAsC,4BAA4B,sCAAsC,+BAA+B,yDAAyD,oCAAoC,4BAA4B,0KAA0K,2CAA2C,MAAM,sCAAsC,yGAAyG,sBAAsB,oKAAoK,uBAAuB,iBAAiB,kOAAkO,WAAW,8DAA8D,WAAW,qDAAqD,aAAa,IAAI,oBAAoB,8EAA8E,GAAG,6KAA6K,uCAAuC,gDAAgD,qCAAqC,6GAA6G,oCAAoC,kEAAkE,IAAI,iBAAiB,iJAAiJ,eAAe,sJAAsJ,gDAAgD,4CAA4C,yCAAyC,WAAW,qCAAqC,mEAAmE,gDAAgD,uEAAuE,iBAAiB,oCAAoC,sCAAsC,kCAAkC,MAAM,yDAAyD,8GAA8G,OAAO,0EAA0E,kDAAkD,SAAS,kDAAkD,+BAA+B,qBAAqB,+BAA+B,iDAAiD,qFAAqF,4GAA4G,YAAY,oEAAoE,EAAE,UAAU,iDAAiD,aAAa,6FAA6F,iDAAiD,YAAY,MAAM,+BAA+B,qBAAqB,wBAAwB,iDAAiD,UAAU,gEAAgE,mDAAmD,OAAO,gBAAgB,mCAAmC,oNAAoN,gDAAgD,0GAA0G,0BAA0B,aAAa,0HAA0H,mEAAmE,MAAM,kCAAkC,MAAM,uDAAuD,aAAa,wCAAwC,kBAAkB,uGAAuG,oDAAoD,YAAY,UAAU,2EAA2E,MAAM,kCAAkC,MAAM,qDAAqD,mFAAmF,6GAA6G,0BAA0B,YAAY,kBAAkB,qBAAqB,sBAAsB,iEAAiE,4BAA4B,EAAE,GAAG,SAAS,8BAA8B,SAAS,gCAAgC,YAAY,2NAA2N,UAAU,QAAQ,eAAe,gBAAgB,kEAAkE,aAAa,kFAAkF,4DAA4D,YAAY,mBAAmB,qCAAqC,sEAAsE,SAAS,uBAAuB,KAAK,yEAAyE,0EAA0E,qEAAqE,IAAI,+CAA+C,kGAAkG,WAAW,QAAQ,YAAY,qEAAqE,0CAA0C,qFAAqF,WAAW,UAAU,kBAAkB,UAAU,mBAAmB,sBAAsB,mBAAmB,oDAAoD,MAAM,sBAAsB,kBAAkB,aAAa,4CAA4C,EAAE,KAAK,+CAA+C,yBAAyB,0BAA0B,qDAAqD,EAAE,KAAK,mGAAmG,yBAAyB,IAAI,sBAAsB,MAAM,eAAe,oDAAoD,sBAAsB,MAAM,mBAAmB,8CAA8C,sEAAsE,sDAAsD,2CAA2C,2CAA2C,iBAAiB,iBAAiB,aAAa,yEAAyE,mDAAmD,4GAA4G,GAAG,iBAAiB,2DAA2D,sBAAsB,iIAAiI,OAAO,kCAAkC,SAAS,gJAAgJ,iQAAiQ,cAAc,+KAA+K,QAAQ,eAAe,kGAAkG,WAAW,mBAAmB,WAAW,mCAAmC,oDAAoD,4BAA4B,uKAAuK,WAAW,EAAE,KAAK,qBAAqB,oNAAoN,EAAE,kCAAkC,aAAa,oKAAoK,WAAW,4NAA4N,yBAAyB,kBAAkB,aAAa,4KAA4K,SAAS,uFAAuF,SAAS,0FAA0F,SAAS,qGAAqG,OAAO,4CAA4C,aAAa,OAAO,iIAAiI,yBAAyB,OAAO,+HAA+H,yBAAyB,aAAa,uWAAuW,oFAAoF,YAAY,+RAA+R,4CAA4C,OAAO,yLAAyL,mBAAmB,yCAAyC,mBAAmB,WAAW,2NAA2N,qBAAqB,SAAS,onBAAonB,oBAAoB,qCAAqC,eAAe,QAAQ,+IAA+I,wCAAwC,QAAQ,eAAe,uDAAuD,mIAAmI,aAAa,wTAAwT,SAAS,+CAA+C,SAAS,wDAAwD,KAAK,MAAM,yCAAyC,wDAAwD,4BAA4B,qCAAqC,QAAQ,YAAY,sBAAsB,mNAAmN,yBAAyB,WAAW,aAAa,6CAA6C,WAAW,uCAAuC,kJAAkJ,WAAW,qFAAqF,YAAY,uBAAuB,wJAAwJ,aAAa,2JAA2J,iBAAiB,sEAAsE,YAAY,6GAA6G,iBAAiB,MAAM,wPAAwP,kDAAkD,0DAA0D,EAAE,UAAU,0KAA0K,+BAA+B,gIAAgI,QAAQ,eAAe,kDAAkD,yBAAyB,EAAE,2BAA2B,EAAE,0BAA0B,iCAAiC,wDAAwD,QAAQ,sBAAsB,gHAAgH,qBAAqB,2DAA2D,8DAA8D,qDAAqD,eAAe,wDAAwD,mBAAmB,sCAAsC,qCAAqC,oCAAoC,sCAAsC,yFAAyF,WAAW,GAAG,4DAA4D,iBAAiB,6FAA6F,SAAS,gIAAgI,uWAAuW,kEAAkE,kJAAkJ,wGAAwG,gGAAgG,sCAAsC,mJAAmJ,sJAAsJ,UAAU,sIAAsI,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,SAAS,iBAAiB,eAAe,2DAA2D,6FAA6F,UAAU,8BAA8B,4JAA4J,WAAW,wDAAwD,WAAW,gDAAgD,WAAW,EAAE,WAAW,sBAAsB,iBAAiB,kEAAkE,aAAa,mBAAmB,6DAA6D,aAAa,MAAM,YAAY,eAAe,IAAI,yDAAyD,gBAAgB,qDAAqD,eAAe,oFAAoF,wBAAwB,oCAAoC,+BAA+B,qCAAqC,yLAAyL,2BAA2B,WAAW,2CAA2C,UAAU,uFAAuF,sBAAsB,iPAAiP,WAAW,EAAE,SAAS,4CAA4C,SAAS,6DAA6D,2CAA2C,SAAS,gQAAgQ,iJAAiJ,WAAW,6RAA6R,OAAO,2gBAA2gB,WAAW,QAAQ,kBAAkB,kBAAkB,EAAE,0FAA0F,mZAAmZ,eAAe,wBAAwB,oBAAoB,4FAA4F,eAAe,6JAA6J,eAAe,mPAAmP,eAAe,qOAAqO,aAAa,kDAAkD,mCAAmC,0TAA0T,+HAA+H,OAAO,GAAG,quBAAquB,iCAAiC,iJAAiJ,YAAY,WAAW,kBAAkB,mBAAmB,MAAM,sBAAsB,6IAA6I,eAAe,OAAO,wCAAwC,0MAA0M,iBAAiB,cAAc,oKAAoK,aAAa,eAAe,iDAAiD,EAAE,sBAAsB,8EAA8E,gOAAgO,YAAY,8EAA8E,UAAU,+IAA+I,kBAAkB,UAAU,gDAAgD,KAAK,uCAAuC,EAAE,qFAAqF,iFAAiF,oFAAoF,oCAAoC,mBAAmB,oBAAoB,mIAAmI,6DAA6D,QAAQ,GAAG,QAAQ,EAAE,iLAAiL,WAAW,uCAAuC,WAAW,gCAAgC,WAAW,6BAA6B,0BAA0B,mFAAmF,6EAA6E,6EAA6E,+BAA+B,MAAM,yCAAyC,uBAAuB,0CAA0C,2CAA2C,uCAAuC,6BAA6B,yBAAyB,MAAM,wBAAwB,cAAc,gCAAgC,8BAA8B,cAAc,uBAAuB,yMAAyM,IAAI,EAAE,eAAe,mBAAmB,6FAA6F,wHAAwH,cAAc,oEAAoE,aAAa,4BAA4B,iDAAiD,wCAAwC,8CAA8C,2HAA2H,qBAAqB,uHAAuH,2CAA2C,aAAa,sCAAsC,WAAW,sBAAsB,kBAAkB,mEAAmE,0CAA0C,SAAS,8BAA8B,8EAA8E,wEAAwE,gDAAgD,6CAA6C,0CAA0C,WAAW,gBAAgB,iFAAiF,mVAAmV,kOAAkO,gBAAgB,aAAa,6GAA6G,iCAAiC,4GAA4G,iBAAiB,EAAE,IAAI,mHAAmH,kBAAkB,2DAA2D,2DAA2D,cAAc,gBAAgB,0MAA0M,mBAAmB,EAAE,MAAM,cAAc,yJAAyJ,KAAK,2DAA2D,iDAAiD,qGAAqG,4BAA4B,6VAA6V,mBAAmB,mBAAmB,GAAG,qBAAqB,wEAAwE,2CAA2C,yCAAyC,2WAA2W,iBAAiB,wDAAwD,SAAS,wNAAwN,aAAa,iBAAiB,kBAAkB,sDAAsD,yBAAyB,iDAAiD,oBAAoB,gGAAgG,wDAAwD,QAAQ,sCAAsC,wBAAwB,6DAA6D,cAAc,mDAAmD,sCAAsC,qEAAqE,OAAO,4BAA4B,eAAe,EAAE,eAAe,oDAAoD,gDAAgD,sJAAsJ,6CAA6C,qBAAqB,eAAe,yDAAyD,mHAAmH,OAAO,sBAAsB,mCAAmC,OAAO,sBAAsB,mCAAmC,aAAa,2CAA2C,YAAY,iEAAiE,YAAY,mCAAmC,SAAS,iDAAiD,6CAA6C,oIAAoI,+FAA+F,wBAAwB,qCAAqC,sEAAsE,2BAA2B,kEAAkE,mCAAmC,eAAe,OAAO,UAAU,iCAAiC,6CAA6C,iGAAiG,+EAA+E,eAAe,uGAAuG,wBAAwB,iJAAiJ,kBAAkB,EAAE,kBAAkB,uBAAuB,EAAE,6BAA6B,iCAAiC,2CAA2C,4BAA4B,cAAc,sJAAsJ,qDAAqD,EAAE,+CAA+C,kBAAkB,iDAAiD,OAAO,SAAS,IAAI,oGAAoG,UAAU,uCAAuC,GAAG,SAAS,MAAM,wDAAwD,wBAAwB,8EAA8E,SAAS,wBAAwB,EAAE,4CAA4C,wBAAwB,uHAAuH,EAAE,MAAM,aAAa,kDAAkD,uCAAuC,8CAA8C,EAAE,iCAAiC,wBAAwB,uFAAuF,qFAAqF,iBAAiB,sFAAsF,EAAE,KAAK,2EAA2E,mCAAmC,SAAS,mBAAmB,SAAS,OAAO,YAAY,8CAA8C,eAAe,IAAI,wBAAwB,IAAI,kBAAkB,EAAE,aAAa,uDAAuD,sJAAsJ,iBAAiB,gDAAgD,iBAAiB,MAAM,KAAK,kBAAkB,aAAa,4EAA4E,sBAAsB,qBAAqB,2EAA2E,qBAAqB,0CAA0C,KAAK,wBAAwB,eAAe,cAAc,wBAAwB,YAAY,cAAc,wBAAwB,aAAa,wFAAwF,6CAA6C,2CAA4F;;;;;;;;;;;;;;;;;;ACD92uF;;AAEnC;AACA,SAAS,2DAAW,GAAG,yDAAW;AAClC;;AAEe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACpBqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;;;;;;AC9CzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;;AAGA;AACA;;AAEA,sBAAsB,YAAY;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC;;;;;;;;;;;;;ACtHY;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;AC7Da;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC,eAAe,mBAAO,CAAC,wFAAgC;;AAEvD,iBAAiB,mBAAO,CAAC,wDAAa;;AAEtC,wBAAwB,mBAAO,CAAC,0EAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA,4BAA4B;;AAE5B,yBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB;AACxB;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wFAAwF;;AAExF;AACA,4GAA4G;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B,gCAAgC;AAChC;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;;;;;;;;;;;;;;;ACvSA,IAAIA,KAAK,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,CAAC;AACzD,IAAIC,KAAK,GAAGF,QAAQ,CAACC,gBAAgB,CAAC,2BAA2B,CAAC;AAE3D,MAAME,eAAe,GAAGA,CAAA,KAAM;EACnCD,KAAK,CAACE,OAAO,CAAEC,QAAQ,IACrBA,QAAQ,CAACC,gBAAgB,CAAC,OAAO,EAAE,YAAY;IAC7C,IAAIC,QAAQ,GAAG,IAAI,CAACC,UAAU;IAE9BT,KAAK,CAACK,OAAO,CAAEK,IAAI,IAAK;MACtB,IAAIF,QAAQ,IAAIE,IAAI,EAAE;QACpBF,QAAQ,CAACG,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;QACnC;MACF;MACAF,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACjC,CAAC,CAAC;EACJ,CAAC,CACH,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACjBD,MAAMC,MAAM,GAAGb,QAAQ,CAACc,aAAa,CAAC,YAAY,CAAC;AACnD,MAAMC,IAAI,GAAGf,QAAQ,CAACc,aAAa,CAAC,UAAU,CAAC;AAC/C,MAAME,SAAS,GAAGhB,QAAQ,CAACC,gBAAgB,CAAC,YAAY,CAAC;AAElD,MAAMgB,UAAU,GAAGA,CAAA,KAAM;EAC/BJ,MAAM,EAAEP,gBAAgB,CAAC,OAAO,EAAE,MAAM;IACvCS,IAAI,EAAEL,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAChCE,MAAM,EAAEH,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAClC,IAAII,IAAI,EAAEL,SAAS,CAACQ,QAAQ,CAAC,QAAQ,CAAC,EAAE;MACvClB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,QAAQ;IACzC,CAAC,MAAM;MACNrB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;IACvC;EACD,CAAC,CAAC;EAEFL,SAAS,CAACZ,OAAO,CAAEkB,EAAE,IAAK;IACzBA,EAAE,CAAChB,gBAAgB,CAAC,OAAO,EAAE,MAAM;MAClCS,IAAI,EAAEL,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MAChCZ,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;MACtCR,MAAM,EAAEH,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC,CAAC,CAAC;EACH,CAAC,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACtBD,MAAMW,OAAO,GAAGvB,QAAQ,CAACc,aAAa,CAAC,oBAAoB,CAAC;AAErD,MAAMU,QAAQ,GAAGA,CAAA,KAAM;EAC5B,IAAI;IACF,MAAMC,WAAW,GAAGA,CAAA,KAAM;MACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;MAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;QACdH,OAAO,CAACb,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MACjC,CAAC,MAAM;QACLN,OAAO,CAACb,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MACpC;IACF,CAAC;IAEDa,WAAW,CAAC,CAAC;IACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtCmB,WAAW,CAAC,CAAC;IACf,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOK,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;;;;;;;;ACpBmF;AACpF,MAAMI,MAAM,GAAGlC,QAAQ,CAACc,aAAa,CAAC,QAAQ,CAAC;AAC/C,MAAMqB,YAAY,GAAGnC,QAAQ,CAACc,aAAa,CAAC,iBAAiB,CAAC;AAEvD,MAAMsB,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,MAAM,GAAG,IAAIJ,0FAAY,CAAC,cAAc,EAAE;IAC9CC,MAAM,EAAE,SAAS;IACjBI,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,MAAMb,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;IAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;MACdQ,MAAM,CAACxB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IAChC,CAAC,MAAM;MACLK,MAAM,CAACxB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC;IAEA,IAAIc,GAAG,IAAI,GAAG,EAAE;MACdS,YAAY,CAACzB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IACtC,CAAC,MAAM;MACLM,YAAY,CAACzB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACzC;EACF,CAAC;EACDa,WAAW,CAAC,CAAC;EACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IACtCmB,WAAW,CAAC,CAAC;EACf,CAAC,CAAC;AACJ,CAAC;;;;;;;;;;;;;;;;AC5BgE;AACjEc,8CAAM,CAACI,GAAG,CAAC,CAACH,8CAAU,EAAEC,8CAAU,EAAEC,4CAAQ,CAAC,CAAC;AAEvC,MAAME,qBAAqB,GAAGA,CAAA,KAAM;EACzC,IAAI;IACF,MAAMC,oBAAoB,GAAG,IAAIN,8CAAM,CAAC,0BAA0B,EAAE;MAClEO,aAAa,EAAE,GAAG;MAClBC,UAAU,EAAE;QACVC,MAAM,EAAE,0CAA0C;QAClDC,MAAM,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;IACR,CAAC,CAAC;IAEF,MAAMC,WAAW,GAAG,IAAIZ,8CAAM,CAAC,gBAAgB,EAAE;MAC/CO,aAAa,EAAE,CAAC;MAChBI,IAAI,EAAE,IAAI;MACVH,UAAU,EAAE;QACVC,MAAM,EAAE,qBAAqB;QAC7BC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,2BAA2B;QAC/B+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHR,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,CAAC,EAAE;UACDA,aAAa,EAAE;QACjB;MACF;IACF,CAAC,CAAC;IAEF,MAAMS,kBAAkB,GAAG,IAAIhB,8CAAM,CAAC,uBAAuB,EAAE;MAC7DQ,UAAU,EAAE;QACVC,MAAM,EAAE,uCAAuC;QAC/CC,MAAM,EAAE;MACV,CAAC;MACDO,mBAAmB,EAAE,IAAI;MACzB;MACAC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,CAAC;MAChBR,KAAK,EAAE,IAAI;MACXqB,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ,CAAC;MACDR,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,kCAAkC;QACtC+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHO,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC,GAAG;UAClBf,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHe,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHf,aAAa,EAAE,GAAG;UAClBe,YAAY,EAAE,CAAC;QACjB;MACF,CAAC;MACDC,cAAc,EAAE;IAClB,CAAC,CAAC;IAEF,MAAMC,eAAe,GAAG,IAAIxB,8CAAM,CAAC,oBAAoB,EAAE;MACvDQ,UAAU,EAAE;QACVC,MAAM,EAAE,oCAAoC;QAC5CC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACV9B,EAAE,EAAE,+BAA+B;QACnC+B,SAAS,EAAE;MACb,CAAC;MACDS,cAAc,EAAE,KAAK;MACrBN,mBAAmB,EAAE,IAAI;MACzBE,cAAc,EAAE,IAAI;MACpBR,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE;IACT,CAAC,CAAC;IAEF,MAAM0B,cAAc,GAAG,IAAIzB,8CAAM,CAAC,oBAAoB,EAAE;MACtD0B,QAAQ,EAAE,IAAI;MACdC,UAAU,EAAE,IAAI;MAChBR,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,MAAM;MACrBI,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE,IAAI;MACX6B,QAAQ,EAAE;QACRC,OAAO,EAAE,IAAI;QACbC,KAAK,EAAE,CAAC;QACRC,oBAAoB,EAAE;MACxB,CAAC;MACDC,gBAAgB,EAAE;IACpB,CAAC,CAAC;IAEFvE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,WAAW,EAAE,YAAY;MACzC0D,cAAc,CAACG,QAAQ,CAACK,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;IAEJxE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,UAAU,EAAE,YAAY;MACxC0D,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;IAEJ9C,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtC,IAAI,CAAC0D,cAAc,CAACG,QAAQ,CAACO,OAAO,EAAE;QACpCV,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;MACjC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAO3C,CAAC,EAAE;IACVC,OAAO,CAAC4C,KAAK,CAAC7C,CAAC,CAAC;EAClB;AACF,CAAC;;;;;;;;;;;;;;;;ACtI6B;AAE9B,MAAM+C,OAAO,GAAG7E,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC;AACrD,MAAMgE,UAAU,GAAG9E,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMiE,SAAS,GAAG/E,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMkE,SAAS,GAAGhF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMmE,aAAa,GAAGjF,QAAQ,CAACc,aAAa,CAAC,kBAAkB,CAAC;AAChE,MAAMoE,UAAU,GAAGlF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMqE,SAAS,GAAGnF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMsE,WAAW,GAAGpF,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC;AAEhD,MAAMuE,cAAc,GAAGA,CAAA,KAAM;EAClC,IAAI;IACF,IAAIC,cAAc,GAAG,IAAI;IAEzB,MAAMC,WAAW,GAAGX,oDAAO,CAAC5E,QAAQ,CAACwF,cAAc,CAAC,eAAe,CAAC,EAAE;MACpErB,QAAQ,EAAE,IAAI;MACdjB,IAAI,EAAE,IAAI;MACVuC,KAAK,EAAE,IAAI;MACXC,QAAQ,EAAE,KAAK;MACfC,UAAU,EAAE;IACd,CAAC,CAAC;IAEF,MAAMC,aAAa,GAAGA,CAACC,UAAU,EAAEC,SAAS,KAAK;MAC/C,IAAInE,MAAM,CAACoE,MAAM,CAACC,KAAK,GAAG,GAAG,EAAE;QAC7BT,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWJ,UAAW;QAC9B,CAAC,CAAC;MACJ,CAAC,MAAM;QACLN,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWH,SAAU;QAC7B,CAAC,CAAC;MACJ;IACF,CAAC;IAEDF,aAAa,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAClDL,WAAW,CAACY,MAAM,CAAC,GAAG,CAAC;IACvB,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;MAC/Bb,WAAW,CAACc,IAAI,CAAC,CAAC;MAElBd,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;MAC5Bf,WAAW,CAACE,KAAK,CAAC,KAAK,CAAC;MACxBF,WAAW,CAACG,QAAQ,CAAC,IAAI,CAAC;MAC1BH,WAAW,CAACrC,IAAI,CAAC,KAAK,CAAC;MAEvB2B,OAAO,CAACnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC7BiD,UAAU,CAACpE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChCkD,SAAS,CAACrE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC/BmD,SAAS,CAACtE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;IACjC,CAAC;IAED0D,WAAW,CAACgB,EAAE,CAAC,MAAM,EAAE,MAAM;MAC3B,IAAI,CAAChB,WAAW,CAACiB,MAAM,CAAC,CAAC,EAAE;QACzBjB,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;QAC5Bf,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC,CAAC,MAAM,IAAI0D,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAIjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACrDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;MACjC,CAAC,MAAM,IAAIlB,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAI,CAACjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACtDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC;IACF,CAAC,CAAC;IAEF0D,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;IACnC,CAAC,CAAC;IAEF2E,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjCuE,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFuE,SAAS,CAAC7E,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACxCuE,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjC2E,WAAW,CAACmB,KAAK,CAAC,CAAC;MACnBvB,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFiE,OAAO,CAACvE,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACtC,IAAIgF,cAAc,KAAK,IAAI,EAAE;QAC3BM,aAAa,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9CN,cAAc,GAAG,KAAK;MACxB;MACAtF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC/D7B,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC3D7B,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAE7D0D,WAAW,CAACoB,KAAK,CAAC,IAAI,CAAC;MACvB1B,aAAa,EAAEvE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MACpCsD,SAAS,EAAEzE,SAAS,CAACmB,GAAG,CAAC,SAAS,CAAC;MACnCgD,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,iBAAiB,CAAC;MACzC7B,QAAQ,CAACc,aAAa,CAAC,OAAO,CAAC,CAACM,KAAK,CAACwF,SAAS,GAAG,SAAS;MAE3D,IAAIrB,WAAW,CAACE,KAAK,CAAC,CAAC,EAAE;QACvBF,WAAW,CAACsB,WAAW,CAAC,CAAC,CAAC;QAC1BT,kBAAkB,CAAC,CAAC;MACtB,CAAC,MAAM;QACLA,kBAAkB,CAAC,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOtE,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;AC1GD,sBAAsB,qBAAM,mBAAmB,qBAAM;AACrD;AACA,aAAa,mBAAO,CAAC,2BAAc;;AAEnC;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA;;AAEA;AACA;AACA,EAAE,gBAAgB,qBAAM;AACxB,UAAU,qBAAM;AAChB,EAAE;AACF;AACA,EAAE;AACF;AACA;;AAEA;;;;;;;;;;;ACZA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,2BAA2B;AAC3B,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,YAAY,YAAY,GAAG,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;;AAEtB;AACA,iBAAiB,QAAQ;;AAEzB;AACA,YAAY,QAAQ;;AAEpB;AACA,YAAY,QAAQ;;AAEpB;AACA;AACA;AACA;AACA;;AAEA,YAAY,aAAa,GAAG,aAAa,MAAM;;AAE/C;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC9KA;AACqD;AACC;AACiC;;AAEvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,uEAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;;AAEA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;;AAGN,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,0BAA0B,uEAAM;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA,eAAe;;AAEf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;;;AAGA,2CAA2C;;AAE3C;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB,0EAAQ;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;;AAEA,+DAA+D,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,6CAA6C,EAAE;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;;AAGR;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,KAAK,8CAA8C,kBAAkB;AACvF,KAAK;AACL;;AAEA;AACA;AACA,kBAAkB,KAAK,sBAAsB,kBAAkB,2BAA2B,kBAAkB;AAC5G,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,kBAAkB,KAAK,uDAAuD,mBAAmB;AACjG,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA,kBAAkB,KAAK,2BAA2B,mBAAmB,+BAA+B,gBAAgB;AACpH,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,qBAAqB,uEAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB,oBAAoB;;AAEpB;AACA;;AAEA;;AAEA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,OAAO;AACP;;AAEA,0EAA0E;;AAE1E,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA,+EAA+E;AAC/E;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,kBAAkB;AAClB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,wBAAwB,8FAAqB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;;AAEA,cAAc,0EAAQ;AACtB,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA,yEAAyE;;AAEzE;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;;AAGhB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,aAAa;;AAEb;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4DAA4D,WAAW,eAAe,aAAa;;AAEnG;AACA;AACA;AACA;AACA,2DAA2D,GAAG;AAC9D,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,oEAAoE,OAAO,eAAe,aAAa;;AAEvG;AACA;AACA,gBAAgB;AAChB;;;AAGA,8BAA8B,wCAAwC;AACtE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD,OAAO,eAAe,cAAc,oBAAoB,WAAW,mBAAmB,EAAE;AAC7I,mBAAmB;AACnB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE,MAAM;AAC9E,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iEAAiE,MAAM;AACvE;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA,WAAW;AACX,SAAS;;AAET;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,aAAa;AACb;AACA,YAAY;;;AAGZ;AACA;AACA;;AAEA,iDAAiD;;AAEjD;AACA;AACA,YAAY;;;AAGZ,oCAAoC;;AAEpC;AACA,SAAS;;AAET,mBAAmB;AACnB,SAAS;;AAET;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,YAAY;AACZ;AACA;AACA;AACA;;AAEA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,oBAAoB,YAAY,+BAA+B,mBAAmB;AAClF,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;;AAEA;;AAE2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/lD3C;AAC2D;AACxB;AACoC;AACa;AACzC;;AAE3C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;AACA;;AAEA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,6EAAU;AAC3B;;AAEA;AACA;AACA,wCAAwC;;AAExC,qBAAqB,6DAAa,GAAG,2DAAa;AAClD,mBAAmB,6DAAa,GAAG,2DAAa,uCAAuC;;AAEvF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,2DAAa,aAAa,2DAAa,eAAe,2DAAa;AAClF,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,2DAAa,qBAAqB,2DAAa,qBAAqB,2DAAa;AAChG,IAAI;AACJ;AACA;;AAEA,YAAY,iBAAiB,GAAG,SAAS;AACzC;;AAEA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,4DAA4D;AAC5D;;AAEA,6CAA6C;AAC7C;;AAEA,+DAA+D;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC,kGAAkG;;AAElG;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;;AAElB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B;AAC7B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,oEAAoE;;AAEpE,iDAAiD;;AAEjD;AACA;AACA,+DAA+D;;AAE/D,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C,kBAAkB;;AAElB;AACA,iBAAiB,2DAAa;AAC9B,IAAI;AACJ;AACA;;AAEA,kBAAkB,4BAA4B;AAC9C,0CAA0C;;AAE1C,2CAA2C;AAC3C;;AAEA,mDAAmD;;AAEnD,kBAAkB;;AAElB;AACA,8BAA8B,2DAAa,SAAS,2DAAa;AACjE,MAAM;AACN;AACA;;AAEA,0BAA0B,WAAW,GAAG,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,2DAAa;AACjC,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,iBAAiB;AAC7B;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA,EAAE,qFAAiB;AACnB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,KAAK;AACzC,iBAAiB,yBAAyB,EAAE,UAAU;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA;AACA;;AAEA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC,IAAI;;AAEL;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,iBAAiB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,eAAe;AACf,6BAA6B;AAC7B;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,uBAAuB,iCAAiC;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA,YAAY,8CAA8C,EAAE,MAAM;AAClE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6EAAU;AAC7B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY,gBAAgB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+EAA+E;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,6EAAU;AACxC;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,kBAAkB;AAChC;AACA,cAAc,oBAAoB;AAClC;AACA,cAAc,kBAAkB;AAChC;AACA,cAAc,kBAAkB;AAChC;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uIAAuI;AACvI;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,oBAAoB;AAClC;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,2FAAqB;AAC3D;AACA;;AAEA;AACA,GAAG,IAAI;AACP,GAAG;;;AAGH;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA,oBAAoB;;AAEpB;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC,YAAY;AACZ,4CAA4C;AAC5C,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,MAAM;AACpB;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,GAAG,6CAA6C;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,qEAAqE;;AAErE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,qDAAS;AAC9B;AACA;;AAEA;AACA;AACA;AACA,IAAI,WAAW;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;;AAGA;;AAE6K;;;;;;;;;;;;ACzqFjK;;AAEZ;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,WAAW,aAAa,2BAA2B,GAAG;AACtD,WAAW,oDAAoD,2BAA2B,YAAY;AACtG,WAAW,uDAAuD;AAClE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,4CAA4C;AACvD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,2BAA2B;AACtC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,cAAc;AACd,YAAY;AACZ,cAAc;AACd,iBAAiB;AACjB,iBAAiB;;;;;;;;;;;AC1MjB,kBAAkB,mBAAO,CAAC,+FAAe;AACzC,UAAU,mBAAO,CAAC,+EAAO;AACzB,eAAe,mBAAO,CAAC,yFAAY;AACnC,UAAU,mBAAO,CAAC,+EAAO;;AAEzB;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,oBAAoB;AAClC;AACA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB;AAC/D;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA,gCAAgC;AAChC;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,KAAK;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,CAAC;;AAED,mHAAmH;AACnH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,CAAC;;AAED,oBAAoB;AACpB,4BAA4B;AAC5B,iBAAiB;;;;;;;;;;;ACjUjB,kBAAkB,mBAAO,CAAC,+FAAe;;AAEzC;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,oBAAoB,YAAY,QAAQ;AAChF,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,0BAA0B,cAAc;AACxC;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,yBAAyB;AACrC,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,MAAM;AAClB,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;;AAGA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,YAAY,QAAQ;AACpB,YAAY,mBAAmB;AAC/B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,EAAE;AACF,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,yBAAyB;AACzB,0BAA0B;AAC1B,2BAA2B;AAC3B,4BAA4B;AAC5B,+BAA+B;AAC/B;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,SAAS;AACT;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ,gEAAgE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA,6BAA6B,+CAA+C;AAC5E,IAAI;AACJ,6BAA6B,mCAAmC;AAChE;AACA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,4EAA4E;AAC5E,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,SAAS;AACV;;AAEA;AACA,CAAC,oBAAoB;AACrB,CAAC,oBAAoB;AACrB,CAAC,yBAAyB;AAC1B,CAAC,eAAe;AAChB,CAAC,YAAY;AACb,CAAC,gBAAgB;AACjB,CAAC,qBAAqB;AACtB;;;;;;;;;;;;AC/yDa;;AAEb,aAAa,6HAA+B;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;ACrnEjB,UAAU,mBAAO,CAAC,+EAAO;AACzB,yBAAyB;AACzB,qBAAqB;AACrB,gJAAqD;;;;;;;;;;;ACHrD,gBAAgB,gIAAkC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd,eAAe;AACf,mBAAmB;AACnB,aAAa;AACb,4BAA4B;AAC5B,mBAAmB;AACnB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,WAAW;AACX,mBAAmB,MAAM;AACzB;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,IAAI,KAAK;AACT;AACA;AACA;AACA,wBAAwB;AACxB,yBAAyB;AACzB,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,IAAI;AACJ;;AAEA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,KAAK;AACZ,gCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,KAAK;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,EAAE;AACF;AACA,0BAA0B,yBAAyB;AACnD,wBAAwB,uBAAuB;AAC/C,sBAAsB,qBAAqB;AAC3C,oBAAoB,mBAAmB;AACvC,sBAAsB;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ,uBAAuB,0DAA0D;AACjF;AACA,wBAAwB;AACxB;;;;AAIA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,kBAAkB;;;;;;;;;;;ACrpBlB,gBAAgB,wGAAwC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,UAAU;;AAEV;;AAEA,UAAU;;AAEV,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;AAGA;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK,IAA0C;AAC/C,EAAE,iCAAO,EAAE,mCAAG;AACd;AACA,GAAG;AAAA,kGAAE;AACL,GAAG,KAAK,EAIN;AACF,CAAC,SAAS,qBAAM,mBAAmB,qBAAM;;AAEzC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;;AAEA;AACA,+DAA+D;AAC/D,sEAAsE;AACtE,gHAAgH;AAChH,uEAAuE;AACvE,gFAAgF;AAChF,8IAA8I;AAC9I,8EAA8E;AAC9E,uFAAuF;AACvF,0IAA0I;AAC1I,qFAAqF;AACrF,8FAA8F;AAC9F,0JAA0J;;AAE1J;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,yBAAyB;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA,6DAA6D,GAAG;;AAEhE;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA,8MAA8M;AAC9M,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,iBAAiB;;AAE9D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,4CAA4C,GAAG;AAC/C,mFAAmF;;AAEnF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;;;;;;;;;;ACzoBD;;AAEA;AACA;AACA,sFAAsF,iBAAiB;AACvG;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,MAAM,IAAyD;AAC/D;AACA,OAAO,EAKgC;AACvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7KD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEqC;AACE;AACT;AACqB;AACpB;AACE;AAC8B;AACT;AACjB;AACqL;AAC1I;AACkC;AACnB;AAC3C;AACa;AACoC;AAC3C;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,wBAAwB;AACxB,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA,sBAAsB,wDAAQ;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,8DAAgB;AACvB;AACA;;AAEA;AACA;AACA;AACA,WAAW,8DAAgB;AAC3B;AACA;AACA;AACA,SAAS,8DAAgB,SAAS,8DAAgB;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,8DAAgB;AAC7D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,0BAA0B,MAAM,EAAE,iBAAiB,EAAE,QAAQ;AAC7D;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,yBAAyB;AAC/D;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6BAA6B,MAAM;AACnC,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,yDAAyD;AAC7D;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,2CAA2C,wEAA0B,IAAI,gEAAkB,mBAAmB,oEAAsB,IAAI,+DAAiB,YAAY,oEAAsB;AAC3L,YAAY,gEAAkB,IAAI,gEAAkB;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,gEAAkB,IAAI,gEAAkB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,sBAAsB,oBAAoB;AAC1C,2BAA2B,yBAAyB;AACpD,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,qBAAqB,mBAAmB;AACxC,4BAA4B,0BAA0B;AACtD,0BAA0B,wBAAwB;AAClD,sBAAsB,oBAAoB;AAC1C,qBAAqB,mBAAmB;AACxC,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS,wDAAQ,KAAK,+DAAiB;AACvC;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6DAAe,KAAK,2DAAa;AAC5C,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa,wDAAQ;AACrB;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA,0CAA0C,wDAAQ;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,kDAAkD,iBAAiB;AACnE,aAAa,oEAAsB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,sCAAsC;AAClD,qCAAqC;AACrC;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,2DAAa;AACf,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qEAAuB;AACpC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uEAAyB;AACtC;AACA;AACA,2BAA2B,qEAAyB;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,MAAM,oEAAoB;AAC1B;AACA;AACA,oBAAoB,oEAAsB;AAC1C;AACA;AACA,MAAM;AACN,mBAAmB,oEAAsB;AACzC;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,2EAA6B;AACvE,4CAA4C,2EAA6B;AACzE,0CAA0C,2EAA6B;AACvE;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAAmB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,wEAA4B;AAC9B;AACA;AACA,MAAM,mEAAmB;AACzB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qEAAyB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4DAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,wDAAQ;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wEAAwB;AAC1C,mBAAmB,6DAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,OAAO;AACP,MAAM,qEAAyB;AAC/B,MAAM,wEAA4B;AAClC,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,GAAG;AACjB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,gEAAoB;AACjC;AACA,gBAAgB,gEAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,4DAA4D,sDAAQ;AACpE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,oBAAoB,+DAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,0CAA0C,aAAa,GAAG,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,8CAA8C,aAAa,GAAG,SAAS;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4CAA4C,aAAa,GAAG,SAAS;AACrE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,OAAO,6BAA6B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc,UAAU;AACxE;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDAAgD;AAC5D;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,WAAW;AAC/B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,qCAAqC;AACrC;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI,+DAAmB;AACvB;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,sBAAsB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,WAAW;AACX;AACA;AACA,MAAM,iDAAiD;AACvD;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC,KAAK;AAC/C;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,YAAY,mDAAmD;AAC/D;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,GAAG,aAAa,UAAU;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,GAAG,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE;AACvE;AACA;AACA;AACA;AACA,sDAAsD,GAAG,SAAS,EAAE;AACpE;AACA,qBAAqB,GAAG,IAAI,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mEAAmE,mBAAmB;AACtF;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,kBAAkB,sEAAwB;AAC1C;AACA,kBAAkB,sEAAwB;AAC1C;AACA,oDAAoD,SAAS;AAC7D;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,mBAAmB;AACjD,oCAAoC,YAAY,mBAAmB;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,0BAA0B;AAClE,0CAA0C,0BAA0B;AACpE;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,uBAAuB;AACrC,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,uBAAuB,KAAK,uBAAuB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,6DAA6D;AAC7D,YAAY,OAAO;AACnB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gEAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,SAAS,yBAAyB;AAClC,uDAAuD;AACvD;AACA;AACA;AACA,cAAc,8BAA8B,IAAI,yBAAyB;AACzE;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+DAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,MAAM,2BAA2B,4BAA4B;AAC7D;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,4BAA4B;AACzC;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,+BAA+B;AAC7D,SAAS,yBAAyB;AAClC,yCAAyC;AACzC;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,cAAc,+BAA+B;AAC7C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB,gEAAoB;AAC3C;AACA;AACA;;AAEA;AACA;AACA,MAAM,4BAA4B,8BAA8B;AAChE;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,6BAA6B;AAC1C;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,kEAAsB;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,2BAA2B;AACnC;AACA,sCAAsC,iCAAiC;AACvE;AACA;AACA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,sCAAsC;AACpE;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0EAA8B;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA,uCAAuC,sCAAsC;AAC7E;AACA,0DAA0D,wBAAwB;AAClF;AACA,aAAa,QAAQ;AACrB,sDAAsD,sCAAsC;AAC5F;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,yEAA6B;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc,WAAW,8CAA8C,WAAW;AAClF,yCAAyC,yBAAyB;AAClE,cAAc,mCAAmC;AACjD;AACA;AACA,cAAc,wCAAwC;AACtD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,kDAAkD,KAAK,GAAG;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,6CAA6C,KAAK,GAAG,EAAE,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,iBAAiB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,0CAA0C,OAAO,yCAAyC,MAAM,uCAAuC,SAAS;AAChJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6DAAe,IAAI,6DAAe;AACxC,kBAAkB,6DAAe;AACjC;AACA;AACA;;AAEA;AACA;AACA,IAAI,4FAA4F;AAChG;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA,UAAU;AACV;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mDAAmD,4BAA4B;AAC/E;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,iBAAiB;AACtC,mBAAmB,gBAAgB;AACnC;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B,iBAAiB,gBAAgB;AACjC,IAAI,iDAAiD;AACrD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA,YAAY;AACZ,4DAA4D,WAAW;AACvE,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA,2BAA2B,gBAAgB,QAAQ,YAAY;AAC/D,WAAW,iBAAiB;AAC5B;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,SAAS;AACtB,0DAA0D;AAC1D;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB,iBAAiB;AACrC;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6BAA6B,UAAU;AACvC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc,kBAAkB,aAAa,sBAAsB;AACnE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,SAAS,yDAAkB;AAC3B;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wEAA0B,qBAAqB,sEAAwB,qDAAqD,uEAAyB,qBAAqB,wEAA0B,qBAAqB,0EAA4B,qBAAqB,wEAA0B,yDAAyD,wEAA0B,qBAAqB,wEAA0B,qBAAqB,uEAAyB;AACnf,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gCAAgC,oBAAoB,GAAG,qBAAqB;AAC5E,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oBAAoB,mBAAmB;AACvC;AACA;AACA;;AAEA;AACA,YAAY,aAAa;AACzB;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,aAAa;AAC5B;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA,uDAAuD,mBAAmB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,kBAAkB;AAC/B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,QAAQ;AACxB,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA,YAAY,kBAAkB;AAC9B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,mDAAmD,YAAY;AAC/D;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC,MAAM,gBAAgB;AACtB;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,wBAAwB;AACvC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE,iBAAiB;AACrF,IAAI,iBAAiB,OAAO,gBAAgB;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY,oEAAsB;AAClC;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC;;AAEA;AACA;AACA,mBAAmB,+DAAiB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oEAAsB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gDAAgD,IAAI;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,8CAA8C,+DAAiB;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA,qBAAqB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc,EAAE,2DAAe;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB,iDAAiD,UAAU;AACjF;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,mDAAG;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA;AACA;AACA,4EAA4E,UAAU;AACtF;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,QAAQ;AAC1B,4DAA4D,qBAAqB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,4DAAc;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA,gBAAgB,qBAAqB,YAAY,kBAAkB;AACnE;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB,qBAAqB;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,gCAAgC,KAAK;AACrC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA,0BAA0B,mDAAmD;AAC7E,6DAA6D;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,uBAAuB,YAAY,iBAAiB,gBAAgB;AACpE;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ,WAAW;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,0BAA0B,wBAAwB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM;AACjC,8BAA8B,MAAM;AACpC;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM,yBAAyB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,sDAAsD,qBAAqB;AAC3E,MAAM,qBAAqB,OAAO,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA,8CAA8C,gCAAgC;AAC9E;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,4BAA4B,qBAAqB,GAAG,OAAO,eAAe;AAC1E,MAAM,qBAAqB;AAC3B;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6DAAe;AACvB;AACA;;AAEA;AACA;AACA;AACA,QAAQ,2DAAa;AACrB;AACA;AACA;AACA,8CAA8C,uDAAG,iBAAiB,uDAAG;AACrE;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,oEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM,6DAAe;AACrB;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA,aAAa,QAAQ;AACrB,iBAAiB,kCAAkC;AACnD;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sDAAQ,IAAI,8DAAgB,IAAI,8DAAgB;AACxD,wBAAwB,MAAM;AAC9B,aAAa,8DAAgB;AAC7B;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD,iBAAiB,4BAA4B;AAC7C;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,8BAA8B;AACpE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,IAAI,+CAA+C;AACnD,IAAI,+CAA+C;AACnD,IAAI,mDAAmD;AACvD;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,IAAI,0DAA0D;AAC9D;AACA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA,2DAA2D,cAAc;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E,KAAK,kBAAkB;AAClG;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,MAAM;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC,KAAK,2BAA2B;AAC1E;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC;AAC1C,MAAM,sCAAsC;AAC5C;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6DAAe,gBAAgB,sDAAQ;AACvE,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,gBAAgB;AACvD,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA,eAAe,6DAAe;AAC9B,MAAM,2DAAe,aAAa,sDAAQ;AAC1C;AACA;;AAEA;AACA,qDAAqD,8BAA8B;AACnF,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,8BAA8B,MAAM,+BAA+B;AAC3E;AACA;AACA;AACA;AACA,wCAAwC,wDAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,iBAAiB,yBAAyB,wBAAwB;AAC9E;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS,gBAAgB,SAAS,gBAAgB,SAAS;AACzH,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS;AAC7G,UAAU;AACV,0DAA0D,UAAU,UAAU,UAAU,cAAc,SAAS,WAAW,SAAS;AACnI,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS,YAAY,SAAS;AAClI;AACA;AACA;AACA,yBAAyB,+DAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB,WAAW,WAAW,GAAG,oBAAoB;AAC3E;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;;AAEA;AACA,IAAI,2DAAe,aAAa,sDAAQ;;AAExC;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,GAAG;AACtC,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8DAA8D,GAAG;AACjE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8EAA8E,UAAU,oBAAoB;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,6DAA6D;AAC7D;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,sCAAsC;AAC5C;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,KAAK;AACL;AACA;AACA,sBAAsB,+BAA+B;AACrD,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,oBAAoB,UAAU;AAC9B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qEAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,sBAAsB,6BAA6B;AACnD,KAAK;AACL,gCAAgC,qEAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,8BAA8B;AACjF,MAAM,2BAA2B;AACjC;AACA,aAAa,YAAY;AACzB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,0BAA0B,KAAK,wBAAwB;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,sBAAsB,qEAAuB;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,eAAe;AAC3B,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,sBAAsB;AAC9C;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,wBAAwB;AAChC,IAAI,sBAAsB,kCAAkC;AAC5D;AACA,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,+BAA+B,iCAAiC;AAChE,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,cAAc,wDAAQ;AACtB;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,GAAG,UAAU,EAAE,0EAA0E,GAAG,IAAI,EAAE;AACnM;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,wBAAwB,8CAAO;AACrC;AACA;AACA,4BAA4B,sDAAa,CAAC,8CAAO,WAAW,sDAAa;AACzE;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,uCAAuC;AACxE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,sBAAsB;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,QAAQ,gFAAgC,gHAAgH,oFAAsC;AAC9L;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,oCAAoC,IAAI,oCAAoC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,+BAA+B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,kBAAkB,QAAQ;AAC1B;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,+BAA+B;AACvC,IAAI,oBAAoB,kCAAkC;AAC1D;AACA,IAAI,gBAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE,QAAQ;AACR,iCAAiC,mCAAmC;AACpE;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,uBAAuB;AAC3D;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,iBAAiB;AACpE,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mEAAmE,aAAa,UAAU,EAAE;AAC5F,kCAAkC,MAAM;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,wDAAQ;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C,oDAAoD,GAAG;AACvD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B,EAAE,sBAAsB;AAClF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C,qDAAqD,GAAG;AACxD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B,EAAE,sBAAsB;AACpF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mDAAmD,GAAG;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,eAAe;AAChD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gBAAgB;AAC5B;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,iDAAiD,sEAAsB;;AAEvE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gBAAgB;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,8BAA8B,iBAAiB,EAAE,aAAa,EAAE,sBAAsB;AACtF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,8BAA8B,iBAAiB,EAAE,sBAAsB;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,yDAAkB,iBAAiB,yDAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,8BAA8B,yDAAkB;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4DAAc;AACjC;AACA;AACA,wBAAwB,4DAAc;AACtC,YAAY;AACZ;AACA;AACA;AACA;AACA,kBAAkB,kEAAoB;AACtC;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO,mBAAmB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,qEAAqE;AACrE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA,gCAAgC,6BAA6B;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yBAAyB,sBAAsB;AAC/C;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM,MAAM,GAAG,WAAW,oCAAoC,uCAAuC,KAAK,gCAAgC,oBAAoB;AAC9K;AACA,6BAA6B,SAAS,WAAW,KAAK,yBAAyB,qBAAqB,EAAE,SAAS;AAC/G,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD,8EAA8E,SAAS;AACvF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,oBAAoB,gEAAgE,oBAAoB,wEAAwE,sBAAsB;AACnR,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iEAAqB;AAC/C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iEAAqB;AAC7B,QAAQ;AACR,QAAQ,iEAAqB;AAC7B;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0FAA0F,4DAA4D;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,8DAA8D,qEAAuB;;AAErF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oDAAoD,qEAAuB;AAC3E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,gEAAoB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C,OAAO;AACP;AACA;AACA,yCAAyC,UAAU;AACnD,OAAO;AACP;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,oBAAoB;AACjC,aAAa,UAAU;AACvB,aAAa,gCAAgC;AAC7C;AACA;AACA,cAAc,QAAQ,WAAW;AACjC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,GAAG;AACH;AACA;AACA,kBAAkB,oEAAsB;;AAExC;AACA;;AAEA;AACA,oBAAoB,6EAA+B;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI,4DAAgB;;AAEpB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uEAAyB,YAAY,8DAAgB;;AAEtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,4BAA4B,4DAAgB;AAC5C;AACA;AACA,GAAG;AACH;AACA,IAAI,4DAAgB;AACpB;AACA;AACA,CAAC;AACD,2DAA2D,uEAAyB;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAA6C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK;AAChD;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,0BAA0B,cAAc;AACxC,sCAAsC,cAAc;AACpD,wDAAwD,cAAc;AACtE,OAAO;AACP;AACA,0BAA0B,KAAK;AAC/B,YAAY,cAAc;AAC1B;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,aAAa,oEAAsB;;AAEnC;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,8BAA8B;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc,kBAAkB;AAChC,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kEAAoB;AAC5B,0CAA0C,gEAAoB;AAC9D;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC,gBAAgB,oEAAsB;AACtC;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,+DAAmB;AACzB;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,mDAAmD,0BAA0B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,IAAI,yBAAyB;AAC7B;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,uEAAuE,4BAA4B;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,0DAA0D,WAAW;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,mEAAmE,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,2DAA2D,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,oEAAoE,WAAW;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD,wCAAwC,EAAE;AAC1C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,6CAA6C;AAC7C,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA,kDAAkD,UAAU;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,aAAa;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,QAAQ,wDAAQ;AAChB,QAAQ,wDAAQ;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,MAAM;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,MAAM,qBAAqB,UAAU;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;;AAEA,SAAS,QAAQ;AACjB,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU,GAAG,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,cAAc,aAAa,cAAc;AACjF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD,qBAAqB;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA,WAAW;AACX;AACA;AACA,0BAA0B,yBAAyB;AACnD,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe;AAC9F,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;AACpE;AACA;AACA;AACA,yEAAyE,WAAW;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,qEAAqE,WAAW;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2BAA2B,QAAQ,yBAAyB,gBAAgB;AAC5E;AACA;;AAEA;AACA;AACA,2BAA2B,QAAQ,iBAAiB,gBAAgB;AACpE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,eAAe;AACf,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,sBAAsB,wDAAQ;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,wEAAwB;;AAEnD;AACA,OAAO,wDAAQ;;AAEf;AACA,IAAI,wEAAwB;;AAE5B;AACA,aAAa,6DAAa;;AAE1B;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;;AAEhB;AACA,IAAI,wEAAwB;;AAE5B;AACA,gBAAgB,6DAAa;;AAE7B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,+EAAiC;AACzF,2BAA2B,oEAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX,aAAa,6EAAiC;AAC9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,QAAQ,+EAAiC,IAAI,+EAAiC;AAC9E;AACA,MAAM,6EAAiC;AACvC;AACA;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,aAAa,2EAA6B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,yDAAkB;AACxD,gCAAgC,yDAAkB;AAClD,qCAAqC,yDAAkB,uBAAuB,yDAAkB;AAChG,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU,wDAAQ;AAClB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,cAAc;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,QAAQ,KAAK;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,yBAAyB,kBAAkB,EAAE,wCAAwC;;AAErF;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,mCAAmC,iBAAiB;AACpD,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB,QAAQ,uBAAuB;AACtE;AACA,aAAa,QAAQ;AACrB,gCAAgC,wBAAwB;AACxD,aAAa,wBAAwB;AACrC;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC,MAAM,qBAAqB,KAAK,2BAA2B;AAC3D;AACA,aAAa,QAAQ;AACrB,oBAAoB,iBAAiB;AACrC;AACA,cAAc;AACd;AACA;AACA,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,aAAa,QAAQ;AACrB,0DAA0D,kBAAkB;AAC5E;AACA,cAAc;AACd,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,yBAAyB;AACzB;AACA,cAAc;AACd;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA,gBAAgB;AAChB,gBAAgB,QAAQ;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,oBAAoB,yGAAyG;AAC7H;AACA;AACA;AACA;AACA,oCAAoC,iCAAiC;AACrE;;AAEA;AACA,kCAAkC,qCAAqC;AACvE;AACA,cAAc,oBAAoB;AAClC;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4DAAc,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,4BAA4B;AAC/C;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,UAAU;AACV;AACA;AACA,kBAAkB,gEAAkB;;AAEpC;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA;AACA,cAAc;AACd;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,+DAA+D;AACrE;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA,eAAe,sCAAsC;AACrD;AACA,cAAc;AACd;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,+CAA+C,KAAK,2BAA2B,YAAY;AAC3F;AACA;AACA,oCAAoC,KAAK;AACzC,MAAM;AACN,+CAA+C,KAAK;AACpD;AACA;AACA,6CAA6C,KAAK,6BAA6B,cAAc;AAC7F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,kBAAkB;AAC9B;AACA;AACA,sBAAsB,SAAS,uCAAuC,MAAM,IAAI,aAAa,SAAS;AACtG;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA,IAAI,cAAc;AAClB;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA,qCAAqC,cAAc,KAAK,YAAY;AACpE;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,eAAe;AAC3B,6CAA6C,cAAc,KAAK,YAAY;AAC5E;AACA;AACA,YAAY;AACZ,+CAA+C,qBAAqB;AACpE;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,iEAAmB;AAC3F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,+EAAiC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA,0CAA0C;AAC1C;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,cAAc,QAAQ;AACtB;AACA;AACA,WAAW;AACX;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,uBAAuB,6CAA6C;AACpE;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,wBAAwB;AACnC;AACA;AACA,YAAY;AACZ;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,iBAAiB,EAAE;AAC5D;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;;AAEA;AACA,uBAAuB,uCAAuC;AAC9D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,kBAAkB,kBAAkB,EAAE;AAClE;AACA;AACA,CAAC;AACD;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,mCAAmC;AAC1D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,cAAc,cAAc;AAC5B;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA,gDAAgD;AAChD,GAAG;;AAEH,wDAAwD;;AAExD;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,4EAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,OAAO,KAAK,IAAI;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;;AAEA,kBAAkB,wBAAwB;AAC1C;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;AACN,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY;AACZ;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,cAAc;AAChC;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA,8BAA8B;;AAE9B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA,IAAI;AACJ,yCAAyC;AACzC,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,gDAAgD;AAChD;;AAEA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA;AACA,YAAY,SAAS;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA,aAAa,gEAAiB;AAC9B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6BAA6B,2BAA2B;AACxD;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ,kBAAkB,2BAA2B;AAC7C;AACA,sEAAsE;;AAEtE,+CAA+C,6EAAY;AAC3D;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,YAAY,MAAM,GAAG,IAAI;AACzB,GAAG;;AAEH;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,MAAM;AACnD;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB,+CAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,eAAe;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4CAA4C;;AAE5C,6CAA6C;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,KAAK;AACL,SAAS,+DAAiB;AAC1B,iBAAiB,+DAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA,0CAA0C,EAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0EAAQ,GAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,yBAAyB;AACzB;;AAEA,yCAAyC;;AAEzC;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS;;AAEf,+DAA+D;AAC/D;AACA;;AAEA;AACA,gDAAgD;;AAEhD,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA,IAAI;AACJ,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,+BAA+B;AACxD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wCAAwC;AAC9D;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA,IAAI;;AAEJ;AACA;AACA,mDAAmD;AACnD;;AAEA,sBAAsB,mCAAmC;AACzD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,oBAAoB,iCAAiC;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,SAAS;AACpB;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,cAAc,UAAU;AACxB;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,mCAAmC,+DAAmB;AACtD;AACA;AACA;AACA;AACA,8DAA8D;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,kEAAkE;;AAElE;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,MAAM;;AAEN;AACA;AACA;AACA,8BAA8B,+DAAmB;AACjD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC,QAAQ;AACR;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,iCAAiC,+DAAiB;AAClD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB;AACA;;AAEA,sFAAsF;AACtF;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,wFAAwF;;AAExF,oFAAoF;;AAEpF,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2DAAe,qBAAqB,2DAAe,qBAAqB,2DAAe;AAC1G,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,sFAAiB;AACzB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,MAAM;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kCAAkC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E;;AAE3E;AACA;AACA,kBAAkB,aAAa;AAC/B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,iHAAiH;;AAEjH,YAAY,sFAAiB,QAAQ,kFAAa;AAClD,6BAA6B,gFAAY,SAAS;AAClD;;AAEA;AACA;AACA;AACA,iBAAiB,0FAAuB,SAAS;AACjD;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,uBAAuB;AACzC;AACA,oCAAoC;;AAEpC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,WAAW;AACxD;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,kDAAK;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN,kBAAkB,8BAA8B;AAChD;AACA;AACA,sBAAsB,4DAAe,iBAAiB;;AAEtD;AACA,QAAQ,sEAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,0DAA0D;AAC1D;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,4DAAe,iBAAiB;;AAErE;AACA;AACA,2BAA2B,+DAAmB;AAC9C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAS,CAAC,4EAAO;AAChC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sEAAyB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wBAAwB,0CAA0C,IAAI;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+BAA+B;;AAE/B,qCAAqC;AACrC;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA,2BAA2B,+DAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA,sBAAsB,2DAAc,qCAAqC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,6DAA6D,IAAI;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+DAAmB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+DAAmB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC,mCAAmC;AAC7G;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wQAAwQ;;AAExQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,kBAAkB,gBAAgB;AAClC;AACA,8DAA8D;;AAE9D,kGAAkG;AAClG,QAAQ;;AAER,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uVAAuV;AACvV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,cAAc,YAAY;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA,oEAAoE;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,iBAAiB;AACjC,4BAA4B;;AAE5B,kBAAkB,uBAAuB;AACzC,sCAAsC;;AAEtC,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;;AAEf,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,oCAAoC,SAAS;AAC7C,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;AACN;;AAEA,uEAAuE;;AAEvE,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,MAAM;;AAEN;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,MAAM;;AAEN,oDAAoD;;AAEpD;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN,gDAAgD;;AAEhD;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,WAAW,uBAAuB;AAClC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA,oDAAoD;;AAEpD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,mCAAmC;;AAEnC,sCAAsC;;AAEtC,6BAA6B;;AAE7B;AACA,+CAA+C;;AAE/C,mCAAmC;;AAEnC;AACA,8BAA8B;;AAE9B;AACA,uCAAuC;;AAEvC,6BAA6B;;AAE7B;AACA,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C,uCAAuC;;AAEvC,yCAAyC;;AAEzC,iCAAiC;;AAEjC;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC,2CAA2C;;AAE3C,mCAAmC;;AAEnC;AACA,2CAA2C;;AAE3C,wCAAwC;;AAExC,8CAA8C;;AAE9C,+CAA+C;;AAE/C,gCAAgC;;AAEhC;AACA,2CAA2C;;AAE3C,+CAA+C;;AAE/C,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA,4BAA4B;AAC5B;;AAEA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,sCAAsC;;AAEtC,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,yCAAyC;;AAEzC,wCAAwC;;AAExC,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,wCAAwC;;AAExC,0CAA0C;;AAE1C,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA,2BAA2B;;AAE3B;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,uBAAuB;AACvB;;AAEA,uIAAuI;AACvI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,qCAAqC,mCAAmC;;AAExE;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC;AACA;AACA,mCAAmC;;AAEnC;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA,gCAAgC;AAChC,QAAQ;AACR;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,2BAA2B,eAAe;AAC1C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2DAA2D;AAC3D,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,uFAAuF;;AAEvF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,4BAA4B;AAC5B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4DAA4D;AAC5D;;AAEA,mBAAmB;;AAEnB;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,gEAAgE;AAChE,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;AAER;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,yBAAyB;;AAEzB,2EAA2E;;AAE3E;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B,iCAAiC;AACjC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E;;AAE/E,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;;AAEA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,wCAAwC;AACxC;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,+DAA+D;;AAE/D;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,6EAA6E;;AAE7E,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA,UAAU;;AAEV,+DAA+D;;AAE/D,gEAAgE;AAChE;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,iDAAiD;;AAEjD;AACA;AACA;AACA,0BAA0B;;AAE1B,mDAAmD;AACnD;AACA,UAAU;AACV;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA,UAAU;;AAEV,qCAAqC;AACrC;;AAEA,iFAAiF;;AAEjF;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO,KAAK,KAAK,WAAW,UAAU;AAC7E,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA,0HAA0H;AAC1H;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,4BAA4B;;AAE5B,iCAAiC,yCAAyC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA,yCAAyC;;AAEzC;AACA,OAAO;;AAEP;AACA,+CAA+C;;AAE/C;AACA;AACA,+BAA+B;AAC/B;;AAEA,gCAAgC;AAChC,OAAO;AACP;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,mBAAmB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,gCAAgC,QAAQ;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,gBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,kEAAkE;;AAElE,sDAAsD;;AAEtD,gDAAgD;AAChD;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA,kDAAkD;;AAElD,kDAAkD;;AAElD,sCAAsC;;AAEtC;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA,kDAAkD;AAClD,QAAQ;AACR,sCAAsC;;AAEtC,0CAA0C;;AAE1C,0CAA0C;;AAE1C;AACA,oBAAoB,oCAAoC;AACxD,4CAA4C;AAC5C;AACA;;AAEA,gDAAgD;;AAEhD,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ,uEAAuE;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG;;AAExG;AACA;AACA;AACA;AACA;AACA,4HAA4H;;AAE5H,0IAA0I;AAC1I;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,oCAAoC,SAAS;AAC7C;AACA,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;;AAEd,sEAAsE;;AAEtE,yBAAyB;;AAEzB;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV,kEAAkE;;AAElE;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,kBAAkB,2BAA2B;AAC7C;AACA,wCAAwC;;AAExC;AACA;AACA,UAAU;;AAEV;AACA;AACA,UAAU;;AAEV,0EAA0E;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,yDAAyD;;AAEzD,kEAAkE;AAClE;;AAEA,0CAA0C;;AAE1C,sDAAsD;;AAEtD,kBAAkB,8BAA8B;AAChD;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,QAAQ;AACR;;AAEA,sEAAsE;;AAEtE;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,kGAAkG;;AAElG,6FAA6F;;AAE7F;AACA;AACA;AACA,SAAS;AACT,OAAO,GAAG;;AAEV,2EAA2E;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,+HAA+H;AAC/H;;AAEA;AACA;AACA,oGAAoG;;AAEpG;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,sGAAsG;;AAEtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH;;AAEpH;AACA,YAAY;;AAEZ;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO;AACP,iFAAiF;;AAEjF;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B;AACA,cAAc,QAAQ;AACtB;AACA,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,eAAe,2BAA2B;AAC1C;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;;AAEA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,sBAAsB;;AAEtB,iBAAiB;;AAEjB,mBAAmB;;AAEnB,wBAAwB;;AAExB;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,gBAAgB,UAAU;AAC1B,gBAAgB,yBAAyB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mBAAmB;AACnB,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,eAAe;;AAEf,iDAAiD;;AAEjD;AACA,6CAA6C;;AAE7C,mFAAmF;;AAEnF,yCAAyC;;AAEzC;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,sBAAsB,YAAY;AAClC,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA,0DAA0D;;AAE1D,2DAA2D;;AAE3D;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA,sCAAsC;AACtC;;AAEA,+FAA+F;;AAE/F;AACA;AACA,sCAAsC;;AAEtC,gFAAgF;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA,oBAAoB;;AAEpB,qDAAqD;;AAErD;AACA;AACA;AACA,sBAAsB;;AAEtB,uDAAuD;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,WAAW,6CAA6C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,gBAAgB,UAAU;AAC1B;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0EAAQ,GAAG;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA,eAAe,0FAAuB,qBAAqB;AAC3D;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB,+CAA+C,IAAI;AAC1G;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,kDAAkD;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iEAAiE;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA,MAAM,2FAAwB;AAC9B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,wBAAwB,0FAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,+BAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,2BAA2B,qFAAoB,IAAI,KAAK,EAAE,QAAQ;AAClE,GAAG;AACH;AACA;AACA,0BAA0B,WAAW,8BAA8B,6BAA6B;AAChG;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,iBAAiB,QAAQ;AACzB,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kFAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,qEAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6DAAe;AAClD;AACA;AACA;AACA,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6DAAe;AAC1C;AACA;AACA;AACA,6BAA6B,6DAAe,YAAY;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,8DAA8D;AAC9D;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,qFAAqF;AACrF;;AAEA,iGAAiG;AACjG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,8FAA8F;AAC9F;;AAEA,6HAA6H;;AAE7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mCAAmC,QAAQ,MAAM;AACzE;AACA;AACA;AACA;AACA,IAAI;;AAEJ,uFAAuF;;AAEvF,yEAAyE;;AAEzE;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA,gHAAgH;;AAEhH,qKAAqK;AACrK;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,sBAAsB,mCAAmC,QAAQ,MAAM;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA,gDAAgD,uEAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,uEAAyB;AAC3E;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;AAChB;;AAEA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2GAA2G;;AAE3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA,8EAA8E;;AAE9E,mEAAmE;AACnE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;;AAEA,oCAAoC,0DAAc;AAClD;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG,IAAI,GAAG;;AAEV,sGAAsG;;AAEtG;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA,KAAK;AACL,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,EAAE;AACxE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA,sBAAsB,cAAc,GAAG,YAAY,GAAG,SAAS;AAC/D;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ,iEAAiE,qEAAgB;AACjF;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,SAAS;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,iDAAiD,qEAAgB;AACjE,6CAA6C,qEAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,0BAA0B;;AAE1B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE,IAAI;AACJ;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,YAAY,MAAM,GAAG,YAAY,GAAG,iBAAiB,+BAA+B,UAAU,GAAG,mBAAmB,kCAAkC,eAAe,KAAK,YAAY,yCAAyC,YAAY,KAAK,SAAS,+BAA+B,eAAe,mBAAmB,SAAS,mBAAmB,SAAS,sBAAsB,UAAU,mBAAmB,GAAG;AACrZ;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,aAAa;AACxB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,iBAAiB,2DAAe,QAAQ,2DAAe;AACvD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,sDAAsD,wBAAwB,qBAAqB,yBAAyB,yBAAyB,iBAAiB,qCAAqC,sBAAsB,kCAAkC,eAAe;AAClR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,6BAA6B;;AAE7B;AACA;AACA,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER,iCAAiC;;AAEjC;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,0BAA0B,aAAa,KAAK,SAAS;AACrD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,qCAAqC,OAAO,KAAK,kCAAkC,KAAK;AACxF;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA,MAAM;AACN;;AAEA;AACA,uCAAuC,kBAAkB,KAAK;AAC9D;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,kEAAkE;AAClE;AACA;;AAEA;AACA;AACA,2DAA2D,eAAe;AAC1E,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB,aAAa,SAAS;AACtB;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kDAAkD,KAAK,cAAc,MAAM;AAC3E;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA,qFAAqF;;AAErF,6EAA6E;;AAE7E,mGAAmG;AACnG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,sEAAsE,YAAY,mBAAmB,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,0KAA0K;AAC1K;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+IAA+I;AAC/I;AACA;;AAEA,sHAAsH;AACtH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,IAAI,UAAU,IAAI,KAAK,IAAI;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,WAAW,KAAK,SAAS,MAAM,UAAU;AAChF,oFAAoF;AACpF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C,gDAAgD;;AAEhD,6EAA6E;AAC7E;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,2EAA2E;;AAE3E;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA,kEAAkE;AAClE;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,iBAAiB,uBAAuB,4CAA4C,uBAAuB,4CAA4C;AACvS;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6CAA6C;AAC7C;;AAEA;AACA,0EAA0E,kBAAkB;AAC5F;AACA,gEAAgE,gBAAgB;AAChF,qCAAqC;AACrC;;AAEA,6CAA6C,+DAAmB;AAChE;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;AACA,kBAAkB,MAAM,YAAY,aAAa,6BAA6B,wBAAwB,cAAc,wBAAwB,IAAI;AAChJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0EAAQ,GAAG;AACnC;AACA,SAAS;AACT,QAAQ,0EAAQ;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,6BAA6B;;AAE7B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+BAA+B,IAAI;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,wBAAwB,gCAAgC,gCAAgC,QAAQ,OAAO,MAAM,IAAI,QAAQ;AACzH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,6HAA6H;AAC7H;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,SAAS,uCAAuC,mCAAmC;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA,+DAA+D,+BAA+B;AAC9F;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,0BAA0B,sCAAsC,EAAE,+BAA+B;AACjG;AACA;AACA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,4EAA4E,qBAAqB,uCAAuC,mCAAmC;AAC3K;AACA;AACA,uCAAuC;AACvC;;AAEA,iFAAiF;;AAEjF,+GAA+G;AAC/G;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB,IAAI,6DAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,gEAAgE,YAAY;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC,KAAK;AAC7C;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE,yDAAyD,UAAU;AACnE;AACA,mBAAmB,KAAK;AACxB;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,+CAA+C,uBAAuB,KAAK,cAAc,WAAW,KAAK;AACzG;AACA;AACA,MAAM;AACN,+CAA+C,QAAQ,+FAA+F,wBAAwB,KAAK,KAAK;AACxL;AACA;AACA;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA;AACA,MAAM;AACN,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,qCAAqC,KAAK,qBAAqB,OAAO;AACtE;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,6DAA6D,YAAY;AACzE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA,6DAA6D,SAAS;AACtE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA,MAAM;AACN,6CAA6C,KAAK;AAClD;AACA,GAAG;AACH;AACA;AACA,iBAAiB,gFAAe;AAChC,oCAAoC,KAAK,oBAAoB,OAAO;AACpE;AACA,kEAAkE,UAAU;AAC5E,8DAA8D,UAAU;AACxE;AACA,qBAAqB,KAAK;AAC1B,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B;AAC3F;AACA;AACA,MAAM;AACN,uDAAuD,KAAK;AAC5D;AACA,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,iBAAiB,gFAAe,SAAS;AACzC;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B,KAAK,MAAM;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oCAAoC,KAAK;AACzC;AACA,2BAA2B,MAAM,4DAA4D;AAC7F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,KAAK;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,kEAAoB,IAAI,kEAAoB,qBAAqB,kEAAoB;AAC/H;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,WAAW,mEAAqB,IAAI,mEAAqB,qBAAqB,mEAAqB;AACnG;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,cAAc;AAC1D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gBAAgB,KAAK;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA,gFAAgF;;AAEhF;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C,eAAe,6DAAe;AAC9B,uCAAuC;AACvC;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,uEAAuE,6DAAe;AACtF,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA,eAAe,kEAAoB;AACnC,oBAAoB,kEAAoB;AACxC,MAAM;AACN,gBAAgB,2DAAe;AAC/B;AACA;AACA,uBAAuB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qEAAgB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA,kBAAkB,6DAAe;AACjC,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA,sDAAsD;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0BAA0B;AAC1B,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA,2BAA2B;;AAE3B,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW,IAAI,aAAa,+BAA+B,aAAa,WAAW,mBAAmB,sBAAsB,2BAA2B,iEAAiE,wBAAwB;AACnR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;AAEA;AACA,qFAAqF;;AAErF;AACA,8EAA8E,mBAAmB;AACjG;AACA,MAAM;AACN;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0BAA0B,wBAAwB,mCAAmC;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qBAAqB,gBAAgB,gBAAgB,cAAc,mBAAmB;AACxI;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,SAAS;AACzB;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,QAAQ;AACR;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,gBAAgB,SAAS;AACzB;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,uBAAuB,qBAAqB;AAC5C,6BAA6B;;AAE7B;AACA,oHAAoH;;AAEpH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,GAAG;AACrB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA+D;;AAE/D;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,6FAA6F;AAC7F;;AAEA;AACA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,iEAAiE,cAAc,KAAK,eAAe;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN,gEAAgE;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ,WAAW,aAAa;AAClE;AACA,iCAAiC;AACjC;AACA,UAAU;AACV;AACA,UAAU;AACV,4FAA4F;AAC5F;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,8BAA8B;AAC9B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,YAAY;AACvB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA,iEAAiE;;AAEjE;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN,8GAA8G;;AAE9G,uFAAuF;;AAEvF;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD,6EAA6E,KAAK;AAClF;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+CAA+C,MAAM;AACrD,yDAAyD,cAAc;AACvE;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,kCAAkC,0DAAY;AAC9C,qCAAqC,0DAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,4CAA4C,yDAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA;AACA;AACA,kEAAkE;;AAElE,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,+DAAmB;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,2CAA2C,iDAAiD,KAAK,gBAAgB;AACjH;AACA,WAAW,eAAe;AAC1B;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,uEAAuE;AACvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA,mIAAmI;AACnI;;AAEA;AACA,WAAW,eAAe,oCAAoC,UAAU,IAAI,sBAAsB;AAClG;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,qBAAqB,eAAe,yCAAyC,eAAe,IAAI,cAAc;AAC9G;AACA,8DAA8D,eAAe,IAAI,oBAAoB;AACrG;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,qBAAqB,eAAe,0CAA0C,eAAe,KAAK,mBAAmB;AACrH;AACA,6DAA6D,eAAe,IAAI,cAAc;AAC9F;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kEAAoB;AAC/C;AACA;AACA;AACA,qFAAqF;;AAErF;AACA,+EAA+E;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,KAAK,aAAa;;AAElB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO,KAAK,OAAO,OAAO,MAAM;AACnE;AACA;AACA,sCAAsC,MAAM;AAC5C,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kEAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA,oDAAoD;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,uCAAuC;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG;;AAEZ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER,iCAAiC;;AAEjC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,4EAA4E;;AAE5E;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;;AAEA;AACA,4DAA4D,qBAAqB;AACjF,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uIAAuI;AACvI;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iDAAiD,4BAA4B,qBAAqB,QAAQ,cAAc,wBAAwB,gBAAgB,KAAK;;AAElL;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,gIAAgI;;AAEhI;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,KAAK;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;;AAEA,4GAA4G;;AAE5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA;AACA;AACA,sEAAsE,gFAAmB;AACzF;AACA;AACA,0BAA0B,iDAAiD,gFAAmB,CAAC;AAC/F;AACA;AACA,gGAAgG,gFAAmB,EAAE;;AAErH;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN,wDAAwD,qFAAoB,UAAU,mFAAkB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4CAA4C,YAAY,KAAK,kBAAkB,8BAA8B,aAAa;AAC1H,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,8BAA8B,uCAAuC;AAClG;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B,4EAAW,iDAAiD;AACtF,0BAA0B,4EAAW,6BAA6B;AAClE;AACA,kCAAkC,iCAAiC,QAAQ,aAAa;AACxF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,uDAAuD,0BAA0B;AACjF;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA;AACA,uCAAuC,YAAY;AACnD;AACA;AACA;AACA,kCAAkC,YAAY,mBAAmB,uBAAuB;AACxF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,4EAAW;AAC9C;AACA,yCAAyC,4EAAW;AACpD,yCAAyC,4EAAW;AACpD;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,8CAA8C,kBAAkB,SAAS,YAAY;AACrF,QAAQ;AACR;;AAEA;AACA,2DAA2D,4EAAW;AACtE,2DAA2D,4EAAW,kCAAkC;;AAExG;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG,UAAU;;AAEV;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG;AACA;AACA;AACA;AACA,kCAAkC,WAAW,IAAI,8BAA8B;AAC/E;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uJAAuJ;AACvJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG;AACvG;;AAEA;AACA;AACA,qFAAqF;;AAErF;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,gCAAgC,YAAY,MAAM,2BAA2B;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK,kEAAkE;AACnF;AACA;;AAEA,YAAY,KAAK,iEAAiE;AAClF;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,KAAK;AACnB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB;AACA,OAAO;AACP;AACA,QAAQ,iEAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B,MAAM;;AAEN,oCAAoC,+DAAmB;AACvD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,KAAK;AACpD,gBAAgB,KAAK;AACrB,oEAAoE,MAAM;AAC1E;AACA,YAAY,KAAK;AACjB,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA,yDAAyD,KAAK;AAC9D,YAAY,KAAK,wBAAwB;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,2BAA2B,QAAQ,KAAK,qBAAqB,EAAE,MAAM;AACrE;AACA;AACA,KAAK,GAAG;;AAER,gBAAgB,KAAK;AACrB;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA,mBAAmB,KAAK;AACxB,KAAK;AACL;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,8BAA8B,MAAM;AACpC,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,aAAa,2BAA2B,yBAAyB,oBAAoB,OAAO;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA,sIAAsI;AACtI;;AAEA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA,sEAAsE;AACtE;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB,kCAAkC,YAAY,gBAAgB,OAAO;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,aAAa,uCAAuC,uBAAuB,KAAK,oBAAoB,yEAAyE;;AAE9M;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,YAAY,8CAA8C,UAAU;AAC1H;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,4DAA4D;;AAE5D;AACA,iCAAiC,aAAa,iBAAiB,mBAAmB;AAClF;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD,WAAW,KAAK,QAAQ,iCAAiC,YAAY;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ;;AAEvJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oCAAoC,MAAM;AAC1C;AACA,KAAK;AACL;AACA,oCAAoC,MAAM;AAC1C;AACA,yCAAyC,MAAM;AAC/C;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,gBAAgB;AAC3B;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4EAAW;AACxC;AACA;AACA;AACA;AACA,2BAA2B,gFAAe;AAC1C,2BAA2B,gFAAe,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG,GAAG;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA,uBAAuB,iEAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gBAAgB,oEAAsB,WAAW;;AAEjD;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gCAAgC,oEAAsB;AACtD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA,YAAY,wDAAQ;AACpB,gCAAgC,0EAA0B,IAAI,gFAAgC,IAAI,6EAA6B,IAAI,4EAA4B;AAC/J;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,6IAA6I;;AAE7I;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,+BAA+B,+FAAwB,QAAQ;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,sIAAsI;AACtI;;AAEA;AACA,+FAA+F;;AAE/F;AACA,6DAA6D;AAC7D;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA,oFAAoF;AACpF;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qCAAqC,gEAAkB,eAAe,gEAAkB,kBAAkB,gEAAkB;AAC5H;AACA;AACA;AACA;AACA,iGAAiG;AACjG;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6EAA6E;AAC7E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK;AACL,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA,2BAA2B,wDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,4SAA4S;;AAE5S;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kEAAkE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,0DAAY;AAC5C,MAAM,wDAAY;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,uBAAuB,+FAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,SAAS,qFAAoB;AAC7B,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChgkDK,CAAC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;;AAGO;AACP;AACA,GAAG;;AAEI;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,6DAAa;AAC1B;AACO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;AACM;AACA;AACA;AACP,mCAAmC;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,eAAe;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI,WAAW;AACf;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACO;AACP,yEAAyE,aAAa;AACtF;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEO;AACP,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC9Q0E,CAAC;AAC3E;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAQ;;AAEnC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,iBAAiB,0DAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA;AACO;AACP,kBAAkB,6DAAW;AAC7B,wBAAwB,6DAAW;AACnC,gBAAgB,6DAAW;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA,4BAA4B;;AAE5B,kCAAkC,gEAAc,kDAAkD;;AAElG;AACA,gCAAgC,gEAAc;AAC9C;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/FmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,GAAG,GAAG;;AAEN,sBAAsB;AACtB;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;;AAGJ,yBAAyB;AACzB;;AAEA;AACA;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;;AAEA,oCAAoC;AACpC;AACO;AACP;AACA;AACA;;AAEA,SAAS,kEAAkB,IAAI,kEAAkB,oBAAoB,gEAAkB;AACvF;AACO;AACP;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,oBAAoB,4BAA4B;AAChD;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACO;AACA;;;;;;;;;;;;;;;;;;;;;;AC5PiD;AACb;AACa;AACR;AACY;AAC5D;AACA;AACA,UAAU,yDAAO;AACjB;AACA,cAAc,yDAAO;AACrB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD,iCAAiC;;AAEjC;AACA;;AAEA;AACA,sBAAsB,yDAAO;AAC7B;AACA,CAAC,GAAG;;AAEG,0BAA0B;AACjC;;AAEO;AACP,UAAU,yDAAO;;AAEjB,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEI;AACP,SAAS,wDAAO;AAChB;;;;;;;;;;;;;;;;;;;;;ACtL4G;AACjC,CAAC;AAC5E;AACA;AACA;;AAEO;AACP,QAAQ,sDAAO;AACf,WAAW,sDAAO;AAClB,WAAW,sDAAO;AAClB,eAAe,sDAAO;AACtB,UAAU,sDAAO;AACjB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB,mBAAmB,sDAAO;AAC1B,cAAc,sDAAO;AACrB,aAAa,sDAAO;AACpB,eAAe,sDAAO;AACtB,WAAW,sDAAO;AAClB,gBAAgB,sDAAO;AACvB,cAAc,sDAAO;AACrB,cAAc,sDAAO;AACrB;AACA;AACA;AACA,WAAW,sDAAO;AAClB,aAAa,sDAAO;AACpB,kBAAkB,sDAAO;AACzB,cAAc,sDAAO;AACrB,iBAAiB,sDAAO;AACxB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4DAAa;AACxB;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,IAAI;AAC7B;AACA,KAAK;AACL;;AAEA;AACA,WAAW,4DAAa;AACxB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,MAAM,yDAAU;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGO;AACP;AACA,UAAU,sDAAO;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,yDAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,mEAAmE;;AAEnE;AACA;;AAEA;AACA,GAAG;;AAEI;AACP;;AAEA;AACA;;AAEA;AACA,iBAAiB,4DAAa;AAC9B;AACA;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD,4FAA4F;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;AACA,IAAI;;;AAGJ;AACA,qBAAqB,yBAAyB;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEO;AACP,UAAU,sDAAO;AACjB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA,gBAAgB,4DAAa;AAC7B;AACA;AACA,cAAc,4DAAa;AAC3B,uBAAuB,4DAAa;AACpC;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,8DAAW;AACnC,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,sBAAsB,uDAAQ,6BAA6B;;AAE3D;AACA;AACA;AACA,4FAA4F;;AAE5F;AACA,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA,gGAAgG;;AAEhG;AACA,qBAAqB,4DAAa;AAClC,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kBAAkB,4DAAa;AAC/B,MAAM;;;AAGN;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChfwD;AACxD,UAAU,yDAAO;AACV;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;;AAEjB,qCAAqC,4DAAU;AAC/C;AACA,GAAG;AACH;AACA;;AAEA,uCAAuC;AACvC;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACnC4H;AACjD;AACzB;;AAElD;AACA;AACA,WAAW,+DAAa;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACO;AACP,UAAU,yDAAO;AACjB;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,iBAAiB,+DAAa;AAC9B;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,yCAAyC;AACpD;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA,UAAU,yDAAO;AACjB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+DAAa;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,+DAAa;;AAEhC,kBAAkB,YAAY;AAC9B;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;AAChC,mBAAmB,+DAAa;AAChC;AACA,GAAG;AACH;AACA;AACA,kBAAkB,+DAAa;AAC/B,uBAAuB,+DAAa;AACpC,8BAA8B,+DAAa;AAC3C;AACA,GAAG;AACH,yCAAyC;;AAEzC;AACA;;AAEA,2BAA2B,kCAAkC;AAC7D;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB,qBAAqB;AAC1C,iDAAiD;;AAEjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,cAAc,+DAAa;;AAE3B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C,mBAAmB,8DAAW;AAC9B,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,qBAAqB,6DAAW;;AAEhC;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,sBAAsB,+DAAa,QAAQ;AAC3C;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;;AAEhC;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,+DAAa;AACxC,oBAAoB;;AAEpB;AACA,gBAAgB,+DAAa;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,GAAG;AACH;AACA;AACO;AACP;;AAEA;AACA;AACA;;AAEA,iBAAiB;AACjB;;AAEA;AACA,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC,IAAI;AACJ,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACxiBwD;AACjD,mBAAmB,yDAAO;AAC1B,mBAAmB,yDAAO;AAC1B,2BAA2B,yDAAO;AACzC;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,YAAY,YAAY;AACxB;AACA;;AAEO;AACP;AACA,aAAa;;AAEb;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA,qBAAqB;;AAErB;AACA;;AAEA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,4DAAU;AAClB;AACA,MAAM,SAAS,4DAAU;AACzB;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;;;;;;;;;;;;;;;;AC/GO;AACP;AACA,0BAA0B;AAC1B;AACA;;AAEO;AACP;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACnDqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;AC9CzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA,UAAU,mBAAO,CAAC,0DAAU;AAC5B,UAAU,mBAAO,CAAC,gEAAa;AAC/B,aAAa,mBAAO,CAAC,sEAAgB;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc,uBAAuB;AACxD;AACA,eAAe,mBAAO,CAAC,0DAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,IAAI,MAAM,IAAI,QAAQ,EAAE;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gDAAgD;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,+BAA+B;AAC/B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gDAAgD,aAAa;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACt0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;ACtIA;;;;;;;;;;ACAA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA;AACA,2BAA2B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;;;;;;ACdvE;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,kCAAkC;AACxD;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;;AAEA,4CAA4C,IAAI;;AAEhD;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,IAAI;AACJ,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,sDAAsD;AAC7G;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,+BAA+B;AACrD;AACA;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC,yEAAyE,SAAS;AAClF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE;AACxE,2CAA2C;;AAE3C,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,qDAAS;AAC5B,qBAAqB,uDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,gBAAgB,gBAAgB;AAChC,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;;AAE9B,kBAAkB,gBAAgB;AAClC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;;AAEA,cAAc,iBAAiB;AAC/B;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA,MAAM;AACN,kBAAkB,qBAAqB;AACvC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC,qCAAqC;;AAErC;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,kBAAkB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB;;AAEvB,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA,gBAAgB,kBAAkB;AAClC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH,EAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,SAAS;AACT,0BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,CAAC,EAAC;AACquB;;;;;;;;;;;;;;;;;;;;ACz9CtvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,YAAY;AACZ,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB;AACrB,8BAA8B;AAC9B;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B,uBAAuB;AACvB,gBAAgB;AAChB,kBAAkB;AAClB,KAAK;AACL;AACA;AACA,KAAK;AACL,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,eAAe;AACf,cAAc;AACd,cAAc;AACd,oBAAoB;AACpB,sBAAsB;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEkE;;;;;;;;;;;;;;;;;ACnJ3B;AACxB;AACf;AACA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA,MAAM;;AAEN;AACA,2CAA2C,MAAM;AACjD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACvC+C;AACA;AAC/C,iEAAe;AACf,eAAe;AACf,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;ACL8C;;AAE/C;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,8BAA8B,OAAO,8BAA8B;AAC1F;AACA,IAAI;AACJ,oBAAoB,8BAA8B;;AAElD;AACA,sBAAsB,8BAA8B;AACpD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,wDAAM;AACR;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA,CAAC;;;;;;;;;;;;;;;ACrCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnDyC;AACM;AAC/C,iEAAe;AACf,YAAY;AACZ,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACyC;AACR;AAC6B;AACR;AACF;AACE;AACN;AACM;AACN;AACT;AACM;AACE;AACV;AACF;AACa;AACT;AACU;AACR;AACF;AACe;AACjB;AACoB;AACzD;AACA,eAAe;AACf,QAAQ;AACR,WAAW;AACX,YAAY;AACZ,OAAO;AACP,MAAM;AACN,YAAY;AACZ,QAAQ;AACR,aAAa;AACb,eAAe;AACf,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,aAAa,wDAAM,GAAG;AACtB;;AAEA,qBAAqB,0DAAC;AACtB;AACA,MAAM,0DAAC;AACP,0BAA0B,wDAAM,GAAG;AACnC;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA,qBAAqB,kEAAU;AAC/B,oBAAoB,gEAAS;AAC7B;AACA,KAAK;AACL,qBAAqB,kEAAU;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,mEAAkB;AACxC;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;;AAER,yBAAyB,wDAAM,GAAG,EAAE,qDAAQ,qBAAqB;;AAEjE,oBAAoB,wDAAM,GAAG;AAC7B,4BAA4B,wDAAM,GAAG;AACrC,0BAA0B,wDAAM,GAAG,WAAW;;AAE9C;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;;;AAGN,eAAe,sDAAC,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0DAAC;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,4BAA4B;;AAE5B;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC,mBAAmB;AACzD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B,qCAAqC,EAAE,iBAAiB,eAAe,qCAAqC,EAAE,aAAa;AACzJ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;;AAErC,gBAAgB,0DAAC;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,+DAA+D;AAChF;;AAEA;AACA;AACA,oBAAoB,0DAAC,qDAAqD;;AAE1E;;AAEA;AACA;;AAEA;AACA,OAAO;;;AAGP;;AAEA;AACA,uBAAuB,uDAAW;AAClC;AACA,mBAAmB,0DAAC;AACpB;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN,2BAA2B;;AAE3B,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA,kCAAkC;;AAElC,gCAAgC;;AAEhC,2BAA2B;;AAE3B;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM,6DAAW;AACjB;;AAEA;AACA;AACA;;AAEA;AACA,IAAI,wDAAM;AACV;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,qDAAQ;AACnB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD,YAAY,iEAAM,EAAE,qEAAQ;AAC5B,iEAAe,MAAM;;;;;;;;;;;;;;;ACjmBrB,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;ACzHD;AACA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;AC3GwC;AACI;AACF;AACF;AACJ;AACF;AACE;AACrC;;AAEA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA,6HAA6H,oDAAQ;AACrI,IAAI;AACJ,2CAA2C,oDAAQ;AACnD;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,wDAAY;AACpC,uBAAuB,uDAAW;AAClC,sBAAsB,sDAAU;;AAEhC;AACA,sBAAsB,oDAAQ;AAC9B;;AAEA,mBAAmB,mDAAO;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA,CAAC;;;;;;;;;;;;;;;AChGc;AACf;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACZe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ,0CAA0C;;AAE1C;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Ce;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AClCsD;AACvC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ,uBAAuB,qDAAG;AAC1B,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qDAAG;AAC1B,EAAE,0DAAQ;AACV;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iFAAiF;AACjF;;AAEA;AACA,oFAAoF;AACpF;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC/IyC;AACL;AACQ;AAC7B;AACf,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4BAA4B,qDAAG;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,+CAA+C,0DAAC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ,gDAAgD;;AAEhD;AACA;;;;;;;;;;;;;;;;;;AC7NoD;AAChB;AACQ,CAAC;;AAE7C;AACA;AACA,sBAAsB,uDAAW,aAAa,qDAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEe;AACf;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;;AAE9C;;AAEA;AACA,gBAAgB,0DAAC;AACjB;;AAEA,sFAAsF,sBAAsB;AAC5G,8DAA8D;;AAE9D;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wBAAwB,qDAAG;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,0DAAC;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACjH+C;AACI;AACnD,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACRuC;AACQ;AAC/C,iEAAe;AACf,WAAW;AACX,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;;ACLsC;AACH;AACrB;AACf,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA,oBAAoB,0DAAC;;AAErB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpCe;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClByC;AACN;AACQ;AAC3C,iEAAe;AACf,YAAY;AACZ,SAAS;AACT,aAAa;AACb,CAAC;;;;;;;;;;;;;;;;;ACPwC;AACL;AACrB;AACf;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI,UAAU;;AAEd,uDAAuD,0DAAC;AACxD,yBAAyB,kBAAkB,GAAG,2BAA2B;AACzE,sCAAsC,kBAAkB;;AAExD;AACA;;AAEA;AACA,sBAAsB,oBAAoB;AAC1C,0BAA0B,0DAAC,4CAA4C,mBAAmB,EAAE,uBAAuB;AACnH;AACA;;AAEA,sCAAsC,kBAAkB;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH,kBAAkB,yBAAyB;AAC3C,qBAAqB,0DAAC;AACtB;;AAEA,yCAAyC,QAAQ;AACjD,sBAAsB,0DAAC;AACvB;AACA;;;;;;;;;;;;;;;AC1De;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,0BAA0B,kBAAkB,GAAG,2BAA2B,IAAI,kBAAkB,GAAG,uBAAuB;AAC1H;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxC4C;AAC7B;AACf,uCAAuC;AACvC;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,wDAAM;AACV;AACA;;;;;;;;;;;;;;;;ACrCuC;AACxB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iBAAiB,qDAAS;;AAE1B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB,6BAA6B;AACnD;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;;;;;AC1EuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;ACnEmC;AACQ;AACJ;AACA;AACE;AACQ;AACU;AAC3D,iEAAe;AACf,SAAS;AACT,aAAa;AACb,WAAW;AACX,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,qBAAqB;AACrB,CAAC;;;;;;;;;;;;;;;ACfD;AACe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC7BA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC9DA;AACe;AACf;AACA;AACA;;;;;;;;;;;;;;;;ACJ6D;AAC9C;AACf;AACA,+FAA+F,aAAa;AAC5G;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA,4FAA4F,MAAM;AAClG,MAAM;AACN;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;;AAE1C,oCAAoC;;AAEpC;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,sDAAsD,0BAA0B;;AAEnI;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACpLoC;AACa;AAClC;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,0DAAC;;AAE1B;AACA;AACA;AACA,+CAA+C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC5I,QAAQ,0DAAQ;AAChB;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,6CAA6C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC1I,MAAM,0DAAQ;AACd;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACtCA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC/Be;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACT+C;AACI;AACJ;AAC/C,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACPc;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACRe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,kDAAkD,mDAAmD;AACrG;;AAEA,2BAA2B,KAAK;;AAEhC;AACA;AACA,yCAAyC,KAAK;AAC9C;AACA;;AAEA,wCAAwC,KAAK;;AAE7C;AACA,wCAAwC,KAAK;AAC7C,MAAM;AACN,wCAAwC,KAAK;AAC7C;AACA;AACA;;;;;;;;;;;;;;;;AChCiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACfiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AClBqD;AACtC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,8DAAY;AACrC;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACrB6C;AACA;AACA;AACA;AACF;AAC3C,iEAAe;AACf,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,aAAa;AACb,CAAC;;;;;;;;;;;;;;;ACXc;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAE;AAC1D;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC/C6D;AAC9C;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E,kFAAkF,+BAA+B;;AAEhM;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACpFyC;AACI;AACQ;AACI;AACI;AACZ;AACU;AACJ;AACE;AACzD,iEAAe;AACf,YAAY;AACZ,cAAc;AACd,kBAAkB;AAClB,oBAAoB;AACpB,sBAAsB;AACtB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,oBAAoB;AACpB,CAAC;;;;;;;;;;;;;;;ACnBc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,uEAAuE,UAAU;AACjF;;;;;;;;;;;;;;;;AChDoC;AACrB;AACf;AACA;AACA,gBAAgB,0DAAC,gBAAgB,kBAAkB;AACnD;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC,0DAAC;AACtC,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnCe;AACf;;AAEA;AACA,qDAAqD;;AAErD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjDe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AChCuD;AACxC;AACf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA,GAAG,EAAE;AACL;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA,IAAI,gEAAc;AAClB,IAAI,gEAAc;AAClB;;AAEA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,GAAG;;AAEH,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA,yDAAyD,UAAU;AACnE;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,gBAAgB,yCAAyC;AACzD,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,yCAAyC;AAChF,KAAK;AACL;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,IAAI,gEAAc,yDAAyD,aAAa;AACxF,IAAI,gEAAc,wDAAwD,kEAAkE;AAC5I;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,wBAAwB,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kCAAkC,EAAE,gCAAgC,EAAE,+BAA+B;AAC1M;;AAEA;AACA,6CAA6C,kBAAkB,4BAA4B,YAAY;AACvG,IAAI;AACJ;AACA,IAAI;;;AAGJ;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,UAAU;AAC1H,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,UAAU;AACpH;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;;AAEA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;;;;;;;;;;;;;;;ACPoC;AACrB;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,0DAAC;AAC1B;;;;;;;;;;;;;;;;;AC3CoE;AAChC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD,4BAA4B,QAAQ,IAAI,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,0DAAC;;AAEvB;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,0CAA0C,0EAAiB;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;;AAEzB;AACA;;AAEA;AACA;AACA,0EAA0E,EAAE,OAAO,EAAE;AACrF;AACA;;AAEA,2BAA2B,2CAA2C;AACtE;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,iEAAiE,oBAAoB;AACrF;AACA;AACA,iCAAiC;;AAEjC;AACA,2BAA2B,0DAAC;AAC5B;;AAEA,cAAc,0DAAC;AACf;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA,mEAAmE,EAAE,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE;AAC9H;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,0CAA0C,0EAAiB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,2CAA2C,0EAAiB;AAC5D;AACA;;AAEA;AACA,iBAAiB,0DAAC,iBAAiB,qCAAqC;AACxE,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrSA;;AAEA;AACyC;AACQ;AAClC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,0DAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA,kEAAkE;AAClE;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,qBAAqB,uDAAW;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,uDAAW;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,uDAAW;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC7NA,kCAAkC,iBAAiB;AACF;AAClC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA,mBAAmB;AACnB;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,0DAAQ;AAClB;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;AC9LyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,sBAAsB;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;;AAEA;AACA;AACA,qBAAqB,GAAG,QAAQ,2BAA2B;AAC3D,QAAQ;AACR;AACA,qBAAqB,GAAG,SAAS,2BAA2B;AAC5D,QAAQ;AACR,gBAAgB,GAAG;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,2BAA2B,OAAO,2BAA2B;AACzG;AACA,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG;AACvC,kBAAkB,OAAO;AACzB,gBAAgB,YAAY;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;AC5HyD;AACJ;AACI;AAC1C;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA,oCAAoC;;AAEpC;AACA;AACA;;AAEA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,KAAK,WAAW,KAAK,WAAW,eAAe,QAAQ,eAAe,QAAQ,aAAa,MAAM;AACxJ,wBAAwB,oEAAY;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,oEAAY;AACxC;;AAEA;AACA,2BAA2B,oEAAY;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACtGyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,cAAc,MAAM;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,oDAAoD,OAAO;AAC3D;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;;AAGR;AACA,2BAA2B,MAAM,QAAQ,0CAA0C,IAAI,gCAAgC;AACvH,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA,sCAAsC,KAAK,eAAe,KAAK,eAAe,KAAK;AACnF,0DAA0D,qDAAqD,cAAc,qDAAqD;AAClL;AACA,uCAAuC,gBAAgB,IAAI,cAAc,EAAE,YAAY,GAAG;;AAE1F;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;ACzJoC;AACiB;AACtC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC,SAAS;AACT,QAAQ;AACR;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,+BAA+B,eAAe,8BAA8B,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG;;AAEvJ;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,oCAAoC,8BAA8B;AAC5F;AACA;;AAEA;AACA,wBAAwB,0DAAC,oCAAoC,kCAAkC;AAC/F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D,sCAAsC,eAAe;AACrD,KAAK;;AAEL;AACA;AACA,oDAAoD,sCAAsC,MAAM,iBAAiB,yCAAyC,mBAAmB;AAC7K,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO,OAAO,OAAO,qBAAqB,0BAA0B,MAAM,2BAA2B;AAChJ;AACA;;AAEA;AACA,8CAA8C,QAAQ,cAAc,0CAA0C,eAAe,2CAA2C;AACxK;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;ACnLqD;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO,2BAA2B,GAAG,MAAM,GAAG;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACrEyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,oEAAY;AACrC;;AAEA;AACA,wBAAwB,oEAAY;AACpC;;AAEA;AACA;AACA;;AAEA,uCAAuC,GAAG,MAAM,GAAG,mBAAmB,QAAQ,eAAe,QAAQ;AACrG,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;ACrG4C;AAC7B;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,YAAY,qDAAG;AACf,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB,yBAAyB,qDAAG;AAC5B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;;AAGA,0BAA0B,qDAAG;AAC7B;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;;AAEA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;;AAGR;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACpPe;AACf;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM,sBAAsB;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,8EAA8E,aAAa;AAC3F;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,uCAAuC,kCAAkC;AACzE,KAAK;;AAEL;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnHoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,sDAAsD,yBAAyB,cAAc,QAAQ;AACrG;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kDAAkD,uDAAuD;AACzG;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC/FuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,KAAK,GAAG,IAAI,GAAG,MAAM;AACtC,MAAM;AACN,iBAAiB,IAAI,GAAG,MAAM;AAC9B;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;;AAE5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrJA;AACoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,iCAAiC,yBAAyB,wCAAwC,+BAA+B;AACjI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA,MAAM;AACN;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AClIuC;AACH;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB,4BAA4B,MAAM;AAC3H,sCAAsC,oBAAoB,QAAQ,mBAAmB,SAAS,oBAAoB;;AAElH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,WAAW;AAC9D;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,0DAAC;;AAE/B;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,sBAAsB;;AAEhD;AACA;;AAEA;AACA,0FAA0F,mBAAmB,UAAU,kCAAkC;AACzJ;AACA,YAAY;AACZ,mEAAmE,kCAAkC,4BAA4B,mBAAmB;AACpJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,wBAAwB,4BAA4B,MAAM;AAC9F;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA,eAAe,0DAAC;AAChB;;AAEA,aAAa,0DAAC;AACd;;AAEA;;AAEA;AACA,8BAA8B,+BAA+B;AAC7D,kCAAkC,0DAAC,4CAA4C,0DAAC;AAChF;AACA,OAAO;AACP,MAAM;AACN,gCAAgC,iCAAiC;AACjE;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2EAA2E;;AAE3E,kDAAkD,cAAc;AAChE;AACA,UAAU;;;AAGV,+BAA+B,iBAAiB;AAChD;AACA;AACA,QAAQ;AACR,kDAAkD,4BAA4B;AAC9E;AACA,kDAAkD,4BAA4B;AAC9E;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA,iEAAiE,0DAAC,wCAAwC,0DAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,oBAAoB,wBAAwB;AAC5C;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;AC1RmD;AACE;AACR;AACM;AACQ;AAC5C;AACf;AACA,CAAC;AACD;AACA,iBAAiB,+DAAW;AAC5B,kBAAkB,gEAAY;AAC9B,cAAc,4DAAQ;AACtB,iBAAiB,+DAAW;AAC5B,qBAAqB,mEAAe;AACpC,GAAG;AACH;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjCe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;AC9CA;AACuC;AACH;AACkB;AACvC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,qDAAG;AACrD;AACA;AACA,MAAM;AACN;AACA;;;AAGA,+BAA+B,qDAAG;AAClC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;;AAGN,kDAAkD;;AAElD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA,8CAA8C;;AAE9C;AACA;AACA;;AAEA;AACA;AACA,4FAA4F;AAC5F,QAAQ,6EAA6E;AACrF,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA,SAAS;;AAET;AACA,mCAAmC;AACnC;;AAEA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA,aAAa,MAAM,aAAa;AAChC;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;;;AAGV,mDAAmD;;AAEnD,0GAA0G;;AAE1G;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrasF;AAClD;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,0DAAC;;AAEb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,oFAAyB;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD,0DAAC,2BAA2B,0DAAC;AAC9E;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;ACxLoC;AACgC;AACkB;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B,4BAA4B,IAAI;AAChC,wBAAwB,IAAI;AAC5B,uBAAuB,IAAI;AAC3B,qBAAqB,IAAI;AACzB,sBAAsB,IAAI;AAC1B,+BAA+B,IAAI;AACnC,mCAAmC,IAAI;AACvC,yBAAyB,IAAI;AAC7B,oBAAoB,IAAI;AACxB,0BAA0B,IAAI;AAC9B,wBAAwB,IAAI;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,sCAAsC,kBAAkB,GAAG,SAAS,2BAA2B,kBAAkB,GAAG,SAAS,GAAG,SAAS;AACzI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D,6CAA6C;;AAE5G;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uGAAuG,yBAAyB,EAAE,OAAO;;AAEzI;AACA;AACA,0BAA0B,0DAAC;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,gBAAgB;AACnD,sCAAsC,yBAAyB;AAC/D;;AAEA;AACA;AACA,sDAAsD,QAAQ;AAC9D,2DAA2D,yBAAyB;AACpF;;AAEA,qFAAqF,yBAAyB;AAC9G,cAAc;AACd;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mEAAmE,cAAc;AACjF;AACA;;AAEA;AACA,eAAe,0EAAiB;AAChC,eAAe,0EAAiB;AAChC;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,eAAe,0EAAiB,sEAAsE,OAAO,WAAW,OAAO;AAC/H;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA,UAAU;AACV,gCAAgC,sBAAsB,SAAS,mBAAmB,MAAM,qBAAqB;AAC7G;AACA;;AAEA;AACA,2CAA2C,0EAAiB;AAC5D;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,oBAAoB,qCAAqC,kBAAkB;AACpH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,4BAA4B;AACrE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,oFAAyB;AACxD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;AACf;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,cAAc,0DAAC;AACf;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,qBAAqB,EAAE,YAAY;AACzD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,0EAAiB;AACvC;AACA,oBAAoB,0DAAC;AACrB;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,0EAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN,kGAAkG,0DAAC;AACnG;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACzZoC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN,gBAAgB,0DAAC;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,MAAM;AACN,aAAa,yBAAyB;AACtC;;AAEA;AACA,aAAa,2BAA2B;AACxC,MAAM;AACN,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,EAAE,IAAI,EAAE;AAC3C,MAAM;AACN;AACA,mCAAmC,EAAE,IAAI,EAAE,eAAe,aAAa;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACjHyC;AACL;AACa;AACqC;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C,kCAAkC,QAAQ;AAC1C,MAAM;AACN,4CAA4C,OAAO;AACnD,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C,MAAM;AACN,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,0DAAQ;AAC5B;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,8BAA8B,oFAAyB;AACvD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;;AAEf;AACA;AACA;;AAEA,+BAA+B,kCAAkC;;AAEjE;AACA,gBAAgB,0DAAC,gBAAgB,kCAAkC;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACxWiD;AACb;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;AACzB;AACA;;AAEA;AACA,8BAA8B,0DAAC;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,4FAA4F,aAAa;AACzG,4FAA4F,aAAa;AACzG,qEAAqE,oEAAoE,uFAAuF;AAChO;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,MAAM,SAAS,0DAAQ;AACvB,iDAAiD;AACjD;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,UAAU;;;AAGV,gHAAgH,iBAAiB;AACjI,gHAAgH,iBAAiB;;AAEjI;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU,2FAA2F;AACrG;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,sBAAsB;AAC5C,sEAAsE,qBAAqB;AAC3F;AACA,MAAM;AACN,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AC3MoC;AACmB;AACxC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C,0DAAC,kDAAkD,0DAAC,gBAAgB,yBAAyB,6BAA6B,MAAM,IAAI,MAAM;AACpL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,SAAS;AACtC;AACA;;AAEA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,yBAAyB;AAC1D,MAAM;AACN,iCAAiC,iBAAiB;AAClD;AACA,qCAAqC,yBAAyB,4BAA4B,EAAE;AAC5F;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mEAAmE,OAAO;AAC1E;AACA;;AAEA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,MAAM,gEAAc,+CAA+C,mBAAmB;AACtF;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;AClSuC;AACH;AACiB;AACtC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,uBAAuB,yBAAyB;AAC1E;AACA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D,WAAW;AACtE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2FAA2F,WAAW;AACtG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,8DAAY;AACjC,qBAAqB,8DAAY;AACjC;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAe,MAAM,eAAe;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe,MAAM,eAAe;AACnH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,0DAAC,uBAAuB,yBAAyB;AAC5E;;AAEA;AACA;AACA,4DAA4D,+BAA+B;AAC3F,UAAU;AACV;AACA;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,kEAAkE,WAAW,MAAM,WAAW;AAC9F,2EAA2E,WAAW;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0DAA0D,+BAA+B;AACzF,QAAQ;AACR;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,sDAAsD,kCAAkC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,uDAAuD,kCAAkC;AACzF;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACnmBe;AACf,aAAa;AACb,sBAAsB;AACtB;;;;;;;;;;;;;;;;ACHyC;AAC1B;AACf,mBAAmB,uDAAW;;AAE9B;AACA;AACA;AACA,8CAA8C,gBAAgB;;AAE9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;ACtByB;AACV;AACf,4CAA4C,WAAW,KAAK,OAAO;AACnE;AACA,gDAAgD,YAAY;;AAE5D;AACA,gBAAgB,mDAAC,mCAAmC,WAAW,KAAK,OAAO;AAC3E;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACZyU;AACzU;AACA,UAAU;AACV,aAAa;AACb,UAAU;AACV,aAAa;AACb,MAAM;AACN,YAAY;AACZ,WAAW;AACX,YAAY;AACZ,IAAI;AACJ,KAAK;AACL,SAAS;AACT,eAAe;AACf,YAAY;AACZ,aAAa;AACb,QAAQ;AACR,QAAQ;AACR,KAAK;AACL,MAAM;AACN,MAAM;AACN,MAAM;AACN,IAAI;AACJ,OAAO;AACP,IAAI;AACJ,QAAQ;AACR,SAAS;AACT,MAAM;AACN,SAAS;AACT,MAAM;AACN,SAAS;AACT,QAAQ;AACR,SAAS;AACT,SAAS;AACT,MAAM;AACN,UAAU;AACV,QAAQ;AACR,QAAQ;AACR;AACA;AACA,wBAAwB,mCAAC;AACzB;AACA;AACA,GAAG;AACH,CAAC;AACD,iEAAe,mCAAC;;;;;;;;;;;;;;;AC7CD;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8BAA8B,qCAAqC,EAAE,OAAO;;AAE5E;AACA,gCAAgC,qCAAqC;AACrE;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;AC9Be;AACf;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;AClCuC;AACvC;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACvBuC;AACO;AAC9C;;AAEA;AACA;AACA,EAAE,IAAI;AACN,kBAAkB,2DAAU;AAC5B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;;AAE3D;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;;AAEA,gEAAgE,YAAY,GAAG,aAAa;AAC5F;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACtDoD;AACpD;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA,QAAQ,WAAW;AACnB;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;;AAEA;AACA;AACA,MAAM,WAAW;AACjB;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,4DAA4D;AAClE;;;AAGA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;;AAEA,sDAAsD,iBAAiB;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE4D;AACM;AACG;AACM;AACA;AACA;AACH;AACH;AACZ;AACA;AACkB;AAClB;AACS;AACuB;AACpB;AACN;AACQ;AACd;AACwB;AACJ;AACA;AACA;AACe;AACH;;;;;;;UCnCzF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNwC;AAEa;AACW;AACA;AACJ;AACE;AACT;AAErDb,mEAAU,CAAC,CAAC;AACZoE,2EAAc,CAAC,CAAC;AAChBzC,6EAAqB,CAAC,CAAC;AACvBR,6EAAe,CAAC,CAAC;AACjBjC,yEAAe,CAAC,CAAC;AACjBqB,kEAAQ,CAAC,CAAC,C","sources":["webpack://gulp-builder/./node_modules/@fancyapps/ui/dist/fancybox.esm.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/media-groups.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/stream.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/http-handler.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/index.js","webpack://gulp-builder/./src/js/components/accordion.js","webpack://gulp-builder/./src/js/components/burger-menu.js","webpack://gulp-builder/./src/js/components/paint-btn.js","webpack://gulp-builder/./src/js/components/scroll-smooth.js","webpack://gulp-builder/./src/js/components/sliders.js","webpack://gulp-builder/./src/js/components/video-player.js","webpack://gulp-builder/./node_modules/global/document.js","webpack://gulp-builder/./node_modules/global/window.js","webpack://gulp-builder/./node_modules/is-function/index.js","webpack://gulp-builder/./node_modules/keycode/index.js","webpack://gulp-builder/./node_modules/m3u8-parser/dist/m3u8-parser.es.js","webpack://gulp-builder/./node_modules/mpd-parser/dist/mpd-parser.es.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js","webpack://gulp-builder/./node_modules/mux.js/lib/tools/parse-sidx.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/clock.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/numbers.js","webpack://gulp-builder/./node_modules/safe-json-parse/tuple.js","webpack://gulp-builder/./node_modules/smooth-scroll/dist/smooth-scroll.js","webpack://gulp-builder/./node_modules/url-toolkit/src/url-toolkit.js","webpack://gulp-builder/./node_modules/video.js/dist/video.es.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/browser-index.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vtt.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttcue.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttregion.js","webpack://gulp-builder/ignored|C:\\Users\\kiril\\OneDrive\\Рабочий стол\\Projects\\felix-gulp\\node_modules\\global|min-document","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/extends.js","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://gulp-builder/./node_modules/dom7/dom7.esm.js","webpack://gulp-builder/./node_modules/ssr-window/ssr-window.esm.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/getBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/index.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/setBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/check-overflow/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/addClasses.js","webpack://gulp-builder/./node_modules/swiper/core/classes/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/removeClasses.js","webpack://gulp-builder/./node_modules/swiper/core/core.js","webpack://gulp-builder/./node_modules/swiper/core/defaults.js","webpack://gulp-builder/./node_modules/swiper/core/events-emitter.js","webpack://gulp-builder/./node_modules/swiper/core/events/index.js","webpack://gulp-builder/./node_modules/swiper/core/events/onClick.js","webpack://gulp-builder/./node_modules/swiper/core/events/onResize.js","webpack://gulp-builder/./node_modules/swiper/core/events/onScroll.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchEnd.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchMove.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchStart.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/index.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/setGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/images/index.js","webpack://gulp-builder/./node_modules/swiper/core/images/loadImage.js","webpack://gulp-builder/./node_modules/swiper/core/images/preloadImages.js","webpack://gulp-builder/./node_modules/swiper/core/loop/index.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopCreate.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopDestroy.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopFix.js","webpack://gulp-builder/./node_modules/swiper/core/moduleExtendParams.js","webpack://gulp-builder/./node_modules/swiper/core/modules/observer/observer.js","webpack://gulp-builder/./node_modules/swiper/core/modules/resize/resize.js","webpack://gulp-builder/./node_modules/swiper/core/slide/index.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideNext.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slidePrev.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideReset.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideTo.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClosest.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToLoop.js","webpack://gulp-builder/./node_modules/swiper/core/transition/index.js","webpack://gulp-builder/./node_modules/swiper/core/transition/setTransition.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEmit.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEnd.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionStart.js","webpack://gulp-builder/./node_modules/swiper/core/translate/getTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/index.js","webpack://gulp-builder/./node_modules/swiper/core/translate/maxTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/minTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/setTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/translateTo.js","webpack://gulp-builder/./node_modules/swiper/core/update/index.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateActiveIndex.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateAutoHeight.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateProgress.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSize.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlides.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesClasses.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesOffset.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesProgress.js","webpack://gulp-builder/./node_modules/swiper/modules/a11y/a11y.js","webpack://gulp-builder/./node_modules/swiper/modules/autoplay/autoplay.js","webpack://gulp-builder/./node_modules/swiper/modules/controller/controller.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cards/effect-cards.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-creative/effect-creative.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cube/effect-cube.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-fade/effect-fade.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-flip/effect-flip.js","webpack://gulp-builder/./node_modules/swiper/modules/free-mode/free-mode.js","webpack://gulp-builder/./node_modules/swiper/modules/grid/grid.js","webpack://gulp-builder/./node_modules/swiper/modules/hash-navigation/hash-navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/history/history.js","webpack://gulp-builder/./node_modules/swiper/modules/keyboard/keyboard.js","webpack://gulp-builder/./node_modules/swiper/modules/lazy/lazy.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/manipulation.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/addSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/appendSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/prependSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/mousewheel/mousewheel.js","webpack://gulp-builder/./node_modules/swiper/modules/navigation/navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/pagination/pagination.js","webpack://gulp-builder/./node_modules/swiper/modules/parallax/parallax.js","webpack://gulp-builder/./node_modules/swiper/modules/scrollbar/scrollbar.js","webpack://gulp-builder/./node_modules/swiper/modules/thumbs/thumbs.js","webpack://gulp-builder/./node_modules/swiper/modules/virtual/virtual.js","webpack://gulp-builder/./node_modules/swiper/modules/zoom/zoom.js","webpack://gulp-builder/./node_modules/swiper/shared/classes-to-selector.js","webpack://gulp-builder/./node_modules/swiper/shared/create-element-if-not-defined.js","webpack://gulp-builder/./node_modules/swiper/shared/create-shadow.js","webpack://gulp-builder/./node_modules/swiper/shared/dom.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-init.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-target.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-virtual-transition-end.js","webpack://gulp-builder/./node_modules/swiper/shared/get-browser.js","webpack://gulp-builder/./node_modules/swiper/shared/get-device.js","webpack://gulp-builder/./node_modules/swiper/shared/get-support.js","webpack://gulp-builder/./node_modules/swiper/shared/utils.js","webpack://gulp-builder/./node_modules/swiper/swiper.esm.js","webpack://gulp-builder/webpack/bootstrap","webpack://gulp-builder/webpack/runtime/compat get default export","webpack://gulp-builder/webpack/runtime/define property getters","webpack://gulp-builder/webpack/runtime/global","webpack://gulp-builder/webpack/runtime/hasOwnProperty shorthand","webpack://gulp-builder/webpack/runtime/make namespace object","webpack://gulp-builder/./src/js/main.js"],"sourcesContent":["// @fancyapps/ui/Fancybox v4.0.31\nconst t=t=>\"object\"==typeof t&&null!==t&&t.constructor===Object&&\"[object Object]\"===Object.prototype.toString.call(t),e=(...i)=>{let s=!1;\"boolean\"==typeof i[0]&&(s=i.shift());let o=i[0];if(!o||\"object\"!=typeof o)throw new Error(\"extendee must be an object\");const n=i.slice(1),a=n.length;for(let i=0;i(t=parseFloat(t)||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t){return!!(t&&\"object\"==typeof t&&t instanceof Element&&t!==document.body)&&(!t.__Panzoom&&(function(t){const e=getComputedStyle(t)[\"overflow-y\"],i=getComputedStyle(t)[\"overflow-x\"],s=(\"scroll\"===e||\"auto\"===e)&&Math.abs(t.scrollHeight-t.clientHeight)>1,o=(\"scroll\"===i||\"auto\"===i)&&Math.abs(t.scrollWidth-t.clientWidth)>1;return s||o}(t)?t:s(t.parentNode)))},o=\"undefined\"!=typeof window&&window.ResizeObserver||class{constructor(t){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=t}observe(t){if(this.observables.some((e=>e.el===t)))return;const e={el:t,size:{height:t.clientHeight,width:t.clientWidth}};this.observables.push(e)}unobserve(t){this.observables=this.observables.filter((e=>e.el!==t))}disconnect(){this.observables=[]}check(){const t=this.observables.filter((t=>{const e=t.el.clientHeight,i=t.el.clientWidth;if(t.size.height!==e||t.size.width!==i)return t.size.height=e,t.size.width=i,!0})).map((t=>t.el));t.length>0&&this.callback(t),window.requestAnimationFrame(this.boundCheck)}};class n{constructor(t){this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY}}const a=(t,e)=>e?Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2):0,r=(t,e)=>e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t;class h{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=t,this.startPointers=[],this.currentPointers=[],this._pointerStart=t=>{if(t.buttons>0&&0!==t.button)return;const e=new n(t);this.currentPointers.some((t=>t.id===e.id))||this._triggerPointerStart(e,t)&&(window.addEventListener(\"mousemove\",this._move),window.addEventListener(\"mouseup\",this._pointerEnd))},this._touchStart=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerStart(new n(e),t)},this._move=t=>{const e=this.currentPointers.slice(),i=(t=>\"changedTouches\"in t)(t)?Array.from(t.changedTouches).map((t=>new n(t))):[new n(t)];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(this.currentPointers[e]=t)}this._moveCallback(e,this.currentPointers.slice(),t)},this._triggerPointerEnd=(t,e)=>{const i=this.currentPointers.findIndex((e=>e.id===t.id));return!(i<0)&&(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(t,e),!0)},this._pointerEnd=t=>{t.buttons>0&&0!==t.button||this._triggerPointerEnd(new n(t),t)&&(window.removeEventListener(\"mousemove\",this._move,{passive:!1}),window.removeEventListener(\"mouseup\",this._pointerEnd,{passive:!1}))},this._touchEnd=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerEnd(new n(e),t)},this._startCallback=e,this._moveCallback=i,this._endCallback=s,this._element.addEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.addEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.addEventListener(\"touchmove\",this._move,{passive:!1}),this._element.addEventListener(\"touchend\",this._touchEnd),this._element.addEventListener(\"touchcancel\",this._touchEnd)}stop(){this._element.removeEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.removeEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.removeEventListener(\"touchmove\",this._move,{passive:!1}),this._element.removeEventListener(\"touchend\",this._touchEnd),this._element.removeEventListener(\"touchcancel\",this._touchEnd),window.removeEventListener(\"mousemove\",this._move),window.removeEventListener(\"mouseup\",this._pointerEnd)}_triggerPointerStart(t,e){return!!this._startCallback(t,e)&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}}class l{constructor(t={}){this.options=e(!0,{},t),this.plugins=[],this.events={};for(const t of[\"on\",\"once\"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(t,e,...i){t=String(t);let s=(o=t,n=this.options,o.split(\".\").reduce((function(t,e){return t&&t[e]}),n));var o,n;return\"function\"==typeof s&&(s=s.call(this,this,...i)),void 0===s?e:s}localize(t,e=[]){return t=(t=String(t).replace(/\\{\\{(\\w+).?(\\w+)?\\}\\}/g,((t,i,s)=>{let o=\"\";s?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(o=this.option(`l10n.${i}`)),o||(o=t);for(let t=0;te))}on(e,i){if(t(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(\" \").forEach((t=>{const e=this.events[t]=this.events[t]||[];-1==e.indexOf(i)&&e.push(i)})),this}once(e,i){if(t(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(\" \").forEach((t=>{const e=(...s)=>{this.off(t,e),i.call(this,this,...s)};e._=i,this.on(t,e)})),this}off(e,i){if(!t(e))return e.split(\" \").forEach((t=>{const e=this.events[t];if(!e||!e.length)return this;let s=-1;for(let t=0,o=e.length;t1||Math.abs(e.left-this.dragStart.rect.left)>1))return t.preventDefault(),void t.stopPropagation();!1!==this.trigger(\"click\",t)&&this.option(\"zoom\")&&\"toggleZoom\"===this.option(\"click\")&&(t.preventDefault(),t.stopPropagation(),this.zoomWithClick(t))}onWheel(t){!1!==this.trigger(\"wheel\",t)&&this.option(\"zoom\")&&this.option(\"wheel\")&&this.zoomWithWheel(t)}zoomWithWheel(t){void 0===this.changedDelta&&(this.changedDelta=0);const e=Math.max(-1,Math.min(1,-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)),i=this.content.scale;let s=i*(100+e*this.option(\"wheelFactor\"))/100;if(e<0&&Math.abs(i-this.option(\"minScale\"))<.01||e>0&&Math.abs(i-this.option(\"maxScale\"))<.01?(this.changedDelta+=Math.abs(e),s=i):(this.changedDelta=0,s=Math.max(Math.min(s,this.option(\"maxScale\")),this.option(\"minScale\"))),this.changedDelta>this.option(\"wheelLimit\"))return;if(t.preventDefault(),s===i)return;const o=this.$content.getBoundingClientRect(),n=t.clientX-o.left,a=t.clientY-o.top;this.zoomTo(s,{x:n,y:a})}zoomWithClick(t){const e=this.$content.getClientRects()[0],i=t.clientX-e.left,s=t.clientY-e.top;this.toggleZoom({x:i,y:s})}attachEvents(){this.$content.addEventListener(\"load\",this.onLoad),this.$container.addEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.addEventListener(\"click\",this.onClick,{passive:!1}),this.initObserver();const t=new h(this.$container,{start:(e,i)=>{if(!this.option(\"touch\"))return!1;if(this.velocity.scale<0)return!1;const o=i.composedPath()[0];if(!t.currentPointers.length){if(-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(o.nodeName))return!1;if(this.option(\"textSelection\")&&((t,e,i)=>{const s=t.childNodes,o=document.createRange();for(let t=0;t=a.left&&i>=a.top&&e<=a.right&&i<=a.bottom)return n}return!1})(o,e.clientX,e.clientY))return!1}return!s(o)&&(!1!==this.trigger(\"touchStart\",i)&&(\"mousedown\"===i.type&&i.preventDefault(),this.state=\"pointerdown\",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0))},move:(e,i,s)=>{if(\"pointerdown\"!==this.state)return;if(!1===this.trigger(\"touchMove\",s))return void s.preventDefault();if(i.length<2&&!0===this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\"))return;if(i.length>1&&(!this.option(\"zoom\")||!1===this.option(\"pinchToZoom\")))return;const o=r(e[0],e[1]),n=r(i[0],i[1]),h=n.clientX-o.clientX,l=n.clientY-o.clientY,c=a(e[0],e[1]),d=a(i[0],i[1]),u=c&&d?d/c:1;this.dragOffset.x+=h,this.dragOffset.y+=l,this.dragOffset.scale*=u,this.dragOffset.time=Date.now()-this.dragPosition.time;const f=1===this.dragStart.scale&&this.option(\"lockAxis\");if(f&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=t>45&&t<135?\"y\":\"x\"}if(\"xy\"===f||\"y\"!==this.lockAxis){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset[\"x\"===this.lockAxis?\"y\":\"x\"]=0),this.$container.classList.add(this.option(\"draggingClass\")),this.transform.scale===this.option(\"baseScale\")&&\"y\"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option(\"baseScale\")&&\"x\"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const e=r(t.startPointers[0],t.startPointers[1]),i=e.clientX-this.dragStart.rect.x,s=e.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,s);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=n}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(e,i)=>{if(\"pointerdown\"!==this.state)return;if(this._dragOffset={...this.dragOffset},t.currentPointers.length)return void this.resetDragPosition();if(this.state=\"decel\",this.friction=this.option(\"decelFriction\"),this.recalculateTransform(),this.$container.classList.remove(this.option(\"draggingClass\")),!1===this.trigger(\"touchEnd\",i))return;if(\"decel\"!==this.state)return;const s=this.option(\"minScale\");if(this.transform.scale.01){const t=this.dragPosition.midPoint||e,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:t.clientX-i.left,y:t.clientY-i.top})}else;}});this.pointerTracker=t}initObserver(){this.resizeObserver||(this.resizeObserver=new o((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const t=this.$container.getBoundingClientRect();t.width&&t.height?((Math.abs(t.width-this.container.width)>1||Math.abs(t.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option(\"baseScale\"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option(\"friction\"),this.velocity={x:0,y:0,scale:0};const{x:t,y:e,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:t,y:e,scale:i},this.dragPosition={...this.dragPosition,x:t,y:e,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(t){!0!==t&&this.trigger(\"beforeUpdate\");const e=this.$container,s=this.$content,o=this.$viewport,n=s instanceof HTMLImageElement,a=this.option(\"zoom\"),r=this.option(\"resizeParent\",a);let h=this.option(\"width\"),l=this.option(\"height\"),c=h||(d=s,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(t=>Math.max(parseFloat(t.naturalHeight||0),parseFloat(t.height&&t.height.baseVal&&t.height.baseVal.value||0),parseFloat(t.offsetHeight||0),parseFloat(t.scrollHeight||0)))(s);Object.assign(s.style,{width:h?`${h}px`:\"\",height:l?`${l}px`:\"\",maxWidth:\"\",maxHeight:\"\"}),r&&Object.assign(o.style,{width:\"\",height:\"\"});const f=this.option(\"ratio\");c=i(c*f),u=i(u*f),h=c,l=u;const g=s.getBoundingClientRect(),p=o.getBoundingClientRect(),m=o==e?p:e.getBoundingClientRect();let y=Math.max(o.offsetWidth,i(p.width)),v=Math.max(o.offsetHeight,i(p.height)),b=window.getComputedStyle(o);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,a){if(Math.abs(c-g.width)>.1||Math.abs(u-g.height)>.1){const t=((t,e,i,s)=>{const o=Math.min(i/t||0,s/e);return{width:t*o||0,height:e*o||0}})(c,u,Math.min(c,g.width),Math.min(u,g.height));h=i(t.width),l=i(t.height)}Object.assign(s.style,{width:`${h}px`,height:`${l}px`,transform:\"\"})}if(r&&(Object.assign(o.style,{width:`${h}px`,height:`${l}px`}),this.viewport={...this.viewport,width:h,height:l}),n&&a&&\"function\"!=typeof this.options.maxScale){const t=this.option(\"maxScale\");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:t}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:h,fitHeight:l,width:h,height:l,scale:1,isZoomable:a},this.container={width:m.width,height:m.height},!0!==t&&this.trigger(\"afterUpdate\")}zoomIn(t){this.zoomTo(this.content.scale+(t||this.option(\"step\")))}zoomOut(t){this.zoomTo(this.content.scale-(t||this.option(\"step\")))}toggleZoom(t={}){const e=this.option(\"maxScale\"),i=this.option(\"baseScale\"),s=this.content.scale>i+.5*(e-i)?i:e;this.zoomTo(s,t)}zoomTo(t=this.option(\"baseScale\"),{x:e=null,y:s=null}={}){t=Math.max(Math.min(t,this.option(\"maxScale\")),this.option(\"minScale\"));const o=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===e&&(e=this.content.width*o*.5),null===s&&(s=this.content.height*o*.5);const{deltaX:n,deltaY:a}=this.getZoomDelta(t,e,s);e=this.content.x-n,s=this.content.y-a,this.panTo({x:e,y:s,scale:t,friction:this.option(\"zoomFriction\")})}getZoomDelta(t,e=0,i=0){const s=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,n=e>0&&s?e/s:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*t-s)*n,deltaY:(this.content.fitHeight*t-o)*a}}panTo({x:t=this.content.x,y:e=this.content.y,scale:i,friction:s=this.option(\"friction\"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:s,boundY:o}=this.getBounds(i);s&&(t=Math.max(Math.min(t,s.to),s.from)),o&&(e=Math.max(Math.min(e,o.to),o.from))}this.friction=s,this.transform={...this.transform,x:t,y:e,scale:i},s?(this.state=\"panning\",this.velocity={x:(1/this.friction-1)*(t-this.content.x),y:(1/this.friction-1)*(e-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger(\"startAnimation\"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if(\"pointerdown\"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(t){let e=this.boundX,s=this.boundY;if(void 0!==e&&void 0!==s)return{boundX:e,boundY:s};e={from:0,to:0},s={from:0,to:0},t=t||this.transform.scale;const o=this.content.fitWidth*t,n=this.content.fitHeight*t,a=this.viewport.width,r=this.viewport.height;if(oe.to),i&&(n=this.content.yi.to),s||o){let i=((s?e.from:e.to)-this.content.x)*t;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=e.from&&o<=e.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(n||a){let e=((n?i.from:i.to)-this.content.y)*t;const s=this.content.y+(e+this.velocity.y)/this.friction;s>=i.from&&s<=i.to&&(e+=this.velocity.y),this.velocity.y=e,this.recalculateTransform()}}setDragResistance(){if(\"pointerdown\"!==this.state)return;const{boundX:t,boundY:e}=this.getBounds(this.dragPosition.scale);let i,s,o,n;if(t&&(i=this.dragPosition.xt.to),e&&(o=this.dragPosition.ye.to),(i||s)&&(!i||!s)){const e=i?t.from:t.to,s=e-this.dragPosition.x;this.dragPosition.x=e-.3*s}if((o||n)&&(!o||!n)){const t=o?e.from:e.to,i=t-this.dragPosition.y;this.dragPosition.y=t-.3*i}}setDragForce(){\"pointerdown\"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(t){let e,s,o;if(t?(e=i(this.transform.x),s=i(this.transform.y),o=this.transform.scale,this.content={...this.content,x:e,y:s,scale:o}):(e=i(this.content.x),s=i(this.content.y),o=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:e,y:s}),this.trigger(\"beforeTransform\"),e=i(this.content.x),s=i(this.content.y),t&&this.option(\"zoom\")){let t,n;t=i(this.content.fitWidth*o),n=i(this.content.fitHeight*o),this.content.width=t,this.content.height=n,this.transform={...this.transform,width:t,height:n,scale:o},Object.assign(this.$content.style,{width:`${t}px`,height:`${n}px`,maxWidth:\"none\",maxHeight:\"none\",transform:`translate3d(${e}px, ${s}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${e}px, ${s}px, 0) scale(${o})`;this.trigger(\"afterTransform\")}endAnimation(t){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state=\"ready\",this.handleCursor(),!0!==t&&this.trigger(\"endAnimation\")}handleCursor(){const t=this.option(\"draggableClass\");t&&this.option(\"touch\")&&(1==this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\")?this.$container.classList.remove(t):this.$container.classList.add(t))}detachEvents(){this.$content.removeEventListener(\"load\",this.onLoad),this.$container.removeEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.removeEventListener(\"click\",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){\"destroy\"!==this.state&&(this.state=\"destroy\",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}d.version=\"4.0.31\",d.Plugins={};const u=(t,e)=>{let i=0;return function(...s){const o=(new Date).getTime();if(!(o-i{e.preventDefault(),e.stopPropagation(),this.carousel[\"slide\"+(\"next\"===t?\"Next\":\"Prev\")]()})),e}build(){this.$container||(this.$container=document.createElement(\"div\"),this.$container.classList.add(...this.option(\"classNames.main\").split(\" \")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton(\"next\"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton(\"prev\"),this.$container.appendChild(this.$prev))}onRefresh(){const t=this.carousel.pages.length;t<=1||t>1&&this.carousel.elemDimWidth=t-1&&this.$next.setAttribute(\"disabled\",\"\")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on(\"refresh change\",this.onRefresh)}detach(){this.carousel.off(\"refresh change\",this.onRefresh),this.cleanup()}}f.defaults={prevTpl:'',nextTpl:'',classNames:{main:\"carousel__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}};class g{constructor(t){this.carousel=t,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(t){this.target=this.carousel,this.nav=t,this.attachEvents()}addAsNavFor(t){this.target=t,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on(\"ready\",this.onNavReady),this.nav.on(\"createSlide\",this.onNavCreateSlide),this.nav.on(\"Panzoom.click\",this.onNavClick),this.target.on(\"change\",this.onTargetChange),this.target.on(\"Panzoom.afterUpdate\",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(t,e,i){const s=i.target.closest(\".carousel__slide\");if(!s)return;i.stopPropagation();const o=parseInt(s.dataset.index,10),n=this.target.findPageForSlide(o);this.target.page!==n&&this.target.slideTo(n,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){const t=this.target.pages[this.target.page].indexes[0],e=this.nav.findPageForSlide(t);this.nav.slideTo(e),this.markSelectedSlide(t)}markSelectedSlide(t){this.selectedIndex=t,[...this.nav.slides].filter((t=>t.$el&&t.$el.classList.remove(\"is-nav-selected\")));const e=this.nav.slides[t];e&&e.$el&&e.$el.classList.add(\"is-nav-selected\")}attach(t){const e=t.options.Sync;(e.target||e.nav)&&(e.target?this.addAsNavFor(e.target):e.nav&&this.addAsTargetFor(e.nav),this.friction=e.friction)}detach(){this.nav&&(this.nav.off(\"ready\",this.onNavReady),this.nav.off(\"Panzoom.click\",this.onNavClick),this.nav.off(\"createSlide\",this.onNavCreateSlide)),this.target&&(this.target.off(\"Panzoom.afterUpdate\",this.onTargetChange),this.target.off(\"change\",this.onTargetChange))}}g.defaults={friction:.92};const p={Navigation:f,Dots:class{constructor(t){this.carousel=t,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length{if(!(\"page\"in t.target.dataset))return;t.preventDefault(),t.stopPropagation();const e=parseInt(t.target.dataset.page,10),i=this.carousel;e!==i.page&&(i.pages.length<3&&i.option(\"infinite\")?i[0==e?\"slidePrev\":\"slideNext\"]():i.slideTo(e))})),this.$list=t,this.carousel.$container.appendChild(t),this.carousel.$container.classList.add(\"has-dots\"),t}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove(\"has-dots\")}rebuildDots(){let t=this.$list;const e=!!t,i=this.carousel.pages.length;if(i<2)return void(e&&this.removeList());e||(t=this.buildList());const s=this.$list.children.length;if(s>i)for(let t=i;t{const i=t.code;let s;\"Enter\"===i||\"NumpadEnter\"===i?s=e:\"ArrowRight\"===i?s=e.nextSibling:\"ArrowLeft\"===i&&(s=e.previousSibling),s&&s.click()})),this.$list.appendChild(e)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((t=>{t.classList.remove(\"is-selected\")}));const t=this.$list.childNodes[this.carousel.page];t&&t.classList.add(\"is-selected\")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:g};const m={slides:[],preload:0,slidesPerPage:\"auto\",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:\"\",classNames:{viewport:\"carousel__viewport\",track:\"carousel__track\",slide:\"carousel__slide\",slideSelected:\"is-selected\"},l10n:{NEXT:\"Next slide\",PREV:\"Previous slide\",GOTO:\"Go to slide #%d\"}};class y extends l{constructor(t,i={}){if(super(i=e(!0,{},m,i)),this.state=\"init\",this.$container=t,!(this.$container instanceof HTMLElement))throw new Error(\"No root element provided\");this.slideNext=u(this.slideNext.bind(this),250),this.slidePrev=u(this.slidePrev.bind(this),250),this.init(),t.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(y.Plugins),this.trigger(\"init\"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state=\"ready\",this.trigger(\"ready\")}initLayout(){const t=this.option(\"prefix\"),e=this.option(\"classNames\");this.$viewport=this.option(\"viewport\")||this.$container.querySelector(`.${t}${e.viewport}`),this.$viewport||(this.$viewport=document.createElement(\"div\"),this.$viewport.classList.add(...(t+e.viewport).split(\" \")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option(\"track\")||this.$container.querySelector(`.${t}${e.track}`),this.$track||(this.$track=document.createElement(\"div\"),this.$track.classList.add(...(t+e.track).split(\" \")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[];this.$viewport.querySelectorAll(`.${this.option(\"prefix\")}${this.option(\"classNames.slide\")}`).forEach((t=>{const e={$el:t,isDom:!0};this.slides.push(e),this.trigger(\"createSlide\",e,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=e(!0,[...this.slides],this.options.slides))}updateMetrics(){let t,e=0,s=[];this.slides.forEach(((i,o)=>{const n=i.$el,a=i.isDom||!t?this.getSlideMetrics(n):t;i.index=o,i.width=a,i.left=e,t=a,e+=a,s.push(o)}));let o=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),n=getComputedStyle(this.$track);o-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),this.contentWidth=e,this.viewportWidth=o;const a=[],r=this.option(\"slidesPerPage\");if(Number.isInteger(r)&&e>o)for(let t=0;to)&&(a.push({indexes:[],slides:[]}),t=a.length-1,e=0),e+=s.width,a[t].indexes.push(i),a[t].slides.push(s)}}const h=this.option(\"center\"),l=this.option(\"fill\");a.forEach(((t,i)=>{t.index=i,t.width=t.slides.reduce(((t,e)=>t+e.width),0),t.left=t.slides[0].left,h&&(t.left+=.5*(o-t.width)*-1),l&&!this.option(\"infiniteX\",this.option(\"infinite\"))&&e>o&&(t.left=Math.max(t.left,0),t.left=Math.min(t.left,e-o))}));const c=[];let d;a.forEach((t=>{const e={...t};d&&e.left===d.left?(d.width+=e.width,d.slides=[...d.slides,...e.slides],d.indexes=[...d.indexes,...e.indexes]):(e.index=c.length,d=e,c.push(e))})),this.pages=c;let u=this.page;if(null===u){const t=this.option(\"initialSlide\");u=null!==t?this.findPageForSlide(t):parseInt(this.option(\"initialPage\",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger(\"refresh\")}getSlideMetrics(t){if(!t){const e=this.slides[0];(t=document.createElement(\"div\")).dataset.isTestEl=1,t.style.visibility=\"hidden\",t.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),e.customClass&&t.classList.add(...e.customClass.split(\" \")),this.$track.prepend(t)}let e=Math.max(t.offsetWidth,i(t.getBoundingClientRect().width));const s=t.currentStyle||window.getComputedStyle(t);return e=e+(parseFloat(s.marginLeft)||0)+(parseFloat(s.marginRight)||0),t.dataset.isTestEl&&t.remove(),e}findPageForSlide(t){t=parseInt(t,10)||0;const e=this.pages.find((e=>e.indexes.indexOf(t)>-1));return e?e.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(t,e={}){const{x:i=-1*this.setPage(t,!0),y:s=0,friction:o=this.option(\"friction\")}=e;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:s,friction:o,ignoreBounds:!0}),\"ready\"===this.state&&\"ready\"===this.Panzoom.state&&this.trigger(\"settle\"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const t=e(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:\"x\",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option(\"textSelection\",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option(\"Panzoom\"));this.Panzoom=new d(this.$container,t),this.Panzoom.on({\"*\":(t,...e)=>this.trigger(`Panzoom.${t}`,...e),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger(\"settle\")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option(\"infiniteX\",this.option(\"infinite\"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option(\"infiniteY\",this.option(\"infinite\"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const t=this.contentWidth,e=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option(\"preload\"),o=this.option(\"infiniteX\",this.option(\"infinite\")),n=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-left\")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-right\"));this.slides.forEach((r=>{let h,l,c=0;h=i-n,l=i+e+a,h-=s*(e+n+a),l+=s*(e+n+a);const d=r.left+r.width>h&&r.lefth&&r.lefth&&r.lefti&&r.left<=i+e+a&&(c=0)):this.removeSlideEl(r),r.hasDiff=c}));let r=0,h=0;this.slides.forEach(((e,i)=>{let s=0;e.$el?(i!==r||e.hasDiff?s=h+e.hasDiff*t:h=0,e.$el.style.left=Math.abs(s)>.1?`${h+e.hasDiff*t}px`:\"\",r++):h+=e.width})),this.markSelectedSlides()}createSlideEl(t){if(!t)return;if(t.$el){let e=t.$el.dataset.index;if(!e||parseInt(e,10)!==t.index){let e;t.$el.dataset.index=t.index,t.$el.querySelectorAll(\"[data-lazy-srcset]\").forEach((t=>{t.srcset=t.dataset.lazySrcset})),t.$el.querySelectorAll(\"[data-lazy-src]\").forEach((t=>{let e=t.dataset.lazySrc;t instanceof HTMLImageElement?t.src=e:t.style.backgroundImage=`url('${e}')`})),(e=t.$el.dataset.lazySrc)&&(t.$el.style.backgroundImage=`url('${e}')`),t.state=\"ready\"}return}const e=document.createElement(\"div\");e.dataset.index=t.index,e.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),t.customClass&&e.classList.add(...t.customClass.split(\" \")),t.html&&(e.innerHTML=t.html);const i=[];this.slides.forEach(((t,e)=>{t.$el&&i.push(e)}));const s=t.index;let o=null;if(i.length){let t=i.reduce(((t,e)=>Math.abs(e-s){const o=i.$el;if(!o)return;const n=this.pages[this.page];n&&n.indexes&&n.indexes.indexOf(s)>-1?(t&&!o.classList.contains(t)&&(o.classList.add(t),this.trigger(\"selectSlide\",i)),o.removeAttribute(e)):(t&&o.classList.contains(t)&&(o.classList.remove(t),this.trigger(\"unselectSlide\",i)),o.setAttribute(e,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option(\"infiniteX\",this.option(\"infinite\"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const t=this.contentWidth,e=this.viewportWidth;if(!this.option(\"infiniteX\",this.option(\"infinite\"))||this.pages.length<2||te&&(i.content.x-=t,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&\"pointerdown\"===i.state&&i.resetDragPosition(),s}onTouchEnd(t,e){const i=this.option(\"dragFree\");if(!i&&this.pages.length>1&&t.dragOffset.time<350&&Math.abs(t.dragOffset.y)<1&&Math.abs(t.dragOffset.x)>5)this[t.dragOffset.x<0?\"slideNext\":\"slidePrev\"]();else if(i){const[,e]=this.getPageFromPosition(-1*t.transform.x);this.setPage(e)}else this.slideToClosest()}slideToClosest(t={}){let[,e]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(e,t)}getPageFromPosition(t){const e=this.pages.length;this.option(\"center\")&&(t+=.5*this.viewportWidth);const i=Math.floor(t/this.contentWidth);t-=i*this.contentWidth;let s=this.slides.find((e=>e.left<=t&&e.left+e.width>t));if(s){let t=this.findPageForSlide(s.index);return[t,t+i*e]}return[0,0]}setPage(t,e){let i=0,s=parseInt(t,10)||0;const o=this.page,n=this.pageIndex,a=this.pages.length,r=this.contentWidth,h=this.viewportWidth;if(t=(s%a+a)%a,this.option(\"infiniteX\",this.option(\"infinite\"))&&r>h){const o=Math.floor(s/a)||0,n=r;if(i=this.pages[t].left+o*n,!0===e&&a>2){let t=-1*this.Panzoom.content.x;const e=i-n,o=i+n,r=Math.abs(t-i),h=Math.abs(t-e),l=Math.abs(t-o);l{this.removeSlideEl(t)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}y.version=\"4.0.31\",y.Plugins=p;const v=!(\"undefined\"==typeof window||!window.document||!window.document.createElement);let b=null;const x=[\"a[href]\",\"area[href]\",'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\"select:not([disabled]):not([aria-hidden])\",\"textarea:not([disabled]):not([aria-hidden])\",\"button:not([disabled]):not([aria-hidden])\",\"iframe\",\"object\",\"embed\",\"video\",\"audio\",\"[contenteditable]\",'[tabindex]:not([tabindex^=\"-\"]):not([disabled]):not([aria-hidden])'],w=t=>{if(t&&v){null===b&&document.createElement(\"div\").focus({get preventScroll(){return b=!0,!1}});try{if(t.setActive)t.setActive();else if(b)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:\"auto\"})}}catch(t){}}};const $={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:\"t\",Carousel:{},tpl:'
'};class C{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onPrepare\",\"onClosing\",\"onKeydown\"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length=this.fancybox.option(\"Thumbs.minScreenHeight\")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(t,e){e===t.option(\"Thumbs.key\")&&this.toggle()}build(){if(this.$container)return;const t=document.createElement(\"div\");t.classList.add(\"fancybox__thumbs\"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel.nextSibling),this.Carousel=new y(t,e(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option(\"Thumbs.Carousel\"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on(\"wheel\",((t,e)=>{e.preventDefault(),this.fancybox[e.deltaY<0?\"prev\":\"next\"]()})),this.$container=t,this.state=\"visible\"}getSlides(){const t=[];for(const e of this.fancybox.items){const i=e.thumb;i&&t.push({html:this.fancybox.option(\"Thumbs.tpl\").replace(/\\{\\{src\\}\\}/gi,i),customClass:`has-thumb has-${e.type||\"image\"}`})}return t}toggle(){\"visible\"===this.state?this.hide():\"hidden\"===this.state?this.show():this.build()}show(){\"hidden\"===this.state&&(this.$container.style.display=\"\",this.Carousel.Panzoom.attachEvents(),this.state=\"visible\")}hide(){\"visible\"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display=\"none\",this.state=\"hidden\")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state=\"init\"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}C.defaults=$;const S=(t,e)=>{const i=new URL(t),s=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[t,i]of[...s,...Object.entries(e)])\"t\"===t?o.set(\"start\",parseInt(i)):o.set(t,i);o=o.toString();let n=t.match(/#t=((.*)?\\d+s)/);return n&&(o+=`#t=${n[1]}`),o},E={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:\"transparent\",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'',format:\"\"}};class P{constructor(t){this.fancybox=t;for(const t of[\"onInit\",\"onReady\",\"onCreateSlide\",\"onRemoveSlide\",\"onSelectSlide\",\"onUnselectSlide\",\"onRefresh\",\"onMessage\"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide,\"Carousel.selectSlide\":this.onSelectSlide,\"Carousel.unselectSlide\":this.onUnselectSlide,\"Carousel.refresh\":this.onRefresh}}onInit(){for(const t of this.fancybox.items)this.processType(t)}processType(t){if(t.html)return t.src=t.html,t.type=\"html\",void delete t.html;const i=t.src||\"\";let s=t.type||this.fancybox.options.type,o=null;if(!i||\"string\"==typeof i){if(o=i.match(/(?:youtube\\.com|youtu\\.be|youtube\\-nocookie\\.com)\\/(?:watch\\?(?:.*&)?v=|v\\/|u\\/|embed\\/?)?(videoseries\\?list=(?:.*)|[\\w-]{11}|\\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const e=S(i,this.fancybox.option(\"Html.youtube\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://www.youtube-nocookie.com/embed/${n}?${e}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${n}/mqdefault.jpg`,t.vendor=\"youtube\",s=\"video\"}else if(o=i.match(/^.+vimeo.com\\/(?:\\/)?([\\d]+)(.*)?/)){const e=S(i,this.fancybox.option(\"Html.vimeo\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://player.vimeo.com/video/${n}?${e}`,t.vendor=\"vimeo\",s=\"video\"}else(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:(?:(?:maps\\/(?:place\\/(?:.*)\\/)?\\@(.*),(\\d+.?\\d+?)z))|(?:\\?ll=))(.*)?/i))?(t.src=`//maps.google.${o[1]}/?ll=${(o[2]?o[2]+\"&z=\"+Math.floor(o[3])+(o[4]?o[4].replace(/^\\//,\"&\"):\"\"):o[4]+\"\").replace(/\\?/,\"&\")}&output=${o[4]&&o[4].indexOf(\"layer=c\")>0?\"svembed\":\"embed\"}`,s=\"map\"):(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:maps\\/search\\/)(.*)/i))&&(t.src=`//maps.google.${o[1]}/maps?q=${o[2].replace(\"query=\",\"q=\").replace(\"api=1\",\"\")}&output=embed`,s=\"map\");s||(\"#\"===i.charAt(0)?s=\"inline\":(o=i.match(/\\.(mp4|mov|ogv|webm)((\\?|#).*)?$/i))?(s=\"html5video\",t.format=t.format||\"video/\"+(\"ogv\"===o[1]?\"ogg\":o[1])):i.match(/(^data:image\\/[a-z0-9+\\/=]*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\\?|#).*)?$)/i)?s=\"image\":i.match(/\\.(pdf)((\\?|#).*)?$/i)&&(s=\"pdf\")),t.type=s||this.fancybox.option(\"defaultType\",\"image\"),\"html5video\"!==s&&\"video\"!==s||(t.video=e({},this.fancybox.option(\"Html.video\"),t.video),t._width&&t._height?t.ratio=parseFloat(t._width)/parseFloat(t._height):t.ratio=t.ratio||t.video.ratio||E.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&(this.setContent(t),t.index===this.fancybox.getSlide().index&&this.playVideo(t))}))}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}loadInlineContent(t){let e;if(t.src instanceof HTMLElement)e=t.src;else if(\"string\"==typeof t.src){const i=t.src.split(\"#\",2),s=2===i.length&&\"\"===i[0]?i[1]:i[0];e=document.getElementById(s)}if(e){if(\"clone\"===t.type||e.$placeHolder){e=e.cloneNode(!0);let i=e.getAttribute(\"id\");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${t.index}`,e.setAttribute(\"id\",i)}else{const t=document.createElement(\"div\");t.classList.add(\"fancybox-placeholder\"),e.parentNode.insertBefore(t,e),e.$placeHolder=t}this.fancybox.setContent(t,e)}else this.fancybox.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}loadAjaxContent(t){const e=this.fancybox,i=new XMLHttpRequest;e.showLoading(t),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&\"ready\"===e.state&&(e.hideLoading(t),200===i.status?e.setContent(t,i.responseText):e.setError(t,404===i.status?\"{{AJAX_NOT_FOUND}}\":\"{{AJAX_FORBIDDEN}}\"))};const s=t.ajax||null;i.open(s?\"POST\":\"GET\",t.src),i.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),i.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),i.send(s),t.xhr=i}loadIframeContent(t){const e=this.fancybox,i=document.createElement(\"iframe\");if(i.className=\"fancybox__iframe\",i.setAttribute(\"id\",`fancybox__iframe_${e.id}_${t.index}`),i.setAttribute(\"allow\",\"autoplay; fullscreen\"),i.setAttribute(\"scrolling\",\"auto\"),t.$iframe=i,\"iframe\"!==t.type||!1===t.preload)return i.setAttribute(\"src\",t.src),this.fancybox.setContent(t,i),void this.resizeIframe(t);e.showLoading(t);const s=document.createElement(\"div\");s.style.visibility=\"hidden\",this.fancybox.setContent(t,s),s.appendChild(i),i.onerror=()=>{e.setError(t,\"{{IFRAME_ERROR}}\")},i.onload=()=>{e.hideLoading(t);let s=!1;i.isReady||(i.isReady=!0,s=!0),i.src.length&&(i.parentNode.style.visibility=\"\",this.resizeIframe(t),s&&e.revealContent(t))},i.setAttribute(\"src\",t.src)}setAspectRatio(t){const e=t.$content,i=t.ratio;if(!e)return;let s=t._width,o=t._height;if(i||s&&o){Object.assign(e.style,{width:s&&o?\"100%\":\"\",height:s&&o?\"100%\":\"\",maxWidth:\"\",maxHeight:\"\"});let t=e.offsetWidth,n=e.offsetHeight;if(s=s||t,o=o||n,s>t||o>n){let e=Math.min(t/s,n/o);s*=e,o*=e}Math.abs(s/o-i)>.01&&(i{t.$el&&(t.$iframe&&this.resizeIframe(t),t.ratio&&this.setAspectRatio(t))}))}setContent(t){if(t&&!t.isDom){switch(t.type){case\"html\":this.fancybox.setContent(t,t.src);break;case\"html5video\":this.fancybox.setContent(t,this.fancybox.option(\"Html.html5video.tpl\").replace(/\\{\\{src\\}\\}/gi,t.src).replace(\"{{format}}\",t.format||t.html5video&&t.html5video.format||\"\").replace(\"{{poster}}\",t.poster||t.thumb||\"\"));break;case\"inline\":case\"clone\":this.loadInlineContent(t);break;case\"ajax\":this.loadAjaxContent(t);break;case\"pdf\":case\"video\":case\"map\":t.preload=!1;case\"iframe\":this.loadIframeContent(t)}t.ratio&&this.setAspectRatio(t)}}onSelectSlide(t,e,i){\"ready\"===t.state&&this.playVideo(i)}playVideo(t){if(\"html5video\"===t.type&&t.video.autoplay)try{const e=t.$el.querySelector(\"video\");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(t){}if(\"video\"!==t.type||!t.$iframe||!t.$iframe.contentWindow)return;const e=()=>{if(\"done\"===t.state&&t.$iframe&&t.$iframe.contentWindow){let e;if(t.$iframe.isReady)return t.video&&t.video.autoplay&&(e=\"youtube\"==t.vendor?{event:\"command\",func:\"playVideo\"}:{method:\"play\",value:\"true\"}),void(e&&t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"));\"youtube\"===t.vendor&&(e={event:\"listening\",id:t.$iframe.getAttribute(\"id\")},t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"))}t.poller=setTimeout(e,250)};e()}onUnselectSlide(t,e,i){if(\"html5video\"===i.type){try{i.$el.querySelector(\"video\").pause()}catch(t){}return}let s=!1;\"vimeo\"==i.vendor?s={method:\"pause\",value:\"true\"}:\"youtube\"===i.vendor&&(s={event:\"command\",func:\"pauseVideo\"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),\"*\"),clearTimeout(i.poller)}onRemoveSlide(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src=\"//about:blank\",i.$iframe=null);const s=i.$content;\"inline\"===i.type&&s&&(s.classList.remove(\"fancybox__content\"),\"none\"!==s.style.display&&(s.style.display=\"none\")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=s&&s.$placeHolder;o&&(o.parentNode.insertBefore(s,o),o.remove(),s.$placeHolder=null)}onMessage(t){try{let e=JSON.parse(t.data);if(\"https://player.vimeo.com\"===t.origin){if(\"ready\"===e.event)for(let e of document.getElementsByClassName(\"fancybox__iframe\"))e.contentWindow===t.source&&(e.isReady=1)}else\"https://www.youtube-nocookie.com\"===t.origin&&\"onReady\"===e.event&&(document.getElementById(e.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener(\"message\",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener(\"message\",this.onMessage,!1)}}P.defaults=E;class T{constructor(t){this.fancybox=t;for(const t of[\"onReady\",\"onClosing\",\"onDone\",\"onPageChange\",\"onCreateSlide\",\"onRemoveSlide\",\"onImageStatusChange\"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,\"Carousel.change\":this.onPageChange,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&this.setContent(t)}))}onDone(t,e){this.handleCursor(e)}onClosing(t){clearTimeout(this.clickTimer),this.clickTimer=null,t.Carousel.slides.forEach((t=>{t.$image&&(t.state=\"destroy\"),t.Panzoom&&t.Panzoom.detachEvents()})),\"closing\"===this.fancybox.state&&this.canZoom(t.getSlide())&&this.zoomOut()}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(t,e,i){i.$image&&(i.$el.classList.remove(t.option(\"Image.canZoomInClass\")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(t){if(t.isDom||t.html||t.type&&\"image\"!==t.type)return;if(t.$image)return;t.type=\"image\",t.state=\"loading\";const e=document.createElement(\"div\");e.style.visibility=\"hidden\";const i=document.createElement(\"img\");i.addEventListener(\"load\",(e=>{e.stopImmediatePropagation(),this.onImageStatusChange(t)})),i.addEventListener(\"error\",(()=>{this.onImageStatusChange(t)})),i.src=t.src,i.alt=\"\",i.draggable=!1,i.classList.add(\"fancybox__image\"),t.srcset&&i.setAttribute(\"srcset\",t.srcset),t.sizes&&i.setAttribute(\"sizes\",t.sizes),t.$image=i;const s=this.fancybox.option(\"Image.wrap\");if(s){const o=document.createElement(\"div\");o.classList.add(\"string\"==typeof s?s:\"fancybox__image-wrap\"),o.appendChild(i),e.appendChild(o),t.$wrap=o}else e.appendChild(i);t.$el.dataset.imageFit=this.fancybox.option(\"Image.fit\"),this.fancybox.setContent(t,e),i.complete||i.error?this.onImageStatusChange(t):this.fancybox.showLoading(t)}onImageStatusChange(t){const e=t.$image;e&&\"loading\"===t.state&&(e.complete&&e.naturalWidth&&e.naturalHeight?(this.fancybox.hideLoading(t),\"contain\"===this.fancybox.option(\"Image.fit\")&&this.initSlidePanzoom(t),t.$el.addEventListener(\"wheel\",(e=>this.onWheel(t,e)),{passive:!1}),t.$content.addEventListener(\"click\",(e=>this.onClick(t,e)),{passive:!1}),this.revealContent(t)):this.fancybox.setError(t,\"{{IMAGE_ERROR}}\"))}initSlidePanzoom(t){t.Panzoom||(t.Panzoom=new d(t.$el,e(!0,this.fancybox.option(\"Image.Panzoom\",{}),{viewport:t.$wrap,content:t.$image,width:t._width,height:t._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option(\"Image.touch\"),panOnlyZoomed:!0,click:!1,wheel:!1})),t.Panzoom.on(\"startAnimation\",(()=>{this.fancybox.trigger(\"Image.startAnimation\",t)})),t.Panzoom.on(\"endAnimation\",(()=>{\"zoomIn\"===t.state&&this.fancybox.done(t),this.handleCursor(t),this.fancybox.trigger(\"Image.endAnimation\",t)})),t.Panzoom.on(\"afterUpdate\",(()=>{this.handleCursor(t),this.fancybox.trigger(\"Image.afterUpdate\",t)})))}revealContent(t){null===this.fancybox.Carousel.prevPage&&t.index===this.fancybox.options.startIndex&&this.canZoom(t)?this.zoomIn():this.fancybox.revealContent(t)}getZoomInfo(t){const e=t.$thumb.getBoundingClientRect(),i=e.width,s=e.height,o=t.$content.getBoundingClientRect(),n=o.width,a=o.height,r=o.top-e.top,h=o.left-e.left;let l=this.fancybox.option(\"Image.zoomOpacity\");return\"auto\"===l&&(l=Math.abs(i/s-n/a)>.1),{top:r,left:h,scale:n&&i?i/n:1,opacity:l}}canZoom(t){const e=this.fancybox,i=e.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(t.Panzoom&&!t.Panzoom.content.width)return!1;if(!e.option(\"Image.zoom\")||\"contain\"!==e.option(\"Image.fit\"))return!1;const s=t.$thumb;if(!s||\"loading\"===t.state)return!1;i.classList.add(\"fancybox__no-click\");const o=s.getBoundingClientRect();let n;if(this.fancybox.option(\"Image.ignoreCoveredThumbnail\")){const t=document.elementFromPoint(o.left+1,o.top+1)===s,e=document.elementFromPoint(o.right-1,o.bottom-1)===s;n=t&&e}else n=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===s;return i.classList.remove(\"fancybox__no-click\"),n}zoomIn(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom,{top:s,left:o,scale:n,opacity:a}=this.getZoomInfo(e);t.trigger(\"reveal\",e),i.panTo({x:-1*o,y:-1*s,scale:n,friction:0,ignoreBounds:!0}),e.$content.style.visibility=\"\",e.state=\"zoomIn\",!0===a&&i.on(\"afterTransform\",(t=>{\"zoomIn\"!==e.state&&\"zoomOut\"!==e.state||(t.$content.style.opacity=Math.min(1,1-(1-t.content.scale)/(1-n)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option(\"Image.zoomFriction\")})}zoomOut(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom;if(!i)return;e.state=\"zoomOut\",t.state=\"customClosing\",e.$caption&&(e.$caption.style.visibility=\"hidden\");let s=this.fancybox.option(\"Image.zoomFriction\");const o=t=>{const{top:o,left:n,scale:a,opacity:r}=this.getZoomInfo(e);t||r||(s*=.82),i.panTo({x:-1*n,y:-1*o,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener(\"scroll\",o),i.once(\"endAnimation\",(()=>{window.removeEventListener(\"scroll\",o),t.destroy()})),o()}handleCursor(t){if(\"image\"!==t.type||!t.$el)return;const e=t.Panzoom,i=this.fancybox.option(\"Image.click\",!1,t),s=this.fancybox.option(\"Image.touch\"),o=t.$el.classList,n=this.fancybox.option(\"Image.canZoomInClass\"),a=this.fancybox.option(\"Image.canZoomOutClass\");if(o.remove(a),o.remove(n),e&&\"toggleZoom\"===i){e&&1===e.content.scale&&e.option(\"maxScale\")-e.content.scale>.01?o.add(n):e.content.scale>1&&!s&&o.add(a)}else\"close\"===i&&o.add(a)}onWheel(t,e){if(\"ready\"===this.fancybox.state&&!1!==this.fancybox.trigger(\"Image.wheel\",e))switch(this.fancybox.option(\"Image.wheel\")){case\"zoom\":\"done\"===t.state&&t.Panzoom&&t.Panzoom.zoomWithWheel(e);break;case\"close\":this.fancybox.close();break;case\"slide\":this.fancybox[e.deltaY<0?\"prev\":\"next\"]()}}onClick(t,e){if(\"ready\"!==this.fancybox.state)return;const i=t.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case\"toggleZoom\":e.stopPropagation(),t.Panzoom&&t.Panzoom.zoomWithClick(e);break;case\"close\":this.fancybox.close();break;case\"next\":e.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option(\"Image.click\"),n=this.fancybox.option(\"Image.doubleClick\");n?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(n)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(o)}),300):s(o)}onPageChange(t,e){const i=t.getSlide();e.slides.forEach((t=>{t.Panzoom&&\"done\"===t.state&&t.index!==i.index&&t.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}T.defaults={canZoomInClass:\"can-zoom_in\",canZoomOutClass:\"can-zoom_out\",zoom:!0,zoomOpacity:\"auto\",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:\"toggleZoom\",doubleClick:null,wheel:\"zoom\",fit:\"contain\",wrap:!1,Panzoom:{ratio:1}};class L{constructor(t){this.fancybox=t;for(const t of[\"onChange\",\"onClosing\"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,\"Carousel.change\":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash=\"\",this.timer=null}onChange(t){const e=t.Carousel;this.timer&&clearTimeout(this.timer);const i=null===e.prevPage,s=t.getSlide(),o=new URL(document.URL).hash;let n=!1;if(s.slug)n=\"#\"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,o=t.option(\"slug\")||i&&i.fancybox;o&&o.length&&\"true\"!==o&&(n=\"#\"+o+(e.slides.length>1?\"-\"+(s.index+1):\"\"))}i&&(this.origHash=o!==n?o:\"\"),n&&o!==n&&(this.timer=setTimeout((()=>{try{window.history[i?\"pushState\":\"replaceState\"]({},document.title,window.location.pathname+window.location.search+n),i&&(this.hasCreatedHistory=!0)}catch(t){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||\"\"))}catch(t){}}attach(t){t.on(this.events)}detach(t){t.off(this.events)}static startFromUrl(){const t=L.Fancybox;if(!t||t.getInstance()||!1===t.defaults.Hash)return;const{hash:e,slug:i,index:s}=L.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug=\"${e}\"]`);if(o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})),t.getInstance())return;const n=document.querySelectorAll(`[data-fancybox=\"${i}\"]`);n.length&&(null===s&&1===n.length?o=n[0]:s&&(o=n[s-1]),o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:t,index:e}=L.getParsedURL(),i=L.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(t){const i=s.Carousel;if(t===s.option(\"slug\"))return i.slideTo(e-1);for(let e of i.slides)if(e.slug&&e.slug===t)return i.slideTo(e.index);const o=s.getSlide(),n=o.$trigger&&o.$trigger.dataset;if(n&&n.fancybox===t)return i.slideTo(e-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}L.startFromUrl()}static create(t){function e(){window.addEventListener(\"hashchange\",L.onHashChange,!1),L.startFromUrl()}L.Fancybox=t,v&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?e():document.addEventListener(\"DOMContentLoaded\",e)}))}static destroy(){window.removeEventListener(\"hashchange\",L.onHashChange,!1)}static getParsedURL(){const t=window.location.hash.substr(1),e=t.split(\"-\"),i=e.length>1&&/^\\+?\\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||null;return{hash:t,slug:e.join(\"-\"),index:i}}}const _={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(t){_.pageXOffset=window.pageXOffset,_.pageYOffset=window.pageYOffset,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class A{constructor(t){this.fancybox=t,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const t=this.fancybox.option(\"slideshow.delay\",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option(\"infinite\")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),t);let e=this.$progress;e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__progress\"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel),this.$progress=e,e.offsetHeight),e.style.transitionDuration=`${t}ms`,e.style.transform=\"scaleX(1)\"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration=\"\",this.$progress.style.transform=\"\",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add(\"has-slideshow\"),\"done\"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener(\"visibilitychange\",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove(\"has-slideshow\"),document.removeEventListener(\"visibilitychange\",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const z={display:[\"counter\",\"zoom\",\"slideshow\",\"fullscreen\",\"thumbs\",\"close\"],autoEnable:!0,items:{counter:{position:\"left\",type:\"div\",class:\"fancybox__counter\",html:' / ',attr:{tabindex:-1}},prev:{type:\"button\",class:\"fancybox__button--prev\",label:\"PREV\",html:'',attr:{\"data-fancybox-prev\":\"\"}},next:{type:\"button\",class:\"fancybox__button--next\",label:\"NEXT\",html:'',attr:{\"data-fancybox-next\":\"\"}},fullscreen:{type:\"button\",class:\"fancybox__button--fullscreen\",label:\"TOGGLE_FULLSCREEN\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),_.element()?_.deactivate():_.activate(this.fancybox.$container)}},slideshow:{type:\"button\",class:\"fancybox__button--slideshow\",label:\"TOGGLE_SLIDESHOW\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),this.Slideshow.toggle()}},zoom:{type:\"button\",class:\"fancybox__button--zoom\",label:\"TOGGLE_ZOOM\",html:'',click:function(t){t.preventDefault();const e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:\"link\",label:\"DOWNLOAD\",class:\"fancybox__button--download\",html:'',click:function(t){t.stopPropagation()}},thumbs:{type:\"button\",label:\"TOGGLE_THUMBS\",class:\"fancybox__button--thumbs\",html:'',click:function(t){t.stopPropagation();const e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:\"button\",label:\"CLOSE\",class:\"fancybox__button--close\",html:'',attr:{\"data-fancybox-close\":\"\",tabindex:0}}}};class k{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onInit\",\"onPrepare\",\"onDone\",\"onKeydown\",\"onClosing\",\"onChange\",\"onSettle\",\"onRefresh\"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,\"Carousel.change\":this.onChange,\"Carousel.settle\":this.onSettle,\"Carousel.Panzoom.touchStart\":()=>this.onRefresh(),\"Image.startAnimation\":(t,e)=>this.onRefresh(e),\"Image.afterUpdate\":(t,e)=>this.onRefresh(e)}}onInit(){if(this.fancybox.option(\"Toolbar.autoEnable\")){let t=!1;for(const e of this.fancybox.items)if(\"image\"===e.type){t=!0;break}if(!t)return void(this.state=\"disabled\")}for(const e of this.fancybox.option(\"Toolbar.display\")){if(\"close\"===(t(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}}onPrepare(){const t=this.fancybox;if(\"init\"===this.state&&(this.build(),this.update(),this.Slideshow=new A(t),!t.Carousel.prevPage&&(t.option(\"slideshow.autoStart\")&&this.Slideshow.activate(),t.option(\"fullscreen.autoStart\")&&!_.element())))try{_.activate(t.$container)}catch(t){}}onFsChange(){window.scrollTo(_.pageXOffset,_.pageYOffset)}onSettle(){const t=this.fancybox,e=this.Slideshow;e&&e.isActive()&&(t.getSlide().index!==t.Carousel.slides.length-1||t.option(\"infinite\")?\"done\"===t.getSlide().state&&e.setTimer():e.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(t,e){const i=this.Slideshow;e.index===t.getSlide().index&&(this.update(),i&&i.isActive()&&(t.option(\"infinite\")||e.index!==t.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(t){t&&t.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||t&&\"done\"!==t.state||this.Slideshow.deactivate())}onKeydown(t,e,i){\" \"===e&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener(\"fullscreenchange\",this.onFsChange)}createElement(t){let e;\"div\"===t.type?e=document.createElement(\"div\"):(e=document.createElement(\"link\"===t.type?\"a\":\"button\"),e.classList.add(\"carousel__button\")),e.innerHTML=t.html,e.setAttribute(\"tabindex\",t.tabindex||0),t.class&&e.classList.add(...t.class.split(\" \"));for(const i in t.attr)e.setAttribute(i,t.attr[i]);t.label&&e.setAttribute(\"title\",this.fancybox.localize(`{{${t.label}}}`)),t.click&&e.addEventListener(\"click\",t.click.bind(this)),\"prev\"===t.id&&e.setAttribute(\"data-fancybox-prev\",\"\"),\"next\"===t.id&&e.setAttribute(\"data-fancybox-next\",\"\");const i=e.querySelector(\"svg\");return i&&(i.setAttribute(\"role\",\"img\"),i.setAttribute(\"tabindex\",\"-1\"),i.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\")),e}build(){this.cleanup();const i=this.fancybox.option(\"Toolbar.items\"),s=[{position:\"left\",items:[]},{position:\"center\",items:[]},{position:\"right\",items:[]}],o=this.fancybox.plugins.Thumbs;for(const n of this.fancybox.option(\"Toolbar.display\")){let a,r;if(t(n)?(a=n.id,r=e({},i[a],n)):(a=n,r=i[a]),[\"counter\",\"next\",\"prev\",\"slideshow\"].includes(a)&&this.fancybox.items.length<2)continue;if(\"fullscreen\"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener(\"fullscreenchange\",this.onFsChange)}if(\"thumbs\"===a&&(!o||\"disabled\"===o.state))continue;if(!r)continue;let h=r.position||\"right\",l=s.find((t=>t.position===h));l&&l.items.push(r)}const n=document.createElement(\"div\");n.classList.add(\"fancybox__toolbar\");for(const t of s)if(t.items.length){const e=document.createElement(\"div\");e.classList.add(\"fancybox__toolbar__items\"),e.classList.add(`fancybox__toolbar__items--${t.position}`);for(const i of t.items)e.appendChild(this.createElement(i));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const t=this.fancybox.getSlide(),e=t.index,i=this.fancybox.items.length,s=t.downloadSrc||(\"image\"!==t.type||t.error?null:t.src);for(const t of this.fancybox.$container.querySelectorAll(\"a.fancybox__button--download\"))s?(t.removeAttribute(\"disabled\"),t.removeAttribute(\"tabindex\"),t.setAttribute(\"href\",s),t.setAttribute(\"download\",s),t.setAttribute(\"target\",\"_blank\")):(t.setAttribute(\"disabled\",\"\"),t.setAttribute(\"tabindex\",-1),t.removeAttribute(\"href\"),t.removeAttribute(\"download\"));const o=t.Panzoom,n=o&&o.option(\"maxScale\")>o.option(\"baseScale\");for(const t of this.fancybox.$container.querySelectorAll(\".fancybox__button--zoom\"))n?t.removeAttribute(\"disabled\"):t.setAttribute(\"disabled\",\"\");for(const e of this.fancybox.$container.querySelectorAll(\"[data-fancybox-index]\"))e.innerHTML=t.index+1;for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-count]\"))t.innerHTML=i;if(!this.fancybox.option(\"infinite\")){for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-prev]\"))0===e?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\");for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-next]\"))e===i-1?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}k.defaults=z;const O={ScrollLock:class{constructor(t){this.fancybox=t,this.viewport=null,this.pendingUpdate=null;for(const t of[\"onReady\",\"onResize\",\"onTouchstart\",\"onTouchmove\"])this[t]=this[t].bind(this)}onReady(){const t=window.visualViewport;t&&(this.viewport=t,this.startY=0,t.addEventListener(\"resize\",this.onResize),this.updateViewport()),window.addEventListener(\"touchstart\",this.onTouchstart,{passive:!1}),window.addEventListener(\"touchmove\",this.onTouchmove,{passive:!1}),window.addEventListener(\"wheel\",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const t=this.fancybox,e=this.viewport,i=e.scale||1,s=t.$container;if(!s)return;let o=\"\",n=\"\",a=\"\";i-1>.1&&(o=e.width*i+\"px\",n=e.height*i+\"px\",a=`translate3d(${e.offsetLeft}px, ${e.offsetTop}px, 0) scale(${1/i})`),s.style.width=o,s.style.height=n,s.style.transform=a}onTouchstart(t){this.startY=t.touches?t.touches[0].screenY:t.screenY}onTouchmove(t){const e=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!t.cancelable)return;if(t.touches.length>1||1!==i)return;const o=s(t.composedPath()[0]);if(!o)return void t.preventDefault();const n=window.getComputedStyle(o),a=parseInt(n.getPropertyValue(\"height\"),10),r=t.touches?t.touches[0].screenY:t.screenY,h=e<=r&&0===o.scrollTop,l=e>=r&&o.scrollHeight-o.scrollTop===a;(h||l)&&t.preventDefault()}onWheel(t){s(t.composedPath()[0])||t.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const t=this.viewport;t&&(t.removeEventListener(\"resize\",this.onResize),this.viewport=null),window.removeEventListener(\"touchstart\",this.onTouchstart,!1),window.removeEventListener(\"touchmove\",this.onTouchmove,!1),window.removeEventListener(\"wheel\",this.onWheel,{passive:!1})}attach(){this.fancybox.on(\"initLayout\",this.onReady)}detach(){this.fancybox.off(\"initLayout\",this.onReady),this.cleanup()}},Thumbs:C,Html:P,Toolbar:k,Image:T,Hash:L};const M={startIndex:0,preload:1,infinite:!0,showClass:\"fancybox-zoomInUp\",hideClass:\"fancybox-fadeOut\",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:\"close\",closeButton:\"inside\",dragToClose:!0,keyboard:{Escape:\"close\",Delete:\"close\",Backspace:\"close\",PageUp:\"next\",PageDown:\"prev\",ArrowUp:\"next\",ArrowDown:\"prev\",ArrowRight:\"next\",ArrowLeft:\"prev\"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:\"Close\",NEXT:\"Next\",PREV:\"Previous\",MODAL:\"You can close this modal content with the ESC key\",ERROR:\"Something Went Wrong, Please Try Again Later\",IMAGE_ERROR:\"Image Not Found\",ELEMENT_NOT_FOUND:\"HTML Element Not Found\",AJAX_NOT_FOUND:\"Error Loading AJAX : Not Found\",AJAX_FORBIDDEN:\"Error Loading AJAX : Forbidden\",IFRAME_ERROR:\"Error Loading Page\",TOGGLE_ZOOM:\"Toggle zoom level\",TOGGLE_THUMBS:\"Toggle thumbnails\",TOGGLE_SLIDESHOW:\"Toggle slideshow\",TOGGLE_FULLSCREEN:\"Toggle full-screen mode\",DOWNLOAD:\"Download\"}},I=new Map;let F=0;class R extends l{constructor(t,i={}){t=t.map((t=>(t.width&&(t._width=t.width),t.height&&(t._height=t.height),t))),super(e(!0,{},M,i)),this.bindHandlers(),this.state=\"init\",this.setItems(t),this.attachPlugins(R.Plugins),this.trigger(\"init\"),!0===this.option(\"hideScrollbar\")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),I.set(this.id,this),this.trigger(\"prepare\"),this.state=\"ready\",this.trigger(\"ready\"),this.$container.setAttribute(\"aria-hidden\",\"false\"),this.option(\"trapFocus\")&&this.focus()}option(t,...e){const i=this.getSlide();let s=i?i[t]:void 0;return void 0!==s?(\"function\"==typeof s&&(s=s.call(this,this,...e)),s):super.option(t,...e)}bindHandlers(){for(const t of[\"onMousedown\",\"onKeydown\",\"onClick\",\"onFocus\",\"onCreateSlide\",\"onSettle\",\"onTouchMove\",\"onTouchEnd\",\"onTransform\"])this[t]=this[t].bind(this)}attachEvents(){document.addEventListener(\"mousedown\",this.onMousedown),document.addEventListener(\"keydown\",this.onKeydown,!0),this.option(\"trapFocus\")&&document.addEventListener(\"focus\",this.onFocus,!0),this.$container.addEventListener(\"click\",this.onClick)}detachEvents(){document.removeEventListener(\"mousedown\",this.onMousedown),document.removeEventListener(\"keydown\",this.onKeydown,!0),document.removeEventListener(\"focus\",this.onFocus,!0),this.$container.removeEventListener(\"click\",this.onClick)}initLayout(){this.$root=this.option(\"parentEl\")||document.body;let t=this.option(\"template.main\");t&&(this.$root.insertAdjacentHTML(\"beforeend\",this.localize(t)),this.$container=this.$root.querySelector(\".fancybox__container\")),this.$container||(this.$container=document.createElement(\"div\"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:\"fancybox__container\",role:\"dialog\",tabIndex:\"-1\",\"aria-modal\":\"true\",\"aria-hidden\":\"true\",\"aria-label\":this.localize(\"{{MODAL}}\")}).forEach((t=>this.$container.setAttribute(...t))),this.option(\"animated\")&&this.$container.classList.add(\"is-animated\"),this.$backdrop=this.$container.querySelector(\".fancybox__backdrop\"),this.$backdrop||(this.$backdrop=document.createElement(\"div\"),this.$backdrop.classList.add(\"fancybox__backdrop\"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(\".fancybox__carousel\"),this.$carousel||(this.$carousel=document.createElement(\"div\"),this.$carousel.classList.add(\"fancybox__carousel\"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute(\"id\"),this.id||(this.id=this.options.id||++F,this.$container.setAttribute(\"id\",\"fancybox-\"+this.id));const e=this.option(\"mainClass\");return e&&this.$container.classList.add(...e.split(\" \")),document.documentElement.classList.add(\"with-fancybox\"),this.trigger(\"initLayout\"),this}setItems(t){const e=[];for(const i of t){const t=i.$trigger;if(t){const e=t.dataset||{};i.src=e.src||t.getAttribute(\"href\")||i.src,i.type=e.type||i.type,!i.src&&t instanceof HTMLImageElement&&(i.src=t.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let t=i.$trigger&&i.$trigger.origTarget;t&&(s=t instanceof HTMLImageElement?t:t.querySelector(\"img:not([aria-hidden])\")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector(\"img:not([aria-hidden])\"))}i.$thumb=s||null;let o=i.thumb;!o&&s&&(o=s.currentSrc||s.src,!o&&s.dataset&&(o=s.dataset.lazySrc||s.dataset.src)),o||\"image\"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||\"\",e.push(i)}this.items=e}initCarousel(){return this.Carousel=new y(this.$carousel,e(!0,{},{prefix:\"\",classNames:{viewport:\"fancybox__viewport\",track:\"fancybox__track\",slide:\"fancybox__slide\"},textSelection:!0,preload:this.option(\"preload\"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option(\"infinite\"),infiniteY:!0,l10n:this.option(\"l10n\"),Dots:!1,Navigation:{classNames:{main:\"fancybox__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option(\"dragToClose\"),lockAxis:()=>{if(this.Carousel){let t=\"x\";return this.option(\"dragToClose\")&&(t+=\"y\"),t}}},on:{\"*\":(t,...e)=>this.trigger(`Carousel.${t}`,...e),init:t=>this.Carousel=t,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option(\"Carousel\"))),this.option(\"dragToClose\")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger(\"initCarousel\"),this}onCreateSlide(t,e){let i=e.caption||\"\";if(\"function\"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,e)),\"string\"==typeof i&&i.length){const t=document.createElement(\"div\"),s=`fancybox__caption_${this.id}_${e.index}`;t.className=\"fancybox__caption\",t.innerHTML=i,t.setAttribute(\"id\",s),e.$caption=e.$el.appendChild(t),e.$el.classList.add(\"has-caption\"),e.$el.setAttribute(\"aria-labelledby\",s)}}onSettle(){this.option(\"autoFocus\")&&this.focus()}onFocus(t){this.isTopmost()&&this.focus(t)}onClick(t){if(t.defaultPrevented)return;let e=t.composedPath()[0];if(e.matches(\"[data-fancybox-close]\"))return t.preventDefault(),void R.close(!1,t);if(e.matches(\"[data-fancybox-next]\"))return t.preventDefault(),void R.next();if(e.matches(\"[data-fancybox-prev]\"))return t.preventDefault(),void R.prev();const i=document.activeElement;if(i){if(i.closest(\"[contenteditable]\"))return;e.matches(x)||i.blur()}if(e.closest(\".fancybox__content\"))return;if(getSelection().toString().length)return;if(!1===this.trigger(\"click\",t))return;switch(this.option(\"click\")){case\"close\":this.close();break;case\"next\":this.next()}}onTouchMove(){const t=this.getSlide().Panzoom;return!t||1===t.content.scale}onTouchEnd(t){const e=t.dragOffset.y;Math.abs(e)>=150||Math.abs(e)>=35&&t.dragOffset.time<350?(this.option(\"hideClass\")&&(this.getSlide().hideClass=\"fancybox-throwOut\"+(t.content.y<0?\"Up\":\"Down\")),this.close()):\"y\"===t.lockAxis&&t.panTo({y:0})}onTransform(t){if(this.$backdrop){const e=Math.abs(t.content.y),i=e<1?\"\":Math.max(.33,Math.min(1,1-e/t.content.fitHeight*1.5));this.$container.style.setProperty(\"--fancybox-ts\",i?\"0s\":\"\"),this.$container.style.setProperty(\"--fancybox-opacity\",i)}}onMousedown(){\"ready\"===this.state&&document.body.classList.add(\"is-using-mouse\")}onKeydown(t){if(!this.isTopmost())return;document.body.classList.remove(\"is-using-mouse\");const e=t.key,i=this.option(\"keyboard\");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const s=t.composedPath()[0],o=document.activeElement&&document.activeElement.classList,n=o&&o.contains(\"carousel__button\");if(\"Escape\"!==e&&!n){if(t.target.isContentEditable||-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(s.nodeName))return}if(!1===this.trigger(\"keydown\",e,t))return;const a=i[e];\"function\"==typeof this[a]&&this[a]()}getSlide(){const t=this.Carousel;if(!t)return null;const e=null===t.page?t.option(\"initialPage\"):t.page,i=t.pages||[];return i.length&&i[e]?i[e].slides[0]:null}focus(t){if(R.ignoreFocusChange)return;if([\"init\",\"closing\",\"customClosing\",\"destroy\"].indexOf(this.state)>-1)return;const e=this.$container,i=this.getSlide(),s=\"done\"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;t&&t.preventDefault(),R.ignoreFocusChange=!0;const o=Array.from(e.querySelectorAll(x));let n,a=[];for(let t of o){const e=t.offsetParent,i=s&&s.contains(t),o=!this.Carousel.$viewport.contains(t);e&&(i||o)?(a.push(t),void 0!==t.dataset.origTabindex&&(t.tabIndex=t.dataset.origTabindex,t.removeAttribute(\"data-orig-tabindex\")),(t.hasAttribute(\"autoFocus\")||!n&&i&&!t.classList.contains(\"carousel__button\"))&&(n=t)):(t.dataset.origTabindex=void 0===t.dataset.origTabindex?t.getAttribute(\"tabindex\"):t.dataset.origTabindex,t.tabIndex=-1)}t?a.indexOf(t.target)>-1?this.lastFocus=t.target:this.lastFocus===e?w(a[a.length-1]):w(e):this.option(\"autoFocus\")&&n?w(n):a.indexOf(document.activeElement)<0&&w(e),this.lastFocus=document.activeElement,R.ignoreFocusChange=!1}hideScrollbar(){if(!v)return;const t=window.innerWidth-document.documentElement.getBoundingClientRect().width,e=\"fancybox-style-noscroll\";let i=document.getElementById(e);i||t>0&&(i=document.createElement(\"style\"),i.id=e,i.type=\"text/css\",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${t}px;}`,document.getElementsByTagName(\"head\")[0].appendChild(i),document.body.classList.add(\"compensate-for-scrollbar\"))}revealScrollbar(){document.body.classList.remove(\"compensate-for-scrollbar\");const t=document.getElementById(\"fancybox-style-noscroll\");t&&t.remove()}clearContent(t){this.Carousel.trigger(\"removeSlide\",t),t.$content&&(t.$content.remove(),t.$content=null),t.$closeButton&&(t.$closeButton.remove(),t.$closeButton=null),t._className&&t.$el.classList.remove(t._className)}setContent(t,e,i={}){let s;const o=t.$el;if(e instanceof HTMLElement)[\"img\",\"iframe\",\"video\",\"audio\"].indexOf(e.nodeName.toLowerCase())>-1?(s=document.createElement(\"div\"),s.appendChild(e)):s=e;else{const t=document.createRange().createContextualFragment(e);s=document.createElement(\"div\"),s.appendChild(t)}if(t.filter&&!t.error&&(s=s.querySelector(t.filter)),s instanceof Element)return t._className=`has-${i.suffix||t.type||\"unknown\"}`,o.classList.add(t._className),s.classList.add(\"fancybox__content\"),\"none\"!==s.style.display&&\"none\"!==getComputedStyle(s).getPropertyValue(\"display\")||(s.style.display=t.display||this.option(\"defaultDisplay\")||\"flex\"),t.id&&s.setAttribute(\"id\",t.id),t.$content=s,o.prepend(s),this.manageCloseButton(t),\"loading\"!==t.state&&this.revealContent(t),s;this.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}manageCloseButton(t){const e=void 0===t.closeButton?this.option(\"closeButton\"):t.closeButton;if(!e||\"top\"===e&&this.$closeButton)return;const i=document.createElement(\"button\");i.classList.add(\"carousel__button\",\"is-close\"),i.setAttribute(\"title\",this.options.l10n.CLOSE),i.innerHTML=this.option(\"template.closeButton\"),i.addEventListener(\"click\",(t=>this.close(t))),\"inside\"===e?(t.$closeButton&&t.$closeButton.remove(),t.$closeButton=t.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(t){this.trigger(\"reveal\",t),t.$content.style.visibility=\"\";let e=!1;t.error||\"loading\"===t.state||null!==this.Carousel.prevPage||t.index!==this.options.startIndex||(e=void 0===t.showClass?this.option(\"showClass\"):t.showClass),e?(t.state=\"animating\",this.animateCSS(t.$content,e,(()=>{this.done(t)}))):this.done(t)}animateCSS(t,e,i){if(t&&t.dispatchEvent(new CustomEvent(\"animationend\",{bubbles:!0,cancelable:!0})),!t||!e)return void(\"function\"==typeof i&&i());const s=function(o){o.currentTarget===this&&(t.removeEventListener(\"animationend\",s),i&&i(),t.classList.remove(e))};t.addEventListener(\"animationend\",s),t.classList.add(e)}done(t){t.state=\"done\",this.trigger(\"done\",t);const e=this.getSlide();e&&t.index===e.index&&this.option(\"autoFocus\")&&this.focus()}setError(t,e){t.error=e,this.hideLoading(t),this.clearContent(t);const i=document.createElement(\"div\");i.classList.add(\"fancybox-error\"),i.innerHTML=this.localize(e||\"

{{ERROR}}

\"),this.setContent(t,i,{suffix:\"error\"})}showLoading(t){t.state=\"loading\",t.$el.classList.add(\"is-loading\");let e=t.$el.querySelector(\".fancybox__spinner\");e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__spinner\"),e.innerHTML=this.option(\"template.spinner\"),e.addEventListener(\"click\",(()=>{this.Carousel.Panzoom.velocity||this.close()})),t.$el.prepend(e))}hideLoading(t){const e=t.$el&&t.$el.querySelector(\".fancybox__spinner\");e&&(e.remove(),t.$el.classList.remove(\"is-loading\")),\"loading\"===t.state&&(this.trigger(\"load\",t),t.state=\"ready\")}next(){const t=this.Carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.Carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.Carousel&&this.Carousel.slideTo(...t)}isClosing(){return[\"closing\",\"customClosing\",\"destroy\"].includes(this.state)}isTopmost(){return R.getInstance().id==this.id}close(t){if(t&&t.preventDefault(),this.isClosing())return;if(!1===this.trigger(\"shouldClose\",t))return;if(this.state=\"closing\",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger(\"closing\",t),\"destroy\"===this.state)return;this.$container.setAttribute(\"aria-hidden\",\"true\"),this.$container.classList.add(\"is-closing\");const e=this.getSlide();if(this.Carousel.slides.forEach((t=>{t.$content&&t.index!==e.index&&this.Carousel.trigger(\"removeSlide\",t)})),\"closing\"===this.state){const t=void 0===e.hideClass?this.option(\"hideClass\"):e.hideClass;this.animateCSS(e.$content,t,(()=>{this.destroy()}),!0)}}destroy(){if(\"destroy\"===this.state)return;this.state=\"destroy\",this.trigger(\"destroy\");const t=this.option(\"placeFocusBack\")?this.option(\"triggerTarget\",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,t&&w(t),I.delete(this.id);const e=R.getInstance();e?e.focus():(document.documentElement.classList.remove(\"with-fancybox\"),document.body.classList.remove(\"is-using-mouse\"),this.revealScrollbar())}static show(t,e={}){return new R(t,e)}static fromEvent(t,e={}){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;const i=t.composedPath()[0];let s,o,n,a=i;if((a.matches(\"[data-fancybox-trigger]\")||(a=a.closest(\"[data-fancybox-trigger]\")))&&(e.triggerTarget=a,s=a&&a.dataset&&a.dataset.fancyboxTrigger),s){const t=document.querySelectorAll(`[data-fancybox=\"${s}\"]`),e=parseInt(a.dataset.fancyboxIndex,10)||0;a=t.length?t[e]:a}Array.from(R.openers.keys()).reverse().some((e=>{n=a||i;let s=!1;try{n instanceof Element&&(\"string\"==typeof e||e instanceof String)&&(s=n.matches(e)||(n=n.closest(e)))}catch(t){}return!!s&&(t.preventDefault(),o=e,!0)}));let r=!1;if(o){e.event=t,e.target=n,n.origTarget=i,r=R.fromOpener(o,e);const s=R.getInstance();s&&\"ready\"===s.state&&t.detail&&document.body.classList.add(\"is-using-mouse\")}return r}static fromOpener(t,i={}){let s=[],o=i.startIndex||0,n=i.target||null;const a=void 0!==(i=e({},i,R.openers.get(t))).groupAll&&i.groupAll,r=void 0===i.groupAttr?\"data-fancybox\":i.groupAttr,h=r&&n?n.getAttribute(`${r}`):\"\";if(!n||h||a){const e=i.root||(n?n.getRootNode():document.body);s=[].slice.call(e.querySelectorAll(t))}if(n&&!a&&(s=h?s.filter((t=>t.getAttribute(`${r}`)===h)):[n]),!s.length)return!1;const l=R.getInstance();return!(l&&s.indexOf(l.options.$trigger)>-1)&&(o=n?s.indexOf(n):o,s=s.map((function(t){const e=[\"false\",\"0\",\"no\",\"null\",\"undefined\"],i=[\"true\",\"1\",\"yes\"],s=Object.assign({},t.dataset),o={};for(let[t,n]of Object.entries(s))if(\"fancybox\"!==t)if(\"width\"===t||\"height\"===t)o[`_${t}`]=n;else if(\"string\"==typeof n||n instanceof String)if(e.indexOf(n)>-1)o[t]=!1;else if(i.indexOf(o[t])>-1)o[t]=!0;else try{o[t]=JSON.parse(n)}catch(e){o[t]=n}else o[t]=n;return t instanceof Element&&(o.$trigger=t),o})),new R(s,e({},i,{startIndex:o,$trigger:n})))}static bind(t,e={}){function i(){document.body.addEventListener(\"click\",R.fromEvent,!1)}v&&(R.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener(\"DOMContentLoaded\",i)),R.openers.set(t,e))}static unbind(t){R.openers.delete(t),R.openers.size||R.destroy()}static destroy(){let t;for(;t=R.getInstance();)t.destroy();R.openers=new Map,document.body.removeEventListener(\"click\",R.fromEvent,!1)}static getInstance(t){if(t)return I.get(t);return Array.from(I.values()).reverse().find((t=>!t.isClosing()&&t))||null}static close(t=!0,e){if(t)for(const t of I.values())t.close(e);else{const t=R.getInstance();t&&t.close(e)}}static next(){const t=R.getInstance();t&&t.next()}static prev(){const t=R.getInstance();t&&t.prev()}}R.version=\"4.0.31\",R.defaults=M,R.openers=new Map,R.Plugins=O,R.bind(\"[data-fancybox]\");for(const[t,e]of Object.entries(R.Plugins||{}))\"function\"==typeof e.create&&e.create(R);export{y as Carousel,R as Fancybox,d as Panzoom};\n","import window from 'global/window';\n\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {string[]} groups\n * The media groups to call the callback for\n * @param {Function} callback\n * Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n groups.forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n var _proto = Stream.prototype;\n\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */\n ;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */\n ;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n ;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n}();\n\nexport { Stream as default };","\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n if (decodeResponseBody === void 0) {\n decodeResponseBody = false;\n }\n\n return function (err, response, responseBody) {\n // if the XHR failed, return that error\n if (err) {\n callback(err);\n return;\n } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n if (response.statusCode >= 400 && response.statusCode <= 599) {\n var cause = responseBody;\n\n if (decodeResponseBody) {\n if (window.TextDecoder) {\n var charset = getCharset(response.headers && response.headers['content-type']);\n\n try {\n cause = new TextDecoder(charset).decode(responseBody);\n } catch (e) {}\n } else {\n cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n }\n }\n\n callback({\n cause: cause\n });\n return;\n } // otherwise, request succeeded\n\n\n callback(null, responseBody);\n };\n};\n\nfunction getCharset(contentTypeHeader) {\n if (contentTypeHeader === void 0) {\n contentTypeHeader = '';\n }\n\n return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n var _contentType$split = contentType.split('='),\n type = _contentType$split[0],\n value = _contentType$split[1];\n\n if (type.trim() === 'charset') {\n return value.trim();\n }\n\n return charset;\n }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\ncreateXHR.httpHandler = require('./http-handler.js');\n/**\n * @license\n * slighly modified parse-headers 2.0.2 \n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * \n */\n\nvar parseHeaders = function parseHeaders(headers) {\n var result = {};\n\n if (!headers) {\n return result;\n }\n\n headers.trim().split('\\n').forEach(function (row) {\n var index = row.indexOf(':');\n var key = row.slice(0, index).trim().toLowerCase();\n var value = row.slice(index + 1).trim();\n\n if (typeof result[key] === 'undefined') {\n result[key] = value;\n } else if (Array.isArray(result[key])) {\n result[key].push(value);\n } else {\n result[key] = [result[key], value];\n }\n });\n return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i]);\n }\n}\n\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n\n return true;\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri;\n\n if (isFunction(options)) {\n callback = options;\n\n if (typeof uri === \"string\") {\n params = {\n uri: uri\n };\n }\n } else {\n params = _extends({}, options, {\n uri: uri\n });\n }\n\n params.callback = callback;\n return params;\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n if (typeof options.callback === \"undefined\") {\n throw new Error(\"callback argument missing\");\n }\n\n var called = false;\n\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n\n return body;\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n\n if (!(evt instanceof Error)) {\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n }\n\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n } // will load the data & process the response in a special response object\n\n\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n\n var response = failureResponse;\n var err = null;\n\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\");\n }\n\n return callback(err, response, response.body);\n }\n\n var xhr = options.xhr || null;\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n\n var key;\n var aborted;\n var uri = xhr.url = options.uri || options.url;\n var method = xhr.method = options.method || \"GET\";\n var body = options.body || options.data;\n var headers = xhr.headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n\n if (\"json\" in options && options.json !== false) {\n isJson = true;\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n body = JSON.stringify(options.json === true ? body : options.json);\n }\n }\n\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n xhr.onprogress = function () {// IE must die\n };\n\n xhr.onabort = function () {\n aborted = true;\n };\n\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n } // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n\n xhr.abort(\"timeout\");\n var e = new Error(\"XMLHttpRequest timeout\");\n e.code = \"ETIMEDOUT\";\n errorFunc(e);\n }, options.timeout);\n }\n\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType;\n }\n\n if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n options.beforeSend(xhr);\n } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n\n\n xhr.send(body || null);\n return xhr;\n}\n\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML;\n }\n\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n } catch (e) {}\n\n return null;\n}\n\nfunction noop() {}","let items = document.querySelectorAll('.accordion__item')\r\nlet title = document.querySelectorAll('.accordion__title-wrapper')\r\n\r\nexport const toggleAccordion = () => {\r\n title.forEach((question) =>\r\n question.addEventListener('click', function () {\r\n let thisItem = this.parentNode\r\n\r\n items.forEach((item) => {\r\n if (thisItem == item) {\r\n thisItem.classList.toggle('active')\r\n return\r\n }\r\n item.classList.remove('active')\r\n })\r\n })\r\n )\r\n}\r\n","const burger = document.querySelector('.burger-js')\r\nconst menu = document.querySelector('.menu-js')\r\nconst menuLinks = document.querySelectorAll('.nav__link')\r\n\r\nexport const changeMenu = () => {\r\n\tburger?.addEventListener('click', () => {\r\n\t\tmenu?.classList.toggle('active')\r\n\t\tburger?.classList.toggle('active')\r\n\t\tif (menu?.classList.contains('active')) {\r\n\t\t\tdocument.body.style.overflowY = 'hidden'\r\n\t\t} else {\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t}\r\n\t})\r\n\r\n\tmenuLinks.forEach((el) => {\r\n\t\tel.addEventListener('click', () => {\r\n\t\t\tmenu?.classList.remove('active')\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t\tburger?.classList.remove('active')\r\n\t\t})\r\n\t})\r\n}\r\n","const btnNext = document.querySelector('.nav-history__next')\r\n\r\nexport const paintBtn = () => {\r\n try {\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n btnNext.classList.add('active')\r\n } else {\r\n btnNext.classList.remove('active')\r\n }\r\n }\r\n\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","import SmoothScroll from '../../../node_modules/smooth-scroll/dist/smooth-scroll.js'\r\nconst header = document.querySelector('header')\r\nconst btnUpWrapper = document.querySelector('.btn-up-wrapper')\r\n\r\nexport const addSmoothScroll = () => {\r\n const scroll = new SmoothScroll('a[href*=\"#\"]', {\r\n header: '.header',\r\n speed: 500\r\n })\r\n\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n header.classList.add('active')\r\n } else {\r\n header.classList.remove('active')\r\n }\r\n\r\n if (top >= 300) {\r\n btnUpWrapper.classList.add('active')\r\n } else {\r\n btnUpWrapper.classList.remove('active')\r\n }\r\n }\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n}\r\n","import Swiper, { Navigation, Pagination, Autoplay } from 'swiper'\r\nSwiper.use([Navigation, Pagination, Autoplay])\r\n\r\nexport const initializationSliders = () => {\r\n try {\r\n const recomendationsSlider = new Swiper('.recommendations__slider', {\r\n slidesPerView: '1',\r\n navigation: {\r\n nextEl: '.recommendations__slider-navigation-next',\r\n prevEl: '.recommendations__slider-navigation-prev'\r\n },\r\n loop: true\r\n })\r\n\r\n const goodsSlider = new Swiper('.goods__slider', {\r\n slidesPerView: 3,\r\n loop: true,\r\n navigation: {\r\n nextEl: '.goods__slider-next',\r\n prevEl: '.goods__slider-prev'\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.goods__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 940: {\r\n slidesPerView: 4\r\n },\r\n 764: {\r\n slidesPerView: 3\r\n },\r\n 600: {\r\n slidesPerView: 2\r\n },\r\n 0: {\r\n slidesPerView: 1\r\n }\r\n }\r\n })\r\n\r\n const professionalSlider = new Swiper('.professional__slider', {\r\n navigation: {\r\n nextEl: '.professional__slider-navigation-next',\r\n prevEl: '.professional__slider-navigation-prev'\r\n },\r\n paginationClickable: true,\r\n // loop: true,\r\n initialSlide: 1,\r\n centeredSlides: true,\r\n slidesPerView: 2,\r\n speed: 1000,\r\n zoom: {\r\n maxRatio: 1.6\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.professional__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 993: {\r\n spaceBetween: -180\r\n },\r\n 860: {\r\n spaceBetween: -260,\r\n slidesPerView: 2\r\n },\r\n 768: {\r\n spaceBetween: -200\r\n },\r\n 500: {\r\n spaceBetween: -80\r\n },\r\n 320: {\r\n slidesPerView: 1.6,\r\n spaceBetween: -80\r\n }\r\n },\r\n allowTouchMove: false\r\n })\r\n\r\n const interviewSlider = new Swiper('.interview__slider', {\r\n navigation: {\r\n nextEl: '.interview__slider-navigation-next',\r\n prevEl: '.interview__slider-navigation-prev'\r\n },\r\n pagination: {\r\n el: '.interview__slider-pagination',\r\n clickable: true\r\n },\r\n allowTouchMove: false,\r\n paginationClickable: true,\r\n centeredSlides: true,\r\n loop: true,\r\n speed: 1000\r\n })\r\n\r\n const partnersSlider = new Swiper('.partners__wrapper', {\r\n freeMode: true,\r\n grabCursor: true,\r\n centeredSlides: true,\r\n slidesPerView: 'auto',\r\n loop: true,\r\n speed: 2000,\r\n autoplay: {\r\n enabled: true,\r\n delay: 1,\r\n disableOnInteraction: true\r\n },\r\n freeModeMomentum: true\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseover', function () {\r\n partnersSlider.autoplay.stop()\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseout', function () {\r\n partnersSlider.autoplay.start()\r\n })\r\n\r\n window.addEventListener('scroll', () => {\r\n if (!partnersSlider.autoplay.running) {\r\n partnersSlider.autoplay.start()\r\n }\r\n })\r\n } catch (e) {\r\n console.error(e)\r\n }\r\n}\r\n","import videojs from 'video.js'\r\n\r\nconst playBtn = document.querySelector('.video__btn')\r\nconst videoTitle = document.querySelector('.video__title')\r\nconst videoText = document.querySelector('.video__text')\r\nconst videoLink = document.querySelector('.video__link')\r\nconst videoGradient = document.querySelector('.video__gradient')\r\nconst videoIntro = document.querySelector('.video__intro')\r\nconst videoMask = document.querySelector('.video__mask')\r\nconst videoJsTech = document.querySelector('.vjs-tech')\r\n\r\nexport const addVideoPlayer = () => {\r\n try {\r\n let isPreviewVideo = true\r\n\r\n const videoPlayer = videojs(document.getElementById('video__player'), {\r\n autoplay: true,\r\n loop: true,\r\n muted: true,\r\n controls: false,\r\n playToggle: false\r\n })\r\n\r\n const loadMainVideo = (desktopUrl, mobileUrl) => {\r\n if (window.screen.width > 768) {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${desktopUrl}`\r\n })\r\n } else {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${mobileUrl}`\r\n })\r\n }\r\n }\r\n\r\n loadMainVideo('preview.mp4', 'preview-mobile.mp4')\r\n videoPlayer.volume(0.7)\r\n const changePlayerStatus = () => {\r\n videoPlayer.play()\r\n\r\n videoPlayer.addClass('play')\r\n videoPlayer.muted(false)\r\n videoPlayer.controls(true)\r\n videoPlayer.loop(false)\r\n\r\n playBtn.classList.add('hide')\r\n videoTitle.classList.add('hide')\r\n videoText.classList.add('hide')\r\n videoLink.classList.add('hide')\r\n }\r\n\r\n videoPlayer.on('play', () => {\r\n if (!videoPlayer.played()) {\r\n videoPlayer.addClass('play')\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n } else if (videoPlayer.played() && videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n } else if (videoPlayer.played() && !videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n }\r\n })\r\n\r\n videoPlayer.on('pause', () => {\r\n playBtn?.classList.remove('hide')\r\n })\r\n\r\n videoPlayer.on('ended', () => {\r\n playBtn?.classList.remove('hide')\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n videoMask.addEventListener('click', () => {\r\n playBtn?.classList.remove('hide')\r\n videoPlayer.pause()\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n playBtn.addEventListener('click', () => {\r\n if (isPreviewVideo === true) {\r\n loadMainVideo('video.mp4', 'video-mobile.mp4')\r\n isPreviewVideo = false\r\n }\r\n document.querySelector('.video__inner').classList.add('active')\r\n document.querySelector('.video-js').classList.add('active')\r\n document.querySelector('.vjs-poster').classList.add('active')\r\n\r\n videoPlayer.fluid(true)\r\n videoGradient?.classList.add('hide')\r\n videoMask?.classList.add('visible')\r\n playBtn?.classList.add('center-position')\r\n document.querySelector('video').style.objectFit = 'contain'\r\n\r\n if (videoPlayer.muted()) {\r\n videoPlayer.currentTime(0)\r\n changePlayerStatus()\r\n } else {\r\n changePlayerStatus()\r\n }\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n if (!fn) {\n return false\n }\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === typeof searchInput) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n if (hasKeyCode) searchInput = hasKeyCode\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput]\n\n // Everything else (cast to string)\n var search = String(searchInput)\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0)\n\n return undefined\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === typeof event) {\n var keyCode = event.which || event.keyCode || event.charCode\n if (keyCode === null || keyCode === undefined) { return false; }\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n \n // check aliases\n var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n return false;\n }\n}\n\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n}\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias]\n}\n","/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nclass LineStream extends Stream {\n constructor() {\n super();\n this.buffer = '';\n }\n /**\n * Add new data to be parsed.\n *\n * @param {string} data the text to process\n */\n\n\n push(data) {\n let nextNewline;\n this.buffer += data;\n nextNewline = this.buffer.indexOf('\\n');\n\n for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n this.trigger('data', this.buffer.substring(0, nextNewline));\n this.buffer = this.buffer.substring(nextNewline + 1);\n }\n }\n\n}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n // optionally match and capture 0+ digits before `@`\n // optionally match and capture 0+ digits after `@`\n const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n const result = {};\n\n if (match[1]) {\n result.length = parseInt(match[1], 10);\n }\n\n if (match[2]) {\n result.offset = parseInt(match[2], 10);\n }\n\n return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue -> key '=' value\n * key -> [^=]*\n * value -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nconst attributeSeparator = function () {\n const key = '[^=]*';\n const value = '\"[^\"]*\"|[^,]*';\n const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nconst parseAttributes = function (attributes) {\n const result = {};\n\n if (!attributes) {\n return result;\n } // split the string using attributes as the separator\n\n\n const attrs = attributes.split(attributeSeparator());\n let i = attrs.length;\n let attr;\n\n while (i--) {\n // filter out unmatched portions of the string\n if (attrs[i] === '') {\n continue;\n } // split the key and value\n\n\n attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n result[attr[0]] = attr[1];\n }\n\n return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nclass ParseStream extends Stream {\n constructor() {\n super();\n this.customParsers = [];\n this.tagMappers = [];\n }\n /**\n * Parses an additional line of input.\n *\n * @param {string} line a single line of an M3U8 file to parse\n */\n\n\n push(line) {\n let match;\n let event; // strip whitespace\n\n line = line.trim();\n\n if (line.length === 0) {\n // ignore empty lines\n return;\n } // URIs\n\n\n if (line[0] !== '#') {\n this.trigger('data', {\n type: 'uri',\n uri: line\n });\n return;\n } // map tags\n\n\n const newLines = this.tagMappers.reduce((acc, mapper) => {\n const mappedLine = mapper(line); // skip if unchanged\n\n if (mappedLine === line) {\n return acc;\n }\n\n return acc.concat([mappedLine]);\n }, [line]);\n newLines.forEach(newLine => {\n for (let i = 0; i < this.customParsers.length; i++) {\n if (this.customParsers[i].call(this, newLine)) {\n return;\n }\n } // Comments\n\n\n if (newLine.indexOf('#EXT') !== 0) {\n this.trigger('data', {\n type: 'comment',\n text: newLine.slice(1)\n });\n return;\n } // strip off any carriage returns here so the regex matching\n // doesn't have to account for them.\n\n\n newLine = newLine.replace('\\r', ''); // Tags\n\n match = /^#EXTM3U/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'm3u'\n });\n return;\n }\n\n match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'inf'\n };\n\n if (match[1]) {\n event.duration = parseFloat(match[1]);\n }\n\n if (match[2]) {\n event.title = match[2];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'targetduration'\n };\n\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'version'\n };\n\n if (match[1]) {\n event.version = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'discontinuity-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'playlist-type'\n };\n\n if (match[1]) {\n event.playlistType = match[1];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = _extends(parseByterange(match[1]), {\n type: 'tag',\n tagType: 'byterange'\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'allow-cache'\n };\n\n if (match[1]) {\n event.allowed = !/NO/.test(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'map'\n };\n\n if (match[1]) {\n const attributes = parseAttributes(match[1]);\n\n if (attributes.URI) {\n event.uri = attributes.URI;\n }\n\n if (attributes.BYTERANGE) {\n event.byterange = parseByterange(attributes.BYTERANGE);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'stream-inf'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.RESOLUTION) {\n const split = event.attributes.RESOLUTION.split('x');\n const resolution = {};\n\n if (split[0]) {\n resolution.width = parseInt(split[0], 10);\n }\n\n if (split[1]) {\n resolution.height = parseInt(split[1], 10);\n }\n\n event.attributes.RESOLUTION = resolution;\n }\n\n if (event.attributes.BANDWIDTH) {\n event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n }\n\n if (event.attributes['FRAME-RATE']) {\n event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n }\n\n if (event.attributes['PROGRAM-ID']) {\n event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'endlist'\n });\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'discontinuity'\n });\n return;\n }\n\n match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'program-date-time'\n };\n\n if (match[1]) {\n event.dateTimeString = match[1];\n event.dateTimeObject = new Date(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'key'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n if (event.attributes.IV) {\n if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n event.attributes.IV = event.attributes.IV.substring(2);\n }\n\n event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n event.attributes.IV = new Uint32Array(event.attributes.IV);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'start'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out-cont'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-in'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'skip'\n };\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n }\n\n if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part'\n };\n event.attributes = parseAttributes(match[1]);\n ['DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['INDEPENDENT', 'GAP'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n\n if (event.attributes.hasOwnProperty('BYTERANGE')) {\n event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'server-control'\n };\n event.attributes = parseAttributes(match[1]);\n ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part-inf'\n };\n event.attributes = parseAttributes(match[1]);\n ['PART-TARGET'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'preload-hint'\n };\n event.attributes = parseAttributes(match[1]);\n ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n event.attributes.byterange = event.attributes.byterange || {};\n event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n delete event.attributes[key];\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'rendition-report'\n };\n event.attributes = parseAttributes(match[1]);\n ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'daterange'\n };\n event.attributes = parseAttributes(match[1]);\n ['ID', 'CLASS'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = String(event.attributes[key]);\n }\n });\n ['START-DATE', 'END-DATE'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = new Date(event.attributes[key]);\n }\n });\n ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['END-ON-NEXT'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/i.test(event.attributes[key]);\n }\n });\n ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = event.attributes[key].toString(16);\n }\n });\n const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n for (const key in event.attributes) {\n if (!clientAttributePattern.test(key)) {\n continue;\n }\n\n const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'independent-segments'\n });\n return;\n } // unknown tag type\n\n\n this.trigger('data', {\n type: 'tag',\n data: newLine.slice(4)\n });\n });\n }\n /**\n * Add a parser for custom headers\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.customType the custom type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser({\n expression,\n customType,\n dataParser,\n segment\n }) {\n if (typeof dataParser !== 'function') {\n dataParser = line => line;\n }\n\n this.customParsers.push(line => {\n const match = expression.exec(line);\n\n if (match) {\n this.trigger('data', {\n type: 'custom',\n data: dataParser(line),\n customType,\n segment\n });\n return true;\n }\n });\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper({\n expression,\n map\n }) {\n const mapFn = line => {\n if (expression.test(line)) {\n return map(line);\n }\n\n return line;\n };\n\n this.tagMappers.push(mapFn);\n }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n const result = {};\n Object.keys(attributes).forEach(function (key) {\n result[camelCase(key)] = attributes[key];\n });\n return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nconst setHoldBack = function (manifest) {\n const {\n serverControl,\n targetDuration,\n partTargetDuration\n } = manifest;\n\n if (!serverControl) {\n return;\n }\n\n const tag = '#EXT-X-SERVER-CONTROL';\n const hb = 'holdBack';\n const phb = 'partHoldBack';\n const minTargetDuration = targetDuration && targetDuration * 3;\n const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n serverControl[hb] = minTargetDuration;\n this.trigger('info', {\n message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n });\n }\n\n if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n this.trigger('warn', {\n message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n });\n serverControl[hb] = minTargetDuration;\n } // default no part hold back to part target duration * 3\n\n\n if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n serverControl[phb] = partTargetDuration * 3;\n this.trigger('info', {\n message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n });\n } // if part hold back is too small default it to part target duration * 2\n\n\n if (partTargetDuration && serverControl[phb] < minPartDuration) {\n this.trigger('warn', {\n message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n });\n serverControl[phb] = minPartDuration;\n }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n constructor() {\n super();\n this.lineStream = new LineStream();\n this.parseStream = new ParseStream();\n this.lineStream.pipe(this.parseStream);\n /* eslint-disable consistent-this */\n\n const self = this;\n /* eslint-enable consistent-this */\n\n const uris = [];\n let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n let currentMap; // if specified, the active decryption key\n\n let key;\n let hasParts = false;\n\n const noop = function () {};\n\n const defaultMediaGroups = {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n // used in MPDs with Widevine encrypted streams.\n\n const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n this.manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: []\n }; // keep track of the last seen segment's byte range end, as segments are not required\n // to provide the offset, in which case it defaults to the next byte after the\n // previous segment\n\n let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n let lastPartByterangeEnd = 0;\n const daterangeTags = {};\n this.on('end', () => {\n // only add preloadSegment if we don't yet have a uri for it.\n // and we actually have parts/preloadHints\n if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n return;\n }\n\n if (!currentUri.map && currentMap) {\n currentUri.map = currentMap;\n }\n\n if (!currentUri.key && key) {\n currentUri.key = key;\n }\n\n if (!currentUri.timeline && typeof currentTimeline === 'number') {\n currentUri.timeline = currentTimeline;\n }\n\n this.manifest.preloadSegment = currentUri;\n }); // update the manifest with the m3u8 entry from the parse stream\n\n this.parseStream.on('data', function (entry) {\n let mediaGroup;\n let rendition;\n ({\n tag() {\n // switch based on the tag type\n (({\n version() {\n if (entry.version) {\n this.manifest.version = entry.version;\n }\n },\n\n 'allow-cache'() {\n this.manifest.allowCache = entry.allowed;\n\n if (!('allowed' in entry)) {\n this.trigger('info', {\n message: 'defaulting allowCache to YES'\n });\n this.manifest.allowCache = true;\n }\n },\n\n byterange() {\n const byterange = {};\n\n if ('length' in entry) {\n currentUri.byterange = byterange;\n byterange.length = entry.length;\n\n if (!('offset' in entry)) {\n /*\n * From the latest spec (as of this writing):\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n *\n * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n *\n * \"If o [offset] is not present, the sub-range begins at the next byte\n * following the sub-range of the previous media segment.\"\n */\n entry.offset = lastByterangeEnd;\n }\n }\n\n if ('offset' in entry) {\n currentUri.byterange = byterange;\n byterange.offset = entry.offset;\n }\n\n lastByterangeEnd = byterange.offset + byterange.length;\n },\n\n endlist() {\n this.manifest.endList = true;\n },\n\n inf() {\n if (!('mediaSequence' in this.manifest)) {\n this.manifest.mediaSequence = 0;\n this.trigger('info', {\n message: 'defaulting media sequence to zero'\n });\n }\n\n if (!('discontinuitySequence' in this.manifest)) {\n this.manifest.discontinuitySequence = 0;\n this.trigger('info', {\n message: 'defaulting discontinuity sequence to zero'\n });\n }\n\n if (entry.duration > 0) {\n currentUri.duration = entry.duration;\n }\n\n if (entry.duration === 0) {\n currentUri.duration = 0.01;\n this.trigger('info', {\n message: 'updating zero segment duration to a small value'\n });\n }\n\n this.manifest.segments = uris;\n },\n\n key() {\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring key declaration without attribute list'\n });\n return;\n } // clear the active encryption key\n\n\n if (entry.attributes.METHOD === 'NONE') {\n key = null;\n return;\n }\n\n if (!entry.attributes.URI) {\n this.trigger('warn', {\n message: 'ignoring key declaration without URI'\n });\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.apple.fps.1_0'] = {\n attributes: entry.attributes\n };\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.microsoft.playready'] = {\n uri: entry.attributes.URI\n };\n return;\n } // check if the content is encrypted for Widevine\n // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n if (entry.attributes.KEYFORMAT === widevineUuid) {\n const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n this.trigger('warn', {\n message: 'invalid key method provided for Widevine'\n });\n return;\n }\n\n if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n this.trigger('warn', {\n message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n });\n }\n\n if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n this.trigger('warn', {\n message: 'invalid key URI provided for Widevine'\n });\n return;\n }\n\n if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n this.trigger('warn', {\n message: 'invalid key ID provided for Widevine'\n });\n return;\n } // if Widevine key attributes are valid, store them as `contentProtection`\n // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n this.manifest.contentProtection = this.manifest.contentProtection || {};\n this.manifest.contentProtection['com.widevine.alpha'] = {\n attributes: {\n schemeIdUri: entry.attributes.KEYFORMAT,\n // remove '0x' from the key id string\n keyId: entry.attributes.KEYID.substring(2)\n },\n // decode the base64-encoded PSSH box\n pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n };\n return;\n }\n\n if (!entry.attributes.METHOD) {\n this.trigger('warn', {\n message: 'defaulting key method to AES-128'\n });\n } // setup an encryption key for upcoming segments\n\n\n key = {\n method: entry.attributes.METHOD || 'AES-128',\n uri: entry.attributes.URI\n };\n\n if (typeof entry.attributes.IV !== 'undefined') {\n key.iv = entry.attributes.IV;\n }\n },\n\n 'media-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid media sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.mediaSequence = entry.number;\n },\n\n 'discontinuity-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid discontinuity sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.discontinuitySequence = entry.number;\n currentTimeline = entry.number;\n },\n\n 'playlist-type'() {\n if (!/VOD|EVENT/.test(entry.playlistType)) {\n this.trigger('warn', {\n message: 'ignoring unknown playlist type: ' + entry.playlist\n });\n return;\n }\n\n this.manifest.playlistType = entry.playlistType;\n },\n\n map() {\n currentMap = {};\n\n if (entry.uri) {\n currentMap.uri = entry.uri;\n }\n\n if (entry.byterange) {\n currentMap.byterange = entry.byterange;\n }\n\n if (key) {\n currentMap.key = key;\n }\n },\n\n 'stream-inf'() {\n this.manifest.playlists = uris;\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring empty stream-inf attributes'\n });\n return;\n }\n\n if (!currentUri.attributes) {\n currentUri.attributes = {};\n }\n\n _extends(currentUri.attributes, entry.attributes);\n },\n\n media() {\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n this.trigger('warn', {\n message: 'ignoring incomplete or missing media group'\n });\n return;\n } // find the media group, creating defaults as necessary\n\n\n const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n rendition = {\n default: /yes/i.test(entry.attributes.DEFAULT)\n };\n\n if (rendition.default) {\n rendition.autoselect = true;\n } else {\n rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n }\n\n if (entry.attributes.LANGUAGE) {\n rendition.language = entry.attributes.LANGUAGE;\n }\n\n if (entry.attributes.URI) {\n rendition.uri = entry.attributes.URI;\n }\n\n if (entry.attributes['INSTREAM-ID']) {\n rendition.instreamId = entry.attributes['INSTREAM-ID'];\n }\n\n if (entry.attributes.CHARACTERISTICS) {\n rendition.characteristics = entry.attributes.CHARACTERISTICS;\n }\n\n if (entry.attributes.FORCED) {\n rendition.forced = /yes/i.test(entry.attributes.FORCED);\n } // insert the new rendition\n\n\n mediaGroup[entry.attributes.NAME] = rendition;\n },\n\n discontinuity() {\n currentTimeline += 1;\n currentUri.discontinuity = true;\n this.manifest.discontinuityStarts.push(uris.length);\n },\n\n 'program-date-time'() {\n if (typeof this.manifest.dateTimeString === 'undefined') {\n // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n // to the manifest object\n // TODO: Consider removing this in future major version\n this.manifest.dateTimeString = entry.dateTimeString;\n this.manifest.dateTimeObject = entry.dateTimeObject;\n }\n\n currentUri.dateTimeString = entry.dateTimeString;\n currentUri.dateTimeObject = entry.dateTimeObject;\n },\n\n targetduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid target duration: ' + entry.duration\n });\n return;\n }\n\n this.manifest.targetDuration = entry.duration;\n setHoldBack.call(this, this.manifest);\n },\n\n start() {\n if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n this.trigger('warn', {\n message: 'ignoring start declaration without appropriate attribute list'\n });\n return;\n }\n\n this.manifest.start = {\n timeOffset: entry.attributes['TIME-OFFSET'],\n precise: entry.attributes.PRECISE\n };\n },\n\n 'cue-out'() {\n currentUri.cueOut = entry.data;\n },\n\n 'cue-out-cont'() {\n currentUri.cueOutCont = entry.data;\n },\n\n 'cue-in'() {\n currentUri.cueIn = entry.data;\n },\n\n 'skip'() {\n this.manifest.skip = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n },\n\n 'part'() {\n hasParts = true; // parts are always specifed before a segment\n\n const segmentIndex = this.manifest.segments.length;\n const part = camelCaseKeys(entry.attributes);\n currentUri.parts = currentUri.parts || [];\n currentUri.parts.push(part);\n\n if (part.byterange) {\n if (!part.byterange.hasOwnProperty('offset')) {\n part.byterange.offset = lastPartByterangeEnd;\n }\n\n lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n }\n\n const partIndex = currentUri.parts.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n if (this.manifest.renditionReports) {\n this.manifest.renditionReports.forEach((r, i) => {\n if (!r.hasOwnProperty('lastPart')) {\n this.trigger('warn', {\n message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n });\n }\n });\n }\n },\n\n 'server-control'() {\n const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n if (!attrs.hasOwnProperty('canBlockReload')) {\n attrs.canBlockReload = false;\n this.trigger('info', {\n message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n });\n }\n\n setHoldBack.call(this, this.manifest);\n\n if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n this.trigger('warn', {\n message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n });\n }\n },\n\n 'preload-hint'() {\n // parts are always specifed before a segment\n const segmentIndex = this.manifest.segments.length;\n const hint = camelCaseKeys(entry.attributes);\n const isPart = hint.type && hint.type === 'PART';\n currentUri.preloadHints = currentUri.preloadHints || [];\n currentUri.preloadHints.push(hint);\n\n if (hint.byterange) {\n if (!hint.byterange.hasOwnProperty('offset')) {\n // use last part byterange end or zero if not a part.\n hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n if (isPart) {\n lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n }\n }\n }\n\n const index = currentUri.preloadHints.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n if (!hint.type) {\n return;\n } // search through all preload hints except for the current one for\n // a duplicate type.\n\n\n for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n const otherHint = currentUri.preloadHints[i];\n\n if (!otherHint.type) {\n continue;\n }\n\n if (otherHint.type === hint.type) {\n this.trigger('warn', {\n message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n });\n }\n }\n },\n\n 'rendition-report'() {\n const report = camelCaseKeys(entry.attributes);\n this.manifest.renditionReports = this.manifest.renditionReports || [];\n this.manifest.renditionReports.push(report);\n const index = this.manifest.renditionReports.length - 1;\n const required = ['LAST-MSN', 'URI'];\n\n if (hasParts) {\n required.push('LAST-PART');\n }\n\n this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n },\n\n 'part-inf'() {\n this.manifest.partInf = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n if (this.manifest.partInf.partTarget) {\n this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n }\n\n setHoldBack.call(this, this.manifest);\n },\n\n 'daterange'() {\n this.manifest.daterange = this.manifest.daterange || [];\n this.manifest.daterange.push(camelCaseKeys(entry.attributes));\n const index = this.manifest.daterange.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n const daterange = this.manifest.daterange[index];\n\n if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n });\n }\n\n if (daterange.duration && daterange.duration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE DURATION must not be negative'\n });\n }\n\n if (daterange.plannedDuration && daterange.plannedDuration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n });\n }\n\n const endOnNextYes = !!daterange.endOnNext;\n\n if (endOnNextYes && !daterange.class) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n });\n }\n\n if (endOnNextYes && (daterange.duration || daterange.endDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n });\n }\n\n if (daterange.duration && daterange.endDate) {\n const startDate = daterange.startDate;\n const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration);\n this.manifest.daterange[index].endDate = new Date(newDateInSeconds);\n }\n\n if (daterange && !this.manifest.dateTimeString) {\n this.trigger('warn', {\n message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n });\n }\n\n if (!daterangeTags[daterange.id]) {\n daterangeTags[daterange.id] = daterange;\n } else {\n for (const attribute in daterangeTags[daterange.id]) {\n if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values'\n });\n break;\n }\n }\n }\n },\n\n 'independent-segments'() {\n this.manifest.independentSegments = true;\n }\n\n })[entry.tagType] || noop).call(self);\n },\n\n uri() {\n currentUri.uri = entry.uri;\n uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n if (this.manifest.targetDuration && !('duration' in currentUri)) {\n this.trigger('warn', {\n message: 'defaulting segment duration to the target duration'\n });\n currentUri.duration = this.manifest.targetDuration;\n } // annotate with encryption information, if necessary\n\n\n if (key) {\n currentUri.key = key;\n }\n\n currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n if (currentMap) {\n currentUri.map = currentMap;\n } // reset the last byterange end as it needs to be 0 between parts\n\n\n lastPartByterangeEnd = 0; // prepare for the next URI\n\n currentUri = {};\n },\n\n comment() {// comments are not important for playback\n },\n\n custom() {\n // if this is segment-level data attach the output to the segment\n if (entry.segment) {\n currentUri.custom = currentUri.custom || {};\n currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n } else {\n this.manifest.custom = this.manifest.custom || {};\n this.manifest.custom[entry.customType] = entry.data;\n }\n }\n\n })[entry.type].call(self);\n });\n }\n\n warnOnMissingAttributes_(identifier, attributes, required) {\n const missing = [];\n required.forEach(function (key) {\n if (!attributes.hasOwnProperty(key)) {\n missing.push(key);\n }\n });\n\n if (missing.length) {\n this.trigger('warn', {\n message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n });\n }\n }\n /**\n * Parse the input string and update the manifest object.\n *\n * @param {string} chunk a potentially incomplete portion of the manifest\n */\n\n\n push(chunk) {\n this.lineStream.push(chunk);\n }\n /**\n * Flush any remaining input. This can be handy if the last line of an M3U8\n * manifest did not contain a trailing newline but the file has been\n * completely received.\n */\n\n\n end() {\n // flush any buffered input\n this.lineStream.push('\\n');\n this.trigger('end');\n }\n /**\n * Add an additional parser for non-standard tags\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.type the type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser(options) {\n this.parseStream.addParser(options);\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper(options) {\n this.parseStream.addTagMapper(options);\n }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n","/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */\nimport resolveUrl from '@videojs/vhs-utils/es/resolve-url';\nimport window from 'global/window';\nimport { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array';\nimport { DOMParser } from '@xmldom/xmldom';\n\nvar version = \"1.2.2\";\n\nconst isObject = obj => {\n return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n return objects.reduce((result, source) => {\n if (typeof source !== 'object') {\n return result;\n }\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n result[key] = result[key].concat(source[key]);\n } else if (isObject(result[key]) && isObject(source[key])) {\n result[key] = merge(result[key], source[key]);\n } else {\n result[key] = source[key];\n }\n });\n return result;\n }, {});\n};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n const result = [];\n\n for (let i = start; i < end; i++) {\n result.push(i);\n }\n\n return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n if (!list.length) {\n return [];\n }\n\n const result = [];\n\n for (let i = 0; i < list.length; i++) {\n result.push(list[i]);\n }\n\n return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n if (e[key]) {\n a.push(i);\n }\n\n return a;\n}, []);\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nconst union = (lists, keyFunction) => {\n return values(lists.reduce((acc, list) => {\n list.forEach(el => {\n acc[keyFunction(el)] = el;\n });\n return acc;\n }, {}));\n};\n\nvar errors = {\n INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n DASH_INVALID_XML: 'DASH_INVALID_XML',\n NO_BASE_URL: 'NO_BASE_URL',\n MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n * requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n * follows RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n * to m3u8-parser\n */\n\nconst urlTypeToSegment = ({\n baseUrl = '',\n source = '',\n range = '',\n indexRange = ''\n}) => {\n const segment = {\n uri: source,\n resolvedUri: resolveUrl(baseUrl || '', source)\n };\n\n if (range || indexRange) {\n const rangeStr = range ? range : indexRange;\n const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n let endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n startRange = Number(startRange);\n }\n\n if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n endRange = Number(endRange);\n }\n\n let length;\n\n if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n } else {\n length = endRange - startRange + 1;\n }\n\n if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n length = Number(length);\n } // byterange should be inclusive according to\n // RFC 2616, Clause 14.35.1\n\n\n segment.byterange = {\n length,\n offset: startRange\n };\n }\n\n return segment;\n};\nconst byteRangeToString = byterange => {\n // `endRange` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n let endRange;\n\n if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n } else {\n endRange = byterange.offset + byterange.length - 1;\n }\n\n return `${byterange.offset}-${endRange}`;\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n * The end number attribute.\n *\n * @return {number|null}\n * The result of parsing the end number.\n */\n\nconst parseEndNumber = endNumber => {\n if (endNumber && typeof endNumber !== 'number') {\n endNumber = parseInt(endNumber, 10);\n }\n\n if (isNaN(endNumber)) {\n return null;\n }\n\n return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst segmentRange = {\n /**\n * Returns the entire range of available segments for a static MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n static(attributes) {\n const {\n duration,\n timescale = 1,\n sourceDuration,\n periodDuration\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber);\n const segmentDuration = duration / timescale;\n\n if (typeof endNumber === 'number') {\n return {\n start: 0,\n end: endNumber\n };\n }\n\n if (typeof periodDuration === 'number') {\n return {\n start: 0,\n end: periodDuration / segmentDuration\n };\n }\n\n return {\n start: 0,\n end: sourceDuration / segmentDuration\n };\n },\n\n /**\n * Returns the current live window range of available segments for a dynamic MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n dynamic(attributes) {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n duration,\n periodStart = 0,\n minimumUpdatePeriod = 0,\n timeShiftBufferDepth = Infinity\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n // after retrieving UTC server time.\n\n const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n // Convert the period start time to EPOCH.\n\n const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n const segmentCount = Math.ceil(periodDuration * timescale / duration);\n const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n const availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n return {\n start: Math.max(0, availableStart),\n end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n };\n }\n\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n * Number of the segment\n * @param {number} index\n * Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n * Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {toSegmentsCallback}\n * Callback map function\n */\n\nconst toSegments = attributes => number => {\n const {\n duration,\n timescale = 1,\n periodStart,\n startNumber = 1\n } = attributes;\n return {\n number: startNumber + number,\n duration: duration / timescale,\n timeline: periodStart,\n time: number * duration\n };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseByDuration = attributes => {\n const {\n type,\n duration,\n timescale = 1,\n periodDuration,\n sourceDuration\n } = attributes;\n const {\n start,\n end\n } = segmentRange[type](attributes);\n const segments = range(start, end).map(toSegments(attributes));\n\n if (type === 'static') {\n const index = segments.length - 1; // section is either a period or the full source\n\n const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n segments[index].duration = sectionDuration - duration / timescale * index;\n }\n\n return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @return {Object.} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n const {\n baseUrl,\n initialization = {},\n sourceDuration,\n indexRange = '',\n periodStart,\n presentationTime,\n number = 0,\n duration\n } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n if (!baseUrl) {\n throw new Error(errors.NO_BASE_URL);\n }\n\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: baseUrl,\n indexRange\n });\n segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n // (since SegmentBase is only for one total segment)\n\n if (duration) {\n const segmentTimeInfo = parseByDuration(attributes);\n\n if (segmentTimeInfo.length) {\n segment.duration = segmentTimeInfo[0].duration;\n segment.timeline = segmentTimeInfo[0].timeline;\n }\n } else if (sourceDuration) {\n segment.duration = sourceDuration;\n segment.timeline = periodStart;\n } // If presentation time is provided, these segments are being generated by SIDX\n // references, and should use the time provided. For the general case of SegmentBase,\n // there should only be one segment in the period, so its presentation time is the same\n // as its period start.\n\n\n segment.presentationTime = presentationTime || periodStart;\n segment.number = number;\n return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n // Retain init segment information\n const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n const timeline = playlist.timeline || 0;\n const sidxByteRange = playlist.sidx.byterange;\n const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n const segments = [];\n const type = playlist.endList ? 'static' : 'dynamic';\n const periodStart = playlist.sidx.timeline;\n let presentationTime = periodStart;\n let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n let startIndex; // eslint-disable-next-line\n\n if (typeof sidx.firstOffset === 'bigint') {\n startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n } else {\n startIndex = sidxEnd + sidx.firstOffset;\n }\n\n for (let i = 0; i < mediaReferences.length; i++) {\n const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale\n // this will be converted to seconds when generating segments\n\n const duration = reference.subsegmentDuration; // should be an inclusive range\n\n let endIndex; // eslint-disable-next-line\n\n if (typeof startIndex === 'bigint') {\n endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n } else {\n endIndex = startIndex + size - 1;\n }\n\n const indexRange = `${startIndex}-${endIndex}`;\n const attributes = {\n baseUrl,\n timescale,\n timeline,\n periodStart,\n presentationTime,\n number,\n duration,\n sourceDuration,\n indexRange,\n type\n };\n const segment = segmentsFromBase(attributes)[0];\n\n if (initSegment) {\n segment.map = initSegment;\n }\n\n segments.push(segment);\n\n if (typeof startIndex === 'bigint') {\n startIndex += window.BigInt(size);\n } else {\n startIndex += size;\n }\n\n presentationTime += duration / timescale;\n number++;\n }\n\n playlist.segments = segments;\n return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nconst getUniqueTimelineStarts = timelineStarts => {\n return union(timelineStarts, ({\n timeline\n }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nconst findPlaylistWithName = (playlists, name) => {\n for (let i = 0; i < playlists.length; i++) {\n if (playlists[i].attributes.NAME === name) {\n return playlists[i];\n }\n }\n\n return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nconst getMediaGroupPlaylists = manifest => {\n let mediaGroupPlaylists = [];\n forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {\n mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n });\n return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nconst updateMediaSequenceForPlaylist = ({\n playlist,\n mediaSequence\n}) => {\n playlist.mediaSequence = mediaSequence;\n playlist.segments.forEach((segment, index) => {\n segment.number = playlist.mediaSequence + index;\n });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nconst updateSequenceNumbers = ({\n oldPlaylists,\n newPlaylists,\n timelineStarts\n}) => {\n newPlaylists.forEach(playlist => {\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n // (see ISO_23009-1-2012 5.3.5.2).\n //\n // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\n if (!oldPlaylist) {\n // Since this is a new playlist, the media sequence values can start from 0 without\n // consequence.\n return;\n } // TODO better support for live SIDX\n //\n // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n // not supported when the SIDX properties change on refreshes.\n //\n // In the future, if support needs to be added, the merging logic here can be called\n // after SIDX references are resolved. For now, exit early to prevent exceptions being\n // thrown due to undefined references.\n\n\n if (playlist.sidx) {\n return;\n } // Since we don't yet support early available timelines, we don't need to support\n // playlists with no segments.\n\n\n const firstNewSegment = playlist.segments[0];\n const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n }); // No matching segment from the old playlist means the entire playlist was refreshed.\n // In this case the media sequence should account for this update, and the new segments\n // should be marked as discontinuous from the prior content, since the last prior\n // timeline was removed.\n\n if (oldMatchingSegmentIndex === -1) {\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n });\n playlist.segments[0].discontinuity = true;\n playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n //\n // If the new playlist's timeline is the same as the last seen segment's timeline,\n // then a discontinuity can be added to identify that there's potentially missing\n // content. If there's no missing content, the discontinuity should still be rather\n // harmless. It's possible that if segment durations are accurate enough, that the\n // existence of a gap can be determined using the presentation times and durations,\n // but if the segment timing info is off, it may introduce more problems than simply\n // adding the discontinuity.\n //\n // If the new playlist's timeline is different from the last seen segment's timeline,\n // then a discontinuity can be added to identify that this is the first seen segment\n // of a new timeline. However, the logic at the start of this function that\n // determined the disconinuity sequence by timeline index is now off by one (the\n // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n // we added it), so the disconinuity sequence must be decremented.\n //\n // A period may also have a duration of zero, so the case of no segments is handled\n // here even though we don't yet support early available periods.\n\n if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n playlist.discontinuitySequence--;\n }\n\n return;\n } // If the first segment matched with a prior segment on a discontinuity (it's matching\n // on the first segment of a period), then the discontinuitySequence shouldn't be the\n // timeline's matching one, but instead should be the one prior, and the first segment\n // of the new manifest should be marked with a discontinuity.\n //\n // The reason for this special case is that discontinuity sequence shows how many\n // discontinuities have fallen off of the playlist, and discontinuities are marked on\n // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n // sequence, and that first segment is an indicator, but can be removed before that\n // timeline is gone.\n\n\n const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n firstNewSegment.discontinuity = true;\n playlist.discontinuityStarts.unshift(0);\n playlist.discontinuitySequence--;\n }\n\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n });\n });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nconst positionManifestOnTimeline = ({\n oldManifest,\n newManifest\n}) => {\n // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n //\n // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n //\n // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n //\n // Because of this change, and the difficulty of supporting periods with changing start\n // times, periods with changing start times are not supported. This makes the logic much\n // simpler, since periods with the same start time can be considerred the same period\n // across refreshes.\n //\n // To give an example as to the difficulty of handling periods where the start time may\n // change, if a single period manifest is refreshed with another manifest with a single\n // period, and both the start and end times are increased, then the only way to determine\n // if it's a new period or an old one that has changed is to look through the segments of\n // each playlist and determine the presentation time bounds to find a match. In addition,\n // if the period start changed to exceed the old period end, then there would be no\n // match, and it would not be possible to determine whether the refreshed period is a new\n // one or the old one.\n const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n // of properties are saved for each seen Period. Even long running live streams won't\n // generate too many Periods, unless the stream is watched for decades. In the future,\n // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n // but it may not become an issue, and the additional info can be useful for debugging.\n\n newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n updateSequenceNumbers({\n oldPlaylists,\n newPlaylists,\n timelineStarts: newManifest.timelineStarts\n });\n return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n // Break out playlists into groups based on their baseUrl\n const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n if (!acc[cur.attributes.baseUrl]) {\n acc[cur.attributes.baseUrl] = [];\n }\n\n acc[cur.attributes.baseUrl].push(cur);\n return acc;\n }, {});\n let allPlaylists = [];\n Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => {\n // assuming playlist IDs are the same across periods\n // TODO: handle multiperiod where representation sets are not the same\n // across periods\n const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\n if (!acc[name]) {\n // First Period\n acc[name] = playlist;\n acc[name].attributes.timelineStarts = [];\n } else {\n // Subsequent Periods\n if (playlist.segments) {\n // first segment of subsequent periods signal a discontinuity\n if (playlist.segments[0]) {\n playlist.segments[0].discontinuity = true;\n }\n\n acc[name].segments.push(...playlist.segments);\n } // bubble up contentProtection, this assumes all DRM content\n // has the same contentProtection\n\n\n if (playlist.attributes.contentProtection) {\n acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n }\n }\n\n acc[name].attributes.timelineStarts.push({\n // Although they represent the same number, it's important to have both to make it\n // compatible with HLS potentially having a similar attribute.\n start: playlist.attributes.periodStart,\n timeline: playlist.attributes.periodStart\n });\n return acc;\n }, {}));\n allPlaylists = allPlaylists.concat(mergedPlaylists);\n });\n return allPlaylists.map(playlist => {\n playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n return playlist;\n });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n const sidxKey = generateSidxKey(playlist.sidx);\n const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n if (sidxMatch) {\n addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n }\n\n return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n if (!Object.keys(sidxMapping).length) {\n return playlists;\n }\n\n for (const i in playlists) {\n playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n }\n\n return playlists;\n};\nconst formatAudioPlaylist = ({\n attributes,\n segments,\n sidx,\n mediaSequence,\n discontinuitySequence,\n discontinuityStarts\n}, isAudioOnly) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n CODECS: attributes.codecs,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuitySequence,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n mediaSequence,\n segments\n };\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n if (isAudioOnly) {\n playlist.attributes.AUDIO = 'audio';\n playlist.attributes.SUBTITLES = 'subs';\n }\n\n return playlist;\n};\nconst formatVttPlaylist = ({\n attributes,\n segments,\n mediaSequence,\n discontinuityStarts,\n discontinuitySequence\n}) => {\n if (typeof segments === 'undefined') {\n // vtt tracks may use single file in BaseURL\n segments = [{\n uri: attributes.baseUrl,\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n duration: attributes.sourceDuration,\n number: 0\n }]; // targetDuration should be the same duration as the only segment\n\n attributes.duration = attributes.sourceDuration;\n }\n\n const m3u8Attributes = {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n };\n\n if (attributes.codecs) {\n m3u8Attributes.CODECS = attributes.codecs;\n }\n\n const vttPlaylist = {\n attributes: m3u8Attributes,\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n timelineStarts: attributes.timelineStarts,\n discontinuityStarts,\n discontinuitySequence,\n mediaSequence,\n segments\n };\n\n if (attributes.serviceLocation) {\n vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n let mainPlaylist;\n const formattedPlaylists = playlists.reduce((a, playlist) => {\n const role = playlist.attributes.role && playlist.attributes.role.value || '';\n const language = playlist.attributes.lang || '';\n let label = playlist.attributes.label || 'main';\n\n if (language && !playlist.attributes.label) {\n const roleLabel = role ? ` (${role})` : '';\n label = `${playlist.attributes.lang}${roleLabel}`;\n }\n\n if (!a[label]) {\n a[label] = {\n language,\n autoselect: true,\n default: role === 'main',\n playlists: [],\n uri: ''\n };\n }\n\n const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n a[label].playlists.push(formatted);\n\n if (typeof mainPlaylist === 'undefined' && role === 'main') {\n mainPlaylist = playlist;\n mainPlaylist.default = true;\n }\n\n return a;\n }, {}); // if no playlists have role \"main\", mark the first as main\n\n if (!mainPlaylist) {\n const firstLabel = Object.keys(formattedPlaylists)[0];\n formattedPlaylists[firstLabel].default = true;\n }\n\n return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n return playlists.reduce((a, playlist) => {\n const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n\n if (!a[label]) {\n a[label] = {\n language: label,\n default: false,\n autoselect: false,\n playlists: [],\n uri: ''\n };\n }\n\n a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n return a;\n }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n if (!svc) {\n return svcObj;\n }\n\n svc.forEach(service => {\n const {\n channel,\n language\n } = service;\n svcObj[language] = {\n autoselect: false,\n default: false,\n instreamId: channel,\n language\n };\n\n if (service.hasOwnProperty('aspectRatio')) {\n svcObj[language].aspectRatio = service.aspectRatio;\n }\n\n if (service.hasOwnProperty('easyReader')) {\n svcObj[language].easyReader = service.easyReader;\n }\n\n if (service.hasOwnProperty('3D')) {\n svcObj[language]['3D'] = service['3D'];\n }\n });\n return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n attributes,\n segments,\n sidx,\n discontinuityStarts\n}) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n AUDIO: 'audio',\n SUBTITLES: 'subs',\n RESOLUTION: {\n width: attributes.width,\n height: attributes.height\n },\n CODECS: attributes.codecs,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n segments\n };\n\n if (attributes.frameRate) {\n playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n }\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n return playlist;\n};\n\nconst videoOnly = ({\n attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n // increment all segments sequentially\n playlists.forEach(playlist => {\n playlist.mediaSequence = 0;\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n });\n\n if (!playlist.segments) {\n return;\n }\n\n playlist.segments.forEach((segment, index) => {\n segment.number = index;\n });\n });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n * The media group playlists\n */\n\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n if (!mediaGroupObject) {\n return [];\n }\n\n return Object.keys(mediaGroupObject).reduce((acc, label) => {\n const labelContents = mediaGroupObject[label];\n return acc.concat(labelContents.playlists);\n }, []);\n};\nconst toM3u8 = ({\n dashPlaylists,\n locations,\n contentSteering,\n sidxMapping = {},\n previousManifest,\n eventStream\n}) => {\n if (!dashPlaylists.length) {\n return {};\n } // grab all main manifest attributes\n\n\n const {\n sourceDuration: duration,\n type,\n suggestedPresentationDelay,\n minimumUpdatePeriod\n } = dashPlaylists[0].attributes;\n const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n const manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: [],\n endList: true,\n mediaGroups: {\n AUDIO: {},\n VIDEO: {},\n ['CLOSED-CAPTIONS']: {},\n SUBTITLES: {}\n },\n uri: '',\n duration,\n playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n };\n\n if (minimumUpdatePeriod >= 0) {\n manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n }\n\n if (locations) {\n manifest.locations = locations;\n }\n\n if (contentSteering) {\n manifest.contentSteering = contentSteering;\n }\n\n if (type === 'dynamic') {\n manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n }\n\n if (eventStream && eventStream.length > 0) {\n manifest.eventStream = eventStream;\n }\n\n const isAudioOnly = manifest.playlists.length === 0;\n const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n const playlistTimelineStarts = formattedPlaylists.map(({\n timelineStarts\n }) => timelineStarts);\n manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n if (organizedAudioGroup) {\n manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n }\n\n if (organizedVttGroup) {\n manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n }\n\n if (captions.length) {\n manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n }\n\n if (previousManifest) {\n return positionManifestOnTimeline({\n oldManifest: previousManifest,\n newManifest: manifest\n });\n }\n\n return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {number} time\n * current time (typically the total time up until the final segment)\n * @param {number} duration\n * duration property for the given \n *\n * @return {number}\n * R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n periodStart = 0,\n minimumUpdatePeriod = 0\n } = attributes;\n const now = (NOW + clientOffset) / 1000;\n const periodStartWC = availabilityStartTime + periodStart;\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n const {\n type,\n minimumUpdatePeriod = 0,\n media = '',\n sourceDuration,\n timescale = 1,\n startNumber = 1,\n periodStart: timeline\n } = attributes;\n const segments = [];\n let time = -1;\n\n for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n const S = segmentTimeline[sIndex];\n const duration = S.d;\n const repeat = S.r || 0;\n const segmentTime = S.t || 0;\n\n if (time < 0) {\n // first segment\n time = segmentTime;\n }\n\n if (segmentTime && segmentTime > time) {\n // discontinuity\n // TODO: How to handle this type of discontinuity\n // timeline++ here would treat it like HLS discontuity and content would\n // get appended without gap\n // E.G.\n // \n // \n // \n // \n // would have $Time$ values of [0, 1, 2, 5]\n // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n // does the value of sourceDuration consider this when calculating arbitrary\n // negative @r repeat value?\n // E.G. Same elements as above with this added at the end\n // \n // with a sourceDuration of 10\n // Would the 2 gaps be included in the time duration calculations resulting in\n // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n time = segmentTime;\n }\n\n let count;\n\n if (repeat < 0) {\n const nextS = sIndex + 1;\n\n if (nextS === segmentTimeline.length) {\n // last segment\n if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n count = getLiveRValue(attributes, time, duration);\n } else {\n // TODO: This may be incorrect depending on conclusion of TODO above\n count = (sourceDuration * timescale - time) / duration;\n }\n } else {\n count = (segmentTimeline[nextS].t - time) / duration;\n }\n } else {\n count = repeat + 1;\n }\n\n const end = startNumber + segments.length + count;\n let number = startNumber + segments.length;\n\n while (number < end) {\n segments.push({\n number,\n duration: duration / timescale,\n time,\n timeline\n });\n time += duration;\n number++;\n }\n }\n\n return segments;\n};\n\nconst identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n * Entire match of identifier\n * @param {string} identifier\n * Name of matched identifier\n * @param {string} format\n * Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n * Desired length of the replaced value. Values less than this width shall be left\n * zero padded\n * @return {string}\n * Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {replaceCallback}\n * Callback to be used with String.prototype.replace to replace identifiers\n */\n\nconst identifierReplacement = values => (match, identifier, format, width) => {\n if (match === '$$') {\n // escape sequence\n return '$';\n }\n\n if (typeof values[identifier] === 'undefined') {\n return match;\n }\n\n const value = '' + values[identifier];\n\n if (identifier === 'RepresentationID') {\n // Format tag shall not be present with RepresentationID\n return value;\n }\n\n if (!format) {\n width = 1;\n } else {\n width = parseInt(width, 10);\n }\n\n if (value.length >= width) {\n return value;\n }\n\n return `${new Array(width - value.length + 1).join('0')}${value}`;\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n * Template string to construct url from\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {string}\n * Segment url with identifiers replaced\n */\n\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseTemplateInfo = (attributes, segmentTimeline) => {\n if (!attributes.duration && !segmentTimeline) {\n // if neither @duration or SegmentTimeline are present, then there shall be exactly\n // one media segment\n return [{\n number: attributes.startNumber || 1,\n duration: attributes.sourceDuration,\n time: 0,\n timeline: attributes.periodStart\n }];\n }\n\n if (attributes.duration) {\n return parseByDuration(attributes);\n }\n\n return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object[]}\n * List of segment objects\n */\n\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n const templateValues = {\n RepresentationID: attributes.id,\n Bandwidth: attributes.bandwidth || 0\n };\n const {\n initialization = {\n sourceURL: '',\n range: ''\n }\n } = attributes;\n const mapSegment = urlTypeToSegment({\n baseUrl: attributes.baseUrl,\n source: constructTemplateUrl(initialization.sourceURL, templateValues),\n range: initialization.range\n });\n const segments = parseTemplateInfo(attributes, segmentTimeline);\n return segments.map(segment => {\n templateValues.Number = segment.number;\n templateValues.Time = segment.time;\n const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is\n // calculated in mpd-parser prior to this, so it's assumed to be available.\n attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n const map = {\n uri,\n timeline: segment.timeline,\n duration: segment.duration,\n resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n map: mapSegment,\n number: segment.number,\n presentationTime\n };\n return map;\n });\n};\n\n/**\n * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object} segmentUrl\n * node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n const {\n baseUrl,\n initialization = {}\n } = attributes;\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: segmentUrl.media,\n range: segmentUrl.mediaRange\n });\n segment.map = initSegment;\n return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object.} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n const {\n duration,\n segmentUrls = [],\n periodStart\n } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n if (!duration && !segmentTimeline || duration && segmentTimeline) {\n throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n }\n\n const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n let segmentTimeInfo;\n\n if (duration) {\n segmentTimeInfo = parseByDuration(attributes);\n }\n\n if (segmentTimeline) {\n segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n }\n\n const segments = segmentTimeInfo.map((segmentTime, index) => {\n if (segmentUrlMap[index]) {\n const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n segment.timeline = segmentTime.timeline;\n segment.duration = segmentTime.duration;\n segment.number = segmentTime.number;\n segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n return segment;\n } // Since we're mapping we should get rid of any blank segments (in case\n // the given SegmentTimeline is handling for more elements than we have\n // SegmentURLs for).\n\n }).filter(segment => segment);\n return segments;\n};\n\nconst generateSegments = ({\n attributes,\n segmentInfo\n}) => {\n let segmentAttributes;\n let segmentsFn;\n\n if (segmentInfo.template) {\n segmentsFn = segmentsFromTemplate;\n segmentAttributes = merge(attributes, segmentInfo.template);\n } else if (segmentInfo.base) {\n segmentsFn = segmentsFromBase;\n segmentAttributes = merge(attributes, segmentInfo.base);\n } else if (segmentInfo.list) {\n segmentsFn = segmentsFromList;\n segmentAttributes = merge(attributes, segmentInfo.list);\n }\n\n const segmentsInfo = {\n attributes\n };\n\n if (!segmentsFn) {\n return segmentsInfo;\n }\n\n const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n // must be in seconds. Since we've generated the segment list, we no longer need\n // @duration to be in @timescale units, so we can convert it here.\n\n if (segmentAttributes.duration) {\n const {\n duration,\n timescale = 1\n } = segmentAttributes;\n segmentAttributes.duration = duration / timescale;\n } else if (segments.length) {\n // if there is no @duration attribute, use the largest segment duration as\n // as target duration\n segmentAttributes.duration = segments.reduce((max, segment) => {\n return Math.max(max, Math.ceil(segment.duration));\n }, 0);\n } else {\n segmentAttributes.duration = 0;\n }\n\n segmentsInfo.attributes = segmentAttributes;\n segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n if (segmentInfo.base && segmentAttributes.indexRange) {\n segmentsInfo.sidx = segments[0];\n segmentsInfo.segments = [];\n }\n\n return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nconst parseDivisionValue = value => {\n return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n const SECONDS_IN_DAY = 24 * 60 * 60;\n const SECONDS_IN_HOUR = 60 * 60;\n const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n const match = durationRegex.exec(str);\n\n if (!match) {\n return 0;\n }\n\n const [year, month, day, hour, minute, second] = match.slice(1);\n return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nconst parseDate = str => {\n // Date format without timezone according to ISO 8601\n // YYY-MM-DDThh:mm:ss.ssssss\n const dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n // expressed by ending with 'Z'\n\n if (dateRegex.test(str)) {\n str += 'Z';\n }\n\n return Date.parse(str);\n};\n\nconst parsers = {\n /**\n * Specifies the duration of the entire Media Presentation. Format is a duration string\n * as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n mediaPresentationDuration(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the Segment availability start time for all Segments referred to in this\n * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n * time. Format is a date string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The date as seconds from unix epoch\n */\n availabilityStartTime(value) {\n return parseDate(value) / 1000;\n },\n\n /**\n * Specifies the smallest period between potential changes to the MPD. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n minimumUpdatePeriod(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the suggested presentation delay. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n suggestedPresentationDelay(value) {\n return parseDuration(value);\n },\n\n /**\n * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n *\n * @param {string} value\n * value of attribute as a string\n *\n * @return {string}\n * The type as a string\n */\n type(value) {\n return value;\n },\n\n /**\n * Specifies the duration of the smallest time shifting buffer for any Representation\n * in the MPD. Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n timeShiftBufferDepth(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n * Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n start(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the width of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed width\n */\n width(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the height of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed height\n */\n height(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the bitrate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed bandwidth\n */\n bandwidth(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the frame rate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed frame rate\n */\n frameRate(value) {\n return parseDivisionValue(value);\n },\n\n /**\n * Specifies the number of the first Media Segment in this Representation in the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n startNumber(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the timescale in units per seconds\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed timescale\n */\n timescale(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTimeOffset.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTimeOffset\n */\n presentationTimeOffset(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the constant approximate Segment duration\n * NOTE: The element also contains an @duration attribute. This duration\n * specifies the duration of the Period. This attribute is currently not\n * supported by the rest of the parser, however we still check for it to prevent\n * errors.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n duration(value) {\n const parsedValue = parseInt(value, 10);\n\n if (isNaN(parsedValue)) {\n return parseDuration(value);\n }\n\n return parsedValue;\n },\n\n /**\n * Specifies the Segment duration, in units of the value of the @timescale.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n d(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the MPD start time, in @timescale units, the first Segment in the series\n * starts relative to the beginning of the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed time\n */\n t(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the repeat count of the number of following contiguous Segments with the\n * same duration expressed by the value of @d\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n r(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTime.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTime\n */\n presentationTime(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Default parser for all other attributes. Acts as a no-op and just returns the value\n * as a string\n *\n * @param {string} value\n * value of attribute as a string\n * @return {string}\n * Unparsed value\n */\n DEFAULT(value) {\n return value;\n }\n\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n * The node to parse attributes from\n * @return {Object}\n * Object with all attributes of el parsed\n */\n\nconst parseAttributes = el => {\n if (!(el && el.attributes)) {\n return {};\n }\n\n return from(el.attributes).reduce((a, e) => {\n const parseFn = parsers[e.name] || parsers.DEFAULT;\n a[e.name] = parseFn(e.value);\n return a;\n }, {});\n};\n\nconst keySystemsMap = {\n 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {Object[]} references\n * List of objects containing the reference URL as well as its attributes\n * @param {Node[]} baseUrlElements\n * List of BaseURL nodes from the mpd\n * @return {Object[]}\n * List of objects with resolved urls and attributes\n */\n\nconst buildBaseUrls = (references, baseUrlElements) => {\n if (!baseUrlElements.length) {\n return references;\n }\n\n return flatten(references.map(function (reference) {\n return baseUrlElements.map(function (baseUrlElement) {\n const initialBaseUrl = getContent(baseUrlElement);\n const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n const finalBaseUrl = merge(parseAttributes(baseUrlElement), {\n baseUrl: resolvedBaseUrl\n }); // If the URL is resolved, we want to get the serviceLocation from the reference\n // assuming there is no serviceLocation on the initialBaseUrl\n\n if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n finalBaseUrl.serviceLocation = reference.serviceLocation;\n }\n\n return finalBaseUrl;\n });\n }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n * Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n * Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n * Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n * Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n * The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n * The Segment information contained within the provided AdaptationSet\n */\n\nconst getSegmentInformation = adaptationSet => {\n const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n tag: 'SegmentURL'\n }, parseAttributes(s)));\n const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n const segmentTimelineParentNode = segmentList || segmentTemplate;\n const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n // @initialization and an node. @initialization can be templated,\n // while the node can have a url and range specified. If the has\n // both @initialization and an subelement we opt to override with\n // the node, as this interaction is not defined in the spec.\n\n const template = segmentTemplate && parseAttributes(segmentTemplate);\n\n if (template && segmentInitialization) {\n template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n } else if (template && template.initialization) {\n // If it is @initialization we convert it to an object since this is the format that\n // later functions will rely on for the initialization segment. This is only valid\n // for \n template.initialization = {\n sourceURL: template.initialization\n };\n }\n\n const segmentInfo = {\n template,\n segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n list: segmentList && merge(parseAttributes(segmentList), {\n segmentUrls,\n initialization: parseAttributes(segmentInitialization)\n }),\n base: segmentBase && merge(parseAttributes(segmentBase), {\n initialization: parseAttributes(segmentInitialization)\n })\n };\n Object.keys(segmentInfo).forEach(key => {\n if (!segmentInfo[key]) {\n delete segmentInfo[key];\n }\n });\n return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n * Segment information for this Representation\n * @property {Object} attributes\n * Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n * Representation node from the mpd\n * @return {RepresentationInformation}\n * Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n * Contains attributes inherited by the AdaptationSet\n * @param {Object[]} adaptationSetBaseUrls\n * List of objects containing resolved base URLs and attributes\n * inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n * Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n * Callback map function\n */\n\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n const repBaseUrlElements = findChildren(representation, 'BaseURL');\n const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n const representationSegmentInfo = getSegmentInformation(representation);\n return repBaseUrls.map(baseUrl => {\n return {\n segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n attributes: merge(attributes, baseUrl)\n };\n });\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n * Content protection nodes\n * @return {Object}\n * Object containing pssh data by key system\n */\n\nconst generateKeySystemInformation = contentProtectionNodes => {\n return contentProtectionNodes.reduce((acc, node) => {\n const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n if (attributes.schemeIdUri) {\n attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n }\n\n const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n if (keySystem) {\n acc[keySystem] = {\n attributes\n };\n const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n if (psshNode) {\n const pssh = getContent(psshNode);\n acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n }\n }\n\n return acc;\n }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n // 608 captions\n if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n let channel;\n let language; // default language to value\n\n language = value;\n\n if (/^CC\\d=/.test(value)) {\n [channel, language] = value.split('=');\n } else if (/^CC\\d$/.test(value)) {\n channel = value;\n }\n\n return {\n channel,\n language\n };\n });\n } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n const flags = {\n // service or channel number 1-63\n 'channel': undefined,\n // language is a 3ALPHA per ISO 639.2/B\n // field is required\n 'language': undefined,\n // BIT 1/0 or ?\n // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n 'aspectRatio': 1,\n // BIT 1/0\n // easy reader flag indicated the text is tailed to the needs of beginning readers\n // default 0, or off\n 'easyReader': 0,\n // BIT 1/0\n // If 3d metadata is present (CEA-708.1) then 1\n // default 0\n '3D': 0\n };\n\n if (/=/.test(value)) {\n const [channel, opts = ''] = value.split('=');\n flags.channel = channel;\n flags.language = value;\n opts.split(',').forEach(opt => {\n const [name, val] = opt.split(':');\n\n if (name === 'lang') {\n flags.language = val; // er for easyReadery\n } else if (name === 'er') {\n flags.easyReader = Number(val); // war for wide aspect ratio\n } else if (name === 'war') {\n flags.aspectRatio = Number(val);\n } else if (name === '3D') {\n flags['3D'] = Number(val);\n }\n });\n } else {\n flags.language = value;\n }\n\n if (flags.channel) {\n flags.channel = 'SERVICE' + flags.channel;\n }\n\n return flags;\n });\n }\n};\n/**\n * A map callback that will parse all event stream data for a collection of periods\n * DASH ISO_IEC_23009 5.10.2.2\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n *\n * @param {PeriodInformation} period object containing necessary period information\n * @return a collection of parsed eventstream event objects\n */\n\nconst toEventStream = period => {\n // get and flatten all EventStreams tags and parse attributes and children\n return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n const eventStreamAttributes = parseAttributes(eventStream);\n const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n return findChildren(eventStream, 'Event').map(event => {\n const eventAttributes = parseAttributes(event);\n const presentationTime = eventAttributes.presentationTime || 0;\n const timescale = eventStreamAttributes.timescale || 1;\n const duration = eventAttributes.duration || 0;\n const start = presentationTime / timescale + period.attributes.start;\n return {\n schemeIdUri,\n value: eventStreamAttributes.value,\n id: eventAttributes.id,\n start,\n end: start + duration / timescale,\n messageData: getContent(event) || eventAttributes.messageData,\n contentEncoding: eventStreamAttributes.contentEncoding,\n presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n };\n });\n }));\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n * AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n * Contains attributes inherited by the Period\n * @param {Object[]} periodBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the Period\n * @param {string[]} periodSegmentInfo\n * Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n * Callback map function\n */\n\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n const adaptationSetAttributes = parseAttributes(adaptationSet);\n const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n const role = findChildren(adaptationSet, 'Role')[0];\n const roleAttributes = {\n role: parseAttributes(role)\n };\n let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n if (captionServices) {\n attrs = merge(attrs, {\n captionServices\n });\n }\n\n const label = findChildren(adaptationSet, 'Label')[0];\n\n if (label && label.childNodes.length) {\n const labelVal = label.childNodes[0].nodeValue.trim();\n attrs = merge(attrs, {\n label: labelVal\n });\n }\n\n const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n if (Object.keys(contentProtection).length) {\n attrs = merge(attrs, {\n contentProtection\n });\n }\n\n const segmentInfo = getSegmentInformation(adaptationSet);\n const representations = findChildren(adaptationSet, 'Representation');\n const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n * Period node from the mpd\n * @property {Object} period.attributes\n * Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n * Period object containing necessary period information\n * @param {number} periodStart\n * Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n * Contains attributes inherited by the mpd\n * @param {Object[]} mpdBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the mpd\n * @return {toAdaptationSetsCallback}\n * Callback map function\n */\n\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n const periodAttributes = merge(mpdAttributes, {\n periodStart: period.attributes.start\n });\n\n if (typeof period.attributes.duration === 'number') {\n periodAttributes.periodDuration = period.attributes.duration;\n }\n\n const adaptationSets = findChildren(period.node, 'AdaptationSet');\n const periodSegmentInfo = getSegmentInformation(period.node);\n return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n};\n/**\n * Tranforms an array of content steering nodes into an object\n * containing CDN content steering information from the MPD manifest.\n *\n * For more information on the DASH spec for Content Steering parsing, see:\n * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {Node[]} contentSteeringNodes\n * Content steering nodes\n * @param {Function} eventHandler\n * The event handler passed into the parser options to handle warnings\n * @return {Object}\n * Object containing content steering data\n */\n\nconst generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => {\n // If there are more than one ContentSteering tags, throw an error\n if (contentSteeringNodes.length > 1) {\n eventHandler({\n type: 'warn',\n message: 'The MPD manifest should contain no more than one ContentSteering tag'\n });\n } // Return a null value if there are no ContentSteering tags\n\n\n if (!contentSteeringNodes.length) {\n return null;\n }\n\n const infoFromContentSteeringTag = merge({\n serverURL: getContent(contentSteeringNodes[0])\n }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n // to `false` if it doesn't exist\n\n infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n return infoFromContentSteeringTag;\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n * Options object\n * @param {Object} options.attributes\n * Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n * Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n * The MPD@type these periods came from\n * @return {number|null}\n * The period start, or null if it's an early available period or error\n */\n\nconst getPeriodStart = ({\n attributes,\n priorPeriodAttributes,\n mpdType\n}) => {\n // Summary of period start time calculation from DASH spec section 5.3.2.1\n //\n // A period's start is the first period's start + time elapsed after playing all\n // prior periods to this one. Periods continue one after the other in time (without\n // gaps) until the end of the presentation.\n //\n // The value of Period@start should be:\n // 1. if Period@start is present: value of Period@start\n // 2. if previous period exists and it has @duration: previous Period@start +\n // previous Period@duration\n // 3. if this is first period and MPD@type is 'static': 0\n // 4. in all other cases, consider the period an \"early available period\" (note: not\n // currently supported)\n // (1)\n if (typeof attributes.start === 'number') {\n return attributes.start;\n } // (2)\n\n\n if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n } // (3)\n\n\n if (!priorPeriodAttributes && mpdType === 'static') {\n return 0;\n } // (4)\n // There is currently no logic for calculating the Period@start value if there is\n // no Period@start or prior Period@start and Period@duration available. This is not made\n // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n // nothing about any other resolution strategies, it's implied. Thus, this case should\n // be considered an early available period, or error, and null should suffice for both\n // of those cases.\n\n\n return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n * The root node of the mpd\n * @param {Object} options\n * Available options for inheritAttributes\n * @param {string} options.manifestUri\n * The uri source of the mpd\n * @param {number} options.NOW\n * Current time per DASH IOP. Default is current time in ms since epoch\n * @param {number} options.clientOffset\n * Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n * List of objects containing Representation information\n */\n\nconst inheritAttributes = (mpd, options = {}) => {\n const {\n manifestUri = '',\n NOW = Date.now(),\n clientOffset = 0,\n // TODO: For now, we are expecting an eventHandler callback function\n // to be passed into the mpd parser as an option.\n // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n // This will support new features including a standardized event handler.\n // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n eventHandler = function () {}\n } = options;\n const periodNodes = findChildren(mpd, 'Period');\n\n if (!periodNodes.length) {\n throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n }\n\n const locations = findChildren(mpd, 'Location');\n const mpdAttributes = parseAttributes(mpd);\n const mpdBaseUrls = buildBaseUrls([{\n baseUrl: manifestUri\n }], findChildren(mpd, 'BaseURL'));\n const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n mpdAttributes.type = mpdAttributes.type || 'static';\n mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n mpdAttributes.NOW = NOW;\n mpdAttributes.clientOffset = clientOffset;\n\n if (locations.length) {\n mpdAttributes.locations = locations.map(getContent);\n }\n\n const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n // adding properties that require looking at prior periods is to parse attributes and add\n // missing ones before toAdaptationSets is called. If more such properties are added, it\n // may be better to refactor toAdaptationSets.\n\n periodNodes.forEach((node, index) => {\n const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n // for this period.\n\n const priorPeriod = periods[index - 1];\n attributes.start = getPeriodStart({\n attributes,\n priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n mpdType: mpdAttributes.type\n });\n periods.push({\n node,\n attributes\n });\n });\n return {\n locations: mpdAttributes.locations,\n contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n // TODO: There are occurences where this `representationInfo` array contains undesired\n // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n // parent BaseURL and a child BaseURL, and the value does not resolve,\n // we end up returning the child BaseURL multiple times.\n // We need to determine a way to remove these duplicates in a safe way.\n // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n eventStream: flatten(periods.map(toEventStream))\n };\n};\n\nconst stringToMpdXml = manifestString => {\n if (manifestString === '') {\n throw new Error(errors.DASH_EMPTY_MANIFEST);\n }\n\n const parser = new DOMParser();\n let xml;\n let mpd;\n\n try {\n xml = parser.parseFromString(manifestString, 'application/xml');\n mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n } catch (e) {// ie 11 throws on invalid xml\n }\n\n if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n throw new Error(errors.DASH_INVALID_XML);\n }\n\n return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nconst parseUTCTimingScheme = mpd => {\n const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n if (!UTCTimingNode) {\n return null;\n }\n\n const attributes = parseAttributes(UTCTimingNode);\n\n switch (attributes.schemeIdUri) {\n case 'urn:mpeg:dash:utc:http-head:2014':\n case 'urn:mpeg:dash:utc:http-head:2012':\n attributes.method = 'HEAD';\n break;\n\n case 'urn:mpeg:dash:utc:http-xsdate:2014':\n case 'urn:mpeg:dash:utc:http-iso:2014':\n case 'urn:mpeg:dash:utc:http-xsdate:2012':\n case 'urn:mpeg:dash:utc:http-iso:2012':\n attributes.method = 'GET';\n break;\n\n case 'urn:mpeg:dash:utc:direct:2014':\n case 'urn:mpeg:dash:utc:direct:2012':\n attributes.method = 'DIRECT';\n attributes.value = Date.parse(attributes.value);\n break;\n\n case 'urn:mpeg:dash:utc:http-ntp:2014':\n case 'urn:mpeg:dash:utc:ntp:2014':\n case 'urn:mpeg:dash:utc:sntp:2014':\n default:\n throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n }\n\n return attributes;\n};\n\nconst VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nconst parse = (manifestString, options = {}) => {\n const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n const playlists = toPlaylists(parsedManifestInfo.representationInfo);\n return toM3u8({\n dashPlaylists: playlists,\n locations: parsedManifestInfo.locations,\n contentSteering: parsedManifestInfo.contentSteeringInfo,\n sidxMapping: options.sidxMapping,\n previousManifest: options.previousManifest,\n eventStream: parsedManifestInfo.eventStream\n });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n","'use strict'\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n","var conventions = require(\"./conventions\");\nvar dom = require('./dom')\nvar entities = require('./entities');\nvar sax = require('./sax');\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.replace(/[\\r\\u0085\\u2028]/g, '\\n')\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax = new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n\tstartDocument : function() {\n \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n \tif (this.locator) {\n \tthis.doc.documentURI = this.locator.systemId;\n \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t var el = doc.createElementNS(namespaceURI, qName||localName);\n\t var len = attrs.length;\n\t appendElement(this, el);\n\t this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t for (var i = 0 ; i < len; i++) {\n\t var namespaceURI = attrs.getURI(i);\n\t var value = attrs.getValue(i);\n\t var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t var ins = this.doc.createProcessingInstruction(target, data);\n\t this.locator && position(this.locator,ins)\n\t appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t if(this.locator = locator){// && !('lineNumber' in locator)){\n\t \tlocator.lineNumber = 0;\n\t }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t var comm = this.doc.createComment(chars);\n\t this.locator && position(this.locator,comm)\n\t appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t //used in characters() methods\n\t this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t if (impl && impl.createDocumentType) {\n\t var dt = impl.createDocumentType(name, publicId, systemId);\n\t this.locator && position(this.locator,dt)\n\t appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n * #comment(chars, start, length)\n * #startCDATA()\n * #endCDATA()\n * #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n * #endDTD()\n * #startEntity(name)\n * #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n * #elementDecl(name, model)\n * #externalEntityDecl(name, publicId, systemId)\n * #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n * #resolveEntity(String name,String publicId,String baseURI,String systemId)\n * #resolveEntity(publicId, systemId)\n * #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n * #notationDecl(name, publicId, systemId) {};\n * #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;\n","var conventions = require(\"./conventions\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record} current\n * @param {string} element\n * @returns {Record}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\nvar ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\nvar TEXT_NODE = NodeType.TEXT_NODE = 3;\nvar CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\nvar ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\nvar ENTITY_NODE = NodeType.ENTITY_NODE = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE = NodeType.COMMENT_NODE = 8;\nvar DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\nvar NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR \t= ExceptionCode.INVALID_STATE_ERR \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR \t= ExceptionCode.SYNTAX_ERR \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR \t= ExceptionCode.NAMESPACE_ERR \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR \t= ExceptionCode.INVALID_ACCESS_ERR \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index unsigned long\n\t * Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI, qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n // Introduced in DOM Level 2:\n hasAttributes:function(){\n \treturn this.attributes.length>0;\n },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n lookupPrefix:function(namespaceURI){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n lookupNamespaceURI:function(prefix){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n \t\t\t\treturn map[prefix] ;\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n isDefaultNamespace:function(namespaceURI){\n \tvar prefix = this.lookupPrefix(namespaceURI);\n \treturn prefix == null;\n }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '<' ||\n c == '>' && '>' ||\n c == '&' && '&' ||\n c == '\"' && '"' ||\n '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n }while(node=node.nextSibling)\n }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName : '#document',\n\tnodeType : DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype : null,\n\tdocumentElement : null,\n\t_inc : 1,\n\n\tinsertBefore : function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild : function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&` and `<` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" > \", and must, for compatibility,\n\t\t * be escaped using either `>` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n","var dom = require('./dom')\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = require('./dom-parser').DOMParser\n","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4] \tNameStartChar\t ::= \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a] \tNameChar\t ::= \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5] \tName\t ::= \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t \t\t\tdoc.appendChild(text);\n\t \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t \t\tend = tagStart+1+tagName.length;\n\t \t}else if(tagName.match(/\\s\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退,有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName = el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart = source.indexOf('',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos = source.lastIndexOf('')\n\t\tif(pos',start+4);\n\t\t\t//append comment source.substring(4,end)//';\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parsing fields [ID3v2.4.0 section 4.14.]\n\n mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (mimeTypeEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Mime type field (terminated with \\0)\n\n frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n frame.pictureType = frame.data[i];\n i++;\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (descriptionEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Description field (terminated with \\0)\n\n frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n i = descriptionEndIndex + 1;\n if (frame.mimeType === LINK_MIME_TYPE) {\n // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n } else {\n // parsing Picture Data field as binary data\n frame.pictureData = frame.data.subarray(i, frame.data.length);\n }\n },\n 'T*': function (frame) {\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parse text field, do not include null terminator in the frame value\n // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n frame.values = frame.value.split('\\0');\n },\n 'TXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the text fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n // frames that allow different types of encoding contain terminated text\n // [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n frame.data = frame.value;\n },\n 'W*': function (frame) {\n // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n },\n 'WXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the description and URL fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information\n // should be ignored [ID3v2.4.0 section 4.3]\n\n frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n },\n 'PRIV': function (frame) {\n var i;\n for (i = 0; i < frame.data.length; i++) {\n if (frame.data[i] === 0) {\n // parse the description and URL fields\n frame.owner = parseIso88591$1(frame.data, 0, i);\n break;\n }\n }\n frame.privateData = frame.data.subarray(i + 1);\n frame.data = frame.privateData;\n }\n };\n var parseId3Frames$1 = function (data) {\n var frameSize,\n frameHeader,\n frameStart = 10,\n tagSize = 0,\n frames = []; // If we don't have enough data for a header, 10 bytes, \n // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n return;\n } // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n\n tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n var hasExtendedHeader = data[5] & 0x40;\n if (hasExtendedHeader) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n break;\n }\n frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n var frame = {\n id: frameHeader,\n data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (frameParsers[frame.id]) {\n // use frame specific parser\n frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n frameParsers['W*'](frame);\n }\n frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n return frames;\n };\n var parseId3 = {\n parseId3Frames: parseId3Frames$1,\n parseSyncSafeInteger: parseSyncSafeInteger$1,\n frameParsers: frameParsers\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n\n var Stream$5 = stream,\n StreamTypes$3 = streamTypes,\n id3 = parseId3,\n MetadataStream;\n MetadataStream = function (options) {\n var settings = {\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n this.trigger('log', {\n level: 'warn',\n message: 'Skipping unrecognized metadata packet'\n });\n return;\n } // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n this.trigger('log', {\n level: 'warn',\n message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n // to be sent along.\n\n break;\n }\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (id3.frameParsers[frame.id]) {\n // use frame specific parser\n id3.frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n id3.frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n id3.frameParsers['W*'](frame);\n } // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n this.trigger('timestamp', frame);\n }\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n };\n MetadataStream.prototype = new Stream$5();\n var metadataStream = MetadataStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$4 = stream,\n CaptionStream$1 = captionStream,\n StreamTypes$2 = streamTypes,\n TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n var MP2T_PACKET_LENGTH$1 = 188,\n // bytes\n SYNC_BYTE$1 = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n TransportPacketStream = function () {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n bytesInBuffer = 0;\n TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH$1,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH$1;\n endIndex += MP2T_PACKET_LENGTH$1;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n TransportPacketStream.prototype = new Stream$4();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n TransportParseStream = function () {\n var parsePsi, parsePat, parsePmt, self;\n TransportParseStream.prototype.init.call(this);\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n parsePsi = function (payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n parsePat = function (payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n parsePmt = function (payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n TransportParseStream.prototype = new Stream$4();\n TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n ElementaryStream = function () {\n var self = this,\n segmentHadPmt = false,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function (payload, pes) {\n var ptsDtsFlags;\n const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n // that are frame data that is continuing from the previous fragment. This\n // is to check that the pes data is the start of a new pes payload\n\n if (startPrefix !== 1) {\n return;\n } // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function (stream, type, forceFlush) {\n var packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream.data.length || stream.size < 9) {\n return;\n }\n event.trackId = stream.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream.data.length; i++) {\n fragment = stream.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream.size = 0;\n stream.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n this.push = function (data) {\n ({\n pat: function () {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function () {\n var stream, streamType;\n switch (data.streamType) {\n case StreamTypes$2.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes$2.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes$2.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function () {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n segmentHadPmt = true;\n self.trigger('data', event);\n }\n })[data.type]();\n };\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n this.flush = function () {\n // if on flush we haven't had a pmt emitted\n // and we have a pmt to emit. emit the pmt\n // so that we trigger a trackinfo downstream.\n if (!segmentHadPmt && programMapTable) {\n var pmt = {\n type: 'metadata',\n tracks: []\n }; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n self.trigger('data', pmt);\n }\n segmentHadPmt = false;\n this.flushStreams_();\n this.trigger('done');\n };\n };\n ElementaryStream.prototype = new Stream$4();\n var m2ts$1 = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n TransportPacketStream: TransportPacketStream,\n TransportParseStream: TransportParseStream,\n ElementaryStream: ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream$1.CaptionStream,\n Cea608Stream: CaptionStream$1.Cea608Stream,\n Cea708Stream: CaptionStream$1.Cea708Stream,\n MetadataStream: metadataStream\n };\n for (var type in StreamTypes$2) {\n if (StreamTypes$2.hasOwnProperty(type)) {\n m2ts$1[type] = StreamTypes$2[type];\n }\n }\n var m2ts_1 = m2ts$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$3 = stream;\n var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n var AdtsStream$1;\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n AdtsStream$1 = function (handlePartialSegments) {\n var buffer,\n frameNum = 0;\n AdtsStream$1.prototype.init.call(this);\n this.skipWarn_ = function (start, end) {\n this.trigger('log', {\n level: 'warn',\n message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n });\n };\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n if (buffer && buffer.length) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n var skip; // We use i + 7 here because we want to be able to parse the entire header.\n // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n while (i + 7 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n if (typeof skip !== 'number') {\n skip = i;\n } // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n\n i++;\n continue;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n // NOTE: frame length includes the size of the header\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n // then we have to wait for more data\n\n if (buffer.byteLength - i < frameLength) {\n break;\n } // Otherwise, deliver the complete AAC frame\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n // data is the frame without it's header\n data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n });\n frameNum++;\n i += frameLength;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // remove processed bytes from the buffer.\n\n buffer = buffer.subarray(i);\n };\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n AdtsStream$1.prototype = new Stream$3();\n var adts = AdtsStream$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb$1;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb$1 = function (workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n return valu;\n }; // ():uint\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n this.loadWord();\n };\n var expGolomb = ExpGolomb$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$2 = stream;\n var ExpGolomb = expGolomb;\n var H264Stream$1, NalByteStream;\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n NalByteStream = function () {\n var syncPoint = 0,\n i,\n buffer;\n NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n this.push = function (data) {\n var swapBuffer;\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n // TODO: the three profiles below don't\n // appear to have sps data in the specificiation anymore?\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n H264Stream$1 = function () {\n var nalByteStream = new NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n H264Stream$1.prototype.init.call(this);\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data,\n nalUnitTypeCode: data[0] & 0x1f\n };\n switch (event.nalUnitTypeCode) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n } // This triggers data on the H264Stream\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n this.flush = function () {\n nalByteStream.flush();\n };\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n this.reset = function () {\n nalByteStream.reset();\n };\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n skipScalingList = function (count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n discardEmulationPreventionBytes = function (data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n readSequenceParameterSet = function (data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio = [1, 1],\n aspectRatioIdc,\n i;\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n case 2:\n sarRatio = [12, 11];\n break;\n case 3:\n sarRatio = [10, 11];\n break;\n case 4:\n sarRatio = [16, 11];\n break;\n case 5:\n sarRatio = [40, 33];\n break;\n case 6:\n sarRatio = [24, 11];\n break;\n case 7:\n sarRatio = [20, 11];\n break;\n case 8:\n sarRatio = [32, 11];\n break;\n case 9:\n sarRatio = [80, 33];\n break;\n case 10:\n sarRatio = [18, 11];\n break;\n case 11:\n sarRatio = [15, 11];\n break;\n case 12:\n sarRatio = [64, 33];\n break;\n case 13:\n sarRatio = [160, 99];\n break;\n case 14:\n sarRatio = [4, 3];\n break;\n case 15:\n sarRatio = [3, 2];\n break;\n case 16:\n sarRatio = [2, 1];\n break;\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n if (sarRatio) {\n sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n // sar is sample aspect ratio\n sarRatio: sarRatio\n };\n };\n };\n H264Stream$1.prototype = new Stream$2();\n var h264 = {\n H264Stream: H264Stream$1,\n NalByteStream: NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n var parseId3TagSize = function (header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n returnSize = returnSize >= 0 ? returnSize : 0;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n var getId3Offset = function (data, offset) {\n if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n return offset;\n }\n offset += parseId3TagSize(data, offset);\n return getId3Offset(data, offset);\n }; // TODO: use vhs-utils\n\n var isLikelyAacData$1 = function (data) {\n var offset = getId3Offset(data, 0);\n return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n // verify that the 2 layer bits are 0, aka this\n // is not mp3 data but aac data.\n (data[offset + 1] & 0x16) === 0x10;\n };\n var parseSyncSafeInteger = function (data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n var percentEncode = function (bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n var parseIso88591 = function (bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n };\n\n var parseAdtsSize = function (header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n var parseType$4 = function (header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n return null;\n };\n var parseSampleRate = function (packet) {\n var i = 0;\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n return null;\n };\n var parseAacTimestamp = function (packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return null;\n }\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n break;\n }\n }\n }\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n return null;\n };\n var utils = {\n isLikelyAacData: isLikelyAacData$1,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType$4,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$1 = stream;\n var aacUtils = utils; // Constants\n\n var AacStream$1;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n AacStream$1 = function () {\n var everything = new Uint8Array(),\n timeStamp = 0;\n AacStream$1.prototype.init.call(this);\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n AacStream$1.prototype = new Stream$1();\n var aac = AacStream$1;\n var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var audioProperties = AUDIO_PROPERTIES$1;\n var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n var videoProperties = VIDEO_PROPERTIES$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream = stream;\n var mp4 = mp4Generator;\n var frameUtils = frameUtils$1;\n var audioFrameUtils = audioFrameUtils$1;\n var trackDecodeInfo = trackDecodeInfo$1;\n var m2ts = m2ts_1;\n var clock = clock$2;\n var AdtsStream = adts;\n var H264Stream = h264.H264Stream;\n var AacStream = aac;\n var isLikelyAacData = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n var AUDIO_PROPERTIES = audioProperties;\n var VIDEO_PROPERTIES = videoProperties; // object types\n\n var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n var retriggerForStream = function (key, event) {\n event.stream = key;\n this.trigger('log', event);\n };\n var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n var keys = Object.keys(pipeline);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i]; // skip non-stream keys and headOfPipeline\n // which is just a duplicate\n\n if (key === 'headOfPipeline' || !pipeline[key].on) {\n continue;\n }\n pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n }\n };\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n var arrayEquals = function (a, b) {\n var i;\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n AudioSegmentStream = function (track, options) {\n var adtsFrames = [],\n sequenceNumber,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n AudioSegmentStream.prototype.init.call(this);\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n adtsFrames.push(data);\n };\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts;\n };\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n segmentDuration = frames.length * frameDuration;\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n // frame info is in video clock cycles. Convert to match expectation of\n // listeners (that all timestamps will be based on video clock cycles).\n clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n // frame times are already in video clock, as is segment duration\n frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n this.trigger('timingInfo', {\n start: frames[0].pts,\n end: frames[0].pts + segmentDuration\n });\n }\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n AudioSegmentStream.prototype = new Stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n VideoSegmentStream = function (track, options) {\n var sequenceNumber,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n VideoSegmentStream.prototype.init.call(this);\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].pts,\n end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n break;\n }\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n gopIndex--;\n }\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n var trimIndex;\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n if (trimIndex === 0) {\n return gops;\n }\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n VideoSegmentStream.prototype = new Stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n CoalesceStream = function (options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.content || output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n CoalesceStream.prototype = new Stream();\n CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n Transmuxer = function (options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n Transmuxer.prototype.init.call(this);\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n return;\n }\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n };\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream(options);\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence. Do not do this if keepOriginalTimestamps is set,\n // because this is a particularly subtle form of timestamp alteration.\n if (audioTrack && !options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n }; // hook up the segment streams once track metadata is delivered\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n }\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n };\n this.getLogTrigger_ = function (key) {\n var self = this;\n return function (event) {\n event.stream = key;\n self.trigger('log', event);\n };\n }; // feed incoming data to the front of the parsing pipeline\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data);\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n Transmuxer.prototype = new Stream();\n var transmuxer = {\n Transmuxer: Transmuxer,\n VideoSegmentStream: VideoSegmentStream,\n AudioSegmentStream: AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateSegmentTimingInfo: generateSegmentTimingInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var toUnsigned$3 = function (value) {\n return value >>> 0;\n };\n var toHexString$1 = function (value) {\n return ('00' + value.toString(16)).slice(-2);\n };\n var bin = {\n toUnsigned: toUnsigned$3,\n toHexString: toHexString$1\n };\n var parseType$3 = function (buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n };\n var parseType_1 = parseType$3;\n var toUnsigned$2 = bin.toUnsigned;\n var parseType$2 = parseType_1;\n var findBox$2 = function (data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType$2(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = findBox$2(data.subarray(i + 8, end), path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = end;\n } // we've finished searching all of data\n\n return results;\n };\n var findBox_1 = findBox$2;\n var toUnsigned$1 = bin.toUnsigned;\n var getUint64$2 = numbers.getUint64;\n var tfdt = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n if (result.version === 1) {\n result.baseMediaDecodeTime = getUint64$2(data.subarray(4));\n } else {\n result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n }\n return result;\n };\n var parseTfdt$2 = tfdt;\n var parseSampleFlags$1 = function (flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n };\n var parseSampleFlags_1 = parseSampleFlags$1;\n var parseSampleFlags = parseSampleFlags_1;\n var trun = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n };\n var parseTrun$2 = trun;\n var tfhd = function (data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n return result;\n };\n var parseTfhd$2 = tfhd;\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n var CaptionStream = captionStream.CaptionStream;\n var findBox$1 = findBox_1;\n var parseTfdt$1 = parseTfdt$2;\n var parseTrun$1 = parseTrun$2;\n var parseTfhd$1 = parseTfhd$2;\n var window$2 = window_1;\n /**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var mapToSample = function (offset, samples) {\n var approximateOffset = offset;\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n if (approximateOffset < sample.size) {\n return sample;\n }\n approximateOffset -= sample.size;\n }\n return null;\n };\n /**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n var findSeiNals = function (avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = {\n logs: [],\n seiNals: []\n },\n seiNal,\n i,\n length,\n lastMatchedSample;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else if (lastMatchedSample) {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n } else {\n result.logs.push({\n level: 'warn',\n message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n });\n break;\n }\n result.seiNals.push(seiNal);\n break;\n }\n }\n return result;\n };\n /**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array} truns - The Trun Run boxes to be parsed\n * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var parseSamples = function (truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = parseTrun$1(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n sample.trackId = trackId;\n sample.dts = currentDts;\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n if (typeof currentDts === 'bigint') {\n sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset);\n currentDts += window$2.BigInt(sample.duration);\n } else {\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n }\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n };\n /**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n var parseCaptionNals = function (segment, videoTrackId) {\n // To get the samples\n var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = findBox$1(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = parseTfhd$1(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = findBox$1(traf, ['trun']);\n var samples;\n var result; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n result = findSeiNals(mdat, samples, trackId);\n if (!captionNals[trackId]) {\n captionNals[trackId] = {\n seiNals: [],\n logs: []\n };\n }\n captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n }\n });\n return captionNals;\n };\n /**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n **/\n\n var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n captionNals = parseCaptionNals(segment, trackId);\n var trackNals = captionNals[trackId] || {};\n return {\n seiNals: trackNals.seiNals,\n logs: trackNals.logs,\n timescale: timescale\n };\n };\n /**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n var CaptionParser = function () {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n captionStream.on('log', function (log) {\n parsedCaptions.logs.push(log);\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n if (parsedData && parsedData.logs) {\n parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n }\n if (parsedData === null || !parsedData.seiNals) {\n if (parsedCaptions.logs.length) {\n return {\n logs: parsedCaptions.logs,\n captions: [],\n captionStreams: []\n };\n }\n return null;\n }\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n parsedCaptions.logs = [];\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {},\n logs: []\n };\n } else {\n this.clearParsedCaptions();\n }\n this.resetCaptionStream();\n };\n this.reset();\n };\n var captionParser = CaptionParser;\n /**\n * Returns the first string in the data array ending with a null char '\\0'\n * @param {UInt8} data \n * @returns the string with the null char\n */\n\n var uint8ToCString$1 = function (data) {\n var index = 0;\n var curChar = String.fromCharCode(data[index]);\n var retString = '';\n while (curChar !== '\\0') {\n retString += curChar;\n index++;\n curChar = String.fromCharCode(data[index]);\n } // Add nullChar\n\n retString += curChar;\n return retString;\n };\n var string = {\n uint8ToCString: uint8ToCString$1\n };\n var uint8ToCString = string.uint8ToCString;\n var getUint64$1 = numbers.getUint64;\n /**\n * Based on: ISO/IEC 23009 Section: 5.10.3.3\n * References:\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n * https://aomediacodec.github.io/id3-emsg/\n * \n * Takes emsg box data as a uint8 array and returns a emsg box object\n * @param {UInt8Array} boxData data from emsg box\n * @returns A parsed emsg box object\n */\n\n var parseEmsgBox = function (boxData) {\n // version + flags\n var offset = 4;\n var version = boxData[0];\n var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n if (version === 0) {\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time_delta = dv.getUint32(offset);\n offset += 4;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n } else if (version === 1) {\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time = getUint64$1(boxData.subarray(offset));\n offset += 8;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n }\n message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n var emsgBox = {\n scheme_id_uri,\n value,\n // if timescale is undefined or 0 set to 1 \n timescale: timescale ? timescale : 1,\n presentation_time,\n presentation_time_delta,\n event_duration,\n id,\n message_data\n };\n return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n };\n /**\n * Scales a presentation time or time delta with an offset with a provided timescale\n * @param {number} presentationTime \n * @param {number} timescale \n * @param {number} timeDelta \n * @param {number} offset \n * @returns the scaled time as a number\n */\n\n var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n };\n /**\n * Checks the emsg box data for validity based on the version\n * @param {number} version of the emsg box to validate\n * @param {Object} emsg the emsg data to validate\n * @returns if the box is valid as a boolean\n */\n\n var isValidEmsgBox = function (version, emsg) {\n var hasScheme = emsg.scheme_id_uri !== '\\0';\n var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n return !(version > 1) && isValidV0Box || isValidV1Box;\n }; // Utility function to check if an object is defined\n\n var isDefined = function (data) {\n return data !== undefined || data !== null;\n };\n var emsg$1 = {\n parseEmsgBox: parseEmsgBox,\n scaleTime: scaleTime\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n\n var toUnsigned = bin.toUnsigned;\n var toHexString = bin.toHexString;\n var findBox = findBox_1;\n var parseType$1 = parseType_1;\n var emsg = emsg$1;\n var parseTfhd = parseTfhd$2;\n var parseTrun = parseTrun$2;\n var parseTfdt = parseTfdt$2;\n var getUint64 = numbers.getUint64;\n var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3;\n var window$1 = window_1;\n var parseId3Frames = parseId3.parseId3Frames;\n /**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n timescale = function (init) {\n var result = {},\n traks = findBox(init, ['moov', 'trak']); // mdhd timescale\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = findBox(trak, ['tkhd'])[0];\n if (!tkhd) {\n return null;\n }\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (!mdhd) {\n return null;\n }\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n };\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n startTime = function (timescale, fragment) {\n var trafs; // we need info from two childrend of each track fragment box\n\n trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n var lowestTime = trafs.reduce(function (acc, traf) {\n var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n var tfdt = findBox(traf, ['tfdt'])[0];\n var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n var baseTime; // version 1 is 64 bit\n\n if (tfdt[0] === 1) {\n baseTime = getUint64(tfdt.subarray(4, 12));\n } else {\n baseTime = dv.getUint32(4);\n } // convert base time to seconds if it is a valid number.\n\n let seconds;\n if (typeof baseTime === 'bigint') {\n seconds = baseTime / window$1.BigInt(scale);\n } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n seconds = baseTime / scale;\n }\n if (seconds < Number.MAX_SAFE_INTEGER) {\n seconds = Number(seconds);\n }\n if (seconds < acc) {\n acc = seconds;\n }\n return acc;\n }, Infinity);\n return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n };\n /**\n * Determine the composition start, in seconds, for an MP4\n * fragment.\n *\n * The composition start time of a fragment can be calculated using the base\n * media decode time, composition time offset, and timescale, as follows:\n *\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n *\n * All of the aforementioned information is contained within a media fragment's\n * `traf` box, except for timescale info, which comes from the initialization\n * segment, so a track id (also contained within a `traf`) is also necessary to\n * associate it with a timescale\n *\n *\n * @param timescales {object} - a hash of track ids to timescale values.\n * @param fragment {Unit8Array} - the bytes of a media segment\n * @return {number} the composition start time for the fragment, in seconds\n **/\n\n compositionStartTime = function (timescales, fragment) {\n var trafBoxes = findBox(fragment, ['moof', 'traf']);\n var baseMediaDecodeTime = 0;\n var compositionTimeOffset = 0;\n var trackId;\n if (trafBoxes && trafBoxes.length) {\n // The spec states that track run samples contained within a `traf` box are contiguous, but\n // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n // We will assume that they are, so we only need the first to calculate start time.\n var tfhd = findBox(trafBoxes[0], ['tfhd'])[0];\n var trun = findBox(trafBoxes[0], ['trun'])[0];\n var tfdt = findBox(trafBoxes[0], ['tfdt'])[0];\n if (tfhd) {\n var parsedTfhd = parseTfhd(tfhd);\n trackId = parsedTfhd.trackId;\n }\n if (tfdt) {\n var parsedTfdt = parseTfdt(tfdt);\n baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n }\n if (trun) {\n var parsedTrun = parseTrun(trun);\n if (parsedTrun.samples && parsedTrun.samples.length) {\n compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n }\n }\n } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n // specified.\n\n var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n if (typeof baseMediaDecodeTime === 'bigint') {\n compositionTimeOffset = window$1.BigInt(compositionTimeOffset);\n timescale = window$1.BigInt(timescale);\n }\n var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n result = Number(result);\n }\n return result;\n };\n /**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n getVideoTrackIds = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = findBox(trak, ['mdia', 'hdlr']);\n var tkhds = findBox(trak, ['tkhd']);\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType$1(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n };\n getTimescaleFromMediaHeader = function (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n };\n /**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n getTracks = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n var tkhd = findBox(trak, ['tkhd'])[0];\n var view, tkhdVersion; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n tkhdVersion = view.getUint8(0);\n track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n if (hdlr) {\n var type = parseType$1(hdlr.subarray(8, 12));\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n var codecBox = findBox(sampleDescriptions, [track.codec])[0];\n var codecConfig, codecConfigType;\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {\n // flac, opus, etc\n track.codec = track.codec.toLowerCase();\n }\n }\n }\n var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n track.timescale = getTimescaleFromMediaHeader(mdhd);\n }\n tracks.push(track);\n });\n return tracks;\n };\n /**\n * Returns an array of emsg ID3 data from the provided segmentData.\n * An offset can also be provided as the Latest Arrival Time to calculate \n * the Event Start Time of v0 EMSG boxes. \n * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n * \n * @param {Uint8Array} segmentData the segment byte array.\n * @param {number} offset the segment start time or Latest Arrival Time, \n * @return {Object[]} an array of ID3 parsed from EMSG boxes\n */\n\n getEmsgID3 = function (segmentData, offset = 0) {\n var emsgBoxes = findBox(segmentData, ['emsg']);\n return emsgBoxes.map(data => {\n var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n return {\n cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n frames: parsedId3Frames\n };\n });\n };\n var probe$2 = {\n // export mp4 inspector's findBox and parseType for backwards compatibility\n findBox: findBox,\n parseType: parseType$1,\n timescale: timescale,\n startTime: startTime,\n compositionStartTime: compositionStartTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks,\n getTimescaleFromMediaHeader: getTimescaleFromMediaHeader,\n getEmsgID3: getEmsgID3\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n\n var StreamTypes$1 = streamTypes;\n var parsePid = function (packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n };\n var parsePayloadUnitStartIndicator = function (packet) {\n return !!(packet[1] & 0x40);\n };\n var parseAdaptionField = function (packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n return offset;\n };\n var parseType = function (packet, pmtPid) {\n var pid = parsePid(packet);\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n return null;\n };\n var parsePat = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n if (pusi) {\n offset += packet[offset] + 1;\n }\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n };\n var parsePmt = function (packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n return programMapTable;\n };\n var parsePesType = function (packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n switch (type) {\n case StreamTypes$1.H264_STREAM_TYPE:\n return 'video';\n case StreamTypes$1.ADTS_STREAM_TYPE:\n return 'audio';\n case StreamTypes$1.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n default:\n return null;\n }\n };\n var parsePesTime = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n if (!pusi) {\n return null;\n }\n var offset = 4 + parseAdaptionField(packet);\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n\n return pes;\n };\n var parseNalUnitType = function (type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n case 0x06:\n return 'sei_rbsp';\n case 0x07:\n return 'seq_parameter_set_rbsp';\n case 0x08:\n return 'pic_parameter_set_rbsp';\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n default:\n return null;\n }\n };\n var videoPacketContainsKeyFrame = function (packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n return foundKeyFrame;\n };\n var probe$1 = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n\n var StreamTypes = streamTypes;\n var handleRollover = timestampRolloverStream.handleRollover;\n var probe = {};\n probe.ts = probe$1;\n probe.aac = utils;\n var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\n var parsePsi_ = function (bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pat':\n pmt.pid = probe.ts.parsePat(packet);\n break;\n case 'pmt':\n var table = probe.ts.parsePmt(packet);\n pmt.table = pmt.table || {};\n Object.keys(table).forEach(function (key) {\n pmt.table[key] = table[key];\n });\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n var parseAudioPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n var parseVideoPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n currentFrame.size = 0;\n }\n }\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n break;\n }\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n }\n }\n };\n /**\n * inspects the aac data stream for start and end time information\n */\n\n var inspectAac_ = function (bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n byteIndex += frameSize;\n break;\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n audioCount++;\n byteIndex += frameSize;\n break;\n default:\n byteIndex++;\n break;\n }\n if (endLoop) {\n return null;\n }\n }\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n };\n /**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n var inspectTs_ = function (bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n if (result.video.length === 0) {\n delete result.video;\n }\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n if (result.audio.length === 0) {\n delete result.audio;\n }\n break;\n }\n }\n }\n return result;\n };\n /**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n var inspect = function (bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n if (!result || !result.audio && !result.video) {\n return null;\n }\n adjustTimestamp_(result, baseTimestamp);\n return result;\n };\n var tsInspector = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n };\n /* global self */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n const wireTransmuxerEvents = function (self, transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n const initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n const typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n transmuxer.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo\n });\n });\n transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n const videoSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo\n });\n });\n transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n const audioSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'audioSegmentTimingInfo',\n audioSegmentTimingInfo\n });\n });\n transmuxer.on('id3Frame', function (id3Frame) {\n self.postMessage({\n action: 'id3Frame',\n id3Frame\n });\n });\n transmuxer.on('caption', function (caption) {\n self.postMessage({\n action: 'caption',\n caption\n });\n });\n transmuxer.on('trackinfo', function (trackInfo) {\n self.postMessage({\n action: 'trackinfo',\n trackInfo\n });\n });\n transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n // convert to video TS since we prioritize video time over audio\n self.postMessage({\n action: 'audioTimingInfo',\n audioTimingInfo: {\n start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n }\n });\n });\n transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n self.postMessage({\n action: 'videoTimingInfo',\n videoTimingInfo: {\n start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n }\n });\n });\n transmuxer.on('log', function (log) {\n self.postMessage({\n action: 'log',\n log\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\n class MessageHandlers {\n constructor(self, options) {\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n\n init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n pushMp4Captions(data) {\n if (!this.captionParser) {\n this.captionParser = new captionParser();\n this.captionParser.init();\n }\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n this.self.postMessage({\n action: 'mp4Captions',\n captions: parsed && parsed.captions || [],\n logs: parsed && parsed.logs || [],\n data: segment.buffer\n }, [segment.buffer]);\n }\n probeMp4StartTime({\n timescales,\n data\n }) {\n const startTime = probe$2.startTime(timescales, data);\n this.self.postMessage({\n action: 'probeMp4StartTime',\n startTime,\n data\n }, [data.buffer]);\n }\n probeMp4Tracks({\n data\n }) {\n const tracks = probe$2.tracks(data);\n this.self.postMessage({\n action: 'probeMp4Tracks',\n tracks,\n data\n }, [data.buffer]);\n }\n /**\n * Probes an mp4 segment for EMSG boxes containing ID3 data.\n * https://aomediacodec.github.io/id3-emsg/\n *\n * @param {Uint8Array} data segment data\n * @param {number} offset segment start time\n * @return {Object[]} an array of ID3 frames\n */\n\n probeEmsgID3({\n data,\n offset\n }) {\n const id3Frames = probe$2.getEmsgID3(data, offset);\n this.self.postMessage({\n action: 'probeEmsgID3',\n id3Frames,\n emsgData: data\n }, [data.buffer]);\n }\n /**\n * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n * internal \"media time,\" as well as whether it contains video and/or audio.\n *\n * @private\n * @param {Uint8Array} bytes - segment bytes\n * @param {number} baseStartTime\n * Relative reference timestamp used when adjusting frame timestamps for rollover.\n * This value should be in seconds, as it's converted to a 90khz clock within the\n * function body.\n * @return {Object} The start time of the current segment in \"media time\" as well as\n * whether it contains video and/or audio\n */\n\n probeTs({\n data,\n baseStartTime\n }) {\n const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n const timeInfo = tsInspector.inspect(data, tsStartTime);\n let result = null;\n if (timeInfo) {\n result = {\n // each type's time info comes back as an array of 2 times, start and end\n hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n };\n if (result.hasVideo) {\n result.videoStart = timeInfo.video[0].ptsTime;\n }\n if (result.hasAudio) {\n result.audioStart = timeInfo.audio[0].ptsTime;\n }\n }\n this.self.postMessage({\n action: 'probeTs',\n result,\n data\n }, [data.buffer]);\n }\n clearAllMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearAllCaptions();\n }\n }\n clearParsedMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearParsedCaptions();\n }\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n\n push(data) {\n // Cast array buffer to correct type for transmuxer\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n\n reset() {\n this.transmuxer.reset();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n\n setTimestampOffset(data) {\n const timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n }\n setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n }\n setRemux(data) {\n this.transmuxer.setRemux(data.remux);\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n\n flush(data) {\n this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n self.postMessage({\n action: 'done',\n type: 'transmuxed'\n });\n }\n endTimeline() {\n this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n // timelines\n\n self.postMessage({\n action: 'endedtimeline',\n type: 'transmuxed'\n });\n }\n alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }\n /**\n * Our web worker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nconst handleData_ = (event, transmuxedData, callback) => {\n const {\n type,\n initSegment,\n captions,\n captionStreams,\n metadata,\n videoFrameDtsTime,\n videoFramePtsTime\n } = event.data.segment;\n transmuxedData.buffer.push({\n captions,\n captionStreams,\n metadata\n });\n const boxes = event.data.segment.boxes || {\n data: event.data.segment.data\n };\n const result = {\n type,\n // cast ArrayBuffer to TypedArray\n data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n };\n if (typeof videoFrameDtsTime !== 'undefined') {\n result.videoFrameDtsTime = videoFrameDtsTime;\n }\n if (typeof videoFramePtsTime !== 'undefined') {\n result.videoFramePtsTime = videoFramePtsTime;\n }\n callback(result);\n};\nconst handleDone_ = ({\n transmuxedData,\n callback\n}) => {\n // Previously we only returned data on data events,\n // not on done events. Clear out the buffer to keep that consistent.\n transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n // have received\n\n callback(transmuxedData);\n};\nconst handleGopInfo_ = (event, transmuxedData) => {\n transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n const {\n transmuxer,\n bytes,\n audioAppendStart,\n gopsToAlignWith,\n remux,\n onData,\n onTrackInfo,\n onAudioTimingInfo,\n onVideoTimingInfo,\n onVideoSegmentTimingInfo,\n onAudioSegmentTimingInfo,\n onId3,\n onCaptions,\n onDone,\n onEndedTimeline,\n onTransmuxerLog,\n isEndOfTimeline\n } = options;\n const transmuxedData = {\n buffer: []\n };\n let waitForEndedTimelineEvent = isEndOfTimeline;\n const handleMessage = event => {\n if (transmuxer.currentTransmux !== options) {\n // disposed\n return;\n }\n if (event.data.action === 'data') {\n handleData_(event, transmuxedData, onData);\n }\n if (event.data.action === 'trackinfo') {\n onTrackInfo(event.data.trackInfo);\n }\n if (event.data.action === 'gopInfo') {\n handleGopInfo_(event, transmuxedData);\n }\n if (event.data.action === 'audioTimingInfo') {\n onAudioTimingInfo(event.data.audioTimingInfo);\n }\n if (event.data.action === 'videoTimingInfo') {\n onVideoTimingInfo(event.data.videoTimingInfo);\n }\n if (event.data.action === 'videoSegmentTimingInfo') {\n onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n }\n if (event.data.action === 'audioSegmentTimingInfo') {\n onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n }\n if (event.data.action === 'id3Frame') {\n onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n }\n if (event.data.action === 'caption') {\n onCaptions(event.data.caption);\n }\n if (event.data.action === 'endedtimeline') {\n waitForEndedTimelineEvent = false;\n onEndedTimeline();\n }\n if (event.data.action === 'log') {\n onTransmuxerLog(event.data.log);\n } // wait for the transmuxed event since we may have audio and video\n\n if (event.data.type !== 'transmuxed') {\n return;\n } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n // of a timeline, that means there may still be data events before the segment\n // processing can be considerred complete. In that case, the final event should be\n // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n if (waitForEndedTimelineEvent) {\n return;\n }\n transmuxer.onmessage = null;\n handleDone_({\n transmuxedData,\n callback: onDone\n });\n /* eslint-disable no-use-before-define */\n\n dequeue(transmuxer);\n /* eslint-enable */\n };\n\n transmuxer.onmessage = handleMessage;\n if (audioAppendStart) {\n transmuxer.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioAppendStart\n });\n } // allow empty arrays to be passed to clear out GOPs\n\n if (Array.isArray(gopsToAlignWith)) {\n transmuxer.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith\n });\n }\n if (typeof remux !== 'undefined') {\n transmuxer.postMessage({\n action: 'setRemux',\n remux\n });\n }\n if (bytes.byteLength) {\n const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n transmuxer.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset,\n byteLength: bytes.byteLength\n }, [buffer]);\n }\n if (isEndOfTimeline) {\n transmuxer.postMessage({\n action: 'endTimeline'\n });\n } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n // the end of the segment\n\n transmuxer.postMessage({\n action: 'flush'\n });\n};\nconst dequeue = transmuxer => {\n transmuxer.currentTransmux = null;\n if (transmuxer.transmuxQueue.length) {\n transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n if (typeof transmuxer.currentTransmux === 'function') {\n transmuxer.currentTransmux();\n } else {\n processTransmux(transmuxer.currentTransmux);\n }\n }\n};\nconst processAction = (transmuxer, action) => {\n transmuxer.postMessage({\n action\n });\n dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n if (!transmuxer.currentTransmux) {\n transmuxer.currentTransmux = action;\n processAction(transmuxer, action);\n return;\n }\n transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n if (!options.transmuxer.currentTransmux) {\n options.transmuxer.currentTransmux = options;\n processTransmux(options);\n return;\n }\n options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n const transmuxer = new TransmuxWorker();\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue = [];\n const term = transmuxer.terminate;\n transmuxer.terminate = () => {\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue.length = 0;\n return term.call(transmuxer);\n };\n transmuxer.postMessage({\n action: 'init',\n options\n });\n return transmuxer;\n};\nvar segmentTransmuxer = {\n reset,\n endTimeline,\n transmux,\n createTransmuxer\n};\nconst workerCallback = function (options) {\n const transmuxer = options.transmuxer;\n const endAction = options.endAction || options.action;\n const callback = options.callback;\n const message = _extends({}, options, {\n endAction: null,\n transmuxer: null,\n callback: null\n });\n const listenForEndEvent = event => {\n if (event.data.action !== endAction) {\n return;\n }\n transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n if (event.data.data) {\n event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n if (options.data) {\n options.data = event.data.data;\n }\n }\n callback(event.data);\n };\n transmuxer.addEventListener('message', listenForEndEvent);\n if (options.data) {\n const isArrayBuffer = options.data instanceof ArrayBuffer;\n message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n message.byteLength = options.data.byteLength;\n const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n transmuxer.postMessage(message, transfers);\n } else {\n transmuxer.postMessage(message);\n }\n};\nconst REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nconst abortAll = activeXhrs => {\n activeXhrs.forEach(xhr => {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nconst getRequestStats = request => {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nconst getProgressStats = progressEvent => {\n const request = progressEvent.target;\n const roundTripTime = Date.now() - request.requestTime;\n const stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\nconst handleErrors = (error, request) => {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n return {\n status: request.status,\n message: 'Empty HLS response at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n const response = request.response;\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n const view = new DataView(response);\n const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n for (let i = 0; i < objects.length; i++) {\n objects[i].bytes = bytes;\n }\n return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n // only know how to parse mp4 init segments at the moment\n\n if (type !== 'mp4') {\n const uri = segment.map.resolvedUri || segment.map.uri;\n return callback({\n internal: true,\n message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`,\n code: REQUEST_ERRORS.FAILURE\n });\n }\n workerCallback({\n action: 'probeMp4Tracks',\n data: segment.map.bytes,\n transmuxer: segment.transmuxer,\n callback: ({\n tracks,\n data\n }) => {\n // transfer bytes back to us\n segment.map.bytes = data;\n tracks.forEach(function (track) {\n segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n if (segment.map.tracks[track.type]) {\n return;\n }\n segment.map.tracks[track.type] = track;\n if (typeof track.id === 'number' && track.timescale) {\n segment.map.timescales = segment.map.timescales || {};\n segment.map.timescales[track.id] = track.timescale;\n }\n });\n return callback(null);\n }\n });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleInitSegmentResponse = ({\n segment,\n finishProcessingFn\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n // until the key request is done to decrypt.\n\n if (segment.map.key) {\n segment.map.encryptedBytes = bytes;\n return finishProcessingFn(null, segment);\n }\n segment.map.bytes = bytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n parseError.xhr = request;\n parseError.status = request.status;\n return finishProcessingFn(parseError, segment);\n }\n finishProcessingFn(null, segment);\n });\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleSegmentResponse = ({\n segment,\n finishProcessingFn,\n responseType\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const newBytes =\n // although responseText \"should\" exist, this guard serves to prevent an error being\n // thrown for two primary cases:\n // 1. the mime type override stops working, or is not implemented for a specific\n // browser\n // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n segment.stats = getRequestStats(request);\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(newBytes);\n } else {\n segment.bytes = new Uint8Array(newBytes);\n }\n return finishProcessingFn(null, segment);\n};\nconst transmuxAndNotify = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const fmp4Tracks = segment.map && segment.map.tracks || {};\n const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n // One reason for this is that in the case of full segments, we want to trust start\n // times from the probe, rather than the transmuxer.\n\n let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n const finish = () => transmux({\n bytes,\n transmuxer: segment.transmuxer,\n audioAppendStart: segment.audioAppendStart,\n gopsToAlignWith: segment.gopsToAlignWith,\n remux: isMuxed,\n onData: result => {\n result.type = result.type === 'combined' ? 'video' : result.type;\n dataFn(segment, result);\n },\n onTrackInfo: trackInfo => {\n if (trackInfoFn) {\n if (isMuxed) {\n trackInfo.isMuxed = true;\n }\n trackInfoFn(segment, trackInfo);\n }\n },\n onAudioTimingInfo: audioTimingInfo => {\n // we only want the first start value we encounter\n if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n audioStartFn(audioTimingInfo.start);\n audioStartFn = null;\n } // we want to continually update the end time\n\n if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n audioEndFn(audioTimingInfo.end);\n }\n },\n onVideoTimingInfo: videoTimingInfo => {\n // we only want the first start value we encounter\n if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n videoStartFn(videoTimingInfo.start);\n videoStartFn = null;\n } // we want to continually update the end time\n\n if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n videoEndFn(videoTimingInfo.end);\n }\n },\n onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n },\n onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n },\n onId3: (id3Frames, dispatchType) => {\n id3Fn(segment, id3Frames, dispatchType);\n },\n onCaptions: captions => {\n captionsFn(segment, [captions]);\n },\n isEndOfTimeline,\n onEndedTimeline: () => {\n endedTimelineFn();\n },\n onTransmuxerLog,\n onDone: result => {\n if (!doneFn) {\n return;\n }\n result.type = result.type === 'combined' ? 'video' : result.type;\n doneFn(null, segment, result);\n }\n }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n // Meaning cached frame data may corrupt our notion of where this segment\n // really starts. To get around this, probe for the info needed.\n\n workerCallback({\n action: 'probeTs',\n transmuxer: segment.transmuxer,\n data: bytes,\n baseStartTime: segment.baseStartTime,\n callback: data => {\n segment.bytes = bytes = data.data;\n const probeResult = data.result;\n if (probeResult) {\n trackInfoFn(segment, {\n hasAudio: probeResult.hasAudio,\n hasVideo: probeResult.hasVideo,\n isMuxed\n });\n trackInfoFn = null;\n }\n finish();\n }\n });\n};\nconst handleSegmentBytes = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n // We should have a handler that fetches the number of bytes required\n // to check if something is fmp4. This will allow us to save bandwidth\n // because we can only exclude a playlist and abort requests\n // by codec after trackinfo triggers.\n\n if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n segment.isFmp4 = true;\n const {\n tracks\n } = segment.map;\n const trackInfo = {\n isFmp4: true,\n hasVideo: !!tracks.video,\n hasAudio: !!tracks.audio\n }; // if we have a audio track, with a codec that is not set to\n // encrypted audio\n\n if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n trackInfo.audioCodec = tracks.audio.codec;\n } // if we have a video track, with a codec that is not set to\n // encrypted video\n\n if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n trackInfo.videoCodec = tracks.video.codec;\n }\n if (tracks.video && tracks.audio) {\n trackInfo.isMuxed = true;\n } // since we don't support appending fmp4 data on progress, we know we have the full\n // segment here\n\n trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n // time. The end time can be roughly calculated by the receiver using the duration.\n //\n // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n // that is the true start of the segment (where the playback engine should begin\n // decoding).\n\n const finishLoading = (captions, id3Frames) => {\n // if the track still has audio at this point it is only possible\n // for it to be audio only. See `tracks.video && tracks.audio` if statement\n // above.\n // we make sure to use segment.bytes here as that\n dataFn(segment, {\n data: bytesAsUint8Array,\n type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n });\n if (id3Frames && id3Frames.length) {\n id3Fn(segment, id3Frames);\n }\n if (captions && captions.length) {\n captionsFn(segment, captions);\n }\n doneFn(null, segment, {});\n };\n workerCallback({\n action: 'probeMp4StartTime',\n timescales: segment.map.timescales,\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n callback: ({\n data,\n startTime\n }) => {\n // transfer bytes back to us\n bytes = data.buffer;\n segment.bytes = bytesAsUint8Array = data;\n if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n timingInfoFn(segment, 'audio', 'start', startTime);\n }\n if (trackInfo.hasVideo) {\n timingInfoFn(segment, 'video', 'start', startTime);\n }\n workerCallback({\n action: 'probeEmsgID3',\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n offset: startTime,\n callback: ({\n emsgData,\n id3Frames\n }) => {\n // transfer bytes back to us\n bytes = emsgData.buffer;\n segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n // Initialize CaptionParser if it hasn't been yet\n\n if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n finishLoading(undefined, id3Frames);\n return;\n }\n workerCallback({\n action: 'pushMp4Captions',\n endAction: 'mp4Captions',\n transmuxer: segment.transmuxer,\n data: bytesAsUint8Array,\n timescales: segment.map.timescales,\n trackIds: [tracks.video.id],\n callback: message => {\n // transfer bytes back to us\n bytes = message.data.buffer;\n segment.bytes = bytesAsUint8Array = message.data;\n message.logs.forEach(function (log) {\n onTransmuxerLog(merge(log, {\n stream: 'mp4CaptionParser'\n }));\n });\n finishLoading(message.captions, id3Frames);\n }\n });\n }\n });\n }\n });\n return;\n } // VTT or other segments that don't need processing\n\n if (!segment.transmuxer) {\n doneFn(null, segment, {});\n return;\n }\n if (typeof segment.container === 'undefined') {\n segment.container = detectContainerForBytes(bytesAsUint8Array);\n }\n if (segment.container !== 'ts' && segment.container !== 'aac') {\n trackInfoFn(segment, {\n hasAudio: false,\n hasVideo: false\n });\n doneFn(null, segment, {});\n return;\n } // ts or aac\n\n transmuxAndNotify({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n};\nconst decrypt = function ({\n id,\n key,\n encryptedBytes,\n decryptionWorker\n}, callback) {\n const decryptionHandler = event => {\n if (event.data.source === id) {\n decryptionWorker.removeEventListener('message', decryptionHandler);\n const decrypted = event.data.decrypted;\n callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n }\n };\n decryptionWorker.addEventListener('message', decryptionHandler);\n let keyBytes;\n if (key.bytes.slice) {\n keyBytes = key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n } // incrementally decrypt the bytes\n\n decryptionWorker.postMessage(createTransferableMessage({\n source: id,\n encrypted: encryptedBytes,\n key: keyBytes,\n iv: key.iv\n }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nconst decryptSegment = ({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n decrypt({\n id: segment.requestId,\n key: segment.key,\n encryptedBytes: segment.encryptedBytes,\n decryptionWorker\n }, decryptedBytes => {\n segment.bytes = decryptedBytes;\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\nconst waitForCompletion = ({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let count = 0;\n let didError = false;\n return (error, segment) => {\n if (didError) {\n return;\n }\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n count += 1;\n if (count === activeXhrs.length) {\n const segmentFinish = function () {\n if (segment.encryptedBytes) {\n return decryptSegment({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n } // Otherwise, everything is ready just continue\n\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n }; // Keep track of when *all* of the requests have completed\n\n segment.endOfAllRequests = Date.now();\n if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n return decrypt({\n decryptionWorker,\n // add -init to the \"id\" to differentiate between segment\n // and init segment decryption, just in case they happen\n // at the same time at some point in the future.\n id: segment.requestId + '-init',\n encryptedBytes: segment.map.encryptedBytes,\n key: segment.map.key\n }, decryptedBytes => {\n segment.map.bytes = decryptedBytes;\n parseInitSegment(segment, parseError => {\n if (parseError) {\n abortAll(activeXhrs);\n return doneFn(parseError, segment);\n }\n segmentFinish();\n });\n });\n }\n segmentFinish();\n }\n };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nconst handleLoadEnd = ({\n loadendState,\n abortFn\n}) => event => {\n const request = event.target;\n if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n abortFn();\n loadendState.calledAbortFn = true;\n }\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nconst handleProgress = ({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n}) => event => {\n const request = event.target;\n if (request.aborted) {\n return;\n }\n segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n return progressFn(event, segment);\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [transmuxer]: Object,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n * aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n * request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\nconst mediaSegmentRequest = ({\n xhr,\n xhrOptions,\n decryptionWorker,\n segment,\n abortFn,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const activeXhrs = [];\n const finishProcessingFn = waitForCompletion({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n }); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n const objects = [segment.key];\n if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n objects.push(segment.map.key);\n }\n const keyRequestOptions = merge(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n if (segment.map && !segment.map.bytes) {\n const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n if (differentMapKey) {\n const mapKeyRequestOptions = merge(xhrOptions, {\n uri: segment.map.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n activeXhrs.push(mapKeyXhr);\n }\n const initSegmentOptions = merge(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map)\n });\n const initSegmentRequestCallback = handleInitSegmentResponse({\n segment,\n finishProcessingFn\n });\n const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n const segmentRequestOptions = merge(xhrOptions, {\n uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment)\n });\n const segmentRequestCallback = handleSegmentResponse({\n segment,\n finishProcessingFn,\n responseType: segmentRequestOptions.responseType\n });\n const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n }));\n activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n // multiple times, provide a shared state object\n\n const loadendState = {};\n activeXhrs.forEach(activeXhr => {\n activeXhr.addEventListener('loadend', handleLoadEnd({\n loadendState,\n abortFn\n }));\n });\n return () => abortAll(activeXhrs);\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nconst logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nconst getCodecs = function (media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n const mediaAttributes = media.attributes || {};\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n};\nconst isMaat = (main, media) => {\n const mediaAttributes = media.attributes || {};\n return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n if (!isMaat(main, media)) {\n return true;\n }\n const mediaAttributes = media.attributes || {};\n const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n for (const groupId in audioGroup) {\n // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n // or there are listed playlists (the case for DASH, as the manifest will have already\n // provided all of the details necessary to generate the audio playlist, as opposed to\n // HLS' externally requested playlists), then the content is demuxed.\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n return true;\n }\n }\n return false;\n};\nconst unwrapCodecList = function (codecList) {\n const codecs = {};\n codecList.forEach(({\n mediaType,\n type,\n details\n }) => {\n codecs[mediaType] = codecs[mediaType] || [];\n codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n });\n Object.keys(codecs).forEach(function (mediaType) {\n if (codecs[mediaType].length > 1) {\n logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n codecs[mediaType] = null;\n return;\n }\n codecs[mediaType] = codecs[mediaType][0];\n });\n return codecs;\n};\nconst codecCount = function (codecObj) {\n let count = 0;\n if (codecObj.audio) {\n count++;\n }\n if (codecObj.video) {\n count++;\n }\n return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nconst codecsForPlaylist = function (main, media) {\n const mediaAttributes = media.attributes || {};\n const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n if (isMaat(main, media) && !codecInfo.audio) {\n if (!isMuxed(main, media)) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n if (defaultCodecs.audio) {\n codecInfo.audio = defaultCodecs.audio;\n }\n }\n }\n return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n if (!representation || !representation.playlist) {\n return;\n }\n const playlist = representation.playlist;\n return JSON.stringify({\n id: playlist.id,\n bandwidth: representation.bandwidth,\n width: representation.width,\n height: representation.height,\n codecs: playlist.attributes && playlist.attributes.CODECS || ''\n });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nconst safeGetComputedStyle = function (el, property) {\n if (!el) {\n return '';\n }\n const result = window$1.getComputedStyle(el);\n if (!result) {\n return '';\n }\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nconst stableSort = function (array, sortFn) {\n const newArray = array.slice();\n array.sort(function (left, right) {\n const cmp = sortFn(left, right);\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistBandwidth = function (left, right) {\n let leftBandwidth;\n let rightBandwidth;\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistResolution = function (left, right) {\n let leftWidth;\n let rightWidth;\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} main\n * Object representation of the main manifest\n * @param {number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {number} playerWidth\n * Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n * Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @param {Object} playlistController\n * the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nlet simpleSelector = function (main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) {\n // If we end up getting called before `main` is available, exit early\n if (!main) {\n return;\n }\n const options = {\n bandwidth: playerBandwidth,\n width: playerWidth,\n height: playerHeight,\n limitRenditionByPlayerDimensions\n };\n let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n if (Playlist.isAudioOnly(main)) {\n playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n // at the buttom of this function for debugging.\n\n options.audioOnly = true;\n } // convert the playlists to an intermediary representation to make comparisons easier\n\n let sortedPlaylistReps = playlists.map(playlist => {\n let bandwidth;\n const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth,\n width,\n height,\n playlist\n };\n });\n stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n }\n if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n } // filter out playlists without resolution information\n\n const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n let resolutionPlusOneList;\n let resolutionPlusOneSmallest;\n let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n }\n let leastPixelDiffRep; // If this selector proves to be better than others,\n // resolutionPlusOneRep and resolutionBestRep and all\n // the code involving them should be removed.\n\n if (playlistController.leastPixelDiffSelector) {\n // find the variant that is closest to the player's pixel size\n const leastPixelDiffList = haveResolution.map(rep => {\n rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n return rep;\n }); // get the highest bandwidth, closest resolution playlist\n\n stableSort(leastPixelDiffList, (left, right) => {\n // sort by highest bandwidth if pixelDiff is the same\n if (left.pixelDiff === right.pixelDiff) {\n return right.bandwidth - left.bandwidth;\n }\n return left.pixelDiff - right.pixelDiff;\n });\n leastPixelDiffRep = leastPixelDiffList[0];\n } // fallback chain of variants\n\n const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (leastPixelDiffRep) {\n type = 'leastPixelDiffRep';\n } else if (resolutionPlusOneRep) {\n type = 'resolutionPlusOneRep';\n } else if (resolutionBestRep) {\n type = 'resolutionBestRep';\n } else if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n } else if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nconst lastBandwidthSelector = function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nconst movingAverageBandwidthSelector = function (decay) {\n let average = -1;\n let lastSystemBandwidth = -1;\n if (decay < 0 || decay > 1) {\n throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n }\n return function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n if (average < 0) {\n average = this.systemBandwidth;\n lastSystemBandwidth = this.systemBandwidth;\n } // stop the average value from decaying for every 250ms\n // when the systemBandwidth is constant\n // and\n // stop average from setting to a very low value when the\n // systemBandwidth becomes 0 in case of chunk cancellation\n\n if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n average = decay * this.systemBandwidth + (1 - decay) * average;\n lastSystemBandwidth = this.systemBandwidth;\n }\n return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.main\n * Object representation of the main manifest\n * @param {number} settings.currentTime\n * The current time of the player\n * @param {number} settings.bandwidth\n * Current measured bandwidth\n * @param {number} settings.duration\n * Duration of the media\n * @param {number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\nconst minRebufferMaxBandwidthSelector = function (settings) {\n const {\n main,\n currentTime,\n bandwidth,\n duration,\n segmentDuration,\n timeUntilRebuffer,\n currentTimeline,\n syncController\n } = settings; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n }\n const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n const numRequests = syncPoint ? 1 : 2;\n const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist,\n rebufferingImpact\n };\n });\n const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\nconst lowestBitrateCompatibleVariantSelector = function () {\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nconst concatSegments = segmentObj => {\n let offset = 0;\n let tempBuffer;\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(segment => {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n }\n return tempBuffer;\n};\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n if (!inbandTextTracks[captionStream]) {\n tech.trigger({\n type: 'usage',\n name: 'vhs-608'\n });\n let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n if (/^cc708_/.test(captionStream)) {\n instreamId = 'SERVICE' + captionStream.split('_')[1];\n }\n const track = tech.textTracks().getTrackById(instreamId);\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[captionStream] = track;\n } else {\n // This section gets called when we have caption services that aren't specified in the manifest.\n // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let label = captionStream;\n let language = captionStream;\n let def = false;\n const captionService = captionServices[instreamId];\n if (captionService) {\n label = captionService.label;\n language = captionService.language;\n def = captionService.default;\n } // Otherwise, create a track with the default `CC#` label and\n // without a language\n\n inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: instreamId,\n // TODO: investigate why this doesn't seem to turn the caption on by default\n default: def,\n label,\n language\n }, false).track;\n }\n }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {Array} captionArray an array of caption data\n * @private\n */\n\nconst addCaptionData = function ({\n inbandTextTracks,\n captionArray,\n timestampOffset\n}) {\n if (!captionArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n captionArray.forEach(caption => {\n const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n // with positioning data\n\n if (caption.content) {\n caption.content.forEach(value => {\n const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n cue.line = value.line;\n cue.align = 'left';\n cue.position = value.position;\n cue.positionAlign = 'line-left';\n inbandTextTracks[track].addCue(cue);\n });\n } else {\n // otherwise, a text value with combined captions is sent\n inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n }\n });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nconst deprecateOldCue = function (cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get() {\n videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get() {\n videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get() {\n videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} metadataArray an array of meta data\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {number} videoDuration the duration of the video\n * @private\n */\n\nconst addMetadata = ({\n inbandTextTracks,\n metadataArray,\n timestampOffset,\n videoDuration\n}) => {\n if (!metadataArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n metadataArray.forEach(metadata => {\n const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n } // If we have no frames, we can't create a cue.\n\n if (!metadata.frames || !metadata.frames.length) {\n return;\n }\n metadata.frames.forEach(frame => {\n const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n metadataTrack.addCue(cue);\n });\n });\n if (!metadataTrack.cues || !metadataTrack.cues.length) {\n return;\n } // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n const cues = metadataTrack.cues;\n const cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (let i = 0; i < cues.length; i++) {\n if (cues[i]) {\n cuesArray.push(cues[i]);\n }\n } // Group cues by their startTime value\n\n const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n const timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach((startTime, idx) => {\n const cueGroup = cuesGroupedByStartTime[startTime];\n const finiteDuration = isFinite(videoDuration) ? videoDuration : 0;\n const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(cue => {\n cue.endTime = nextTime;\n });\n });\n}; // object for mapping daterange attributes\n\nconst dateRangeAttr = {\n id: 'ID',\n class: 'CLASS',\n startDate: 'START-DATE',\n duration: 'DURATION',\n endDate: 'END-DATE',\n endOnNext: 'END-ON-NEXT',\n plannedDuration: 'PLANNED-DURATION',\n scte35Out: 'SCTE35-OUT',\n scte35In: 'SCTE35-IN'\n};\nconst dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nconst addDateRangeMetadata = ({\n inbandTextTracks,\n dateRanges\n}) => {\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n dateRanges.forEach(dateRange => {\n // we generate multiple cues for each date range with different attributes\n for (const key of Object.keys(dateRange)) {\n if (dateRangeKeysToOmit.has(key)) {\n continue;\n }\n const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n cue.id = dateRange.id;\n cue.type = 'com.apple.quicktime.HLS';\n cue.value = {\n key: dateRangeAttr[key],\n data: dateRange[key]\n };\n if (key === 'scte35Out' || key === 'scte35In') {\n cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n }\n metadataTrack.addCue(cue);\n }\n dateRange.processDateRange();\n });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n if (inbandTextTracks.metadataTrack_) {\n return;\n }\n inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n if (!videojs.browser.IS_ANY_SAFARI) {\n inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nconst removeCuesFromTrack = function (start, end, track) {\n let i;\n let cue;\n if (!track) {\n return;\n }\n if (!track.cues) {\n return;\n }\n i = track.cues.length;\n while (i--) {\n cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n if (cue.startTime >= start && cue.endTime <= end) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nconst removeDuplicateCuesFromTrack = function (track) {\n const cues = track.cues;\n if (!cues) {\n return;\n }\n const uniqueCues = {};\n for (let i = cues.length - 1; i >= 0; i--) {\n const cue = cues[i];\n const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n if (uniqueCues[cueKey]) {\n track.removeCue(cue);\n } else {\n uniqueCues[cueKey] = cue;\n }\n }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\nconst gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n let i;\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\nconst updateGopBuffer = (buffer, gops, replace) => {\n if (!gops.length) {\n return buffer;\n }\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n const start = gops[0].pts;\n let i = 0;\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n const updatedBuffer = buffer.slice();\n let i = buffer.length;\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n let j = i + 1;\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\nconst shallowEqual = function (a, b) {\n // if both are undefined\n // or one or the other is undefined\n // they are not equal\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // they are the same object and thus, equal\n\n if (a === b) {\n return true;\n } // sort keys so we can make sure they have\n // all the same keys later.\n\n const akeys = Object.keys(a).sort();\n const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (let i = 0; i < akeys.length; i++) {\n const key = akeys[i]; // different sorted keys, not equal\n\n if (key !== bkeys[i]) {\n return false;\n } // different values, not equal\n\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nconst QUOTA_EXCEEDED_ERR = 22;\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n segments = segments || [];\n const timelineSegments = [];\n let time = 0;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (currentTimeline === segment.timeline) {\n timelineSegments.push(i);\n time += segment.duration;\n if (time > targetTime) {\n return i;\n }\n }\n }\n if (timelineSegments.length === 0) {\n return 0;\n } // default to the last timeline segment\n\n return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n return null;\n }\n if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n return 'Neither audio nor video found in segment.';\n }\n if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {number} currentTime\n * The current time of the player\n * @param {number} targetDuration\n * The target duration of the current playlist\n * @return {number}\n * Time that is safe to remove from the back buffer without interrupting playback\n */\n\nconst safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n // 30 seconds before the playhead provides a safe default for trimming.\n //\n // Choosing a reasonable default is particularly important for high bitrate content and\n // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n // throw an APPEND_BUFFER_ERR.\n let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n if (seekable.length) {\n // Some live playlists may have a shorter window of content than the full allowed back\n // buffer. For these playlists, don't save content that's no longer within the window.\n trimTime = Math.max(trimTime, seekable.start(0));\n } // Don't remove within target duration of the current time to avoid the possibility of\n // removing the GOP currently being played, as removing it can cause playback stalls.\n\n const maxTrimTime = currentTime - targetDuration;\n return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n const {\n startOfSegment,\n duration,\n segment,\n part,\n playlist: {\n mediaSequence: seq,\n id,\n segments = []\n },\n mediaIndex: index,\n partIndex,\n timeline\n } = segmentInfo;\n const segmentLen = segments.length - 1;\n let selection = 'mediaIndex/partIndex increment';\n if (segmentInfo.getMediaInfoForTime) {\n selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n } else if (segmentInfo.isSyncRequest) {\n selection = 'getSyncSegmentCandidate (isSyncRequest)';\n }\n if (segmentInfo.independent) {\n selection += ` with independent ${segmentInfo.independent}`;\n }\n const hasPartIndex = typeof partIndex === 'number';\n const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n preloadSegment: segment\n }) - 1 : 0;\n return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\nconst getBufferedEndOrFallback = (buffered, fallback) => buffered.length ? buffered.end(buffered.length - 1) : fallback;\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n * The timeline of the segment\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} startOfSegment\n * The estimated segment start\n * @param {TimeRange[]} buffered\n * The loader's buffer\n * @param {boolean} calculateTimestampOffsetForEachSegment\n * Feature flag to always calculate timestampOffset\n * @param {boolean} overrideCheck\n * If true, no checks are made to see if the timestamp offset value should be set,\n * but sets it directly to a value.\n *\n * @return {number|null}\n * Either a number representing a new timestamp offset, or null if the segment is\n * part of the same timeline\n */\n\nconst timestampOffsetForSegment = ({\n segmentTimeline,\n currentTimeline,\n startOfSegment,\n buffered,\n calculateTimestampOffsetForEachSegment,\n overrideCheck\n}) => {\n if (calculateTimestampOffsetForEachSegment) {\n return getBufferedEndOrFallback(buffered, startOfSegment);\n } // Check to see if we are crossing a discontinuity to see if we need to set the\n // timestamp offset on the transmuxer and source buffer.\n //\n // Previously, we changed the timestampOffset if the start of this segment was less than\n // the currently set timestampOffset, but this isn't desirable as it can produce bad\n // behavior, especially around long running live streams.\n\n if (!overrideCheck && segmentTimeline === currentTimeline) {\n return null;\n } // When changing renditions, it's possible to request a segment on an older timeline. For\n // instance, given two renditions with the following:\n //\n // #EXTINF:10\n // segment1\n // #EXT-X-DISCONTINUITY\n // #EXTINF:10\n // segment2\n // #EXTINF:10\n // segment3\n //\n // And the current player state:\n //\n // current time: 8\n // buffer: 0 => 20\n //\n // The next segment on the current rendition would be segment3, filling the buffer from\n // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n // then the next segment to be requested will be segment1 from the new rendition in\n // order to fill time 8 and onwards. Using the buffered end would result in repeated\n // content (since it would position segment1 of the new rendition starting at 20s). This\n // case can be identified when the new segment's timeline is a prior value. Instead of\n // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n // more accurate to the actual start time of the segment.\n\n if (segmentTimeline < currentTimeline) {\n return startOfSegment;\n } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n // value uses the end of the last segment if it is available. While this value\n // should often be correct, it's better to rely on the buffered end, as the new\n // content post discontinuity should line up with the buffered end as if it were\n // time 0 for the new content.\n\n return getBufferedEndOrFallback(buffered, startOfSegment);\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n * The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n * The loader type\n * @param {boolean} audioDisabled\n * Whether the audio is disabled for the loader. This should only be true when the\n * loader may have muxed audio in its segment, but should not append it, e.g., for\n * the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n * Whether the loader should wait for a timeline change from the timeline change\n * controller before processing the segment\n */\n\nconst shouldWaitForTimelineChange = ({\n timelineChangeController,\n currentTimeline,\n segmentTimeline,\n loaderType,\n audioDisabled\n}) => {\n if (currentTimeline === segmentTimeline) {\n return false;\n }\n if (loaderType === 'audio') {\n const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n type: 'main'\n }); // Audio loader should wait if:\n //\n // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n // * main hasn't yet changed to the timeline audio is looking to load\n\n return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n // loader's segments (or the content is audio/video only and handled by the main\n // loader).\n\n if (loaderType === 'main' && audioDisabled) {\n const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n type: 'audio'\n }); // Main loader should wait for the audio loader if audio is not pending a timeline\n // change to the current timeline.\n //\n // Since the main loader is responsible for setting the timestamp offset for both\n // audio and video, the main loader must wait for audio to be about to change to its\n // timeline before setting the offset, otherwise, if audio is behind in loading,\n // segments from the previous timeline would be adjusted by the new timestamp offset.\n //\n // This requirement means that video will not cross a timeline until the audio is\n // about to cross to it, so that way audio and video will always cross the timeline\n // together.\n //\n // In addition to normal timeline changes, these rules also apply to the start of a\n // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n // that these rules apply to the first timeline change because if they did not, it's\n // possible that the main loader will cross two timelines before the audio loader has\n // crossed one. Logic may be implemented to handle the startup as a special case, but\n // it's easier to simply treat all timeline changes the same.\n\n if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n return false;\n }\n return true;\n }\n return false;\n};\nconst mediaDuration = timingInfos => {\n let maxDuration = 0;\n ['video', 'audio'].forEach(function (type) {\n const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n if (!typeTimingInfo) {\n return;\n }\n const {\n start,\n end\n } = typeTimingInfo;\n let duration;\n if (typeof start === 'bigint' || typeof end === 'bigint') {\n duration = window$1.BigInt(end) - window$1.BigInt(start);\n } else if (typeof start === 'number' && typeof end === 'number') {\n duration = end - start;\n }\n if (typeof duration !== 'undefined' && duration > maxDuration) {\n maxDuration = duration;\n }\n }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n // as we only need BigInt when we are above that.\n\n if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n maxDuration = Number(maxDuration);\n }\n return maxDuration;\n};\nconst segmentTooLong = ({\n segmentDuration,\n maxDuration\n}) => {\n // 0 duration segments are most likely due to metadata only segments or a lack of\n // information.\n if (!segmentDuration) {\n return false;\n } // For HLS:\n //\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n // The EXTINF duration of each Media Segment in the Playlist\n // file, when rounded to the nearest integer, MUST be less than or equal\n // to the target duration; longer segments can trigger playback stalls\n // or other errors.\n //\n // For DASH, the mpd-parser uses the largest reported segment duration as the target\n // duration. Although that reported duration is occasionally approximate (i.e., not\n // exact), a strict check may report that a segment is too long more often in DASH.\n\n return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n // Right now we aren't following DASH's timing model exactly, so only perform\n // this check for HLS content.\n if (sourceType !== 'hls') {\n return null;\n }\n const segmentDuration = mediaDuration({\n audioTimingInfo: segmentInfo.audioTimingInfo,\n videoTimingInfo: segmentInfo.videoTimingInfo\n }); // Don't report if we lack information.\n //\n // If the segment has a duration of 0 it is either a lack of information or a\n // metadata only segment and shouldn't be reported here.\n\n if (!segmentDuration) {\n return null;\n }\n const targetDuration = segmentInfo.playlist.targetDuration;\n const isSegmentWayTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration * 2\n });\n const isSegmentSlightlyTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration\n });\n const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n return {\n severity: isSegmentWayTooLong ? 'warn' : 'info',\n message: segmentTooLongMessage\n };\n }\n return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass SegmentLoader extends videojs.EventTarget {\n constructor(settings, options = {}) {\n super(); // check pre-conditions\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n this.bandwidth = settings.bandwidth;\n this.throughput = {\n rate: 0,\n count: 0\n };\n this.roundTrip = NaN;\n this.resetStats_();\n this.mediaIndex = null;\n this.partIndex = null; // private settings\n\n this.hasPlayed_ = settings.hasPlayed;\n this.currentTime_ = settings.currentTime;\n this.seekable_ = settings.seekable;\n this.seeking_ = settings.seeking;\n this.duration_ = settings.duration;\n this.mediaSource_ = settings.mediaSource;\n this.vhs_ = settings.vhs;\n this.loaderType_ = settings.loaderType;\n this.currentMediaInfo_ = void 0;\n this.startingMediaInfo_ = void 0;\n this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n this.goalBufferLength_ = settings.goalBufferLength;\n this.sourceType_ = settings.sourceType;\n this.sourceUpdater_ = settings.sourceUpdater;\n this.inbandTextTracks_ = settings.inbandTextTracks;\n this.state_ = 'INIT';\n this.timelineChangeController_ = settings.timelineChangeController;\n this.shouldSaveSegmentTimingInfo_ = true;\n this.parse708captions_ = settings.parse708captions;\n this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n this.calculateTimestampOffsetForEachSegment_ = settings.calculateTimestampOffsetForEachSegment;\n this.captionServices_ = settings.captionServices;\n this.exactManifestTimings = settings.exactManifestTimings;\n this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n this.checkBufferTimeout_ = null;\n this.error_ = void 0;\n this.currentTimeline_ = -1;\n this.pendingSegment_ = null;\n this.xhrOptions_ = null;\n this.pendingSegments_ = [];\n this.audioDisabled_ = false;\n this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n this.gopBuffer_ = [];\n this.timeMapping_ = 0;\n this.safeAppend_ = false;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.playlistOfLastInitSegment_ = {\n audio: null,\n video: null\n };\n this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n // information yet to start the loading process (e.g., if the audio loader wants to\n // load a segment from the next timeline but the main loader hasn't yet crossed that\n // timeline), then the load call will be added to the queue until it is ready to be\n // processed.\n\n this.loadQueue_ = [];\n this.metadataQueue_ = {\n id3: [],\n caption: []\n };\n this.waitingOnRemove_ = false;\n this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n this.activeInitSegmentId_ = null;\n this.initSegments_ = {}; // HLSe playback\n\n this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n this.keyCache_ = {};\n this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n this.syncController_ = settings.syncController;\n this.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n this.transmuxer_ = this.createTransmuxer_();\n this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n this.mediaSource_.addEventListener('sourceopen', () => {\n if (!this.isEndOfStream_()) {\n this.ended_ = false;\n }\n }); // ...for determining the fetch location\n\n this.fetchAtBuffer_ = false; // For comparing with currentTime when overwriting segments on fastQualityChange_ changes. Use -1 as the inactive flag.\n\n this.replaceSegmentsUntil_ = -1;\n this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n Object.defineProperty(this, 'state', {\n get() {\n return this.state_;\n },\n set(newState) {\n if (newState !== this.state_) {\n this.logger_(`${this.state_} -> ${newState}`);\n this.state_ = newState;\n this.trigger('statechange');\n }\n }\n });\n this.sourceUpdater_.on('ready', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }); // Only the main loader needs to listen for pending timeline changes, as the main\n // loader should wait for audio to be ready to change its timeline so that both main\n // and audio timelines change together. For more details, see the\n // shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'main') {\n this.timelineChangeController_.on('pendingtimelinechange', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n } // The main loader only listens on pending timeline changes, but the audio loader,\n // since its loads follow main, needs to listen on timeline changes. For more details,\n // see the shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'audio') {\n this.timelineChangeController_.on('timelinechange', () => {\n if (this.hasEnoughInfoToLoad_()) {\n this.processLoadQueue_();\n }\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n }\n }\n createTransmuxer_() {\n return segmentTransmuxer.createTransmuxer({\n remux: false,\n alignGopsAtEnd: this.safeAppend_,\n keepOriginalTimestamps: true,\n parse708captions: this.parse708captions_,\n captionServices: this.captionServices_\n });\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n\n resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n this.mediaAppends = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n\n dispose() {\n this.trigger('dispose');\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n if (this.transmuxer_) {\n this.transmuxer_.terminate();\n }\n this.resetStats_();\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n }\n this.off();\n }\n setAudio(enable) {\n this.audioDisabled_ = !enable;\n if (enable) {\n this.appendInitSegment_.audio = true;\n } else {\n // remove current track audio if it gets disabled\n this.sourceUpdater_.removeAudio(0, this.duration_());\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n\n abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n return;\n }\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n\n abort_() {\n if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n this.pendingSegment_ = null;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n this.waitingOnRemove_ = false;\n window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n this.quotaExceededErrorRetryTimeout_ = null;\n }\n checkForAbort_(requestId) {\n // If the state is APPENDING, then aborts will not modify the state, meaning the first\n // callback that happens should reset the state to READY so that loading can continue.\n if (this.state === 'APPENDING' && !this.pendingSegment_) {\n this.state = 'READY';\n return true;\n }\n if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n return true;\n }\n return false;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n\n error(error) {\n if (typeof error !== 'undefined') {\n this.logger_('error occurred:', error);\n this.error_ = error;\n }\n this.pendingSegment_ = null;\n return this.error_;\n }\n endOfStream() {\n this.ended_ = true;\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.gopBuffer_.length = 0;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n const trackInfo = this.getMediaInfo_();\n if (!this.sourceUpdater_ || !trackInfo) {\n return createTimeRanges();\n }\n if (this.loaderType_ === 'main') {\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n return this.sourceUpdater_.buffered();\n }\n if (hasVideo) {\n return this.sourceUpdater_.videoBuffered();\n }\n } // One case that can be ignored for now is audio only with alt audio,\n // as we don't yet have proper support for that.\n\n return this.sourceUpdater_.audioBuffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n tracks: map.tracks,\n timescales: map.timescales\n };\n }\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n\n segmentKey(key, set = false) {\n if (!key) {\n return null;\n }\n const id = segmentKeyId(key);\n let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n const result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n\n load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n // audio data from the muxed content should be removed\n\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n\n playlist(newPlaylist, options = {}) {\n if (!newPlaylist) {\n return;\n }\n const oldPlaylist = this.playlist_;\n const segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n //\n // Use the INIT state to determine if playback has started, as the playlist sync info\n // should be fixed once requests begin (as sync points are generated based on sync\n // info), but not before then.\n\n if (this.state === 'INIT') {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n }; // Setting the date time mapping means mapping the program date time (if available)\n // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n // be updated as the playlist is refreshed before the loader starts loading, the\n // program date time mapping needs to be updated as well.\n //\n // This mapping is only done for the main loader because a program date time should\n // map equivalently between playlists.\n\n if (this.loaderType_ === 'main') {\n this.syncController_.setDateTimeMappingForStart(newPlaylist);\n }\n }\n let oldId = null;\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must reset/resync the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n // to false, resulting in fetching segments at currentTime and causing repeated\n // same-segment requests on playlist change. This erroneously drives up the playback watcher\n // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n // will not change the buffer.\n // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n if (isLLHLS) {\n this.resetLoader();\n } else {\n this.resyncLoader();\n }\n }\n this.currentMediaInfo_ = void 0;\n this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n // new playlist was incremented by 1.\n\n if (this.mediaIndex < 0) {\n this.mediaIndex = null;\n this.partIndex = null;\n } else {\n const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n // unless parts fell off of the playlist for this segment.\n // In that case we need to reset partIndex and resync\n\n if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n const mediaIndex = this.mediaIndex;\n this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n // as the part was dropped from our current playlists segment.\n // The mediaIndex will still be valid so keep that around.\n\n this.mediaIndex = mediaIndex;\n }\n }\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleAppendsDone_` after the segment has been successfully appended\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff;\n if (segmentInfo.mediaIndex < 0) {\n segmentInfo.mediaIndex = null;\n segmentInfo.partIndex = null;\n } else {\n // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n }\n }\n }\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n\n pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n\n paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * Resets the segment loader ended and init properties.\n */\n\n resetLoaderProperties() {\n this.ended_ = false;\n this.activeInitSegmentId_ = null;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n *\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n\n resetEverything(done) {\n this.resetLoaderProperties();\n this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n // we then clamp the value to duration if necessary.\n\n this.remove(0, Infinity, done); // clears fmp4 captions\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n }); // reset the cache in the transmuxer\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n\n resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n\n resyncLoader() {\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.mediaIndex = null;\n this.partIndex = null;\n this.syncPoint_ = null;\n this.isPendingTimestampOffset_ = false;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.abort();\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * @param {boolean} force - force all remove operations to happen\n * operation is complete\n */\n\n remove(start, end, done = () => {}, force = false) {\n // clamp end to duration if we need to remove everything.\n // This is due to a browser bug that causes issues if we remove to Infinity.\n // videojs/videojs-contrib-hls#1225\n if (end === Infinity) {\n end = this.duration_();\n } // skip removes that would throw an error\n // commonly happens during a rendition switch at the start of a video\n // from start 0 to end 0\n\n if (end <= start) {\n this.logger_('skipping remove because end ${end} is <= start ${start}');\n return;\n }\n if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n return;\n } // set it to one to complete this function's removes\n\n let removesRemaining = 1;\n const removeFinished = () => {\n removesRemaining--;\n if (removesRemaining === 0) {\n done();\n }\n };\n if (force || !this.audioDisabled_) {\n removesRemaining++;\n this.sourceUpdater_.removeAudio(start, end, removeFinished);\n } // While it would be better to only remove video if the main loader has video, this\n // should be safe with audio only as removeVideo will call back even if there's no\n // video buffer.\n //\n // In theory we can check to see if there's video before calling the remove, but in\n // the event that we're switching between renditions and from video to audio only\n // (when we add support for that), we may need to clear the video contents despite\n // what the new media will contain.\n\n if (force || this.loaderType_ === 'main') {\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n removesRemaining++;\n this.sourceUpdater_.removeVideo(start, end, removeFinished);\n } // remove any captions and ID3 tags\n\n for (const track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n removeFinished();\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n\n monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n\n monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // TODO since the source buffer maintains a queue, and we shouldn't call this function\n // except when we're ready for the next segment, this check can most likely be removed\n if (this.sourceUpdater_.updating()) {\n return;\n } // see if we need to begin loading immediately\n\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (typeof segmentInfo.timestampOffset === 'number') {\n this.isPendingTimestampOffset_ = false;\n this.timelineChangeController_.pendingTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {number} [mediaIndex] the media index of segment we last appended\n * @param {Object} [playlist] a media playlist object\n * @return {boolean} do we need to call endOfStream on the MediaSource\n */\n\n isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n if (!playlist || !this.mediaSource_) {\n return false;\n }\n const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n }\n /**\n * Determines what request should be made given current segment loader state.\n *\n * @return {Object} a request object that describes the segment/part to load\n */\n\n chooseNextRequest_() {\n const buffered = this.buffered_();\n const bufferedEnd = lastBufferedEnd(buffered) || 0;\n const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n const segments = this.playlist_.segments; // return no segment if:\n // 1. we don't have segments\n // 2. The video has not yet played and we already downloaded a segment\n // 3. we already have enough buffered time\n\n if (!segments.length || preloaded || haveEnoughBuffer) {\n return null;\n }\n this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n const next = {\n partIndex: null,\n mediaIndex: null,\n startOfSegment: null,\n playlist: this.playlist_,\n isSyncRequest: Boolean(!this.syncPoint_)\n };\n if (next.isSyncRequest) {\n next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n } else if (this.mediaIndex !== null) {\n const segment = segments[this.mediaIndex];\n const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n if (segment.parts && segment.parts[partIndex + 1]) {\n next.mediaIndex = this.mediaIndex;\n next.partIndex = partIndex + 1;\n } else {\n next.mediaIndex = this.mediaIndex + 1;\n }\n } else {\n // Find the segment containing the end of the buffer or current time.\n const {\n segmentIndex,\n startTime,\n partIndex\n } = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n });\n next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n next.mediaIndex = segmentIndex;\n next.startOfSegment = startTime;\n next.partIndex = partIndex;\n }\n const nextSegment = segments[next.mediaIndex];\n let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n // the next partIndex is invalid do not choose a next segment.\n\n if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n return null;\n } // if the next segment has parts, and we don't have a partIndex.\n // Set partIndex to 0\n\n if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n next.partIndex = 0;\n nextPart = nextSegment.parts[0];\n } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n // it applies to each segment in each media playlist.\n // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n // that the next part we append is \"independent\" if possible.\n // So we check if the previous part is independent, and request\n // it if it is.\n\n if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n if (next.partIndex === 0) {\n const lastSegment = segments[next.mediaIndex - 1];\n const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n next.mediaIndex -= 1;\n next.partIndex = lastSegment.parts.length - 1;\n next.independent = 'previous segment';\n }\n } else if (nextSegment.parts[next.partIndex - 1].independent) {\n next.partIndex -= 1;\n next.independent = 'previous part';\n }\n }\n const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n // 1. this is the last segment in the playlist\n // 2. end of stream has been called on the media source already\n // 3. the player is not seeking\n\n if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n return null;\n }\n return this.generateSegmentInfo_(next);\n }\n generateSegmentInfo_(options) {\n const {\n independent,\n playlist,\n mediaIndex,\n startOfSegment,\n isSyncRequest,\n partIndex,\n forceTimestampOffset,\n getMediaInfoForTime\n } = options;\n const segment = playlist.segments[mediaIndex];\n const part = typeof partIndex === 'number' && segment.parts[partIndex];\n const segmentInfo = {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: part && part.resolvedUri || segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex,\n partIndex: part ? partIndex : null,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest,\n startOfSegment,\n // the segment's playlist\n playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: part && part.duration || segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment,\n part,\n byteLength: 0,\n transmuxer: this.transmuxer_,\n // type of getMediaInfoForTime that was used to get this segment\n getMediaInfoForTime,\n independent\n };\n const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n segmentTimeline: segment.timeline,\n currentTimeline: this.currentTimeline_,\n startOfSegment,\n buffered: this.buffered_(),\n calculateTimestampOffsetForEachSegment: this.calculateTimestampOffsetForEachSegment_,\n overrideCheck\n });\n const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n if (typeof audioBufferedEnd === 'number') {\n // since the transmuxer is using the actual timing values, but the buffer is\n // adjusted by the timestamp offset, we must adjust the value here\n segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n }\n if (this.sourceUpdater_.videoBuffered().length) {\n segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n // since the transmuxer is using the actual timing values, but the time is\n // adjusted by the timestmap offset, we must adjust the value here\n this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n }\n return segmentInfo;\n } // get the timestampoffset for a segment,\n // added so that vtt segment loader can override and prevent\n // adding timestamp offsets.\n\n timestampOffsetForSegment_(options) {\n return timestampOffsetForSegment(options);\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @private\n */\n\n earlyAbortWhenNeeded_(stats) {\n if (this.vhs_.tech_.paused() ||\n // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout ||\n // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return;\n }\n const currentTime = this.currentTime_();\n const measuredBandwidth = stats.bandwidth;\n const segmentDuration = this.pendingSegment_.duration;\n const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$1) {\n return;\n }\n const switchCandidate = minRebufferMaxBandwidthSelector({\n main: this.vhs_.playlists.main,\n currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n if (!switchCandidate) {\n return;\n }\n const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.trigger('earlyabort');\n }\n handleAbort_(segmentInfo) {\n this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n this.mediaRequestsAborted += 1;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n\n handleProgress_(event, simpleSegment) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n this.trigger('progress');\n }\n handleTrackInfo_(simpleSegment, trackInfo) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n if (this.checkForIllegalMediaSwitch(trackInfo)) {\n return;\n }\n trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n // Guard against cases where we're not getting track info at all until we are\n // certain that all streams will provide it.\n\n if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.startingMediaInfo_ = trackInfo;\n this.currentMediaInfo_ = trackInfo;\n this.logger_('trackinfo update', trackInfo);\n this.trigger('trackinfo');\n } // trackinfo may cause an abort if the trackinfo\n // causes a codec change to an unsupported codec.\n\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // set trackinfo on the pending segment so that\n // it can append.\n\n this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_;\n const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n segmentInfo[timingInfoProperty][timeType] = time;\n this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleCaptions_(simpleSegment, captionData) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // This could only happen with fmp4 segments, but\n // should still not happen in general\n\n if (captionData.length === 0) {\n this.logger_('SegmentLoader received no captions from a caption event');\n return;\n }\n const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n // can be adjusted by the timestamp offset\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n return;\n }\n const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n const captionTracks = {}; // get total start/end and captions for each track/stream\n\n captionData.forEach(caption => {\n // caption.stream is actually a track name...\n // set to the existing values in tracks or default values\n captionTracks[caption.stream] = captionTracks[caption.stream] || {\n // Infinity, as any other value will be less than this\n startTime: Infinity,\n captions: [],\n // 0 as an other value will be more than this\n endTime: 0\n };\n const captionTrack = captionTracks[caption.stream];\n captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n captionTrack.captions.push(caption);\n });\n Object.keys(captionTracks).forEach(trackName => {\n const {\n startTime,\n endTime,\n captions\n } = captionTracks[trackName];\n const inbandTextTracks = this.inbandTextTracks_;\n this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n // We do this because a rendition change that also changes the timescale for captions\n // will result in captions being re-parsed for certain segments. If we add them again\n // without clearing we will have two of the same captions visible.\n\n removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n addCaptionData({\n captionArray: captions,\n inbandTextTracks,\n timestampOffset\n });\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n handleId3_(simpleSegment, id3Frames, dispatchType) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n return;\n }\n this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n }\n processMetadataQueue_() {\n this.metadataQueue_.id3.forEach(fn => fn());\n this.metadataQueue_.caption.forEach(fn => fn());\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n }\n processCallQueue_() {\n const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.callQueue_ = [];\n callQueue.forEach(fun => fun());\n }\n processLoadQueue_() {\n const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.loadQueue_ = [];\n loadQueue.forEach(fun => fun());\n }\n /**\n * Determines whether the loader has enough info to load the next segment.\n *\n * @return {boolean}\n * Whether or not the loader has enough info to load the next segment\n */\n\n hasEnoughInfoToLoad_() {\n // Since primary timing goes by video, only the audio loader potentially needs to wait\n // to load.\n if (this.loaderType_ !== 'audio') {\n return true;\n }\n const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n // enough info to load.\n\n if (!segmentInfo) {\n return false;\n } // The first segment can and should be loaded immediately so that source buffers are\n // created together (before appending). Source buffer creation uses the presence of\n // audio and video data to determine whether to create audio/video source buffers, and\n // uses processed (transmuxed or parsed) media to determine the types required.\n\n if (!this.getCurrentMediaInfo_()) {\n return true;\n }\n if (\n // Technically, instead of waiting to load a segment on timeline changes, a segment\n // can be requested and downloaded and only wait before it is transmuxed or parsed.\n // But in practice, there are a few reasons why it is better to wait until a loader\n // is ready to append that segment before requesting and downloading:\n //\n // 1. Because audio and main loaders cross discontinuities together, if this loader\n // is waiting for the other to catch up, then instead of requesting another\n // segment and using up more bandwidth, by not yet loading, more bandwidth is\n // allotted to the loader currently behind.\n // 2. media-segment-request doesn't have to have logic to consider whether a segment\n // is ready to be processed or not, isolating the queueing behavior to the loader.\n // 3. The audio loader bases some of its segment properties on timing information\n // provided by the main loader, meaning that, if the logic for waiting on\n // processing was in media-segment-request, then it would also need to know how\n // to re-generate the segment information after the main loader caught up.\n shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n }\n getMediaInfo_(segmentInfo = this.pendingSegment_) {\n return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n }\n getPendingSegmentPlaylist() {\n return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n }\n hasEnoughInfoToAppend_() {\n if (!this.sourceUpdater_.ready()) {\n return false;\n } // If content needs to be removed or the loader is waiting on an append reattempt,\n // then no additional content should be appended until the prior append is resolved.\n\n if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n return false;\n }\n const segmentInfo = this.pendingSegment_;\n const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n // we do not have information on this specific\n // segment yet\n\n if (!segmentInfo || !trackInfo) {\n return false;\n }\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && !segmentInfo.videoTimingInfo) {\n return false;\n } // muxed content only relies on video timing information for now.\n\n if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n return false;\n }\n if (shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n handleData_(simpleSegment, result) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // If there's anything in the call queue, then this data came later and should be\n // executed after the calls currently queued.\n\n if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n return;\n }\n const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n // logic may change behavior depending on the state, and changing state too early may\n // inflate our estimates of bandwidth. In the future this should be re-examined to\n // note more granular states.\n // don't process and append data if the mediaSource is closed\n\n if (this.mediaSource_.readyState === 'closed') {\n return;\n } // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n segmentInfo.segment.map = simpleSegment.map;\n } // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n segmentInfo.isFmp4 = simpleSegment.isFmp4;\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n if (segmentInfo.isFmp4) {\n this.trigger('fmp4');\n segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n } else {\n const trackInfo = this.getCurrentMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n let firstVideoFrameTimeForData;\n if (useVideoTimingInfo) {\n firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n } // Segment loader knows more about segment timing than the transmuxer (in certain\n // aspects), so make any changes required for a more accurate start time.\n // Don't set the end time yet, as the segment may not be finished processing.\n\n segmentInfo.timingInfo.start = this.trueSegmentStart_({\n currentStart: segmentInfo.timingInfo.start,\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex,\n currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n useVideoTimingInfo,\n firstVideoFrameTimeForData,\n videoTimingInfo: segmentInfo.videoTimingInfo,\n audioTimingInfo: segmentInfo.audioTimingInfo\n });\n } // Init segments for audio and video only need to be appended in certain cases. Now\n // that data is about to be appended, we can check the final cases to determine\n // whether we should append an init segment.\n\n this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n // as we use the start of the segment to offset the best guess (playlist provided)\n // timestamp offset.\n\n this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n // be appended or not.\n\n if (segmentInfo.isSyncRequest) {\n // first save/update our timing info for this segment.\n // this is what allows us to choose an accurate segment\n // and the main reason we make a sync request.\n this.updateTimingInfoEnd_(segmentInfo);\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n // after taking into account its timing info, do not append it.\n\n if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n this.logger_('sync segment was incorrect, not appending');\n return;\n } // otherwise append it like any other segment as our guess was correct.\n\n this.logger_('sync segment was correct, appending');\n } // Save some state so that in the future anything waiting on first append (and/or\n // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n // we need some notion of whether the timestamp offset or other relevant information\n // has had a chance to be set.\n\n segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n this.processMetadataQueue_();\n this.appendData_(segmentInfo, result);\n }\n updateAppendInitSegmentStatus(segmentInfo, type) {\n // alt audio doesn't manage timestamp offset\n if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n // in the case that we're handling partial data, we don't want to append an init\n // segment for each chunk\n !segmentInfo.changedTimestampOffset) {\n // if the timestamp offset changed, the timeline may have changed, so we have to re-\n // append init segments\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n // make sure we append init segment on playlist changes, in case the media config\n // changed\n this.appendInitSegment_[type] = true;\n }\n }\n getInitSegmentAndUpdateState_({\n type,\n initSegment,\n map,\n playlist\n }) {\n // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n // (Section 3) required to parse the applicable Media Segments. It applies to every\n // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n // or until the end of the playlist.\"\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n if (map) {\n const id = initSegmentId(map);\n if (this.activeInitSegmentId_ === id) {\n // don't need to re-append the init segment if the ID matches\n return null;\n } // a map-specified init segment takes priority over any transmuxed (or otherwise\n // obtained) init segment\n //\n // this also caches the init segment for later use\n\n initSegment = this.initSegmentForMap(map, true).bytes;\n this.activeInitSegmentId_ = id;\n } // We used to always prepend init segments for video, however, that shouldn't be\n // necessary. Instead, we should only append on changes, similar to what we've always\n // done for audio. This is more important (though may not be that important) for\n // frame-by-frame appending for LHLS, simply because of the increased quantity of\n // appends.\n\n if (initSegment && this.appendInitSegment_[type]) {\n // Make sure we track the playlist that we last used for the init segment, so that\n // we can re-append the init segment in the event that we get data from a new\n // playlist. Discontinuities and track changes are handled in other sections.\n this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n // we are appending the muxer init segment\n\n this.activeInitSegmentId_ = null;\n return initSegment;\n }\n return null;\n }\n handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n const audioBuffered = this.sourceUpdater_.audioBuffered();\n const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n // should be cleared out during the buffer removals. However, log in case it helps\n // debug.\n\n if (audioBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n }\n if (videoBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n }\n const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n // Can't remove enough buffer to make room for new segment (or the browser doesn't\n // allow for appends of segments this size). In the future, it may be possible to\n // split up the segment and append in pieces, but for now, error out this playlist\n // in an attempt to switch to a more manageable rendition.\n this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n this.error({\n message: 'Quota exceeded error with append of a single segment of content',\n excludeUntil: Infinity\n });\n this.trigger('error');\n return;\n } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n // that the segment-loader should block on future events until this one is handled, so\n // that it doesn't keep moving onto further segments. Adding the call to the call\n // queue will prevent further appends until waitingOnRemove_ and\n // quotaExceededErrorRetryTimeout_ are cleared.\n //\n // Note that this will only block the current loader. In the case of demuxed content,\n // the other load may keep filling as fast as possible. In practice, this should be\n // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n // source buffer, or video fills without enough room for audio to append (and without\n // the availability of clearing out seconds of back buffer to make room for audio).\n // But it might still be good to handle this case in the future as a TODO.\n\n this.waitingOnRemove_ = true;\n this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n // before retrying.\n\n const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n this.remove(0, timeToRemoveUntil, () => {\n this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n // attempts (since we can't clear less than the minimum)\n\n this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n this.quotaExceededErrorRetryTimeout_ = null;\n this.processCallQueue_();\n }, MIN_BACK_BUFFER * 1000);\n }, true);\n }\n handleAppendError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n // if there's no error, nothing to do\n if (!error) {\n return;\n }\n if (error.code === QUOTA_EXCEEDED_ERR) {\n this.handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }); // A quota exceeded error should be recoverable with a future re-append, so no need\n // to trigger an append error.\n\n return;\n }\n this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n this.error(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`); // If an append errors, we often can't recover.\n // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n //\n // Trigger a special error so that it can be handled separately from normal,\n // recoverable errors.\n\n this.trigger('appenderror');\n }\n appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data,\n bytes\n }) {\n // If this is a re-append, bytes were already created and don't need to be recreated\n if (!bytes) {\n const segments = [data];\n let byteLength = data.byteLength;\n if (initSegment) {\n // if the media initialization segment is changing, append it before the content\n // segment\n segments.unshift(initSegment);\n byteLength += initSegment.byteLength;\n } // Technically we should be OK appending the init segment separately, however, we\n // haven't yet tested that, and prepending is how we have always done things.\n\n bytes = concatSegments({\n bytes: byteLength,\n segments\n });\n }\n this.sourceUpdater_.appendBuffer({\n segmentInfo,\n type,\n bytes\n }, this.handleAppendError_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n }\n handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n const segment = this.pendingSegment_.segment;\n const timingInfoProperty = `${type}TimingInfo`;\n if (!segment[timingInfoProperty]) {\n segment[timingInfoProperty] = {};\n }\n segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n }\n appendData_(segmentInfo, result) {\n const {\n type,\n data\n } = result;\n if (!data || !data.byteLength) {\n return;\n }\n if (type === 'audio' && this.audioDisabled_) {\n return;\n }\n const initSegment = this.getInitSegmentAndUpdateState_({\n type,\n initSegment: result.initSegment,\n playlist: segmentInfo.playlist,\n map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n });\n this.appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data\n });\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n\n loadSegment_(segmentInfo) {\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n if (typeof segmentInfo.timestampOffset === 'number') {\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n });\n }\n }\n if (!this.hasEnoughInfoToLoad_()) {\n this.loadQueue_.push(() => {\n // regenerate the audioAppendStart, timestampOffset, etc as they\n // may have changed since this function was added to the queue.\n const options = _extends({}, segmentInfo, {\n forceTimestampOffset: true\n });\n _extends(segmentInfo, this.generateSegmentInfo_(options));\n this.isPendingTimestampOffset_ = false;\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n });\n return;\n }\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n }\n updateTransmuxerAndRequestSegment_(segmentInfo) {\n // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n // the transmuxer still needs to be updated before then.\n //\n // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n // offset must be passed to the transmuxer for stream correcting adjustments.\n if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n segmentInfo.gopsToAlignWith = [];\n this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: segmentInfo.timestampOffset\n });\n }\n const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n const isWalkingForward = this.mediaIndex !== null;\n const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n // the first timeline\n segmentInfo.timeline > 0;\n const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n this.logger_(`Requesting ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n // then this init segment has never been seen before and should be appended.\n //\n // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n // both to true and leave the decision of whether to append the init segment to append time.\n\n if (simpleSegment.map && !simpleSegment.map.bytes) {\n this.logger_('going to request init segment.');\n this.appendInitSegment_ = {\n video: true,\n audio: true\n };\n }\n segmentInfo.abortRequests = mediaSegmentRequest({\n xhr: this.vhs_.xhr,\n xhrOptions: this.xhrOptions_,\n decryptionWorker: this.decrypter_,\n segment: simpleSegment,\n abortFn: this.handleAbort_.bind(this, segmentInfo),\n progressFn: this.handleProgress_.bind(this),\n trackInfoFn: this.handleTrackInfo_.bind(this),\n timingInfoFn: this.handleTimingInfo_.bind(this),\n videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n captionsFn: this.handleCaptions_.bind(this),\n isEndOfTimeline,\n endedTimelineFn: () => {\n this.logger_('received endedtimeline callback');\n },\n id3Fn: this.handleId3_.bind(this),\n dataFn: this.handleData_.bind(this),\n doneFn: this.segmentRequestFinished_.bind(this),\n onTransmuxerLog: ({\n message,\n level,\n stream\n }) => {\n this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n }\n });\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n\n trimBackBuffer_(segmentInfo) {\n const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @return {Object} a simplified segment object copy\n */\n\n createSimplifiedSegmentObj_(segmentInfo) {\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const simpleSegment = {\n resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n byterange: part ? part.byterange : segment.byterange,\n requestId: segmentInfo.requestId,\n transmuxer: segmentInfo.transmuxer,\n audioAppendStart: segmentInfo.audioAppendStart,\n gopsToAlignWith: segmentInfo.gopsToAlignWith,\n part: segmentInfo.part\n };\n const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n if (previousSegment && previousSegment.timeline === segment.timeline) {\n // The baseStartTime of a segment is used to handle rollover when probing the TS\n // segment to retrieve timing information. Since the probe only looks at the media's\n // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n // seconds of media time, so should be used here. The previous segment is used since\n // the end of the previous segment should represent the beginning of the current\n // segment, so long as they are on the same timeline.\n if (previousSegment.videoTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n } else if (previousSegment.audioTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n }\n }\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n if (segment.map) {\n simpleSegment.map = this.initSegmentForMap(segment.map);\n }\n return simpleSegment;\n }\n saveTransferStats_(stats) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n if (stats) {\n this.mediaBytesTransferred += stats.bytesReceived;\n this.mediaTransferDuration += stats.roundTripTime;\n }\n }\n saveBandwidthRelatedStats_(duration, stats) {\n // byteLength will be used for throughput, and should be based on bytes receieved,\n // which we only know at the end of the request and should reflect total bytes\n // downloaded rather than just bytes processed from components of the segment\n this.pendingSegment_.byteLength = stats.bytesReceived;\n if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n this.bandwidth = stats.bandwidth;\n this.roundTrip = stats.roundTripTime;\n }\n handleTimeout_() {\n // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functinality between segment loaders\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n this.trigger('timeout');\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n // check the call queue directly since this function doesn't need to deal with any\n // data, and can continue even if the source buffers are not set up and we didn't get\n // any data from the segment\n if (this.callQueue_.length) {\n this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n if (!this.pendingSegment_) {\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n return;\n }\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to exclude the current playlist\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n }\n const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n if (result.gopInfo) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n } // Although we may have already started appending on progress, we shouldn't switch the\n // state away from loading until we are officially done loading the segment data.\n\n this.state = 'APPENDING'; // used for testing\n\n this.trigger('appending');\n this.waitForAppendsToComplete_(segmentInfo);\n }\n setTimeMapping_(timeline) {\n const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n if (timelineMapping !== null) {\n this.timeMapping_ = timelineMapping;\n }\n }\n updateMediaSecondsLoaded_(segment) {\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n }\n shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n if (timestampOffset === null) {\n return false;\n } // note that we're potentially using the same timestamp offset for both video and\n // audio\n\n if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n return true;\n }\n if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n return true;\n }\n return false;\n }\n trueSegmentStart_({\n currentStart,\n playlist,\n mediaIndex,\n firstVideoFrameTimeForData,\n currentVideoTimestampOffset,\n useVideoTimingInfo,\n videoTimingInfo,\n audioTimingInfo\n }) {\n if (typeof currentStart !== 'undefined') {\n // if start was set once, keep using it\n return currentStart;\n }\n if (!useVideoTimingInfo) {\n return audioTimingInfo.start;\n }\n const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n // within that segment. Since the transmuxer maintains a cache of incomplete data\n // from and/or the last frame seen, the start time may reflect a frame that starts\n // in the previous segment. Check for that case and ensure the start time is\n // accurate for the segment.\n\n if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n return firstVideoFrameTimeForData;\n }\n return videoTimingInfo.start;\n }\n waitForAppendsToComplete_(segmentInfo) {\n const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n if (!trackInfo) {\n this.error({\n message: 'No starting media returned, likely due to an unsupported media format.',\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return;\n } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n // on each queue this loader is responsible for to ensure that the appends are\n // complete.\n\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n segmentInfo.waitingOnAppends = 0; // segments with no data\n\n if (!segmentInfo.hasAppendedData_) {\n if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n // When there's no audio or video data in the segment, there's no audio or video\n // timing information.\n //\n // If there's no audio or video timing information, then the timestamp offset\n // can't be adjusted to the appropriate value for the transmuxer and source\n // buffers.\n //\n // Therefore, the next segment should be used to set the timestamp offset.\n this.isPendingTimestampOffset_ = true;\n } // override settings for metadata only segments\n\n segmentInfo.timingInfo = {\n start: 0\n };\n segmentInfo.waitingOnAppends++;\n if (!this.isPendingTimestampOffset_) {\n // update the timestampoffset\n this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n // no video/audio data.\n\n this.processMetadataQueue_();\n } // append is \"done\" instantly with no data.\n\n this.checkAppendsDone_(segmentInfo);\n return;\n } // Since source updater could call back synchronously, do the increments first.\n\n if (waitForVideo) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForAudio) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForVideo) {\n this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n if (waitForAudio) {\n this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n }\n checkAppendsDone_(segmentInfo) {\n if (this.checkForAbort_(segmentInfo.requestId)) {\n return;\n }\n segmentInfo.waitingOnAppends--;\n if (segmentInfo.waitingOnAppends === 0) {\n this.handleAppendsDone_();\n }\n }\n checkForIllegalMediaSwitch(trackInfo) {\n const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return true;\n }\n return false;\n }\n updateSourceBufferTimestampOffset_(segmentInfo) {\n if (segmentInfo.timestampOffset === null ||\n // we don't yet have the start for whatever media type (video or audio) has\n // priority, timing-wise, so we must wait\n typeof segmentInfo.timingInfo.start !== 'number' ||\n // already updated the timestamp offset for this segment\n segmentInfo.changedTimestampOffset ||\n // the alt audio loader should not be responsible for setting the timestamp offset\n this.loaderType_ !== 'main') {\n return;\n }\n let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n // the timing info here comes from video. In the event that the audio is longer than\n // the video, this will trim the start of the audio.\n // This also trims any offset from 0 at the beginning of the media\n\n segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n timingInfo: segmentInfo.timingInfo\n }); // In the event that there are part segment downloads, each will try to update the\n // timestamp offset. Retaining this bit of state prevents us from updating in the\n // future (within the same segment), however, there may be a better way to handle it.\n\n segmentInfo.changedTimestampOffset = true;\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (didChange) {\n this.trigger('timestampoffset');\n }\n }\n getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo,\n audioTimingInfo,\n timingInfo\n }) {\n if (!this.useDtsForTimestampOffset_) {\n return timingInfo.start;\n }\n if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n return videoTimingInfo.transmuxedDecodeStart;\n } // handle audio only\n\n if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n return audioTimingInfo.transmuxedDecodeStart;\n } // handle content not transmuxed (e.g., MP4)\n\n return timingInfo.start;\n }\n updateTimingInfoEnd_(segmentInfo) {\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n const trackInfo = this.getMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n if (!prioritizedTimingInfo) {\n return;\n }\n segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n // End time may not exist in a case where we aren't parsing the full segment (one\n // current example is the case of fmp4), so use the rough duration to calculate an\n // end time.\n prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n\n handleAppendsDone_() {\n // appendsdone can cause an abort\n if (this.pendingSegment_) {\n this.trigger('appendsdone');\n }\n if (!this.pendingSegment_) {\n this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n // all appending cases?\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n return;\n }\n const segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n // best to wait until all appends are done so we're sure that the primary media is\n // finished (and we have its end time).\n\n this.updateTimingInfoEnd_(segmentInfo);\n if (this.shouldSaveSegmentTimingInfo_) {\n // Timeline mappings should only be saved for the main loader. This is for multiple\n // reasons:\n //\n // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n // and the main loader try to save the timeline mapping, whichever comes later\n // will overwrite the first. In theory this is OK, as the mappings should be the\n // same, however, it breaks for (2)\n // 2) In the event of a live stream, the initial live point will make for a somewhat\n // arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n // the mapping will be off for one of the streams, dependent on which one was\n // first saved (see (1)).\n // 3) Primary timing goes by video in VHS, so the mapping should be video.\n //\n // Since the audio loader will wait for the main loader to load the first segment,\n // the main loader will save the first timeline mapping, and ensure that there won't\n // be a case where audio loads two segments without saving a mapping (thus leading\n // to missing segment timing info).\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n }\n const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n if (segmentDurationMessage) {\n if (segmentDurationMessage.severity === 'warn') {\n videojs.log.warn(segmentDurationMessage.message);\n } else {\n this.logger_(segmentDurationMessage.message);\n }\n }\n this.recordThroughput_(segmentInfo);\n this.pendingSegment_ = null;\n this.state = 'READY';\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate'); // if the sync request was not appended\n // then it was not the correct segment.\n // throw it away and use the data it gave us\n // to get the correct one.\n\n if (!segmentInfo.hasAppendedData_) {\n this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n return;\n }\n }\n this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n this.addSegmentMetadataCue_(segmentInfo);\n if (this.currentTime_() >= this.replaceSegmentsUntil_) {\n this.replaceSegmentsUntil_ = -1;\n this.fetchAtBuffer_ = true;\n }\n if (this.currentTimeline_ !== segmentInfo.timeline) {\n this.timelineChangeController_.lastTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n }); // If audio is not disabled, the main segment loader is responsible for updating\n // the audio timeline as well. If the content is video only, this won't have any\n // impact.\n\n if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n this.timelineChangeController_.lastTimelineChange({\n type: 'audio',\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n }\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate');\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (badSegmentGuess || badPartGuess) {\n this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n this.resetEverything();\n return;\n }\n const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n this.trigger('progress');\n this.mediaIndex = segmentInfo.mediaIndex;\n this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n this.endOfStream();\n } // used for testing\n\n this.trigger('appended');\n if (segmentInfo.hasAppendedData_) {\n this.mediaAppends++;\n }\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n\n recordThroughput_(segmentInfo) {\n if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n\n addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n const segment = segmentInfo.segment;\n const start = segment.start;\n const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n programDateTime: segment.programDateTime,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.id,\n start,\n end\n };\n const data = JSON.stringify(value);\n const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n /**\n * Public setter for defining the private replaceSegmentsUntil_ property, which\n * determines when we can return fetchAtBuffer to true if overwriting the buffer.\n *\n * @param {number} bufferedEnd the end of the buffered range to replace segments\n * until currentTime reaches this time.\n */\n\n set replaceSegmentsUntil(bufferedEnd) {\n this.logger_(`Replacing currently buffered segments until ${bufferedEnd}`);\n this.replaceSegmentsUntil_ = bufferedEnd;\n }\n}\nfunction noop() {}\nconst toTitleCase = function (string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n for (let i = 0; i < queue.length; i++) {\n const queueEntry = queue[i];\n if (queueEntry.type === 'mediaSource') {\n // If the next entry is a media source entry (uses multiple source buffers), block\n // processing to allow it to go through first.\n return null;\n }\n if (queueEntry.type === type) {\n return i;\n }\n }\n return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n if (sourceUpdater.queue.length === 0) {\n return;\n }\n let queueIndex = 0;\n let queueEntry = sourceUpdater.queue[queueIndex];\n if (queueEntry.type === 'mediaSource') {\n if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n sourceUpdater.queue.shift();\n queueEntry.action(sourceUpdater);\n if (queueEntry.doneFn) {\n queueEntry.doneFn();\n } // Only specific source buffer actions must wait for async updateend events. Media\n // Source actions process synchronously. Therefore, both audio and video source\n // buffers are now clear to process the next queue entries.\n\n shiftQueue('audio', sourceUpdater);\n shiftQueue('video', sourceUpdater);\n } // Media Source actions require both source buffers, so if the media source action\n // couldn't process yet (because one or both source buffers are busy), block other\n // queue actions until both are available and the media source action can process.\n\n return;\n }\n if (type === 'mediaSource') {\n // If the queue was shifted by a media source action (this happens when pushing a\n // media source action onto the queue), then it wasn't from an updateend event from an\n // audio or video source buffer, so there's no change from previous state, and no\n // processing should be done.\n return;\n } // Media source queue entries don't need to consider whether the source updater is\n // started (i.e., source buffers are created) as they don't need the source buffers, but\n // source buffer queue entries do.\n\n if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n return;\n }\n if (queueEntry.type !== type) {\n queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n if (queueIndex === null) {\n // Either there's no queue entry that uses this source buffer type in the queue, or\n // there's a media source queue entry before the next entry of this type, in which\n // case wait for that action to process first.\n return;\n }\n queueEntry = sourceUpdater.queue[queueIndex];\n }\n sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n //\n // The queue pending operation must be set before the action is performed in the event\n // that the action results in a synchronous event that is acted upon. For instance, if\n // an exception is thrown that can be handled, it's possible that new actions will be\n // appended to an empty queue and immediately executed, but would not have the correct\n // pending information if this property was set after the action was performed.\n\n sourceUpdater.queuePending[type] = queueEntry;\n queueEntry.action(type, sourceUpdater);\n if (!queueEntry.doneFn) {\n // synchronous operation, process next entry\n sourceUpdater.queuePending[type] = null;\n shiftQueue(type, sourceUpdater);\n return;\n }\n};\nconst cleanupBuffer = (type, sourceUpdater) => {\n const buffer = sourceUpdater[`${type}Buffer`];\n const titleType = toTitleCase(type);\n if (!buffer) {\n return;\n }\n buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = null;\n sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n try {\n sourceBuffer.appendBuffer(bytes);\n } catch (e) {\n sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n sourceUpdater.queuePending[type] = null;\n onError(e);\n }\n },\n remove: (start, end) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n try {\n sourceBuffer.remove(start, end);\n } catch (e) {\n sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n }\n },\n timestampOffset: offset => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n sourceBuffer.timestampOffset = offset;\n },\n callback: callback => (type, sourceUpdater) => {\n callback();\n },\n endOfStream: error => sourceUpdater => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n try {\n sourceUpdater.mediaSource.endOfStream(error);\n } catch (e) {\n videojs.log.warn('Failed to call media source endOfStream', e);\n }\n },\n duration: duration => sourceUpdater => {\n sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n try {\n sourceUpdater.mediaSource.duration = duration;\n } catch (e) {\n videojs.log.warn('Failed to set media source duration', e);\n }\n },\n abort: () => (type, sourceUpdater) => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n try {\n sourceBuffer.abort();\n } catch (e) {\n videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n }\n },\n addSourceBuffer: (type, codec) => sourceUpdater => {\n const titleType = toTitleCase(type);\n const mime = getMimeForCodec(codec);\n sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = codec;\n sourceUpdater[`${type}Buffer`] = sourceBuffer;\n },\n removeSourceBuffer: type => sourceUpdater => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n try {\n sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n } catch (e) {\n videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n }\n },\n changeType: codec => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n } // do not update codec if we don't need to.\n\n if (sourceUpdater.codecs[type] === codec) {\n return;\n }\n sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`);\n sourceBuffer.changeType(mime);\n sourceUpdater.codecs[type] = codec;\n }\n};\nconst pushQueue = ({\n type,\n sourceUpdater,\n action,\n doneFn,\n name\n}) => {\n sourceUpdater.queue.push({\n type,\n action,\n doneFn,\n name\n });\n shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n const buffered = sourceUpdater[`${type}Buffered`]();\n const bufferedAsString = prettyBuffered(buffered);\n sourceUpdater.logger_(`${type} source buffer update end. Buffered: \\n`, bufferedAsString); // Although there should, in theory, be a pending action for any updateend receieved,\n // there are some actions that may trigger updateend events without set definitions in\n // the w3c spec. For instance, setting the duration on the media source may trigger\n // updateend events on source buffers. This does not appear to be in the spec. As such,\n // if we encounter an updateend without a corresponding pending action from our queue\n // for that source buffer type, process the next action.\n\n if (sourceUpdater.queuePending[type]) {\n const doneFn = sourceUpdater.queuePending[type].doneFn;\n sourceUpdater.queuePending[type] = null;\n if (doneFn) {\n // if there's an error, report it\n doneFn(sourceUpdater[`${type}Error_`]);\n }\n }\n shiftQueue(type, sourceUpdater);\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\nclass SourceUpdater extends videojs.EventTarget {\n constructor(mediaSource) {\n super();\n this.mediaSource = mediaSource;\n this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n this.audioTimestampOffset_ = 0;\n this.videoTimestampOffset_ = 0;\n this.queue = [];\n this.queuePending = {\n audio: null,\n video: null\n };\n this.delayedAudioAppendQueue_ = [];\n this.videoAppendQueued_ = false;\n this.codecs = {};\n this.onVideoUpdateEnd_ = onUpdateend('video', this);\n this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n this.onVideoError_ = e => {\n // used for debugging\n this.videoError_ = e;\n };\n this.onAudioError_ = e => {\n // used for debugging\n this.audioError_ = e;\n };\n this.createdSourceBuffers_ = false;\n this.initializedEme_ = false;\n this.triggeredReady_ = false;\n }\n initializedEme() {\n this.initializedEme_ = true;\n this.triggerReady();\n }\n hasCreatedSourceBuffers() {\n // if false, likely waiting on one of the segment loaders to get enough data to create\n // source buffers\n return this.createdSourceBuffers_;\n }\n hasInitializedAnyEme() {\n return this.initializedEme_;\n }\n ready() {\n return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n }\n createSourceBuffers(codecs) {\n if (this.hasCreatedSourceBuffers()) {\n // already created them before\n return;\n } // the intial addOrChangeSourceBuffers will always be\n // two add buffers.\n\n this.addOrChangeSourceBuffers(codecs);\n this.createdSourceBuffers_ = true;\n this.trigger('createdsourcebuffers');\n this.triggerReady();\n }\n triggerReady() {\n // only allow ready to be triggered once, this prevents the case\n // where:\n // 1. we trigger createdsourcebuffers\n // 2. ie 11 synchronously initializates eme\n // 3. the synchronous initialization causes us to trigger ready\n // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n if (this.ready() && !this.triggeredReady_) {\n this.triggeredReady_ = true;\n this.trigger('ready');\n }\n }\n /**\n * Add a type of source buffer to the media source.\n *\n * @param {string} type\n * The type of source buffer to add.\n *\n * @param {string} codec\n * The codec to add the source buffer with.\n */\n\n addSourceBuffer(type, codec) {\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.addSourceBuffer(type, codec),\n name: 'addSourceBuffer'\n });\n }\n /**\n * call abort on a source buffer.\n *\n * @param {string} type\n * The type of source buffer to call abort on.\n */\n\n abort(type) {\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.abort(type),\n name: 'abort'\n });\n }\n /**\n * Call removeSourceBuffer and remove a specific type\n * of source buffer on the mediaSource.\n *\n * @param {string} type\n * The type of source buffer to remove.\n */\n\n removeSourceBuffer(type) {\n if (!this.canRemoveSourceBuffer()) {\n videojs.log.error('removeSourceBuffer is not supported!');\n return;\n }\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.removeSourceBuffer(type),\n name: 'removeSourceBuffer'\n });\n }\n /**\n * Whether or not the removeSourceBuffer function is supported\n * on the mediaSource.\n *\n * @return {boolean}\n * if removeSourceBuffer can be called.\n */\n\n canRemoveSourceBuffer() {\n // As of Firefox 83 removeSourceBuffer\n // throws errors, so we report that it does not support this.\n return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n static canChangeType() {\n return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n canChangeType() {\n return this.constructor.canChangeType();\n }\n /**\n * Call the changeType function on a source buffer, given the code and type.\n *\n * @param {string} type\n * The type of source buffer to call changeType on.\n *\n * @param {string} codec\n * The codec string to change type with on the source buffer.\n */\n\n changeType(type, codec) {\n if (!this.canChangeType()) {\n videojs.log.error('changeType is not supported!');\n return;\n }\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.changeType(codec),\n name: 'changeType'\n });\n }\n /**\n * Add source buffers with a codec or, if they are already created,\n * call changeType on source buffers using changeType.\n *\n * @param {Object} codecs\n * Codecs to switch to\n */\n\n addOrChangeSourceBuffers(codecs) {\n if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n }\n Object.keys(codecs).forEach(type => {\n const codec = codecs[type];\n if (!this.hasCreatedSourceBuffers()) {\n return this.addSourceBuffer(type, codec);\n }\n if (this.canChangeType()) {\n this.changeType(type, codec);\n }\n });\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {MediaObject} object containing audioBytes and/or videoBytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n\n appendBuffer(options, doneFn) {\n const {\n segmentInfo,\n type,\n bytes\n } = options;\n this.processedAppend_ = true;\n if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n this.delayedAudioAppendQueue_.push([options, doneFn]);\n this.logger_(`delayed audio append of ${bytes.length} until video append`);\n return;\n } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n // not be fired. This means that the queue will be blocked until the next action\n // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n // these errors by calling the doneFn with the specific error.\n\n const onError = doneFn;\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.appendBuffer(bytes, segmentInfo || {\n mediaIndex: -1\n }, onError),\n doneFn,\n name: 'appendBuffer'\n });\n if (type === 'video') {\n this.videoAppendQueued_ = true;\n if (!this.delayedAudioAppendQueue_.length) {\n return;\n }\n const queue = this.delayedAudioAppendQueue_.slice();\n this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n this.delayedAudioAppendQueue_.length = 0;\n queue.forEach(que => {\n this.appendBuffer.apply(this, que);\n });\n }\n }\n /**\n * Get the audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The audio buffer's buffered time range\n */\n\n audioBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n return createTimeRanges();\n }\n return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n }\n /**\n * Get the video buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The video buffer's buffered time range\n */\n\n videoBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n return createTimeRanges();\n }\n return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n }\n /**\n * Get a combined video/audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * the combined time range\n */\n\n buffered() {\n const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n if (audio && !video) {\n return this.audioBuffered();\n }\n if (video && !audio) {\n return this.videoBuffered();\n }\n return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n }\n /**\n * Add a callback to the queue that will set duration on the mediaSource.\n *\n * @param {number} duration\n * The duration to set\n *\n * @param {Function} [doneFn]\n * function to run after duration has been set.\n */\n\n setDuration(duration, doneFn = noop) {\n // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.duration(duration),\n name: 'duration',\n doneFn\n });\n }\n /**\n * Add a mediaSource endOfStream call to the queue\n *\n * @param {Error} [error]\n * Call endOfStream with an error\n *\n * @param {Function} [doneFn]\n * A function that should be called when the\n * endOfStream call has finished.\n */\n\n endOfStream(error = null, doneFn = noop) {\n if (typeof error !== 'string') {\n error = undefined;\n } // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.endOfStream(error),\n name: 'endOfStream',\n doneFn\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeAudio(start, end, done = noop) {\n if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeVideo(start, end, done = noop) {\n if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {boolean} the updating status of the SourceBuffer\n */\n\n updating() {\n // the audio/video source buffer is updating\n if (updating('audio', this) || updating('video', this)) {\n return true;\n }\n return false;\n }\n /**\n * Set/get the timestampoffset on the audio SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n audioTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.audioBuffer &&\n // no point in updating if it's the same\n this.audioTimestampOffset_ !== offset) {\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.audioTimestampOffset_ = offset;\n }\n return this.audioTimestampOffset_;\n }\n /**\n * Set/get the timestampoffset on the video SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n videoTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.videoBuffer &&\n // no point in updating if it's the same\n this.videoTimestampOffset !== offset) {\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.videoTimestampOffset_ = offset;\n }\n return this.videoTimestampOffset_;\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the audio queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n audioQueueCallback(callback) {\n if (!this.audioBuffer) {\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the video queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n videoQueueCallback(callback) {\n if (!this.videoBuffer) {\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n\n dispose() {\n this.trigger('dispose');\n bufferTypes.forEach(type => {\n this.abort(type);\n if (this.canRemoveSourceBuffer()) {\n this.removeSourceBuffer(type);\n } else {\n this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n }\n });\n this.videoAppendQueued_ = false;\n this.delayedAudioAppendQueue_.length = 0;\n if (this.sourceopenListener_) {\n this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n }\n this.off();\n }\n}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n constructor() {\n super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n }\n}\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass VTTSegmentLoader extends SegmentLoader {\n constructor(settings, options = {}) {\n super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n this.mediaSource_ = null;\n this.subtitlesTrack_ = null;\n this.loaderType_ = 'subtitle';\n this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n // the sync controller leads to improper behavior.\n\n this.shouldSaveSegmentTimingInfo_ = false;\n }\n createTransmuxer_() {\n // don't need to transmux any subtitles\n return null;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n return createTimeRanges();\n }\n const cues = this.subtitlesTrack_.cues;\n const start = cues[0].startTime;\n const end = cues[cues.length - 1].startTime;\n return createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n const combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n\n track(track) {\n if (typeof track === 'undefined') {\n return this.subtitlesTrack_;\n }\n this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n */\n\n remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // see if we need to begin loading immediately\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n const checkTimestampOffset = () => {\n this.state = 'READY';\n if (!this.paused()) {\n // if not paused, queue a buffer check as soon as possible\n this.monitorBuffer_();\n }\n };\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n this.loadSegment_(segmentInfo);\n } // never set a timestamp offset for vtt segments.\n\n timestampOffsetForSegment_() {\n return null;\n }\n chooseNextRequest_() {\n return this.skipEmptySegments_(super.chooseNextRequest_());\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n\n skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n // stop at the last possible segmentInfo\n if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n segmentInfo = null;\n break;\n }\n segmentInfo = this.generateSegmentInfo_({\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex + 1,\n startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n isSyncRequest: segmentInfo.isSyncRequest\n });\n }\n return segmentInfo;\n }\n stopForError(error) {\n this.error(error);\n this.state = 'READY';\n this.pause();\n this.trigger('error');\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n if (!this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n this.mediaRequestsAborted += 1;\n return;\n }\n if (error) {\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n }\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n } else {\n this.mediaRequestsErrored += 1;\n }\n this.stopForError(error);\n return;\n }\n const segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functionality between segment loaders\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n this.state = 'APPENDING'; // used for tests\n\n this.trigger('appending');\n const segment = segmentInfo.segment;\n if (segment.map) {\n segment.map.bytes = simpleSegment.map.bytes;\n }\n segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n message: 'Error loading vtt.js'\n }));\n return;\n }\n segment.requested = true;\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.stopForError({\n message: e.message\n });\n return;\n }\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n if (segmentInfo.cues.length) {\n segmentInfo.timingInfo = {\n start: segmentInfo.cues[0].startTime,\n end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n };\n } else {\n segmentInfo.timingInfo = {\n start: segmentInfo.startOfSegment,\n end: segmentInfo.startOfSegment + segmentInfo.duration\n };\n }\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n // the subtitle track\n\n segmentInfo.cues.forEach(cue => {\n this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n // cues to have identical time-intervals, but if the text is also identical\n // we can safely assume it is a duplicate that can be removed (ex. when a cue\n // \"overlaps\" VTT segments)\n\n removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n this.handleAppendsDone_();\n }\n handleData_() {// noop as we shouldn't be getting video/audio data captions\n // that we do not support here.\n }\n updateTimingInfoEnd_() {// noop\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @throws NoVttJsError\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n\n parseVTTCues_(segmentInfo) {\n let decoder;\n let decodeBytesToString = false;\n if (typeof window$1.WebVTT !== 'function') {\n // caller is responsible for exception handling.\n throw new NoVttJsError();\n }\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n parser.ontimestampmap = map => {\n segmentInfo.timestampmap = map;\n };\n parser.onparsingerror = error => {\n videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n if (segmentInfo.segment.map) {\n let mapData = segmentInfo.segment.map.bytes;\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n parser.parse(mapData);\n }\n let segmentData = segmentInfo.bytes;\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n\n updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n const segment = segmentInfo.segment;\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n const timestampmap = segmentInfo.timestampmap;\n const diff = timestampmap.MPEGTS / ONE_SECOND_IN_TS - timestampmap.LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(cue => {\n // First convert cue time to TS time using the timestamp-map provided within the vtt\n cue.startTime += diff;\n cue.endTime += diff;\n });\n if (!playlist.syncInfo) {\n const firstStart = segmentInfo.cues[0].startTime;\n const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n}\n\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n * the track to find the cue for\n *\n * @param {number} mediaTime\n * the time to find the cue at\n *\n * @return {Object|null}\n * the found cue or null\n */\n\nconst findAdCue = function (track, mediaTime) {\n const cues = track.cues;\n for (let i = 0; i < cues.length; i++) {\n const cue = cues[i];\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n if (!media.segments) {\n return;\n }\n let mediaTime = offset;\n let cue;\n for (let i = 0; i < media.segments.length; i++) {\n const segment = media.segments[i];\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n mediaTime += segment.duration;\n }\n};\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (duration !== Infinity) {\n const syncPoint = {\n time: 0,\n segmentIndex: 0,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n return null;\n }\n let syncPoint = null;\n let lastDistance = null;\n const partsAndSegments = getPartsAndSegments(playlist);\n currentTime = currentTime || 0;\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n if (!datetimeMapping || !segment.dateTimeObject) {\n continue;\n }\n const segmentTime = segment.dateTimeObject.getTime() / 1000;\n let start = segmentTime + datetimeMapping; // take part duration into account.\n\n if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n for (let z = 0; z < partAndSegment.partIndex; z++) {\n start += segment.parts[z].duration;\n }\n }\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n return syncPoint;\n }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n let lastDistance = null;\n currentTime = currentTime || 0;\n const partsAndSegments = getPartsAndSegments(playlist);\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n currentTime = currentTime || 0;\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n let lastDistance = null;\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const discontinuitySync = syncController.discontinuities[discontinuity];\n if (discontinuitySync) {\n const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex,\n partIndex: null\n };\n }\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (playlist.syncInfo) {\n const syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}];\nclass SyncController extends videojs.EventTarget {\n constructor(options = {}) {\n super(); // ...for synching across variants\n\n this.timelines = [];\n this.discontinuities = [];\n this.timelineToDatetimeMappings = {};\n this.logger_ = logger('SyncController');\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Object}\n * A sync-point object\n */\n\n getSyncPoint(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime);\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @return {number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n\n getExpiredTime(playlist, duration) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n const syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n return Math.abs(syncPoint.time + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: syncPoint.segmentIndex,\n endIndex: 0\n }));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Array}\n * A list of sync-point objects\n */\n\n runStrategies_(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (let i = 0; i < syncPointStrategies.length; i++) {\n const strategy = syncPointStrategies[i];\n const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime);\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint\n });\n }\n }\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {string} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {number} target.value\n * The value to target for the specified key.\n * @return {Object}\n * The sync-point nearest the target\n */\n\n selectSyncPoint_(syncPoints, target) {\n let bestSyncPoint = syncPoints[0].syncPoint;\n let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n let bestStrategy = syncPoints[0].strategy;\n for (let i = 1; i < syncPoints.length; i++) {\n const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[i].syncPoint;\n bestStrategy = syncPoints[i].strategy;\n }\n }\n this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n\n saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n return;\n } // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n const lastRemovedSegment = oldPlaylist.segments[i];\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + i,\n time: lastRemovedSegment.start\n };\n this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n * before segments start to load.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n\n setDateTimeMappingForStart(playlist) {\n // It's possible for the playlist to be updated before playback starts, meaning time\n // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n // crossed, then the old time zero mapping (for the prior timeline) would be retained\n // unless the mappings are cleared.\n this.timelineToDatetimeMappings = {};\n if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n const firstSegment = playlist.segments[0];\n const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n }\n }\n /**\n * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n * based on the latest timing information.\n *\n * @param {Object} options\n * Options object\n * @param {SegmentInfo} options.segmentInfo\n * The current active request information\n * @param {boolean} options.shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved for timeline mapping and program date time mappings.\n */\n\n saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping\n }) {\n const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n const segment = segmentInfo.segment;\n if (didCalculateSegmentTimeMapping) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!segmentInfo.playlist.syncInfo) {\n segmentInfo.playlist.syncInfo = {\n mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n const dateTime = segment.dateTimeObject;\n if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n }\n }\n timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].time;\n }\n mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {Object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @param {boolean} shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved in timelines.\n * @return {boolean}\n * Returns false if segment time mapping could not be calculated\n */\n\n calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n // TODO: remove side effects\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n let mappingObj = this.timelines[segmentInfo.timeline];\n let start;\n let end;\n if (typeof segmentInfo.timestampOffset === 'number') {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n if (shouldSaveTimelineMapping) {\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n }\n start = segmentInfo.startOfSegment;\n end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n start = timingInfo.start + mappingObj.mapping;\n end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n if (part) {\n part.start = start;\n part.end = end;\n } // If we don't have a segment start yet or the start value we got\n // is less than our current segment.start value, save a new start value.\n // We have to do this because parts will have segment timing info saved\n // multiple times and we want segment start to be the earliest part start\n // value for that segment.\n\n if (!segment.start || start < segment.start) {\n segment.start = start;\n }\n segment.end = end;\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n saveDiscontinuitySyncInfo_(segmentInfo) {\n const playlist = segmentInfo.playlist;\n const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n const accuracy = Math.abs(mediaIndexDiff);\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n let time;\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex,\n endIndex: segmentIndex\n });\n } else {\n time = segment.end + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex + 1,\n endIndex: segmentIndex\n });\n }\n this.discontinuities[discontinuity] = {\n time,\n accuracy\n };\n }\n }\n }\n }\n dispose() {\n this.trigger('dispose');\n this.off();\n }\n}\n\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\nclass TimelineChangeController extends videojs.EventTarget {\n constructor() {\n super();\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n }\n clearPendingTimelineChange(type) {\n this.pendingTimelineChanges_[type] = null;\n this.trigger('pendingtimelinechange');\n }\n pendingTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.pendingTimelineChanges_[type] = {\n type,\n from,\n to\n };\n this.trigger('pendingtimelinechange');\n }\n return this.pendingTimelineChanges_[type];\n }\n lastTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.lastTimelineChanges_[type] = {\n type,\n from,\n to\n };\n delete this.pendingTimelineChanges_[type];\n this.trigger('timelinechange');\n }\n return this.lastTimelineChanges_[type];\n }\n dispose() {\n this.trigger('dispose');\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n this.off();\n }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst workerCode = transform(getWorkerString(function () {\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n var Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n }();\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n *\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */\n\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n const precompute = function () {\n const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n const encTable = tables[0];\n const decTable = tables[1];\n const sbox = encTable[4];\n const sboxInv = decTable[4];\n let i;\n let x;\n let xInv;\n const d = [];\n const th = [];\n let x2;\n let x4;\n let x8;\n let s;\n let tEnc;\n let tDec; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n return tables;\n };\n let aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n class AES {\n constructor(key) {\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n let i;\n let j;\n let tmp;\n const sbox = this._tables[0][4];\n const decTable = this._tables[1];\n const keyLen = key.length;\n let rcon = 1;\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n const encKey = key.slice(0);\n const decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {number} encrypted0 the first word to decrypt\n * @param {number} encrypted1 the second word to decrypt\n * @param {number} encrypted2 the third word to decrypt\n * @param {number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n let a = encrypted0 ^ key[0];\n let b = encrypted3 ^ key[1];\n let c = encrypted2 ^ key[2];\n let d = encrypted1 ^ key[3];\n let a2;\n let b2;\n let c2; // key.length === 2 ?\n\n const nInnerRounds = key.length / 4 - 2;\n let i;\n let kIndex = 4;\n const table = this._tables[1]; // load up the tables\n\n const table0 = table[0];\n const table1 = table[1];\n const table2 = table[2];\n const table3 = table[3];\n const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n }\n }\n /**\n * @file async-stream.js\n */\n\n /**\n * A wrapper around the Stream class to use setTimeout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n class AsyncStream extends Stream {\n constructor() {\n super(Stream);\n this.jobs = [];\n this.delay = 1;\n this.timeout_ = null;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n processJob_() {\n this.jobs.shift()();\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n }\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n push(job) {\n this.jobs.push(job);\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n }\n }\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n const ntoh = function (word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n const decrypt = function (encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n const decrypted = new Uint8Array(encrypted.byteLength);\n const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n let init0;\n let init1;\n let init2;\n let init3;\n let encrypted0;\n let encrypted1;\n let encrypted2;\n let encrypted3; // iteration variable\n\n let wordIx; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n class Decrypter {\n constructor(encrypted, key, initVector, done) {\n const step = Decrypter.STEP;\n const encrypted32 = new Int32Array(encrypted.buffer);\n const decrypted = new Uint8Array(encrypted.byteLength);\n let i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {number} the value of step 32000\n */\n\n static get STEP() {\n // 4 * 8000;\n return 32000;\n }\n /**\n * @private\n */\n\n decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n const bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n }\n }\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n };\n var BigInt = window_1.BigInt || Number;\n [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n (function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n })();\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n const createTransferableMessage = function (message) {\n const transferable = {};\n Object.keys(message).forEach(key => {\n const value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /* global self */\n\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n */\n\n self.onmessage = function (event) {\n const data = event.data;\n const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n}));\n\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nconst audioTrackKind_ = properties => {\n let kind = properties.default ? 'main' : 'alternative';\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n segmentLoader.abort();\n segmentLoader.pause();\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\nconst startLoaders = (playlistLoader, mediaType) => {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\nconst onGroupChanged = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup || activeGroup.isMainPlaylist) {\n // there is no group active or active group is a main playlist and won't change\n return;\n }\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n return;\n } // Non-destructive resync\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n mediaType.lastGroup_ = null;\n segmentLoader.abort();\n segmentLoader.pause();\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\nconst onTrackChanged = (type, settings) => () => {\n const {\n mainPlaylistLoader,\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n if (activeGroup.isMainPlaylist) {\n // track did not change, do nothing\n if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n return;\n }\n const pc = settings.vhs.playlistController_;\n const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n if (pc.media() === newPlaylist) {\n return;\n }\n mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n mainPlaylistLoader.pause();\n mainSegmentLoader.resetEverything();\n pc.fastQualityChange_(newPlaylist);\n return;\n }\n if (type === 'AUDIO') {\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no\n // playlist loader for the audio group), we want to do a destructive reset of the\n // main segment loader and not restart the audio loaders\n mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n // it should be stopped\n\n mainSegmentLoader.resetEverything();\n return;\n } // although the segment loader is an audio segment loader, call the setAudio\n // function to ensure it is prepared to re-append the init segment (or handle other\n // config changes)\n\n segmentLoader.setAudio(true);\n mainSegmentLoader.setAudio(false);\n }\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is excluded) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n },\n excludePlaylist\n } = settings; // switch back to default audio track\n\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.activeGroup();\n const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n const defaultTrack = mediaType.tracks[id];\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is exclude the current\n // rendition and hope another will switch audio groups\n excludePlaylist({\n error: {\n message: 'Problem encountered loading the default audio track.'\n }\n });\n return;\n }\n videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n for (const trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n mediaType.onTrackChanged();\n },\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n const track = mediaType.activeTrack();\n if (track) {\n track.mode = 'disabled';\n }\n mediaType.onTrackChanged();\n }\n};\nconst setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: (type, playlistLoader, settings) => {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: (type, playlistLoader, settings) => {\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nconst initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': (type, settings) => {\n const {\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks,\n logger_\n }\n },\n mainPlaylistLoader\n } = settings;\n const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n default: {\n default: true\n }\n }\n };\n if (audioOnlyMain) {\n mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n }\n }\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (audioOnlyMain) {\n logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n properties.isMainPlaylist = true;\n playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n // use the resolved media playlist object\n } else if (sourceType === 'vhs-json' && properties.playlists) {\n playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n } else if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n // should we even have properties.playlists in this check.\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = new videojs.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n default: properties.default,\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': (type, settings) => {\n const {\n tech,\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n },\n mainPlaylistLoader\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n } else if (sourceType === 'dash') {\n const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n if (!playlists.length) {\n return;\n }\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else if (sourceType === 'vhs-json') {\n playlistLoader = new PlaylistLoader(\n // if the vhs-json object included the media playlist, use the media playlist\n // as provided, otherwise use the resolved URI to load the playlist\n properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n default: properties.default && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': (type, settings) => {\n const {\n tech,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n }\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n continue;\n }\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let newProps = {\n label: variantLabel,\n language: properties.language,\n instreamId: properties.instreamId,\n default: properties.default && properties.autoselect\n };\n if (captionServices[newProps.instreamId]) {\n newProps = merge(newProps, captionServices[newProps.instreamId]);\n }\n if (newProps.default === undefined) {\n delete newProps.default;\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n groups[groupId].push(merge({\n id: variantLabel\n }, properties));\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: newProps.instreamId,\n kind: 'captions',\n default: newProps.default,\n language: newProps.language,\n label: newProps.label\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\nconst groupMatch = (list, media) => {\n for (let i = 0; i < list.length; i++) {\n if (playlistMatch(media, list[i])) {\n return true;\n }\n if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nconst activeGroup = (type, settings) => track => {\n const {\n mainPlaylistLoader,\n mediaTypes: {\n [type]: {\n groups\n }\n }\n } = settings;\n const media = mainPlaylistLoader.media();\n if (!media) {\n return null;\n }\n let variants = null; // set to variants to main media active group\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n const groupKeys = Object.keys(groups);\n if (!variants) {\n // find the mainPlaylistLoader media\n // that is in a media group if we are dealing\n // with audio only\n if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n for (let i = 0; i < groupKeys.length; i++) {\n const groupPropertyList = groups[groupKeys[i]];\n if (groupMatch(groupPropertyList, media)) {\n variants = groupPropertyList;\n break;\n }\n } // use the main group if it exists\n } else if (groups.main) {\n variants = groups.main; // only one group, use that one\n } else if (groupKeys.length === 1) {\n variants = groups[groupKeys[0]];\n }\n }\n if (typeof track === 'undefined') {\n return variants;\n }\n if (track === null || !variants) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n return null;\n },\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n return tracks[id];\n }\n }\n return null;\n }\n};\nconst getActiveGroup = (type, {\n mediaTypes\n}) => () => {\n const activeTrack_ = mediaTypes[type].activeTrack();\n if (!activeTrack_) {\n return null;\n }\n return mediaTypes[type].activeGroup(activeTrack_);\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n * PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n * VHS SourceHandler\n * @param {Object} settings.main\n * The parsed main manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n * Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nconst setupMediaGroups = settings => {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n initialize[type](type, settings);\n });\n const {\n mediaTypes,\n mainPlaylistLoader,\n tech,\n vhs,\n segmentLoaders: {\n ['AUDIO']: audioSegmentLoader,\n main: mainSegmentLoader\n }\n } = settings; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n const audioGroup = mediaTypes.AUDIO.activeGroup();\n if (audioGroup) {\n const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onGroupChanged();\n mediaTypes.AUDIO.onTrackChanged();\n const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n // track is changed, but needs to be handled here since the track may not be considered\n // changed on the first call to onTrackChanged\n\n if (!activeAudioGroup.playlistLoader) {\n // either audio is muxed with video or the stream is audio only\n mainSegmentLoader.setAudio(true);\n } else {\n // audio is demuxed\n mainSegmentLoader.setAudio(false);\n audioSegmentLoader.setAudio(true);\n }\n }\n mainPlaylistLoader.on('mediachange', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n });\n mainPlaylistLoader.on('mediachanging', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n }); // custom audio track change event handler for usage event\n\n const onAudioTrackChanged = () => {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'vhs-audio-change'\n });\n };\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n vhs.on('dispose', () => {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n for (const id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nconst createMediaTypes = () => {\n const mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n getActiveGroup: noop,\n onGroupChanged: noop,\n onTrackChanged: noop,\n lastTrack_: null,\n logger_: logger(`MediaGroups[${type}]`)\n };\n });\n return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n */\n\nclass SteeringManifest {\n constructor() {\n this.priority_ = [];\n }\n set version(number) {\n // Only version 1 is currently supported for both DASH and HLS.\n if (number === 1) {\n this.version_ = number;\n }\n }\n set ttl(seconds) {\n // TTL = time-to-live, default = 300 seconds.\n this.ttl_ = seconds || 300;\n }\n set reloadUri(uri) {\n if (uri) {\n // reload URI can be relative to the previous reloadUri.\n this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n }\n }\n set priority(array) {\n // priority must be non-empty and unique values.\n if (array && array.length) {\n this.priority_ = array;\n }\n }\n get version() {\n return this.version_;\n }\n get ttl() {\n return this.ttl_;\n }\n get reloadUri() {\n return this.reloadUri_;\n }\n get priority() {\n return this.priority_;\n }\n}\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\n\nclass ContentSteeringController extends videojs.EventTarget {\n constructor(xhr, bandwidth) {\n super();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.logger_ = logger('Content Steering');\n this.xhr_ = xhr;\n this.getBandwidth_ = bandwidth;\n }\n /**\n * Assigns the content steering tag properties to the steering controller\n *\n * @param {string} baseUrl the baseURL from the manifest for resolving the steering manifest url\n * @param {Object} steeringTag the content steering tag from the main manifest\n */\n\n assignTagProperties(baseUrl, steeringTag) {\n this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n if (!steeringUri) {\n this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n this.trigger('error');\n return;\n } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n if (steeringUri.startsWith('data:')) {\n this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n return;\n } // With DASH queryBeforeStart, we want to use the steeringUri as soon as possible for the request.\n\n this.steeringManifest.reloadUri = this.queryBeforeStart ? steeringUri : resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on tags.\n\n this.queryBeforeStart = steeringTag.queryBeforeStart || false;\n this.proxyServerUrl_ = steeringTag.proxyServerURL || null; // trigger a steering event if we have a pathway from the content steering tag.\n // this tells VHS which segment pathway to start with.\n // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n if (this.defaultPathway && !this.queryBeforeStart) {\n this.trigger('content-steering');\n }\n if (this.queryBeforeStart) {\n this.requestSteeringManifest(this.steeringManifest.reloadUri);\n }\n }\n /**\n * Requests the content steering manifest and parse the response. This should only be called after\n * assignTagProperties was called with a content steering tag.\n *\n * @param {string} initialUri The optional uri to make the request with.\n * If set, the request should be made with exactly what is passed in this variable.\n * This scenario is specific to DASH when the queryBeforeStart parameter is true.\n * This scenario should only happen once on initalization.\n */\n\n requestSteeringManifest(initialUri) {\n const reloadUri = this.steeringManifest.reloadUri;\n if (!initialUri && !reloadUri) {\n return;\n } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n // This request URI accounts for manifest URIs that have been excluded.\n\n const uri = initialUri || this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n if (!uri) {\n this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n this.trigger('error');\n this.dispose();\n return;\n }\n this.request_ = this.xhr_({\n uri\n }, (error, errorInfo) => {\n if (error) {\n // If the client receives HTTP 410 Gone in response to a manifest request,\n // it MUST NOT issue another request for that URI for the remainder of the\n // playback session. It MAY continue to use the most-recently obtained set\n // of Pathways.\n if (errorInfo.status === 410) {\n this.logger_(`manifest request 410 ${error}.`);\n this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n this.excludedSteeringManifestURLs.add(uri);\n return;\n } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n // header in response to a manifest request, it SHOULD wait until the time\n // specified by the Retry-After header to reissue the request.\n\n if (errorInfo.status === 429) {\n const retrySeconds = errorInfo.responseHeaders['retry-after'];\n this.logger_(`manifest request 429 ${error}.`);\n this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n this.startTTLTimeout_(parseInt(retrySeconds, 10));\n return;\n } // If the Steering Manifest cannot be loaded and parsed correctly, the\n // client SHOULD continue to use the previous values and attempt to reload\n // it after waiting for the previously-specified TTL (or 5 minutes if\n // none).\n\n this.logger_(`manifest failed to load ${error}.`);\n this.startTTLTimeout_();\n return;\n }\n const steeringManifestJson = JSON.parse(this.request_.responseText);\n this.startTTLTimeout_();\n this.assignSteeringProperties_(steeringManifestJson);\n });\n }\n /**\n * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n *\n * @param {string} steeringUrl the steering manifest url\n * @return the steering manifest url to a proxy server with all parameters set\n */\n\n setProxyServerUrl_(steeringUrl) {\n const steeringUrlObject = new window$1.URL(steeringUrl);\n const proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n return this.setSteeringParams_(proxyServerUrlObject.toString());\n }\n /**\n * Decodes and parses the data uri encoded steering manifest\n *\n * @param {string} dataUri the data uri to be decoded and parsed.\n */\n\n decodeDataUriManifest_(dataUri) {\n const steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n this.assignSteeringProperties_(steeringManifestJson);\n }\n /**\n * Set the HLS or DASH content steering manifest request query parameters. For example:\n * _HLS_pathway=\"\" and _HLS_throughput=\n * _DASH_pathway and _DASH_throughput\n *\n * @param {string} uri to add content steering server parameters to.\n * @return a new uri as a string with the added steering query parameters.\n */\n\n setSteeringParams_(url) {\n const urlObject = new window$1.URL(url);\n const path = this.getPathway();\n const networkThroughput = this.getBandwidth_();\n if (path) {\n const pathwayKey = `_${this.manifestType_}_pathway`;\n urlObject.searchParams.set(pathwayKey, path);\n }\n if (networkThroughput) {\n const throughputKey = `_${this.manifestType_}_throughput`;\n urlObject.searchParams.set(throughputKey, networkThroughput);\n }\n return urlObject.toString();\n }\n /**\n * Assigns the current steering manifest properties and to the SteeringManifest object\n *\n * @param {Object} steeringJson the raw JSON steering manifest\n */\n\n assignSteeringProperties_(steeringJson) {\n this.steeringManifest.version = steeringJson.VERSION;\n if (!this.steeringManifest.version) {\n this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n this.trigger('error');\n return;\n }\n this.steeringManifest.ttl = steeringJson.TTL;\n this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // TODO: HLS handle PATHWAY-CLONES. See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n // 1. apply first pathway from the array.\n // 2. if first pathway doesn't exist in manifest, try next pathway.\n // a. if all pathways are exhausted, ignore the steering manifest priority.\n // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n // the excluded pathway will be ignored.\n // See excludePathway usage in excludePlaylist().\n // If there are no available pathways, we need to stop content steering.\n\n if (!this.availablePathways_.size) {\n this.logger_('There are no available pathways for content steering. Ending content steering.');\n this.trigger('error');\n this.dispose();\n }\n const chooseNextPathway = pathwaysByPriority => {\n for (const path of pathwaysByPriority) {\n if (this.availablePathways_.has(path)) {\n return path;\n }\n } // If no pathway matches, ignore the manifest and choose the first available.\n\n return [...this.availablePathways_][0];\n };\n const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n if (this.currentPathway !== nextPathway) {\n this.currentPathway = nextPathway;\n this.trigger('content-steering');\n }\n }\n /**\n * Returns the pathway to use for steering decisions\n *\n * @return {string} returns the current pathway or the default\n */\n\n getPathway() {\n return this.currentPathway || this.defaultPathway;\n }\n /**\n * Chooses the manifest request URI based on proxy URIs and server URLs.\n * Also accounts for exclusion on certain manifest URIs.\n *\n * @param {string} reloadUri the base uri before parameters\n *\n * @return {string} the final URI for the request to the manifest server.\n */\n\n getRequestURI(reloadUri) {\n if (!reloadUri) {\n return null;\n }\n const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n if (this.proxyServerUrl_) {\n const proxyURI = this.setProxyServerUrl_(reloadUri);\n if (!isExcluded(proxyURI)) {\n return proxyURI;\n }\n }\n const steeringURI = this.setSteeringParams_(reloadUri);\n if (!isExcluded(steeringURI)) {\n return steeringURI;\n } // Return nothing if all valid manifest URIs are excluded.\n\n return null;\n }\n /**\n * Start the timeout for re-requesting the steering manifest at the TTL interval.\n *\n * @param {number} ttl time in seconds of the timeout. Defaults to the\n * ttl interval in the steering manifest\n */\n\n startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n // 300 (5 minutes) is the default value.\n const ttlMS = ttl * 1000;\n this.ttlTimeout_ = window$1.setTimeout(() => {\n this.requestSteeringManifest();\n }, ttlMS);\n }\n /**\n * Clear the TTL timeout if necessary.\n */\n\n clearTTLTimeout_() {\n window$1.clearTimeout(this.ttlTimeout_);\n this.ttlTimeout_ = null;\n }\n /**\n * aborts any current steering xhr and sets the current request object to null\n */\n\n abort() {\n if (this.request_) {\n this.request_.abort();\n }\n this.request_ = null;\n }\n /**\n * aborts steering requests clears the ttl timeout and resets all properties.\n */\n\n dispose() {\n this.off('content-steering');\n this.off('error');\n this.abort();\n this.clearTTLTimeout_();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n }\n /**\n * adds a pathway to the available pathways set\n *\n * @param {string} pathway the pathway string to add\n */\n\n addAvailablePathway(pathway) {\n if (pathway) {\n this.availablePathways_.add(pathway);\n }\n }\n /**\n * clears all pathways from the available pathways set\n */\n\n clearAvailablePathways() {\n this.availablePathways_.clear();\n }\n excludePathway(pathway) {\n return this.availablePathways_.delete(pathway);\n }\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n currentPlaylist,\n buffered,\n currentTime,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration,\n bufferBasedABR,\n log\n}) {\n // we have no other playlist to switch to\n if (!nextPlaylist) {\n videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n return false;\n }\n const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n if (!currentPlaylist) {\n log(`${sharedLogLine} as current playlist is not set`);\n return true;\n } // no need to switch if playlist is the same\n\n if (nextPlaylist.id === currentPlaylist.id) {\n return false;\n } // determine if current time is in a buffered range.\n\n const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n if (!currentPlaylist.endList) {\n // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n // doubles the time to first playback.\n if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n return false;\n }\n log(`${sharedLogLine} as current playlist is live`);\n return true;\n }\n const forwardBuffer = timeAheadOf(buffered, currentTime);\n const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n\n if (duration < maxBufferLowWaterLine) {\n log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n return true;\n }\n const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n // we can switch down\n\n if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n if (bufferBasedABR) {\n logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n }\n log(logLine);\n return true;\n } // and if our buffer is higher than the low water line,\n // we can switch up\n\n if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n if (bufferBasedABR) {\n logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n }\n log(logLine);\n return true;\n }\n log(`not ${sharedLogLine} as no switching criteria met`);\n return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\n\nclass PlaylistController extends videojs.EventTarget {\n constructor(options) {\n super();\n const {\n src,\n withCredentials,\n tech,\n bandwidth,\n externVhs,\n useCueTags,\n playlistExclusionDuration,\n enableLowInitialPlaylist,\n sourceType,\n cacheEncryptionKeys,\n bufferBasedABR,\n leastPixelDiffSelector,\n captionServices\n } = options;\n if (!src) {\n throw new Error('A non-empty playlist URL or JSON manifest string is required');\n }\n let {\n maxPlaylistRetries\n } = options;\n if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n maxPlaylistRetries = Infinity;\n }\n Vhs$1 = externVhs;\n this.bufferBasedABR = Boolean(bufferBasedABR);\n this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n this.withCredentials = withCredentials;\n this.tech_ = tech;\n this.vhs_ = tech.vhs;\n this.sourceType_ = sourceType;\n this.useCueTags_ = useCueTags;\n this.playlistExclusionDuration = playlistExclusionDuration;\n this.maxPlaylistRetries = maxPlaylistRetries;\n this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n if (this.useCueTags_) {\n this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n this.requestOptions_ = {\n withCredentials,\n maxPlaylistRetries,\n timeout: null\n };\n this.on('error', this.pauseLoading);\n this.mediaTypes_ = createMediaTypes();\n this.mediaSource = new window$1.MediaSource();\n this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n // everything, and the MediaSource should not be detached without a proper disposal\n\n this.seekable_ = createTimeRanges();\n this.hasPlayed_ = false;\n this.syncController_ = new SyncController(options);\n this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n this.decrypter_ = new Decrypter();\n this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n this.inbandTextTracks_ = {};\n this.timelineChangeController_ = new TimelineChangeController();\n const segmentLoaderSettings = {\n vhs: this.vhs_,\n parse708captions: options.parse708captions,\n useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n calculateTimestampOffsetForEachSegment: options.calculateTimestampOffsetForEachSegment,\n captionServices,\n mediaSource: this.mediaSource,\n currentTime: this.tech_.currentTime.bind(this.tech_),\n seekable: () => this.seekable(),\n seeking: () => this.tech_.seeking(),\n duration: () => this.duration(),\n hasPlayed: () => this.hasPlayed_,\n goalBufferLength: () => this.goalBufferLength(),\n bandwidth,\n syncController: this.syncController_,\n decrypter: this.decrypter_,\n sourceType: this.sourceType_,\n inbandTextTracks: this.inbandTextTracks_,\n cacheEncryptionKeys,\n sourceUpdater: this.sourceUpdater_,\n timelineChangeController: this.timelineChangeController_,\n exactManifestTimings: options.exactManifestTimings,\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n }; // The source type check not only determines whether a special DASH playlist loader\n // should be used, but also covers the case where the provided src is a vhs-json\n // manifest object (instead of a URL). In the case of vhs-json, the default\n // PlaylistLoader should be used.\n\n this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n }));\n this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n segmentMetadataTrack: this.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'vtt',\n featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n loadVttJs: () => new Promise((resolve, reject) => {\n function onLoad() {\n tech.off('vttjserror', onError);\n resolve();\n }\n function onError() {\n tech.off('vttjsloaded', onLoad);\n reject();\n }\n tech.one('vttjsloaded', onLoad);\n tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n tech.addWebVttScript_();\n })\n }), options);\n const getBandwidth = () => {\n return this.mainSegmentLoader_.bandwidth;\n };\n this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n this.setupSegmentLoaderListeners_();\n if (this.bufferBasedABR) {\n this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n this.tech_.on('pause', () => this.stopABRTimer_());\n this.tech_.on('play', () => this.startABRTimer_());\n } // Create SegmentLoader stat-getters\n // mediaRequests_\n // mediaRequestsAborted_\n // mediaRequestsTimedout_\n // mediaRequestsErrored_\n // mediaTransferDuration_\n // mediaBytesTransferred_\n // mediaAppends_\n\n loaderStats.forEach(stat => {\n this[stat + '_'] = sumLoaderStat.bind(this, stat);\n });\n this.logger_ = logger('pc');\n this.triggeredFmp4Usage = false;\n if (this.tech_.preload() === 'none') {\n this.loadOnPlay_ = () => {\n this.loadOnPlay_ = null;\n this.mainPlaylistLoader_.load();\n };\n this.tech_.one('play', this.loadOnPlay_);\n } else {\n this.mainPlaylistLoader_.load();\n }\n this.timeToLoadedData__ = -1;\n this.mainAppendsToLoadedData__ = -1;\n this.audioAppendsToLoadedData__ = -1;\n const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n this.tech_.one(event, () => {\n const timeToLoadedDataStart = Date.now();\n this.tech_.one('loadeddata', () => {\n this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n });\n });\n }\n mainAppendsToLoadedData_() {\n return this.mainAppendsToLoadedData__;\n }\n audioAppendsToLoadedData_() {\n return this.audioAppendsToLoadedData__;\n }\n appendsToLoadedData_() {\n const main = this.mainAppendsToLoadedData_();\n const audio = this.audioAppendsToLoadedData_();\n if (main === -1 || audio === -1) {\n return -1;\n }\n return main + audio;\n }\n timeToLoadedData_() {\n return this.timeToLoadedData__;\n }\n /**\n * Run selectPlaylist and switch to the new playlist if we should\n *\n * @param {string} [reason=abr] a reason for why the ABR check is made\n * @private\n */\n\n checkABR_(reason = 'abr') {\n const nextPlaylist = this.selectPlaylist();\n if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n this.switchMedia_(nextPlaylist, reason);\n }\n }\n switchMedia_(playlist, cause, delay) {\n const oldMedia = this.media();\n const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n const newId = playlist.id || playlist.uri;\n if (oldId && oldId !== newId) {\n this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-rendition-change-${cause}`\n });\n }\n this.mainPlaylistLoader_.media(playlist, delay);\n }\n /**\n * A function that ensures we switch our playlists inside of `mediaTypes`\n * to match the current `serviceLocation` provided by the contentSteering controller.\n * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n *\n * This should only be called on a DASH playback scenario while using content steering.\n * This is necessary due to differences in how media in HLS manifests are generally tied to\n * a video playlist, where in DASH that is not always the case.\n */\n\n switchMediaForDASHContentSteering_() {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n const mediaType = this.mediaTypes_[type];\n const activeGroup = mediaType ? mediaType.activeGroup() : null;\n const pathway = this.contentSteeringController_.getPathway();\n if (activeGroup && pathway) {\n // activeGroup can be an array or a single group\n const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n if (dashMediaPlaylists.length) {\n this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n }\n }\n });\n }\n /**\n * Start a timer that periodically calls checkABR_\n *\n * @private\n */\n\n startABRTimer_() {\n this.stopABRTimer_();\n this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n }\n /**\n * Stop the timer that periodically calls checkABR_\n *\n * @private\n */\n\n stopABRTimer_() {\n // if we're scrubbing, we don't need to pause.\n // This getter will be added to Video.js in version 7.11.\n if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n return;\n }\n window$1.clearInterval(this.abrTimer_);\n this.abrTimer_ = null;\n }\n /**\n * Get a list of playlists for the currently selected audio playlist\n *\n * @return {Array} the array of audio playlists\n */\n\n getAudioTrackPlaylists_() {\n const main = this.main();\n const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n // assume that the audio tracks are contained in main\n // playlist array, use that or an empty array.\n\n if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n return defaultPlaylists;\n }\n const AUDIO = main.mediaGroups.AUDIO;\n const groupKeys = Object.keys(AUDIO);\n let track; // get the current active track\n\n if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n } else {\n // default group is `main` or just the first group.\n const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n for (const label in defaultGroup) {\n if (defaultGroup[label].default) {\n track = {\n label\n };\n break;\n }\n }\n } // no active track no playlists.\n\n if (!track) {\n return defaultPlaylists;\n }\n const playlists = []; // get all of the playlists that are possible for the\n // active track.\n\n for (const group in AUDIO) {\n if (AUDIO[group][track.label]) {\n const properties = AUDIO[group][track.label];\n if (properties.playlists && properties.playlists.length) {\n playlists.push.apply(playlists, properties.playlists);\n } else if (properties.uri) {\n playlists.push(properties);\n } else if (main.playlists.length) {\n // if an audio group does not have a uri\n // see if we have main playlists that use it as a group.\n // if we do then add those to the playlists list.\n for (let i = 0; i < main.playlists.length; i++) {\n const playlist = main.playlists[i];\n if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n playlists.push(playlist);\n }\n }\n }\n }\n }\n if (!playlists.length) {\n return defaultPlaylists;\n }\n return playlists;\n }\n /**\n * Register event handlers on the main playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n\n setupMainPlaylistLoaderListeners_() {\n this.mainPlaylistLoader_.on('loadedmetadata', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n if (media.endList && this.tech_.preload() !== 'none') {\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n }\n setupMediaGroups({\n sourceType: this.sourceType_,\n segmentLoaders: {\n AUDIO: this.audioSegmentLoader_,\n SUBTITLES: this.subtitleSegmentLoader_,\n main: this.mainSegmentLoader_\n },\n tech: this.tech_,\n requestOptions: this.requestOptions_,\n mainPlaylistLoader: this.mainPlaylistLoader_,\n vhs: this.vhs_,\n main: this.main(),\n mediaTypes: this.mediaTypes_,\n excludePlaylist: this.excludePlaylist.bind(this)\n });\n this.triggerPresenceUsage_(this.main(), media);\n this.setupFirstPlay();\n if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n this.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n this.trigger('selectedinitialmedia');\n });\n }\n });\n this.mainPlaylistLoader_.on('loadedplaylist', () => {\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n let updatedPlaylist = this.mainPlaylistLoader_.media();\n if (!updatedPlaylist) {\n this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n\n this.excludeUnsupportedVariants_();\n let selectedMedia;\n if (this.enableLowInitialPlaylist) {\n selectedMedia = this.selectInitialPlaylist();\n }\n if (!selectedMedia) {\n selectedMedia = this.selectPlaylist();\n }\n if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n return;\n }\n this.initialMedia_ = selectedMedia;\n this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n // fire again since the playlist will be requested. In the case of vhs-json\n // (where the manifest object is provided as the source), when the media\n // playlist's `segments` list is already available, a media playlist won't be\n // requested, and loadedplaylist won't fire again, so the playlist handler must be\n // called on its own here.\n\n const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n if (!haveJsonSource) {\n return;\n }\n updatedPlaylist = this.initialMedia_;\n }\n this.handleUpdatedMediaPlaylist(updatedPlaylist);\n });\n this.mainPlaylistLoader_.on('error', () => {\n const error = this.mainPlaylistLoader_.error;\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainPlaylistLoader_.on('mediachanging', () => {\n this.mainSegmentLoader_.abort();\n this.mainSegmentLoader_.pause();\n });\n this.mainPlaylistLoader_.on('mediachange', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n }\n this.mainPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n this.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.mainPlaylistLoader_.on('playlistunchanged', () => {\n const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n // excluded for not-changing. We likely just have a really slowly updating\n // playlist.\n\n if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n return;\n }\n const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // exclude it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n this.excludePlaylist({\n error: {\n message: 'Playlist no longer updating.',\n reason: 'playlist-unchanged'\n }\n }); // useful for monitoring QoS\n\n this.tech_.trigger('playliststuck');\n }\n });\n this.mainPlaylistLoader_.on('renditiondisabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-disabled'\n });\n });\n this.mainPlaylistLoader_.on('renditionenabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-enabled'\n });\n });\n }\n /**\n * Given an updated media playlist (whether it was loaded for the first time, or\n * refreshed for live playlists), update any relevant properties and state to reflect\n * changes in the media that should be accounted for (e.g., cues and duration).\n *\n * @param {Object} updatedPlaylist the updated media playlist object\n *\n * @private\n */\n\n handleUpdatedMediaPlaylist(updatedPlaylist) {\n if (this.useCueTags_) {\n this.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n if (!this.tech_.paused()) {\n this.mainSegmentLoader_.load();\n if (this.audioSegmentLoader_) {\n this.audioSegmentLoader_.load();\n }\n }\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n\n triggerPresenceUsage_(main, media) {\n const mediaGroups = main.mediaGroups || {};\n let defaultDemuxed = true;\n const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n for (const mediaGroup in mediaGroups.AUDIO) {\n for (const label in mediaGroups.AUDIO[mediaGroup]) {\n const properties = mediaGroups.AUDIO[mediaGroup][label];\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-demuxed'\n });\n }\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-webvtt'\n });\n }\n if (Vhs$1.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-aes'\n });\n }\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-alternate-audio'\n });\n }\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-playlist-cue-tags'\n });\n }\n }\n shouldSwitchToMedia_(nextPlaylist) {\n const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n const currentTime = this.tech_.currentTime();\n const bufferLowWaterLine = this.bufferLowWaterLine();\n const bufferHighWaterLine = this.bufferHighWaterLine();\n const buffered = this.tech_.buffered();\n return shouldSwitchToMedia({\n buffered,\n currentTime,\n currentPlaylist,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration: this.duration(),\n bufferBasedABR: this.bufferBasedABR,\n log: this.logger_\n });\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n\n setupSegmentLoaderListeners_() {\n this.mainSegmentLoader_.on('bandwidthupdate', () => {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n this.checkABR_('bandwidthupdate');\n this.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('timeout', () => {\n if (this.bufferBasedABR) {\n // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n // Here the only consideration is that for buffer based ABR there's no guarantee\n // of an immediate switch (since the bandwidth is averaged with a timeout\n // bandwidth value of 1), so force a load on the segment loader to keep it going.\n this.mainSegmentLoader_.load();\n }\n }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n // based ABR.\n\n if (!this.bufferBasedABR) {\n this.mainSegmentLoader_.on('progress', () => {\n this.trigger('progress');\n });\n }\n this.mainSegmentLoader_.on('error', () => {\n const error = this.mainSegmentLoader_.error();\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainSegmentLoader_.on('appenderror', () => {\n this.error = this.mainSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.audioSegmentLoader_.on('appenderror', () => {\n this.error = this.audioSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('ended', () => {\n this.logger_('main segment loader ended');\n this.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', event => {\n // never try to early abort with the new ABR algorithm\n if (this.bufferBasedABR) {\n return;\n }\n this.delegateLoaders_('all', ['abort']);\n this.excludePlaylist({\n error: {\n message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n },\n playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n });\n });\n const updateCodecs = () => {\n if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return this.tryToCreateSourceBuffers_();\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n };\n this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n this.mainSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('ended', () => {\n this.logger_('audioSegmentLoader ended');\n this.onEndOfStream();\n });\n }\n mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n\n load() {\n this.mainSegmentLoader_.load();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This will reset the main segment loader\n * and the next segment position to the currentTime.\n * This is good for manual quality changes.\n *\n * @private\n */\n\n fastQualityChange_(media = this.selectPlaylist()) {\n if (media === this.mainPlaylistLoader_.media()) {\n this.logger_('skipping fastQualityChange because new media is same as old');\n return;\n }\n this.switchMedia_(media, 'fast-quality'); // Reset main segment loader properties and next segment position information.\n // Don't need to reset audio as it is reset when media changes.\n // We resetLoaderProperties separately here as we want to fetch init segments if\n // necessary and ensure we're not in an ended state when we switch playlists.\n\n this.resetMainLoaderReplaceSegments();\n }\n /**\n * Sets the replaceUntil flag on the main segment soader to the buffered end\n * and resets the main segment loaders properties.\n */\n\n resetMainLoaderReplaceSegments() {\n const buffered = this.tech_.buffered();\n const bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer\n // on the main loader to remain, false after the resetLoader call, until we have\n // replaced all content buffered ahead of the currentTime.\n\n this.mainSegmentLoader_.replaceSegmentsUntil = bufferedEnd;\n this.mainSegmentLoader_.resetLoaderProperties();\n this.mainSegmentLoader_.resetLoader();\n }\n /**\n * Begin playback.\n */\n\n play() {\n if (this.setupFirstPlay()) {\n return;\n }\n if (this.tech_.ended()) {\n this.tech_.setCurrentTime(0);\n }\n if (this.hasPlayed_) {\n this.load();\n }\n const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable.start(0)) {\n return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n\n setupFirstPlay() {\n const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_) {\n return false;\n } // when the video is a live stream and/or has a start time\n\n if (!media.endList || media.start) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // without a seekable range, the player cannot seek to begin buffering at the\n // live or start point\n return false;\n }\n const seekableEnd = seekable.end(0);\n let startPoint = seekableEnd;\n if (media.start) {\n const offset = media.start.timeOffset;\n if (offset < 0) {\n startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n } else {\n startPoint = Math.min(seekableEnd, offset);\n }\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n this.trigger('firstplay'); // seek to the live point\n\n this.tech_.setCurrentTime(startPoint);\n }\n this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n\n handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n if (this.tech_.autoplay()) {\n const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, e => {});\n }\n }\n this.trigger('sourceopen');\n }\n /**\n * handle the sourceended event on the MediaSource\n *\n * @private\n */\n\n handleSourceEnded_() {\n if (!this.inbandTextTracks_.metadataTrack_) {\n return;\n }\n const cues = this.inbandTextTracks_.metadataTrack_.cues;\n if (!cues || !cues.length) {\n return;\n }\n const duration = this.duration();\n cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n }\n /**\n * handle the durationchange event on the MediaSource\n *\n * @private\n */\n\n handleDurationChange_() {\n this.tech_.trigger('durationchange');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n\n onEndOfStream() {\n let isEndOfStream = this.mainSegmentLoader_.ended_;\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n if (!isEndOfStream) {\n return;\n }\n this.stopABRTimer_();\n this.sourceUpdater_.endOfStream();\n }\n /**\n * Check if a playlist has stopped being updated\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n\n stuckAtPlaylistEnd_(playlist) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Exclude a playlist for a set amount of time, making it unavailable for selection by\n * the rendition selection algorithm, then force a new playlist (rendition) selection.\n *\n * @param {Object=} playlistToExclude\n * the playlist to exclude, defaults to the currently selected playlist\n * @param {Object=} error\n * an optional error\n * @param {number=} playlistExclusionDuration\n * an optional number of seconds to exclude the playlist\n */\n\n excludePlaylist({\n playlistToExclude = this.mainPlaylistLoader_.media(),\n error = {},\n playlistExclusionDuration\n }) {\n // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // excluded instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the main OR while we were disposing of the tech\n\n if (!playlistToExclude) {\n this.error = error;\n if (this.mediaSource.readyState !== 'open') {\n this.trigger('error');\n } else {\n this.sourceUpdater_.endOfStream('network');\n }\n return;\n }\n playlistToExclude.playlistErrors_++;\n const playlists = this.mainPlaylistLoader_.main.playlists;\n const enabledPlaylists = playlists.filter(isEnabled);\n const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n // forever\n\n if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n return this.mainPlaylistLoader_.load(isFinalRendition);\n }\n if (isFinalRendition) {\n // If we're content steering, try other pathways.\n if (this.main().contentSteering) {\n const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n this.contentSteeringController_.excludePathway(pathway);\n this.excludeThenChangePathway_();\n setTimeout(() => {\n this.contentSteeringController_.addAvailablePathway(pathway);\n }, reIncludeDelay);\n return;\n } // Since we're on the final non-excluded playlist, and we're about to exclude\n // it, instead of erring the player or retrying this playlist, clear out the current\n // exclusion list. This allows other playlists to be attempted in case any have been\n // fixed.\n\n let reincluded = false;\n playlists.forEach(playlist => {\n // skip current playlist which is about to be excluded\n if (playlist === playlistToExclude) {\n return;\n }\n const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n reincluded = true;\n delete playlist.excludeUntil;\n }\n });\n if (reincluded) {\n videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n }\n } // Exclude this playlist\n\n let excludeUntil;\n if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n excludeUntil = Infinity;\n } else {\n excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n }\n playlistToExclude.excludeUntil = excludeUntil;\n if (error.reason) {\n playlistToExclude.lastExcludeReason_ = error.reason;\n }\n this.tech_.trigger('excludeplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-excluded'\n }); // TODO: only load a new playlist if we're excluding the current playlist\n // If this function was called with a playlist that's not the current active playlist\n // (e.g., media().id !== playlistToExclude.id),\n // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n const nextPlaylist = this.selectPlaylist();\n if (!nextPlaylist) {\n this.error = 'Playback cannot continue. No available working or supported playlists.';\n this.trigger('error');\n return;\n }\n const logFn = error.internal ? this.logger_ : videojs.log.warn;\n const errorMessage = error.message ? ' ' + error.message : '';\n logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n this.delegateLoaders_('audio', ['abort', 'pause']);\n } // if subtitle group changed reset subtitle loaders\n\n if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n this.delegateLoaders_('subtitle', ['abort', 'pause']);\n }\n this.delegateLoaders_('main', ['abort', 'pause']);\n const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n }\n /**\n * Pause all segment/playlist loaders\n */\n\n pauseLoading() {\n this.delegateLoaders_('all', ['abort', 'pause']);\n this.stopABRTimer_();\n }\n /**\n * Call a set of functions in order on playlist loaders, segment loaders,\n * or both types of loaders.\n *\n * @param {string} filter\n * Filter loaders that should call fnNames using a string. Can be:\n * * all - run on all loaders\n * * audio - run on all audio loaders\n * * subtitle - run on all subtitle loaders\n * * main - run on the main loaders\n *\n * @param {Array|string} fnNames\n * A string or array of function names to call.\n */\n\n delegateLoaders_(filter, fnNames) {\n const loaders = [];\n const dontFilterPlaylist = filter === 'all';\n if (dontFilterPlaylist || filter === 'main') {\n loaders.push(this.mainPlaylistLoader_);\n }\n const mediaTypes = [];\n if (dontFilterPlaylist || filter === 'audio') {\n mediaTypes.push('AUDIO');\n }\n if (dontFilterPlaylist || filter === 'subtitle') {\n mediaTypes.push('CLOSED-CAPTIONS');\n mediaTypes.push('SUBTITLES');\n }\n mediaTypes.forEach(mediaType => {\n const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n if (loader) {\n loaders.push(loader);\n }\n });\n ['main', 'audio', 'subtitle'].forEach(name => {\n const loader = this[`${name}SegmentLoader_`];\n if (loader && (filter === name || filter === 'all')) {\n loaders.push(loader);\n }\n });\n loaders.forEach(loader => fnNames.forEach(fnName => {\n if (typeof loader[fnName] === 'function') {\n loader[fnName]();\n }\n }));\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n\n setCurrentTime(currentTime) {\n const buffered = findRange(this.tech_.buffered(), currentTime);\n if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n if (!this.mainPlaylistLoader_.media().segments) {\n return 0;\n } // if the seek location is already buffered, continue buffering as usual\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n this.mainSegmentLoader_.resetEverything();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.resetEverything();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.resetEverything();\n } // start segment loader loading in case they are paused\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n\n duration() {\n if (!this.mainPlaylistLoader_) {\n return 0;\n }\n const media = this.mainPlaylistLoader_.media();\n if (!media) {\n // no playlists loaded yet, so can't determine a duration\n return 0;\n } // Don't rely on the media source for duration in the case of a live playlist since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, just return Infinity.\n\n if (!media.endList) {\n return Infinity;\n } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n // available). If it's not available, fall back to a playlist-calculated estimate.\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n return Vhs$1.Playlist.duration(media);\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n\n seekable() {\n return this.seekable_;\n }\n onSyncInfoUpdate_() {\n let audioSeekable; // TODO check for creation of both source buffers before updating seekable\n //\n // A fix was made to this function where a check for\n // this.sourceUpdater_.hasCreatedSourceBuffers\n // was added to ensure that both source buffers were created before seekable was\n // updated. However, it originally had a bug where it was checking for a true and\n // returning early instead of checking for false. Setting it to check for false to\n // return early though created other issues. A call to play() would check for seekable\n // end without verifying that a seekable range was present. In addition, even checking\n // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n // due to a media update calling load on the segment loaders, skipping a seek to live,\n // thereby starting live streams at the beginning of the stream rather than at the end.\n //\n // This conditional should be fixed to wait for the creation of two source buffers at\n // the same time as the other sections of code are fixed to properly seek to live and\n // not throw an error due to checking for a seekable end when no seekable range exists.\n //\n // For now, fall back to the older behavior, with the understanding that the seekable\n // range may not be completely correct, leading to a suboptimal initial live point.\n\n if (!this.mainPlaylistLoader_) {\n return;\n }\n let media = this.mainPlaylistLoader_.media();\n if (!media) {\n return;\n }\n let expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n const main = this.mainPlaylistLoader_.main;\n const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (mainSeekable.length === 0) {\n return;\n }\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n return;\n }\n audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (audioSeekable.length === 0) {\n return;\n }\n }\n let oldEnd;\n let oldStart;\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n\n updateDuration(isLive) {\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n this.updateDuration_ = null;\n }\n if (this.mediaSource.readyState !== 'open') {\n this.updateDuration_ = this.updateDuration.bind(this, isLive);\n this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n return;\n }\n if (isLive) {\n const seekable = this.seekable();\n if (!seekable.length) {\n return;\n } // Even in the case of a live playlist, the native MediaSource's duration should not\n // be set to Infinity (even though this would be expected for a live playlist), since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, the duration should be greater than or\n // equal to the last possible seekable value.\n // MediaSource duration starts as NaN\n // It is possible (and probable) that this case will never be reached for many\n // sources, since the MediaSource reports duration as the highest value without\n // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n // we buffered times 0 to 100 with real times of 100 to 200, even though current\n // time will be between 0 and 100, the native media source may report the duration\n // as 200. However, since we report duration separate from the media source (as\n // Infinity), and as long as the native media source duration value is greater than\n // our reported seekable range, seeks will work as expected. The large number as\n // duration for live is actually a strategy used by some players to work around the\n // issue of live seekable ranges cited above.\n\n if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n }\n return;\n }\n const buffered = this.tech_.buffered();\n let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n if (buffered.length > 0) {\n duration = Math.max(duration, buffered.end(buffered.length - 1));\n }\n if (this.mediaSource.duration !== duration) {\n this.sourceUpdater_.setDuration(duration);\n }\n }\n /**\n * dispose of the PlaylistController and everything\n * that it controls\n */\n\n dispose() {\n this.trigger('dispose');\n this.decrypter_.terminate();\n this.mainPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n this.contentSteeringController_.dispose();\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n const groups = this.mediaTypes_[type].groups;\n for (const id in groups) {\n groups[id].forEach(group => {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n this.sourceUpdater_.dispose();\n this.timelineChangeController_.dispose();\n this.stopABRTimer_();\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n }\n this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n this.off();\n }\n /**\n * return the main playlist object if we have one\n *\n * @return {Object} the main playlist object that we parsed\n */\n\n main() {\n return this.mainPlaylistLoader_.main;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n\n media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.mainPlaylistLoader_.media() || this.initialMedia_;\n }\n areMediaTypesKnown_() {\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n // otherwise check on the segment loader.\n\n const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n return false;\n }\n return true;\n }\n getCodecsOrExclude_() {\n const media = {\n main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n };\n const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n media.video = media.main;\n const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n const codecs = {};\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n if (media.main.hasVideo) {\n codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n }\n if (media.main.isMuxed) {\n codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n }\n if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n } // no codecs, no playback.\n\n if (!codecs.audio && !codecs.video) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: 'Could not determine codecs for playlist.'\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // fmp4 relies on browser support, while ts relies on muxer support\n\n const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n const unsupportedCodecs = {};\n let unsupportedAudio;\n ['video', 'audio'].forEach(function (type) {\n if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n unsupportedCodecs[supporter].push(codecs[type]);\n if (type === 'audio') {\n unsupportedAudio = supporter;\n }\n }\n });\n if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n const audioGroup = playlist.attributes.AUDIO;\n this.main().playlists.forEach(variant => {\n const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n if (variantAudioGroup === audioGroup && variant !== playlist) {\n variant.excludeUntil = Infinity;\n }\n });\n this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n } // if we have any unsupported codecs exclude this playlist.\n\n if (Object.keys(unsupportedCodecs).length) {\n const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n if (acc) {\n acc += ', ';\n }\n acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n return acc;\n }, '') + '.';\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n internal: true,\n message\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // check if codec switching is happening\n\n if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n const switchMessages = [];\n ['video', 'audio'].forEach(type => {\n const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n }\n });\n if (switchMessages.length) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n internal: true\n },\n playlistExclusionDuration: Infinity\n });\n return;\n }\n } // TODO: when using the muxer shouldn't we just return\n // the codecs that the muxer outputs?\n\n return codecs;\n }\n /**\n * Create source buffers and exlude any incompatible renditions.\n *\n * @private\n */\n\n tryToCreateSourceBuffers_() {\n // media source is not ready yet or sourceBuffers are already\n // created.\n if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return;\n }\n if (!this.areMediaTypesKnown_()) {\n return;\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.createSourceBuffers(codecs);\n const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n this.excludeIncompatibleVariants_(codecString);\n }\n /**\n * Excludes playlists with codecs that are unsupported by the muxer and browser.\n */\n\n excludeUnsupportedVariants_() {\n const playlists = this.main().playlists;\n const ids = []; // TODO: why don't we have a property to loop through all\n // playlist? Why did we ever mix indexes and keys?\n\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n\n if (ids.indexOf(variant.id) !== -1) {\n return;\n }\n ids.push(variant.id);\n const codecs = codecsForPlaylist(this.main, variant);\n const unsupported = [];\n if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n unsupported.push(`audio codec ${codecs.audio}`);\n }\n if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n unsupported.push(`video codec ${codecs.video}`);\n }\n if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n unsupported.push(`text codec ${codecs.text}`);\n }\n if (unsupported.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n }\n });\n }\n /**\n * Exclude playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current main playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n\n excludeIncompatibleVariants_(codecString) {\n const ids = [];\n const playlists = this.main().playlists;\n const codecs = unwrapCodecList(parseCodecs(codecString));\n const codecCount_ = codecCount(codecs);\n const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n // or it if it is already excluded forever.\n\n if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n return;\n }\n ids.push(variant.id);\n const exclusionReasons = []; // get codecs from the playlist for this variant\n\n const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n // variant is incompatible. Wait for mux.js to probe\n\n if (!variantCodecs.audio && !variantCodecs.video) {\n return;\n } // TODO: we can support this by removing the\n // old media source and creating a new one, but it will take some work.\n // The number of streams cannot change\n\n if (variantCodecCount !== codecCount_) {\n exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n } // only exclude playlists by codec change, if codecs cannot switch\n // during playback.\n\n if (!this.sourceUpdater_.canChangeType()) {\n const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n } // the audio codec cannot change\n\n if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n }\n }\n if (exclusionReasons.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n }\n });\n }\n updateAdCues_(media) {\n let offset = 0;\n const seekable = this.seekable();\n if (seekable.length) {\n offset = seekable.start(0);\n }\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {number} Desired forward buffer length in seconds\n */\n\n goalBufferLength() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.GOAL_BUFFER_LENGTH;\n const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {number} Desired buffer low water line in seconds\n */\n\n bufferLowWaterLine() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.BUFFER_LOW_WATER_LINE;\n const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n }\n bufferHighWaterLine() {\n return Config.BUFFER_HIGH_WATER_LINE;\n }\n addDateRangesToTextTrack_(dateRanges) {\n createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n addDateRangeMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n dateRanges\n });\n }\n addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n // audio/video source with a metadata track, and an alt audio with a metadata track.\n // However, this probably won't happen, and if it does it can be handled then.\n\n createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n addMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n metadataArray,\n timestampOffset,\n videoDuration\n });\n }\n pathwayAttribute_(playlist) {\n return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n }\n /**\n * Initialize content steering listeners and apply the tag properties.\n */\n\n initContentSteeringController_() {\n const initialMain = this.main();\n if (!initialMain.contentSteering) {\n return;\n }\n const updateSteeringValues = main => {\n for (const playlist of main.playlists) {\n this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n }\n this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering);\n };\n updateSteeringValues(initialMain);\n this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new\n // manifest is loaded in live DASH with content steering.\n\n if (this.sourceType_ === 'dash') {\n this.mainPlaylistLoader_.on('mediaupdatetimeout', () => {\n this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id); // clear past values\n\n this.contentSteeringController_.abort();\n this.contentSteeringController_.clearTTLTimeout_();\n this.contentSteeringController_.clearAvailablePathways();\n updateSteeringValues(this.main());\n });\n } // Do this at startup only, after that the steering requests are managed by the Content Steering class.\n // DASH queryBeforeStart scenarios will be handled by the Content Steering class.\n\n if (!this.contentSteeringController_.queryBeforeStart) {\n this.tech_.one('canplay', () => {\n this.contentSteeringController_.requestSteeringManifest();\n });\n }\n }\n /**\n * Simple exclude and change playlist logic for content steering.\n */\n\n excludeThenChangePathway_() {\n const currentPathway = this.contentSteeringController_.getPathway();\n if (!currentPathway) {\n return;\n }\n const main = this.main();\n const playlists = main.playlists;\n const ids = new Set();\n let didEnablePlaylists = false;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key];\n const pathwayId = this.pathwayAttribute_(variant);\n const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n if (steeringExclusion && !differentPathwayId) {\n delete variant.excludeUntil;\n delete variant.lastExcludeReason_;\n didEnablePlaylists = true;\n }\n const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n if (!shouldExclude) {\n return;\n }\n ids.add(variant.id);\n variant.excludeUntil = Infinity;\n variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n });\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n Object.keys(this.mediaTypes_).forEach(key => {\n const type = this.mediaTypes_[key];\n if (type.activePlaylistLoader) {\n const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n didEnablePlaylists = true;\n }\n }\n });\n }\n if (didEnablePlaylists) {\n this.changeSegmentPathway_();\n }\n }\n /**\n * Changes the current playlists for audio, video and subtitles after a new pathway\n * is chosen from content steering.\n */\n\n changeSegmentPathway_() {\n const nextPlaylist = this.selectPlaylist();\n this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n this.switchMediaForDASHContentSteering_();\n }\n this.switchMedia_(nextPlaylist, 'content-steering');\n }\n}\n\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n const playlist = loader.main.playlists[playlistID];\n const incompatible = isIncompatible(playlist);\n const currentlyEnabled = isEnabled(playlist);\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n return enable;\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\nclass Representation {\n constructor(vhsHandler, playlist, id) {\n const {\n playlistController_: pc\n } = vhsHandler;\n const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n if (playlist.attributes) {\n const resolution = playlist.attributes.RESOLUTION;\n this.width = resolution && resolution.width;\n this.height = resolution && resolution.height;\n this.bandwidth = playlist.attributes.BANDWIDTH;\n this.frameRate = playlist.attributes['FRAME-RATE'];\n }\n this.codecs = codecsForPlaylist(pc.main(), playlist);\n this.playlist = playlist; // The id is simply the ordinality of the media playlist\n // within the main playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n }\n}\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n // Add a single API-specific function to the VhsHandler instance\n vhsHandler.representations = () => {\n const main = vhsHandler.playlistController_.main();\n const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n if (!playlists) {\n return [];\n }\n return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n /**\n * Represents an PlaybackWatcher object.\n *\n * @class\n * @param {Object} options an object that includes the tech and settings\n */\n constructor(options) {\n this.playlistController_ = options.playlistController;\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n const playHandler = () => this.monitorCurrentTime_();\n const canPlayHandler = () => this.monitorCurrentTime_();\n const waitingHandler = () => this.techWaiting_();\n const cancelTimerHandler = () => this.resetTimeUpdate_();\n const pc = this.playlistController_;\n const loaderTypes = ['main', 'subtitle', 'audio'];\n const loaderChecks = {};\n loaderTypes.forEach(type => {\n loaderChecks[type] = {\n reset: () => this.resetSegmentDownloads_(type),\n updateend: () => this.checkSegmentDownloads_(type)\n };\n pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n // isn't changing we want to reset. We cannot assume that the new rendition\n // will also be stalled, until after new appends.\n\n pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n // This prevents one segment playlists (single vtt or single segment content)\n // from being detected as stalling. As the buffer will not change in those cases, since\n // the buffer is the entire video duration.\n\n this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n /**\n * We check if a seek was into a gap through the following steps:\n * 1. We get a seeking event and we do not get a seeked event. This means that\n * a seek was attempted but not completed.\n * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n * removed everything from our buffer and appended a segment, and should be ready\n * to check for gaps.\n */\n\n const setSeekingHandlers = fn => {\n ['main', 'audio'].forEach(type => {\n pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n });\n };\n this.seekingAppendCheck_ = () => {\n if (this.fixesBadSeeks_()) {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = this.tech_.currentTime();\n setSeekingHandlers('off');\n }\n };\n this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n this.watchForBadSeeking_ = () => {\n this.clearSeekingAppendCheck_();\n setSeekingHandlers('on');\n };\n this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n this.tech_.on('seeking', this.watchForBadSeeking_);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler);\n /*\n An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n is surfaced in one of two ways:\n 1) The `waiting` event is fired before the player has buffered content, making it impossible\n to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n we can check if playback is stalled due to a gap, and skip the gap if necessary.\n 2) A source with a gap at the beginning of the stream is loaded programatically while the player\n is in a playing state. To catch this case, it's important that our one-time play listener is setup\n even if the player is in a playing state\n */\n\n this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n this.dispose = () => {\n this.clearSeekingAppendCheck_();\n this.logger_('dispose');\n this.tech_.off('waiting', waitingHandler);\n this.tech_.off(timerCancelEvents, cancelTimerHandler);\n this.tech_.off('canplay', canPlayHandler);\n this.tech_.off('play', playHandler);\n this.tech_.off('seeking', this.watchForBadSeeking_);\n this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n loaderTypes.forEach(type => {\n pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n }\n this.resetTimeUpdate_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n\n monitorCurrentTime_() {\n this.checkCurrentTime_();\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * Reset stalled download stats for a specific type of loader\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#playlistupdate\n * @listens Tech#seeking\n * @listens Tech#seeked\n */\n\n resetSegmentDownloads_(type) {\n const loader = this.playlistController_[`${type}SegmentLoader_`];\n if (this[`${type}StalledDownloads_`] > 0) {\n this.logger_(`resetting possible stalled download count for ${type} loader`);\n }\n this[`${type}StalledDownloads_`] = 0;\n this[`${type}Buffered_`] = loader.buffered_();\n }\n /**\n * Checks on every segment `appendsdone` to see\n * if segment appends are making progress. If they are not\n * and we are still downloading bytes. We exclude the playlist.\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#appendsdone\n */\n\n checkSegmentDownloads_(type) {\n const pc = this.playlistController_;\n const loader = pc[`${type}SegmentLoader_`];\n const buffered = loader.buffered_();\n const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n // the buffered value for this loader changed\n // appends are working\n\n if (isBufferedDifferent) {\n this.resetSegmentDownloads_(type);\n return;\n }\n this[`${type}StalledDownloads_`]++;\n this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n playlistId: loader.playlist_ && loader.playlist_.id,\n buffered: timeRangesToArray(buffered)\n }); // after 10 possibly stalled appends with no reset, exclude\n\n if (this[`${type}StalledDownloads_`] < 10) {\n return;\n }\n this.logger_(`${type} loader stalled download exclusion`);\n this.resetSegmentDownloads_(type);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-${type}-download-exclusion`\n });\n if (type === 'subtitle') {\n return;\n } // TODO: should we exclude audio tracks rather than main tracks\n // when type is audio?\n\n pc.excludePlaylist({\n error: {\n message: `Excessive ${type} segment downloading detected.`\n },\n playlistExclusionDuration: Infinity\n });\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n\n checkCurrentTime_() {\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n *\n * @private\n */\n\n resetTimeUpdate_() {\n this.consecutiveUpdates = 0;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {boolean} whether an action was taken to fix the seek\n * @private\n */\n\n fixesBadSeeks_() {\n const seeking = this.tech_.seeking();\n if (!seeking) {\n return false;\n } // TODO: It's possible that these seekable checks should be moved out of this function\n // and into a function that runs on seekablechange. It's also possible that we only need\n // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n // seekable range.\n\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n let seekTo;\n if (isAfterSeekableRange) {\n const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + (\n // if the playlist is too short and the seekable range is an exact time (can\n // happen in live with a 3 segment playlist), then don't use a time delta\n seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n }\n if (typeof seekTo !== 'undefined') {\n this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n const sourceUpdater = this.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n const media = this.media(); // verify that at least two segment durations or one part duration have been\n // appended before checking for a gap.\n\n const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n // appended before checking for a gap.\n\n const bufferedToCheck = [audioBuffered, videoBuffered];\n for (let i = 0; i < bufferedToCheck.length; i++) {\n // skip null buffered\n if (!bufferedToCheck[i]) {\n continue;\n }\n const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n // duration behind we haven't appended enough to call this a bad seek.\n\n if (timeAhead < minAppendedDuration) {\n return false;\n }\n }\n const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n // to seek over the gap\n\n if (nextRange.length === 0) {\n return false;\n }\n seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n\n waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime);\n this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n\n techWaiting_() {\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n if (this.tech_.seeking()) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const livePoint = seekable.end(seekable.length - 1);\n this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-live-resync'\n });\n return true;\n }\n const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const videoUnderflow = this.videoUnderflow_({\n audioBuffered: sourceUpdater.audioBuffered(),\n videoBuffered: sourceUpdater.videoBuffered(),\n currentTime\n });\n if (videoUnderflow) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-video-underflow'\n });\n return true;\n }\n const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n if (nextRange.length > 0) {\n this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n this.resetTimeUpdate_();\n this.skipTheGap_(currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n return false;\n }\n afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n const isLive = !playlist.endList;\n const isLLHLS = typeof playlist.partTargetDuration === 'number';\n if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n if (currentTime > allowedEnd) {\n return true;\n }\n return false;\n }\n beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length &&\n // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n return true;\n }\n return false;\n }\n videoUnderflow_({\n videoBuffered,\n audioBuffered,\n currentTime\n }) {\n // audio only content will not have video underflow :)\n if (!videoBuffered) {\n return;\n }\n let gap; // find a gap in demuxed content.\n\n if (videoBuffered.length && audioBuffered.length) {\n // in Chrome audio will continue to play for ~3s when we run out of video\n // so we have to check that the video buffer did have some buffer in the\n // past.\n const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n const videoRange = findRange(videoBuffered, currentTime);\n const audioRange = findRange(audioBuffered, currentTime);\n if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n gap = {\n start: lastVideoRange.end(0),\n end: audioRange.end(0)\n };\n } // find a gap in muxed content.\n } else {\n const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n\n if (!nextRange.length) {\n gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n }\n }\n if (gap) {\n this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n return true;\n }\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n\n skipTheGap_(scheduledCurrentTime) {\n const buffered = this.tech_.buffered();\n const currentTime = this.tech_.currentTime();\n const nextRange = findNextRange(buffered, currentTime);\n this.resetTimeUpdate_();\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-gap-skip'\n });\n }\n gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n const gaps = findGaps(buffered);\n for (let i = 0; i < gaps.length; i++) {\n const start = gaps.start(i);\n const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start,\n end\n };\n }\n }\n return null;\n }\n}\nconst defaultOptions = {\n errorInterval: 30,\n getSource(next) {\n const tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n const sourceObj = tech.currentSource_ || this.currentSource();\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nconst initPlugin = function (player, options) {\n let lastCalled = 0;\n let seekTo = 0;\n const localOptions = merge(defaultOptions, options);\n player.ready(() => {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n const loadedMetadataHandler = function () {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n const setSource = function (sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n const errorHandler = function () {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-canceled'\n });\n return;\n }\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n const cleanupEvents = function () {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n const reinitPlugin = function (newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nconst reloadSourceOnError = function (options) {\n initPlugin(this, options);\n};\nvar version$4 = \"3.7.0\";\nvar version$3 = \"7.0.1\";\nvar version$2 = \"1.2.2\";\nvar version$1 = \"7.1.0\";\nvar version = \"4.0.1\";\n\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the VHS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE\n */\nconst Vhs = {\n PlaylistLoader,\n Playlist,\n utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n lastBandwidthSelector,\n movingAverageBandwidthSelector,\n comparePlaylistBandwidth,\n comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n Object.defineProperty(Vhs, prop, {\n get() {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n return Config[prop];\n },\n set(value) {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n if (typeof value !== 'number' || value < 0) {\n videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n return;\n }\n Config[prop] = value;\n }\n });\n});\nconst LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n const newPlaylist = playlistLoader.media();\n let selectedIndex = -1;\n for (let i = 0; i < qualityLevels.length; i++) {\n if (qualityLevels[i].id === newPlaylist.id) {\n selectedIndex = i;\n break;\n }\n }\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n vhs.representations().forEach(rep => {\n qualityLevels.addQualityLevel(rep);\n });\n handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n if (!keySystemOptions) {\n return keySystemOptions;\n }\n let codecs = {};\n if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n }\n if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n codecs.audio = audioPlaylist.attributes.CODECS;\n }\n const videoContentType = getMimeForCodec(codecs.video);\n const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n const keySystemContentTypes = {};\n for (const keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {};\n if (audioContentType) {\n keySystemContentTypes[keySystem].audioContentType = audioContentType;\n }\n if (videoContentType) {\n keySystemContentTypes[keySystem].videoContentType = videoContentType;\n } // Default to using the video playlist's PSSH even though they may be different, as\n // videojs-contrib-eme will only accept one in the options.\n //\n // This shouldn't be an issue for most cases as early intialization will handle all\n // unique PSSH values, and if they aren't, then encrypted events should have the\n // specific information needed for the unique license.\n\n if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n * Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n * The playlists to look through\n * @param {string[]} keySystems\n * The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n * An array of KeySystems objects containing available key systems and their\n * pssh values\n */\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n return playlists.reduce((keySystemsArr, playlist) => {\n if (!playlist.contentProtection) {\n return keySystemsArr;\n }\n const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n const keySystemOptions = playlist.contentProtection[keySystem];\n if (keySystemOptions && keySystemOptions.pssh) {\n keySystemsObj[keySystem] = {\n pssh: keySystemOptions.pssh\n };\n }\n return keySystemsObj;\n }, {});\n if (Object.keys(keySystemsOptions).length) {\n keySystemsArr.push(keySystemsOptions);\n }\n return keySystemsArr;\n }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n * The playlists found on the main playlist object\n *\n * @return {Object}\n * Promise that resolves when the key session has been created\n */\n\nconst waitForKeySessionCreation = ({\n player,\n sourceKeySystems,\n audioMedia,\n mainPlaylists\n}) => {\n if (!player.eme.initializeMediaKeys) {\n return Promise.resolve();\n } // TODO should all audio PSSH values be initialized for DRM?\n //\n // All unique video rendition pssh values are initialized for DRM, but here only\n // the initial audio playlist license is initialized. In theory, an encrypted\n // event should be fired if the user switches to an alternative audio playlist\n // where a license is required, but this case hasn't yet been tested. In addition, there\n // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n // languages).\n\n const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n const initializationFinishedPromises = [];\n const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n // only place where it should not be deduped is for ms-prefixed APIs, but\n // the existence of modern EME APIs in addition to\n // ms-prefixed APIs on Edge should prevent this from being a concern.\n // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n keySystemsOptionsArr.forEach(keySystemsOptions => {\n keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n player.tech_.one('keysessioncreated', resolve);\n }));\n initializationFinishedPromises.push(new Promise((resolve, reject) => {\n player.eme.initializeMediaKeys({\n keySystems: keySystemsOptions\n }, err => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n }));\n }); // The reasons Promise.race is chosen over Promise.any:\n //\n // * Promise.any is only available in Safari 14+.\n // * None of these promises are expected to reject. If they do reject, it might be\n // better here for the race to surface the rejection, rather than mask it by using\n // Promise.any.\n\n return Promise.race([\n // If a session was previously created, these will all finish resolving without\n // creating a new session, otherwise it will take until the end of all license\n // requests, which is why the key session check is used (to make setup much faster).\n Promise.all(initializationFinishedPromises),\n // Once a single session is created, the browser knows DRM will be used.\n Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} media\n * The active media playlist\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n *\n * @return {boolean}\n * Whether or not options were configured and EME is available\n */\n\nconst setupEmeOptions = ({\n player,\n sourceKeySystems,\n media,\n audioMedia\n}) => {\n const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n if (!sourceOptions) {\n return false;\n }\n player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n // do nothing.\n\n if (sourceOptions && !player.eme) {\n videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n return false;\n }\n return true;\n};\nconst getVhsLocalStorage = () => {\n if (!window$1.localStorage) {\n return null;\n }\n const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedObject) {\n return null;\n }\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\nconst updateVhsLocalStorage = options => {\n if (!window$1.localStorage) {\n return false;\n }\n let objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? merge(objectToStore, options) : options;\n try {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n * The data URI\n *\n * @return {string|Object}\n * The parsed object/string, or the original string if no supported media type\n * was found\n */\n\nconst expandDataUri = dataUri => {\n if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n } // no known case for this data URI, return the string as-is\n\n return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nconst addOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n xhr._requestCallbackSet = new Set();\n }\n xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nconst addOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n xhr._responseCallbackSet = new Set();\n }\n xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n return;\n }\n xhr._requestCallbackSet.delete(callback);\n if (!xhr._requestCallbackSet.size) {\n delete xhr._requestCallbackSet;\n }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n return;\n }\n xhr._responseCallbackSet.delete(callback);\n if (!xhr._responseCallbackSet.size) {\n delete xhr._responseCallbackSet;\n }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n if (!document || !document.createElement) {\n return false;\n }\n const video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n const canPlay = [\n // Apple santioned\n 'application/vnd.apple.mpegurl',\n // Apple sanctioned for backwards compatibility\n 'audio/mpegurl',\n // Very common\n 'audio/x-mpegurl',\n // Very common\n 'application/x-mpegurl',\n // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\nVhs.supportsNativeDash = function () {\n if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n return false;\n }\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = type => {\n if (type === 'hls') {\n return Vhs.supportsNativeHls;\n }\n if (type === 'dash') {\n return Vhs.supportsNativeDash;\n }\n return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n removeOnResponseHook(Vhs.xhr, callback);\n};\nconst Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nclass VhsHandler extends Component {\n constructor(source, tech, options) {\n super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n // use that over the VHS level `bandwidth` option\n\n if (typeof options.initialBandwidth === 'number') {\n this.options_.bandwidth = options.initialBandwidth;\n }\n this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n // so, get it from Video.js via the `playerId`\n\n if (tech.options_ && tech.options_.playerId) {\n const _player = videojs.getPlayer(tech.options_.playerId);\n this.player_ = _player;\n }\n this.tech_ = tech;\n this.source_ = source;\n this.stats = {};\n this.ignoreNextSeekingEvent_ = false;\n this.setOptions_();\n if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native VHS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n this.playlistController_.fastQualityChange_();\n } else {\n // When leaving fullscreen, since the in page pixel dimensions should be smaller\n // than full screen, see if there should be a rendition switch down to preserve\n // bandwidth.\n this.playlistController_.checkABR_();\n }\n });\n this.on(this.tech_, 'seeking', function () {\n if (this.ignoreNextSeekingEvent_) {\n this.ignoreNextSeekingEvent_ = false;\n return;\n }\n this.setCurrentTime(this.tech_.currentTime());\n });\n this.on(this.tech_, 'error', function () {\n // verify that the error was real and we are loaded\n // enough to have pc loaded.\n if (this.tech_.error() && this.playlistController_) {\n this.playlistController_.pauseLoading();\n }\n });\n this.on(this.tech_, 'play', this.play);\n }\n setOptions_() {\n // defaults\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n this.options_.llhls = this.options_.llhls === false ? false : true;\n this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n if (typeof this.options_.playlistExclusionDuration !== 'number') {\n this.options_.playlistExclusionDuration = 60;\n }\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n const storedObject = getVhsLocalStorage();\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-bandwidth-from-local-storage'\n });\n }\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n if (typeof this.source_[option] !== 'undefined') {\n this.options_[option] = this.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n\n src(src, type) {\n // do nothing if the src is falsey\n if (!src) {\n return;\n }\n this.setOptions_(); // add main playlist controller options\n\n this.options_.src = expandDataUri(this.source_.src);\n this.options_.tech = this.tech_;\n this.options_.externVhs = Vhs;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n this.options_.seekTo = time => {\n this.tech_.setCurrentTime(time);\n };\n this.playlistController_ = new PlaylistController(this.options_);\n const playbackWatcherOptions = merge({\n liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n }, this.options_, {\n seekable: () => this.seekable(),\n media: () => this.playlistController_.media(),\n playlistController: this.playlistController_\n });\n this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n this.playlistController_.on('error', () => {\n const player = videojs.players[this.tech_.options_.playerId];\n let error = this.playlistController_.error;\n if (typeof error === 'object' && !error.code) {\n error.code = 3;\n } else if (typeof error === 'string') {\n error = {\n message: error,\n code: 3\n };\n }\n player.error(error);\n });\n const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n // compatibility with < v2\n\n this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.playlistController_.mainPlaylistLoader_;\n this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get() {\n return this.playlistController_.selectPlaylist;\n },\n set(selectPlaylist) {\n this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get() {\n return this.playlistController_.mainSegmentLoader_.throughput.rate;\n },\n set(throughput) {\n this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get() {\n let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n const tenMbpsAsBitsPerSecond = 10e6;\n if (this.options_.useNetworkInformationApi && networkInformation) {\n // downlink returns Mbps\n // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n // high quality streams are not filtered out.\n\n if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n } else {\n playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n }\n }\n return playerBandwidthEst;\n },\n set(bandwidth) {\n this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get() {\n const invBandwidth = 1 / (this.bandwidth || 1);\n let invThroughput;\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set() {\n videojs.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: () => this.bandwidth || 0,\n enumerable: true\n },\n mediaRequests: {\n get: () => this.playlistController_.mediaRequests_() || 0,\n enumerable: true\n },\n mediaRequestsAborted: {\n get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n enumerable: true\n },\n mediaRequestsErrored: {\n get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n enumerable: true\n },\n mediaTransferDuration: {\n get: () => this.playlistController_.mediaTransferDuration_() || 0,\n enumerable: true\n },\n mediaBytesTransferred: {\n get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n enumerable: true\n },\n mediaAppends: {\n get: () => this.playlistController_.mediaAppends_() || 0,\n enumerable: true\n },\n mainAppendsToLoadedData: {\n get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n enumerable: true\n },\n audioAppendsToLoadedData: {\n get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n enumerable: true\n },\n appendsToLoadedData: {\n get: () => this.playlistController_.appendsToLoadedData_() || 0,\n enumerable: true\n },\n timeToLoadedData: {\n get: () => this.playlistController_.timeToLoadedData_() || 0,\n enumerable: true\n },\n buffered: {\n get: () => timeRangesToArray(this.tech_.buffered()),\n enumerable: true\n },\n currentTime: {\n get: () => this.tech_.currentTime(),\n enumerable: true\n },\n currentSource: {\n get: () => this.tech_.currentSource_,\n enumerable: true\n },\n currentTech: {\n get: () => this.tech_.name_,\n enumerable: true\n },\n duration: {\n get: () => this.tech_.duration(),\n enumerable: true\n },\n main: {\n get: () => this.playlists.main,\n enumerable: true\n },\n playerDimensions: {\n get: () => this.tech_.currentDimensions(),\n enumerable: true\n },\n seekable: {\n get: () => timeRangesToArray(this.tech_.seekable()),\n enumerable: true\n },\n timestamp: {\n get: () => Date.now(),\n enumerable: true\n },\n videoPlaybackQuality: {\n get: () => this.tech_.getVideoPlaybackQuality(),\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n this.tech_.on('bandwidthupdate', () => {\n if (this.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: this.bandwidth,\n throughput: Math.round(this.throughput)\n });\n }\n });\n this.playlistController_.on('selectedinitialmedia', () => {\n // Add the manual rendition mix-in to VhsHandler\n renditionSelectionMixin(this);\n });\n this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n this.setupEme_();\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.playlistController_, 'progress', function () {\n this.tech_.trigger('progress');\n }); // In the live case, we need to ignore the very first `seeking` event since\n // that will be the result of the seek-to-live behavior\n\n this.on(this.playlistController_, 'firstplay', function () {\n this.ignoreNextSeekingEvent_ = true;\n });\n this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n this.tech_.src(this.mediaSourceUrl_);\n }\n createKeySessions_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n this.logger_('waiting for EME key session creation');\n waitForKeySessionCreation({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n mainPlaylists: this.playlists.main.playlists\n }).then(() => {\n this.logger_('created EME key session');\n this.playlistController_.sourceUpdater_.initializedEme();\n }).catch(err => {\n this.logger_('error while creating EME key session', err);\n this.player_.error({\n message: 'Failed to initialize media keys for EME',\n code: 3\n });\n });\n }\n handleWaitingForKey_() {\n // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n // the key is in the manifest. While this should've happened on initial source load, it\n // may happen again in live streams where the keys change, and the manifest info\n // reflects the update.\n //\n // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n // already requested keys for, we don't have to worry about this generating extraneous\n // requests.\n this.logger_('waitingforkey fired, attempting to create any new key sessions');\n this.createKeySessions_();\n }\n /**\n * If necessary and EME is available, sets up EME options and waits for key session\n * creation.\n *\n * This function also updates the source updater so taht it can be used, as for some\n * browsers, EME must be configured before content is appended (if appending unencrypted\n * content before encrypted content).\n */\n\n setupEme_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n const didSetupEmeOptions = setupEmeOptions({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n media: this.playlists.media(),\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n });\n this.player_.tech_.on('keystatuschange', e => {\n if (e.status !== 'output-restricted') {\n return;\n }\n const mainPlaylist = this.playlistController_.main();\n if (!mainPlaylist || !mainPlaylist.playlists) {\n return;\n }\n const excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection\n\n mainPlaylist.playlists.forEach(playlist => {\n if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) {\n if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {\n playlist.excludeUntil = Infinity;\n excludedHDPlaylists.push(playlist);\n }\n }\n });\n if (excludedHDPlaylists.length) {\n videojs.log.warn('DRM keystatus changed to \"output-restricted.\" Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.', ...excludedHDPlaylists); // Clear the buffer before switching playlists, since it may already contain unplayable segments\n\n this.playlistController_.mainSegmentLoader_.resetEverything();\n this.playlistController_.fastQualityChange_();\n }\n });\n this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n if (!didSetupEmeOptions) {\n // If EME options were not set up, we've done all we could to initialize EME.\n this.playlistController_.sourceUpdater_.initializedEme();\n return;\n }\n this.createKeySessions_();\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n\n setupQualityLevels_() {\n const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n // or qualityLevels_ listeners have already been setup, do nothing.\n\n if (!player || !player.qualityLevels || this.qualityLevels_) {\n return;\n }\n this.qualityLevels_ = player.qualityLevels();\n this.playlistController_.on('selectedinitialmedia', () => {\n handleVhsLoadedMetadata(this.qualityLevels_, this);\n });\n this.playlists.on('mediachange', () => {\n handleVhsMediaChange(this.qualityLevels_, this.playlists);\n });\n }\n /**\n * return the version\n */\n\n static version() {\n return {\n '@videojs/http-streaming': version$4,\n 'mux.js': version$3,\n 'mpd-parser': version$2,\n 'm3u8-parser': version$1,\n 'aes-decrypter': version\n };\n }\n /**\n * return the version\n */\n\n version() {\n return this.constructor.version();\n }\n canChangeType() {\n return SourceUpdater.canChangeType();\n }\n /**\n * Begin playing the video.\n */\n\n play() {\n this.playlistController_.play();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n setCurrentTime(currentTime) {\n this.playlistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n duration() {\n return this.playlistController_.duration();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n seekable() {\n return this.playlistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n\n dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n if (this.playlistController_) {\n this.playlistController_.dispose();\n }\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n if (this.tech_ && this.tech_.vhs) {\n delete this.tech_.vhs;\n }\n if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n this.mediaSourceUrl_ = null;\n }\n if (this.tech_) {\n this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n }\n super.dispose();\n }\n convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.playlistController_.media(),\n time,\n callback\n });\n } // the player must be playing before calling this\n\n seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n return seekToProgramTime({\n programTime,\n playlist: this.playlistController_.media(),\n retryCount,\n pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback\n });\n }\n /**\n * Adds the onRequest, onResponse, offRequest and offResponse functions\n * to the VhsHandler xhr Object.\n */\n\n setupXhrHooks_() {\n /**\n * A player function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n this.xhr.onRequest = callback => {\n addOnRequestHook(this.xhr, callback);\n };\n /**\n * A player function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\n this.xhr.onResponse = callback => {\n addOnResponseHook(this.xhr, callback);\n };\n /**\n * Deletes a player onRequest callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offRequest = callback => {\n removeOnRequestHook(this.xhr, callback);\n };\n /**\n * Deletes a player onResponse callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offResponse = callback => {\n removeOnResponseHook(this.xhr, callback);\n }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n this.player_.trigger('xhr-hooks-ready');\n }\n}\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\nconst VhsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$4,\n canHandleSource(srcObj, options = {}) {\n const localOptions = merge(videojs.options, options);\n return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource(source, tech, options = {}) {\n const localOptions = merge(videojs.options, options);\n tech.vhs = new VhsHandler(source, tech, localOptions);\n tech.vhs.xhr = xhrFactory();\n tech.vhs.setupXhrHooks_();\n tech.vhs.src(source.src, source.type);\n return tech.vhs;\n },\n canPlayType(type, options) {\n const simpleType = simpleTypeFromSourceType(type);\n if (!simpleType) {\n return '';\n }\n const overrideNative = VhsSourceHandler.getOverrideNative(options);\n const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n return canUseMsePlayback ? 'maybe' : '';\n },\n getOverrideNative(options = {}) {\n const {\n vhs = {}\n } = options;\n const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n const {\n overrideNative = defaultOverrideNative\n } = vhs;\n return overrideNative;\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { videojs as default };\n","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n var acc = '';\n\n while (len--) {\n acc += str;\n }\n\n return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nexport var countBits = function countBits(x) {\n return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n if (str === void 0) {\n str = ' ';\n }\n\n return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n\n return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n if (bytes instanceof Uint8Array) {\n return bytes;\n }\n\n if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n // any non-number or NaN leads to empty uint8array\n // eslint-disable-next-line\n if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n bytes = 0;\n } else {\n bytes = [bytes];\n }\n }\n\n return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(16), 2, '0');\n }\n\n return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(2), 8, '0');\n }\n\n return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n if (b[0] === 0xFF) {\n return 'big';\n }\n\n if (b[0] === 0xCC) {\n return 'little';\n }\n\n return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$signed = _ref.signed,\n signed = _ref$signed === void 0 ? false : _ref$signed,\n _ref$le = _ref.le,\n le = _ref$le === void 0 ? false : _ref$le;\n\n bytes = toUint8(bytes);\n var fn = le ? 'reduce' : 'reduceRight';\n var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n var number = obj.call(bytes, function (total, byte, i) {\n var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n return total + BigInt(byte) * BYTE_TABLE[exponent];\n }, BigInt(0));\n\n if (signed) {\n var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n number = BigInt(number);\n\n if (number > max) {\n number -= max;\n number -= max;\n number -= BigInt(2);\n }\n }\n\n return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$le = _ref2.le,\n le = _ref2$le === void 0 ? false : _ref2$le;\n\n // eslint-disable-next-line\n if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n number = 0;\n }\n\n number = BigInt(number);\n var byteCount = countBytes(number);\n var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n for (var i = 0; i < byteCount; i++) {\n var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n if (number < 0) {\n bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n bytes[byteIndex] -= i === 0 ? 1 : 2;\n }\n }\n\n return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n if (!bytes) {\n return '';\n } // TODO: should toUint8 handle cases where we only have 8 bytes\n // but report more since this is a Uint16+ Array?\n\n\n bytes = Array.prototype.slice.call(bytes);\n var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n try {\n return decodeURIComponent(escape(string));\n } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n // or full non string data. Just return the potentially garbled string.\n }\n\n return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n string = string.toString();\n }\n\n if (typeof string !== 'string') {\n return new Uint8Array();\n } // If the string already is bytes, we don't have to do this\n // otherwise we do this so that we split multi length characters\n // into individual bytes\n\n\n if (!stringIsBytes) {\n string = unescape(encodeURIComponent(string));\n }\n\n var view = new Uint8Array(string.length);\n\n for (var i = 0; i < string.length; i++) {\n view[i] = string.charCodeAt(i);\n }\n\n return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n buffers[_key] = arguments[_key];\n }\n\n buffers = buffers.filter(function (b) {\n return b && (b.byteLength || b.length) && typeof b !== 'string';\n });\n\n if (buffers.length <= 1) {\n // for 0 length we will return empty uint8\n // for 1 length we return the first uint8\n return toUint8(buffers[0]);\n }\n\n var totalLen = buffers.reduce(function (total, buf, i) {\n return total + (buf.byteLength || buf.length);\n }, 0);\n var tempBuffer = new Uint8Array(totalLen);\n var offset = 0;\n buffers.forEach(function (buf) {\n buf = toUint8(buf);\n tempBuffer.set(buf, offset);\n offset += buf.byteLength;\n });\n return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n * Bytes to check in\n *\n * @param {Uint8Array|Array} b\n * Bytes to check for\n *\n * @param {Object} options\n * options\n *\n * @param {Array|Uint8Array} [offset=0]\n * offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n * mask to use on bytes before comparison.\n *\n * @return {boolean}\n * If all bytes in b are inside of a, taking into account\n * bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$offset = _ref3.offset,\n offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n _ref3$mask = _ref3.mask,\n mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n a = toUint8(a);\n b = toUint8(b); // ie 11 does not support uint8 every\n\n var fn = b.every ? b.every : Array.prototype.every;\n return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n fn.call(b, function (bByte, i) {\n var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n return bByte === aByte;\n });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n if (Uint8Array.prototype.slice) {\n return Uint8Array.prototype.slice.call(src, start, end);\n }\n\n return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n if (src.reverse) {\n return src.reverse();\n }\n\n return Array.prototype.reverse.call(src);\n};","import { padStart, toHexString, toBinaryString } from './byte-helpers.js'; // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax\n// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1\n\nexport var getAv1Codec = function getAv1Codec(bytes) {\n var codec = '';\n var profile = bytes[1] >>> 3;\n var level = bytes[1] & 0x1F;\n var tier = bytes[2] >>> 7;\n var highBitDepth = (bytes[2] & 0x40) >> 6;\n var twelveBit = (bytes[2] & 0x20) >> 5;\n var monochrome = (bytes[2] & 0x10) >> 4;\n var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;\n var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;\n var chromaSamplePosition = bytes[2] & 0x03;\n codec += profile + \".\" + padStart(level, 2, '0');\n\n if (tier === 0) {\n codec += 'M';\n } else if (tier === 1) {\n codec += 'H';\n }\n\n var bitDepth;\n\n if (profile === 2 && highBitDepth) {\n bitDepth = twelveBit ? 12 : 10;\n } else {\n bitDepth = highBitDepth ? 10 : 8;\n }\n\n codec += \".\" + padStart(bitDepth, 2, '0'); // TODO: can we parse color range??\n\n codec += \".\" + monochrome;\n codec += \".\" + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;\n return codec;\n};\nexport var getAvcCodec = function getAvcCodec(bytes) {\n var profileId = toHexString(bytes[1]);\n var constraintFlags = toHexString(bytes[2] & 0xFC);\n var levelId = toHexString(bytes[3]);\n return \"\" + profileId + constraintFlags + levelId;\n};\nexport var getHvcCodec = function getHvcCodec(bytes) {\n var codec = '';\n var profileSpace = bytes[1] >> 6;\n var profileId = bytes[1] & 0x1F;\n var tierFlag = (bytes[1] & 0x20) >> 5;\n var profileCompat = bytes.subarray(2, 6);\n var constraintIds = bytes.subarray(6, 12);\n var levelId = bytes[12];\n\n if (profileSpace === 1) {\n codec += 'A';\n } else if (profileSpace === 2) {\n codec += 'B';\n } else if (profileSpace === 3) {\n codec += 'C';\n }\n\n codec += profileId + \".\"; // ffmpeg does this in big endian\n\n var profileCompatVal = parseInt(toBinaryString(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...\n\n if (profileCompatVal > 255) {\n profileCompatVal = parseInt(toBinaryString(profileCompat), 2);\n }\n\n codec += profileCompatVal.toString(16) + \".\";\n\n if (tierFlag === 0) {\n codec += 'L';\n } else {\n codec += 'H';\n }\n\n codec += levelId;\n var constraints = '';\n\n for (var i = 0; i < constraintIds.length; i++) {\n var v = constraintIds[i];\n\n if (v) {\n if (constraints) {\n constraints += '.';\n }\n\n constraints += v.toString(16);\n }\n }\n\n if (constraints) {\n codec += \".\" + constraints;\n }\n\n return codec;\n};","import window from 'global/window';\nvar regexs = {\n // to determine mime types\n mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n // to determine if a codec is audio or video\n video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n text: /^(stpp.ttml.im1t)/,\n // mux.js support regex\n muxerVideo: /^(avc0?1)/,\n muxerAudio: /^(mp4a)/,\n // match nothing as muxer does not support text right now.\n // there cannot never be a character before the start of a string\n // so this matches nothing.\n muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {string} codec\n * Codec string to translate\n * @return {string}\n * The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n if (!codec) {\n return codec;\n }\n\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n};\n/**\n * Replace the old apple-style `avc1.
.
` codec strings with the standard\n * `avc1.`\n *\n * @param {string[]} codecs\n * An array of codec strings to translate\n * @return {string[]}\n * The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the\n * standard `avc1.`.\n *\n * @param {string} codecString\n * The codec string\n * @return {string}\n * The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n * Number of codecs parsed\n * @property {string} [videoCodec]\n * Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n * Video object type indicator (if found)\n * @property {string|null} audioProfile\n * Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n * The codec string to parse\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n var codecs = codecString.split(',');\n var result = [];\n codecs.forEach(function (codec) {\n codec = codec.trim();\n var codecType;\n mediaTypes.forEach(function (name) {\n var match = regexs[name].exec(codec.toLowerCase());\n\n if (!match || match.length <= 1) {\n return;\n }\n\n codecType = name; // maintain codec case\n\n var type = codec.substring(0, match[1].length);\n var details = codec.replace(type, '');\n result.push({\n type: type,\n details: details,\n mediaType: name\n });\n });\n\n if (!codecType) {\n result.push({\n type: codec,\n details: '',\n mediaType: 'unknown'\n });\n }\n });\n return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n * The master playlist\n * @param {string} audioGroupId\n * ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n if (!audioGroup) {\n return null;\n }\n\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n\n if (audioType.default && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS);\n }\n }\n\n return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n if (!codecString || typeof codecString !== 'string') {\n return;\n }\n\n var codecs = codecString.toLowerCase().split(',').map(function (c) {\n return translateLegacyCodec(c.trim());\n }); // default to video type\n\n var type = 'video'; // only change to audio type if the only codec we have is\n // audio\n\n if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n type = 'audio';\n } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n // text uses application/ for now\n type = 'application';\n } // default the container to mp4\n\n\n var container = 'mp4'; // every codec must be able to go into the container\n // for that container to be the correct one\n\n if (codecs.every(function (c) {\n return regexs.mp4.test(c);\n })) {\n container = 'mp4';\n } else if (codecs.every(function (c) {\n return regexs.webm.test(c);\n })) {\n container = 'webm';\n } else if (codecs.every(function (c) {\n return regexs.ogg.test(c);\n })) {\n container = 'ogg';\n }\n\n return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return codecString.toLowerCase().split(',').every(function (codec) {\n codec = codec.trim(); // any match is supported.\n\n for (var i = 0; i < upperMediaTypes.length; i++) {\n var type = upperMediaTypes[i];\n\n if (regexs[\"muxer\" + type].test(codec)) {\n return true;\n }\n }\n\n return false;\n });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","import { toUint8, bytesMatch } from './byte-helpers.js';\nimport { findBox } from './mp4-helpers.js';\nimport { findEbml, EBML_TAGS } from './ebml-helpers.js';\nimport { getId3Offset } from './id3-helpers.js';\nimport { findH264Nal, findH265Nal } from './nal-helpers.js';\nvar CONSTANTS = {\n // \"webm\" string literal in hex\n 'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n // \"matroska\" string literal in hex\n 'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n // \"fLaC\" string literal in hex\n 'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n // \"OggS\" string literal in hex\n 'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n // ac-3 sync byte, also works for ec-3 as that is simply a codec\n // of ac-3\n 'ac3': toUint8([0x0b, 0x77]),\n // \"RIFF\" string literal in hex used for wav and avi\n 'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n // \"AVI\" string literal in hex\n 'avi': toUint8([0x41, 0x56, 0x49]),\n // \"WAVE\" string literal in hex\n 'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n // \"ftyp3g\" string literal in hex\n '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n // \"ftyp\" string literal in hex\n 'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n // \"styp\" string literal in hex\n 'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n // \"ftypqt\" string literal in hex\n 'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n // moov string literal in hex\n 'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n // moof string literal in hex\n 'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n aac: function aac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x10], {\n offset: offset,\n mask: [0xFF, 0x16]\n });\n },\n mp3: function mp3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x02], {\n offset: offset,\n mask: [0xFF, 0x06]\n });\n },\n webm: function webm(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n return bytesMatch(docType, CONSTANTS.webm);\n },\n mkv: function mkv(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n return bytesMatch(docType, CONSTANTS.matroska);\n },\n mp4: function mp4(bytes) {\n // if this file is another base media file format, it is not mp4\n if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n return false;\n } // if this file starts with a ftyp or styp box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.mp4, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n offset: 4\n })) {\n return true;\n } // if this file starts with a moof/moov box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.moof, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.moov, {\n offset: 4\n })) {\n return true;\n }\n },\n mov: function mov(bytes) {\n return bytesMatch(bytes, CONSTANTS.mov, {\n offset: 4\n });\n },\n '3gp': function gp(bytes) {\n return bytesMatch(bytes, CONSTANTS['3gp'], {\n offset: 4\n });\n },\n ac3: function ac3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.ac3, {\n offset: offset\n });\n },\n ts: function ts(bytes) {\n if (bytes.length < 189 && bytes.length >= 1) {\n return bytes[0] === 0x47;\n }\n\n var i = 0; // check the first 376 bytes for two matching sync bytes\n\n while (i + 188 < bytes.length && i < 188) {\n if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n flac: function flac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.flac, {\n offset: offset\n });\n },\n ogg: function ogg(bytes) {\n return bytesMatch(bytes, CONSTANTS.ogg);\n },\n avi: function avi(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n offset: 8\n });\n },\n wav: function wav(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n offset: 8\n });\n },\n 'h264': function h264(bytes) {\n // find seq_parameter_set_rbsp\n return findH264Nal(bytes, 7, 3).length;\n },\n 'h265': function h265(bytes) {\n // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n return findH265Nal(bytes, [32, 33], 3).length;\n }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n var isLikelyFn = _isLikely[type];\n\n _isLikely[type] = function (bytes) {\n return isLikelyFn(toUint8(bytes));\n };\n}); // export after wrapping\n\nexport var isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexport var detectContainerForBytes = function detectContainerForBytes(bytes) {\n bytes = toUint8(bytes);\n\n for (var i = 0; i < isLikelyTypes.length; i++) {\n var type = isLikelyTypes[i];\n\n if (isLikely[type](bytes)) {\n return type;\n }\n }\n\n return '';\n}; // fmp4 is not a container\n\nexport var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n return findBox(bytes, ['moof']).length > 0;\n};","import { toUint8, bytesToNumber, bytesMatch, bytesToString, numberToBytes, padStart } from './byte-helpers';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js'; // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nexport var EBML_TAGS = {\n EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n DocType: toUint8([0x42, 0x82]),\n Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n Track: toUint8([0xAE]),\n TrackNumber: toUint8([0xd7]),\n DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n TrackEntry: toUint8([0xAE]),\n TrackType: toUint8([0x83]),\n FlagDefault: toUint8([0x88]),\n CodecID: toUint8([0x86]),\n CodecPrivate: toUint8([0x63, 0xA2]),\n VideoTrack: toUint8([0xe0]),\n AudioTrack: toUint8([0xe1]),\n // Not used yet, but will be used for live webm/mkv\n // see https://www.matroska.org/technical/basics.html#block-structure\n // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n Timestamp: toUint8([0xE7]),\n TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n BlockGroup: toUint8([0xA0]),\n BlockDuration: toUint8([0x9B]),\n Block: toUint8([0xA1]),\n SimpleBlock: toUint8([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n var len = 1;\n\n for (var i = 0; i < LENGTH_TABLE.length; i++) {\n if (byte & LENGTH_TABLE[i]) {\n break;\n }\n\n len++;\n }\n\n return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n if (removeLength === void 0) {\n removeLength = true;\n }\n\n if (signed === void 0) {\n signed = false;\n }\n\n var length = getLength(bytes[offset]);\n var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n // as they will be modified below to remove the dataSizeLen bits and we do not\n // want to modify the original data. normally we could just call slice on\n // uint8array but ie 11 does not support that...\n\n if (removeLength) {\n valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n valueBytes[0] ^= LENGTH_TABLE[length - 1];\n }\n\n return {\n length: length,\n value: bytesToNumber(valueBytes, {\n signed: signed\n }),\n bytes: valueBytes\n };\n};\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return path.match(/.{1,2}/g).map(function (p) {\n return normalizePath(p);\n });\n }\n\n if (typeof path === 'number') {\n return numberToBytes(path);\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n if (offset >= bytes.length) {\n return bytes.length;\n }\n\n var innerid = getvint(bytes, offset, false);\n\n if (bytesMatch(id.bytes, innerid.bytes)) {\n return offset;\n }\n\n var dataHeader = getvint(bytes, offset + innerid.length);\n return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n * converting the byte to binary and counting the zeros\n * before a 1. Then you add 1 to that. Examples\n * 00011111 = length 4 because there are 3 zeros before a 1.\n * 00100000 = length 3 because there are 2 zeros before a 1.\n * 00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n * Then all the bytes are merged into a value. NOTE: this\n * is not the case for id ebml tags as there id includes\n * length bits.\n *\n */\n\n\nexport var findEbml = function findEbml(bytes, paths) {\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var id = getvint(bytes, i, false);\n var dataHeader = getvint(bytes, i + id.length);\n var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n if (dataHeader.value === 0x7f) {\n dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n\n if (dataHeader.value !== bytes.length) {\n dataHeader.value -= dataStart;\n }\n }\n\n var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n var data = bytes.subarray(dataStart, dataEnd);\n\n if (bytesMatch(paths[0], id.bytes)) {\n if (paths.length === 1) {\n // this is the end of the paths and we've found the tag we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next tag inside of the data\n // of this one\n results = results.concat(findEbml(data, paths.slice(1)));\n }\n }\n\n var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n i += totalLength;\n }\n\n return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nexport var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n var duration;\n\n if (type === 'group') {\n duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n if (duration) {\n duration = bytesToNumber(duration);\n duration = 1 / timestampScale * duration * timestampScale / 1000;\n }\n\n block = findEbml(block, [EBML_TAGS.Block])[0];\n type = 'block'; // treat data as a block after this point\n }\n\n var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n var trackNumber = getvint(block, 0);\n var timestamp = dv.getInt16(trackNumber.length, false);\n var flags = block[trackNumber.length + 2];\n var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n var parsed = {\n duration: duration,\n trackNumber: trackNumber.value,\n keyframe: type === 'simple' && flags >> 7 === 1,\n invisible: (flags & 0x08) >> 3 === 1,\n lacing: (flags & 0x06) >> 1,\n discardable: type === 'simple' && (flags & 0x01) === 1,\n frames: [],\n pts: ptsdts,\n dts: ptsdts,\n timestamp: timestamp\n };\n\n if (!parsed.lacing) {\n parsed.frames.push(data);\n return parsed;\n }\n\n var numberOfFrames = data[0] + 1;\n var frameSizes = [];\n var offset = 1; // Fixed\n\n if (parsed.lacing === 2) {\n var sizeOfFrame = (data.length - offset) / numberOfFrames;\n\n for (var i = 0; i < numberOfFrames; i++) {\n frameSizes.push(sizeOfFrame);\n }\n } // xiph\n\n\n if (parsed.lacing === 1) {\n for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n var size = 0;\n\n do {\n size += data[offset];\n offset++;\n } while (data[offset - 1] === 0xFF);\n\n frameSizes.push(size);\n }\n } // ebml\n\n\n if (parsed.lacing === 3) {\n // first vint is unsinged\n // after that vints are singed and\n // based on a compounding size\n var _size = 0;\n\n for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true);\n _size += vint.value;\n frameSizes.push(_size);\n offset += vint.length;\n }\n }\n\n frameSizes.forEach(function (size) {\n parsed.frames.push(data.subarray(offset, offset + size));\n offset += size;\n });\n return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n var i = 0;\n var params = {};\n\n while (i < bytes.length) {\n var id = bytes[i] & 0x7f;\n var len = bytes[i + 1];\n var val = void 0;\n\n if (len === 1) {\n val = bytes[i + 2];\n } else {\n val = bytes.subarray(i + 2, i + 2 + len);\n }\n\n if (id === 1) {\n params.profile = val;\n } else if (id === 2) {\n params.level = val;\n } else if (id === 3) {\n params.bitDepth = val;\n } else if (id === 4) {\n params.chromaSubsampling = val;\n } else {\n params[id] = val;\n }\n\n i += 2 + len;\n }\n\n return params;\n};\n\nexport var parseTracks = function parseTracks(bytes) {\n bytes = toUint8(bytes);\n var decodedTracks = [];\n var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n return decodedTracks;\n }\n\n tracks.forEach(function (track) {\n var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\n if (!trackType || !trackType.length) {\n return;\n } // 1 is video, 2 is audio, 17 is subtitle\n // other values are unimportant in this context\n\n\n if (trackType[0] === 1) {\n trackType = 'video';\n } else if (trackType[0] === 2) {\n trackType = 'audio';\n } else if (trackType[0] === 17) {\n trackType = 'subtitle';\n } else {\n return;\n } // todo parse language\n\n\n var decodedTrack = {\n rawCodec: bytesToString(findEbml(track, [EBML_TAGS.CodecID])[0]),\n type: trackType,\n codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n number: bytesToNumber(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n defaultDuration: bytesToNumber(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n default: findEbml(track, [EBML_TAGS.FlagDefault])[0],\n rawData: track\n };\n var codec = '';\n\n if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n codec = \"avc1.\" + getAvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n codec = \"hev1.\" + getHvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n } else {\n codec = 'mp4v.20.9';\n }\n } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n codec = 'theora';\n } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n codec = 'vp8';\n } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n profile = _parseVp9Private.profile,\n level = _parseVp9Private.level,\n bitDepth = _parseVp9Private.bitDepth,\n chromaSubsampling = _parseVp9Private.chromaSubsampling;\n\n codec = 'vp09.';\n codec += padStart(profile, 2, '0') + \".\";\n codec += padStart(level, 2, '0') + \".\";\n codec += padStart(bitDepth, 2, '0') + \".\";\n codec += \"\" + padStart(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n codec += \".\" + padStart(colourPrimaries[0], 2, '0');\n codec += \".\" + padStart(transferCharacteristics[0], 2, '0');\n codec += \".\" + padStart(matrixCoefficients[0], 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag[0], 2, '0');\n }\n } else {\n codec = 'vp9';\n }\n } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n codec = \"av01.\" + getAv1Codec(decodedTrack.codecPrivate);\n } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n codec = 'alac';\n } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n codec = 'mp2';\n } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n codec = 'mp3';\n } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n } else {\n codec = 'mp4a.40.2';\n }\n } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n codec = 'ac-3';\n } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n codec = 'pcm';\n } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n codec = 'speex';\n } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n codec = 'ec-3';\n } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n codec = 'vorbis';\n } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n codec = 'flac';\n } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n codec = 'opus';\n }\n\n decodedTrack.codec = codec;\n decodedTracks.push(decodedTrack);\n });\n return decodedTracks.sort(function (a, b) {\n return a.number - b.number;\n });\n};\nexport var parseData = function parseData(data, tracks) {\n var allBlocks = [];\n var segment = findEbml(data, [EBML_TAGS.Segment])[0];\n var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n if (timestampScale && timestampScale.length) {\n timestampScale = bytesToNumber(timestampScale);\n } else {\n timestampScale = 1000000;\n }\n\n var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n if (!tracks) {\n tracks = parseTracks(segment);\n }\n\n clusters.forEach(function (cluster, ci) {\n var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n return {\n type: 'simple',\n data: b\n };\n });\n var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n return {\n type: 'group',\n data: b\n };\n });\n var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n\n if (timestamp && timestamp.length) {\n timestamp = bytesToNumber(timestamp);\n } // get all blocks then sort them into the correct order\n\n\n var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n return a.data.byteOffset - b.data.byteOffset;\n });\n blocks.forEach(function (block, bi) {\n var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp);\n allBlocks.push(decoded);\n });\n });\n return {\n tracks: tracks,\n blocks: allBlocks\n };\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nvar ID3 = toUint8([0x49, 0x44, 0x33]);\nexport var getId3Size = function getId3Size(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n var flags = bytes[offset + 5];\n var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n var footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n\n return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n\n if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n offset: offset\n })) {\n return offset;\n }\n\n offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n // have multiple ID3 tag sections even though\n // they should not.\n\n return getId3Offset(bytes, offset);\n};","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n * Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n * VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n if (MPEGURL_REGEX.test(type)) {\n return 'hls';\n }\n\n if (DASH_REGEX.test(type)) {\n return 'dash';\n } // Denotes the special case of a manifest object passed to http-streaming instead of a\n // source URL.\n //\n // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n //\n // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n // project, and the +json suffix identifies the structure of the media type.\n\n\n if (type === 'application/vnd.videojs.vhs+json') {\n return 'vhs-json';\n }\n\n return null;\n};","import { stringToBytes, toUint8, bytesMatch, bytesToString, toHexString, padStart, bytesToNumber } from './byte-helpers.js';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js';\nimport { parseOpusHead } from './opus-helpers.js';\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return stringToBytes(path);\n }\n\n if (typeof path === 'number') {\n return path;\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n bytes = toUint8(bytes);\n var results = [];\n var i = 0;\n\n while (bytes.length > i) {\n var tag = bytes[i];\n var size = 0;\n var headerSize = 0; // tag\n\n headerSize++;\n var byte = bytes[headerSize]; // first byte\n\n headerSize++;\n\n while (byte & 0x80) {\n size = (byte & 0x7F) << 7;\n byte = bytes[headerSize];\n headerSize++;\n }\n\n size += byte & 0x7F;\n\n for (var z = 0; z < DESCRIPTORS.length; z++) {\n var _DESCRIPTORS$z = DESCRIPTORS[z],\n id = _DESCRIPTORS$z.id,\n parser = _DESCRIPTORS$z.parser;\n\n if (tag === id) {\n results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n break;\n }\n }\n\n i += size + headerSize;\n }\n\n return results;\n};\nDESCRIPTORS = [{\n id: 0x03,\n parser: function parser(bytes) {\n var desc = {\n tag: 0x03,\n id: bytes[0] << 8 | bytes[1],\n flags: bytes[2],\n size: 3,\n dependsOnEsId: 0,\n ocrEsId: 0,\n descriptors: [],\n url: ''\n }; // depends on es id\n\n if (desc.flags & 0x80) {\n desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n } // url\n\n\n if (desc.flags & 0x40) {\n var len = bytes[desc.size];\n desc.url = bytesToString(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n desc.size += len;\n } // ocr es id\n\n\n if (desc.flags & 0x20) {\n desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n }\n\n desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || [];\n return desc;\n }\n}, {\n id: 0x04,\n parser: function parser(bytes) {\n // DecoderConfigDescriptor\n var desc = {\n tag: 0x04,\n oti: bytes[0],\n streamType: bytes[1],\n bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n descriptors: parseDescriptors(bytes.subarray(13))\n };\n return desc;\n }\n}, {\n id: 0x05,\n parser: function parser(bytes) {\n // DecoderSpecificInfo\n return {\n tag: 0x05,\n bytes: bytes\n };\n }\n}, {\n id: 0x06,\n parser: function parser(bytes) {\n // SLConfigDescriptor\n return {\n tag: 0x06,\n bytes: bytes\n };\n }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n * An array of paths or a single path representing the name\n * of boxes to search through in bytes. Paths may be\n * uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n * Should we search only for complete boxes on the final path.\n * This is very useful when you do not want to get back partial boxes\n * in the case of streaming files.\n *\n * @return {Uint8Array[]}\n * An array of the end paths that we found.\n */\n\nexport var findBox = function findBox(bytes, paths, complete) {\n if (complete === void 0) {\n complete = false;\n }\n\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n // short-circuit the search for empty paths\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n if (size === 0) {\n break;\n }\n\n var end = i + size;\n\n if (end > bytes.length) {\n // this box is bigger than the number of bytes we have\n // and complete is set, we cannot find any more boxes.\n if (complete) {\n break;\n }\n\n end = bytes.length;\n }\n\n var data = bytes.subarray(i + 8, end);\n\n if (bytesMatch(type, paths[0])) {\n if (paths.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next box along the path\n results.push.apply(results, findBox(data, paths.slice(1), complete));\n }\n }\n\n i = end;\n } // we've finished searching all of bytes\n\n\n return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n * The name of the box to find.\n *\n * @return {Uint8Array[]}\n * a subarray of bytes representing the name boxed we found.\n */\n\nexport var findNamedBox = function findNamedBox(bytes, name) {\n name = normalizePath(name);\n\n if (!name.length) {\n // short-circuit the search for empty paths\n return bytes.subarray(bytes.length);\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n if (bytesMatch(bytes.subarray(i, i + name.length), name)) {\n var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n var end = size > 1 ? i + size : bytes.byteLength;\n return bytes.subarray(i + 4, end);\n }\n\n i++;\n } // we've finished searching all of bytes\n\n\n return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n if (entrySize === void 0) {\n entrySize = 4;\n }\n\n if (parseEntry === void 0) {\n parseEntry = function parseEntry(d) {\n return bytesToNumber(d);\n };\n }\n\n var entries = [];\n\n if (!data || !data.length) {\n return entries;\n }\n\n var entryCount = bytesToNumber(data.subarray(4, 8));\n\n for (var i = 8; entryCount; i += entrySize, entryCount--) {\n entries.push(parseEntry(data.subarray(i, i + entrySize)));\n }\n\n return entries;\n};\n\nexport var buildFrameTable = function buildFrameTable(stbl, timescale) {\n var keySamples = parseSamples(findBox(stbl, ['stss'])[0]);\n var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]);\n var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) {\n return {\n sampleCount: bytesToNumber(entry.subarray(0, 4)),\n sampleDelta: bytesToNumber(entry.subarray(4, 8))\n };\n });\n var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n return {\n firstChunk: bytesToNumber(entry.subarray(0, 4)),\n samplesPerChunk: bytesToNumber(entry.subarray(4, 8)),\n sampleDescriptionIndex: bytesToNumber(entry.subarray(8, 12))\n };\n });\n var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n var frames = [];\n\n for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n var samplesInChunk = void 0;\n\n for (var i = 0; i < samplesToChunks.length; i++) {\n var sampleToChunk = samplesToChunks[i];\n var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n\n if (isThisOne) {\n samplesInChunk = sampleToChunk.samplesPerChunk;\n break;\n }\n }\n\n var chunkOffset = chunkOffsets[chunkIndex];\n\n for (var _i = 0; _i < samplesInChunk; _i++) {\n var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n var keyframe = !keySamples.length;\n\n if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n keyframe = true;\n }\n\n var frame = {\n keyframe: keyframe,\n start: chunkOffset,\n end: chunkOffset + frameEnd\n };\n\n for (var k = 0; k < timeToSamples.length; k++) {\n var _timeToSamples$k = timeToSamples[k],\n sampleCount = _timeToSamples$k.sampleCount,\n sampleDelta = _timeToSamples$k.sampleDelta;\n\n if (frames.length <= sampleCount) {\n // ms to ns\n var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n frame.duration = sampleDelta;\n break;\n }\n }\n\n frames.push(frame);\n chunkOffset += frameEnd;\n }\n }\n\n return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n var codec = bytesToString(bytes.subarray(0, 4));\n\n if (track.type === 'video') {\n track.info = track.info || {};\n track.info.width = bytes[28] << 8 | bytes[29];\n track.info.height = bytes[30] << 8 | bytes[31];\n } else if (track.type === 'audio') {\n track.info = track.info || {};\n track.info.channels = bytes[20] << 8 | bytes[21];\n track.info.bitDepth = bytes[22] << 8 | bytes[23];\n track.info.sampleRate = bytes[28] << 8 | bytes[29];\n }\n\n if (codec === 'avc1') {\n var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n codec += \".\" + getAvcCodec(avcC);\n track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n /* {\n configurationVersion: avcC[0],\n profile: avcC[1],\n profileCompatibility: avcC[2],\n level: avcC[3],\n lengthSizeMinusOne: avcC[4] & 0x3\n };\n let spsNalUnitCount = avcC[5] & 0x1F;\n const spsNalUnits = track.info.avc.spsNalUnits = [];\n // past spsNalUnitCount\n let offset = 6;\n while (spsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }\n let ppsNalUnitCount = avcC[offset];\n const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n // past ppsNalUnitCount\n offset += 1;\n while (ppsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }*/\n // HEVCDecoderConfigurationRecord\n } else if (codec === 'hvc1' || codec === 'hev1') {\n codec += \".\" + getHvcCodec(findNamedBox(bytes, 'hvcC'));\n } else if (codec === 'mp4a' || codec === 'mp4v') {\n var esds = findNamedBox(bytes, 'esds');\n var esDescriptor = parseDescriptors(esds.subarray(4))[0];\n var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n var tag = _ref.tag;\n return tag === 0x04;\n })[0];\n\n if (decoderConfig) {\n // most codecs do not have a further '.'\n // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n codec += '.' + toHexString(decoderConfig.oti);\n\n if (decoderConfig.oti === 0x40) {\n codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n } else if (decoderConfig.oti === 0x20) {\n codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n } else if (decoderConfig.oti === 0xdd) {\n codec = 'vorbis';\n }\n } else if (track.type === 'audio') {\n codec += '.40.2';\n } else {\n codec += '.20.9';\n }\n } else if (codec === 'av01') {\n // AV1DecoderConfigurationRecord\n codec += \".\" + getAv1Codec(findNamedBox(bytes, 'av1C'));\n } else if (codec === 'vp09') {\n // VPCodecConfigurationRecord\n var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n var profile = vpcC[0];\n var level = vpcC[1];\n var bitDepth = vpcC[2] >> 4;\n var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n var colourPrimaries = vpcC[3];\n var transferCharacteristics = vpcC[4];\n var matrixCoefficients = vpcC[5];\n codec += \".\" + padStart(profile, 2, '0');\n codec += \".\" + padStart(level, 2, '0');\n codec += \".\" + padStart(bitDepth, 2, '0');\n codec += \".\" + padStart(chromaSubsampling, 2, '0');\n codec += \".\" + padStart(colourPrimaries, 2, '0');\n codec += \".\" + padStart(transferCharacteristics, 2, '0');\n codec += \".\" + padStart(matrixCoefficients, 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag, 2, '0');\n } else if (codec === 'theo') {\n codec = 'theora';\n } else if (codec === 'spex') {\n codec = 'speex';\n } else if (codec === '.mp3') {\n codec = 'mp4a.40.34';\n } else if (codec === 'msVo') {\n codec = 'vorbis';\n } else if (codec === 'Opus') {\n codec = 'opus';\n var dOps = findNamedBox(bytes, 'dOps');\n track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n // Firefox requires a codecDelay for opus playback\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n track.info.codecDelay = 6500000;\n } else {\n codec = codec.toLowerCase();\n }\n /* eslint-enable */\n // flac, ac-3, ec-3, opus\n\n\n track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n if (frameTable === void 0) {\n frameTable = true;\n }\n\n bytes = toUint8(bytes);\n var traks = findBox(bytes, ['moov', 'trak'], true);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {\n bytes: trak\n };\n var mdia = findBox(trak, ['mdia'])[0];\n var hdlr = findBox(mdia, ['hdlr'])[0];\n var trakType = bytesToString(hdlr.subarray(8, 12));\n\n if (trakType === 'soun') {\n track.type = 'audio';\n } else if (trakType === 'vide') {\n track.type = 'video';\n } else {\n track.type = trakType;\n }\n\n var tkhd = findBox(trak, ['tkhd'])[0];\n\n if (tkhd) {\n var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n var tkhdVersion = view.getUint8(0);\n track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n\n var mdhd = findBox(mdia, ['mdhd'])[0];\n\n if (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n }\n\n var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n var stsd = findBox(stbl, ['stsd'])[0];\n var descriptionCount = bytesToNumber(stsd.subarray(4, 8));\n var offset = 8; // add codec and codec info\n\n while (descriptionCount--) {\n var len = bytesToNumber(stsd.subarray(offset, offset + 4));\n var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n addSampleDescription(track, sampleDescriptor);\n offset += 4 + len;\n }\n\n if (frameTable) {\n track.frameTable = buildFrameTable(stbl, track.timescale);\n } // codec has no sub parameters\n\n\n tracks.push(track);\n });\n return tracks;\n};\nexport var parseMediaInfo = function parseMediaInfo(bytes) {\n var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n if (!mvhd || !mvhd.length) {\n return;\n }\n\n var info = {}; // ms to ns\n // mvhd v1 has 8 byte duration and other fields too\n\n if (mvhd[0] === 1) {\n info.timestampScale = bytesToNumber(mvhd.subarray(20, 24));\n info.duration = bytesToNumber(mvhd.subarray(24, 32));\n } else {\n info.timestampScale = bytesToNumber(mvhd.subarray(12, 16));\n info.duration = bytesToNumber(mvhd.subarray(16, 20));\n }\n\n info.bytes = mvhd;\n return info;\n};","import { bytesMatch, toUint8 } from './byte-helpers.js';\nexport var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\nexport var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\nexport var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nexport var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n var positions = [];\n var i = 1; // Find all `Emulation Prevention Bytes`\n\n while (i < bytes.length - 2) {\n if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n positions.push(i + 2);\n i++;\n }\n\n i++;\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (positions.length === 0) {\n return bytes;\n } // Create a new array to hold the NAL unit data\n\n\n var newLength = bytes.length - positions.length;\n var newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === positions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n positions.shift();\n }\n\n newData[i] = bytes[sourceIndex];\n }\n\n return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n if (nalLimit === void 0) {\n nalLimit = Infinity;\n }\n\n bytes = toUint8(bytes);\n types = [].concat(types);\n var i = 0;\n var nalStart;\n var nalsFound = 0; // keep searching until:\n // we reach the end of bytes\n // we reach the maximum number of nals they want to seach\n // NOTE: that we disregard nalLimit when we have found the start\n // of the nal we want so that we can find the end of the nal we want.\n\n while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n var nalOffset = void 0;\n\n if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n nalOffset = 4;\n } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n nalOffset = 3;\n } // we are unsynced,\n // find the next nal unit\n\n\n if (!nalOffset) {\n i++;\n continue;\n }\n\n nalsFound++;\n\n if (nalStart) {\n return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n }\n\n var nalType = void 0;\n\n if (dataType === 'h264') {\n nalType = bytes[i + nalOffset] & 0x1f;\n } else if (dataType === 'h265') {\n nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n }\n\n if (types.indexOf(nalType) !== -1) {\n nalStart = i + nalOffset;\n } // nal header is 1 length for h264, and 2 for h265\n\n\n i += nalOffset + (dataType === 'h264' ? 1 : 2);\n }\n\n return bytes.subarray(0, 0);\n};\nexport var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h264', type, nalLimit);\n};\nexport var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h265', type, nalLimit);\n};","export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nexport var parseOpusHead = function parseOpusHead(bytes) {\n var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n var littleEndian = version !== 0;\n var config = {\n version: version,\n channels: view.getUint8(1),\n preSkip: view.getUint16(2, littleEndian),\n sampleRate: view.getUint32(4, littleEndian),\n outputGain: view.getUint16(8, littleEndian),\n channelMappingFamily: view.getUint8(10)\n };\n\n if (config.channelMappingFamily > 0 && bytes.length > 10) {\n config.streamCount = view.getUint8(11);\n config.twoChannelStreamCount = view.getUint8(12);\n config.channelMapping = [];\n\n for (var c = 0; c < config.channels; c++) {\n config.channelMapping.push(view.getUint8(13 + c));\n }\n }\n\n return config;\n};\nexport var setOpusHead = function setOpusHead(config) {\n var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n var view = new DataView(new ArrayBuffer(size));\n var littleEndian = config.version !== 0;\n view.setUint8(0, config.version);\n view.setUint8(1, config.channels);\n view.setUint16(2, config.preSkip, littleEndian);\n view.setUint32(4, config.sampleRate, littleEndian);\n view.setUint16(8, config.outputGain, littleEndian);\n view.setUint8(10, config.channelMappingFamily);\n\n if (config.channelMappingFamily > 0) {\n view.setUint8(11, config.streamCount);\n config.channelMapping.foreach(function (cm, i) {\n view.setUint8(12 + i, cm);\n });\n }\n\n return new Uint8Array(view.buffer);\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n WebVTT: require(\"./vtt.js\"),\n VTTCue: require(\"./vttcue.js\"),\n VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n window.VTTCue = cueShim;\n window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n window.VTTCue = nativeVTTCue;\n window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n vttjs.shim();\n}\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\n\nvar _objCreate = Object.create || (function() {\n function F() {}\n return function(o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function(k, v) {\n if (/^-?\\d+$/.test(v)) { // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function(k, v) {\n var m;\n if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n var kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n var k = kv[0].trim();\n var v = kv[1].trim();\n callback(k, v);\n }\n}\n\nfunction parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed timestamp: \" + oInput);\n }\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"size\":\n settings.percent(k, v);\n break;\n case \"align\":\n settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n try {\n cue.line = settings.get(\"line\", \"auto\");\n } catch (e) {}\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n // Safari still uses the old middle value and won't accept center\n try {\n cue.align = settings.get(\"align\", \"center\");\n } catch (e) {\n cue.align = settings.get(\"align\", \"middle\");\n }\n try {\n cue.position = settings.get(\"position\", \"auto\");\n } catch (e) {\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n center: 50,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n }\n\n\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n center: \"center\",\n middle: \"center\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== \"-->\") { // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n white: 'rgba(255,255,255,1)',\n lime: 'rgba(0,255,0,1)',\n cyan: 'rgba(0,255,255,1)',\n red: 'rgba(255,0,0,1)',\n yellow: 'rgba(255,255,0,1)',\n magenta: 'rgba(255,0,255,1)',\n blue: 'rgba(0,0,255,1)',\n black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n }\n\n // Consume 'n' characters from the input.\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n\n var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n // If there is some text before the next tag, return it, otherwise return\n // the tag.\n return consume(m[1] ? m[1] : m[2]);\n }\n\n function unescape(s) {\n TEXTAREA_ELEMENT.innerHTML = s;\n s = TEXTAREA_ELEMENT.textContent;\n TEXTAREA_ELEMENT.textContent = \"\";\n return s;\n }\n\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] ||\n NEEDS_PARENT[element.localName] === current.localName;\n }\n\n // Create an element for this tag.\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n if (!tagName) {\n return null;\n }\n var element = window.document.createElement(tagName);\n var name = TAG_ANNOTATION[type];\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n return element;\n }\n\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length &&\n tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n }\n // Otherwise just ignore the end tag.\n continue;\n }\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n // If we can't parse the tag, skip to the next tag.\n if (!m) {\n continue;\n }\n // Try to construct an element, and ignore the tag if we couldn't.\n node = createElement(m[1], m[3]);\n if (!node) {\n continue;\n }\n // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n if (!shouldAdd(current, node)) {\n continue;\n }\n // Set the class list (as a list of classes, separated by space).\n if (m[2]) {\n var classes = m[2].split('.');\n\n classes.forEach(function(cl) {\n var bgColor = /^bg_/.test(cl);\n // slice out `bg_` if it's a background color\n var colorName = bgColor ? cl.slice(3) : cl;\n\n if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n var propName = bgColor ? 'background-color' : 'color';\n var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n node.style[propName] = propValue;\n }\n });\n\n node.className = classes.join(' ');\n }\n // Append the node to the current node, and enter the scope of the new\n // node.\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n }\n\n // Text nodes are leaf nodes.\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n\n return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n for (var i = 0; i < strongRTLRanges.length; i++) {\n var currentRange = strongRTLRanges[i];\n if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n return text;\n }\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n\n pushNodes(nodeStack, cueDiv);\n while ((text = nextTextNode(nodeStack))) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n if (isStrongRTLChar(charCode)) {\n return \"rtl\";\n }\n }\n }\n return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n if (typeof cue.line === \"number\" &&\n (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n return cue.line;\n }\n if (!cue.track || !cue.track.textTrackList ||\n !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n div = div || this.div;\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n StyleBox.call(this);\n this.cue = cue;\n\n // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: \"rgba(255, 255, 255, 1)\",\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\",\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\"\n };\n\n this.applyStyles(styles, this.cueDiv);\n\n // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except middle instead of center on Safari.\n this.div = window.document.createElement(\"div\");\n styles = {\n direction: determineBidi(this.cueDiv),\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\",\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n\n this.applyStyles(styles);\n this.div.appendChild(this.cueDiv);\n\n // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n var textPos = 0;\n switch (cue.positionAlign) {\n case \"start\":\n case \"line-left\":\n textPos = cue.position;\n break;\n case \"center\":\n textPos = cue.position - (cue.size / 2);\n break;\n case \"end\":\n case \"line-right\":\n textPos = cue.position - cue.size;\n break;\n }\n\n // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\")\n });\n // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n\n this.move = function(box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\")\n });\n };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect();\n // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n : 0;\n\n }\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || (top + (obj.height || height));\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n return this.left < b2.right &&\n this.right > b2.left &&\n this.top < b2.bottom &&\n this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n return this.top >= container.top &&\n this.bottom <= container.bottom &&\n this.left >= container.left &&\n this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n case \"-x\":\n return this.right > container.right;\n case \"+y\":\n return this.top < container.top;\n case \"-y\":\n return this.bottom > container.bottom;\n }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n obj = obj.div ? obj.div.getBoundingClientRect() :\n obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || (top + (obj.height || height)),\n width: obj.width || width\n };\n return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n b.move(axis[i]);\n }\n // We found a spot where we aren't overlapping anything. This is our\n // best position.\n if (b.within(containerBox)) {\n return b;\n }\n var p = b.intersectPercentage(containerBox);\n // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n }\n // Reset the box position to the specified position.\n b = new BoxPosition(specifiedPosition);\n }\n return bestPosition || specifiedPosition;\n }\n\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = [];\n\n // If we have a line number to align the cue to.\n if (cue.snapToLines) {\n var size;\n switch (cue.vertical) {\n case \"\":\n axis = [ \"+y\", \"-y\" ];\n size = \"height\";\n break;\n case \"rl\":\n axis = [ \"+x\", \"-x\" ];\n size = \"width\";\n break;\n case \"lr\":\n axis = [ \"-x\", \"+x\" ];\n size = \"width\";\n break;\n }\n\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0];\n\n // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n }\n\n // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n }\n\n // Move the box to the specified position. This may not be its best\n // position.\n boxPosition.move(initialAxis, position);\n\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n switch (cue.lineAlign) {\n case \"center\":\n linePos -= (calculatedPercentage / 2);\n break;\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n }\n\n // Apply initial line position to the cue box.\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n\n axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n // Get the box position again after we've applied the specified positioning\n // to it.\n boxPosition = new BoxPosition(styleBox);\n }\n\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n return {\n decode: function(data) {\n if (!data) {\n return \"\";\n }\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n// and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n }\n\n // Remove all previous children.\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay);\n\n // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }\n\n // We don't need to recompute the cues' display states. Just reuse them.\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n return;\n }\n\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n\n (function() {\n var styleBox, cue;\n\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i];\n\n // Compute the intial position and styles of the cue div.\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div);\n\n // Move the cue div to it's correct line position.\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n cue.displayState = styleBox.div;\n\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n if (!vttjs) {\n vttjs = {};\n }\n\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function (data) {\n var self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {stream: true});\n }\n\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n var line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.4 WebVTT region and WebVTT region settings syntax\n function parseRegion(input) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n case \"width\":\n settings.percent(k, v);\n break;\n case \"lines\":\n settings.integer(k, v);\n break;\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n if (xy.length !== 2) {\n break;\n }\n // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/);\n\n // Create the region, using default values for any values that were not\n // specified.\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\");\n // Register the region.\n self.onregion && self.onregion(region);\n // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n }\n\n // draft-pantos-http-live-streaming-20\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n // 3.5 WebVTT\n function parseTimestampMap(input) {\n var settings = new Settings();\n\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"MPEGT\":\n settings.integer(k + 'S', v);\n break;\n case \"LOCA\":\n settings.set(k + 'L', parseTimeStamp(v));\n break;\n }\n }, /[^\\d]:/, /,/);\n\n self.ontimestampmap && self.ontimestampmap({\n \"MPEGTS\": settings.get(\"MPEGTS\"),\n \"LOCAL\": settings.get(\"LOCAL\")\n });\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader(input) {\n if (input.match(/X-TIMESTAMP-MAP/)) {\n // This line contains HLS X-TIMESTAMP-MAP metadata\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"X-TIMESTAMP-MAP\":\n parseTimestampMap(v);\n break;\n }\n }, /=/);\n } else {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n\n }\n\n // 5.1 WebVTT file parsing.\n try {\n var line;\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n\n self.state = \"HEADER\";\n }\n\n var alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n continue;\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n // Safari still uses the old middle value and won't accept center\n try {\n self.cue.align = \"center\";\n } catch (e) {\n self.cue.align = \"middle\";\n }\n self.state = \"CUE\";\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /*falls through*/\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e);\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n self.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n continue;\n case \"BADCUE\": // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e);\n\n // If we are currently parsing a cue, report what we have.\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n },\n flush: function () {\n var self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch(e) {\n self.reportOrThrowError(e);\n }\n self.onflush && self.onflush();\n return this;\n }\n};\n\nmodule.exports = WebVTT;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n \"\": 1,\n \"lr\": 1,\n \"rl\": 1\n};\nvar alignSetting = {\n \"start\": 1,\n \"center\": 1,\n \"end\": 1,\n \"left\": 1,\n \"right\": 1,\n \"auto\": 1,\n \"line-left\": 1,\n \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n this.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = \"auto\";\n var _positionAlign = \"auto\";\n var _size = 100;\n var _align = \"center\";\n\n Object.defineProperties(this, {\n \"id\": {\n enumerable: true,\n get: function() {\n return _id;\n },\n set: function(value) {\n _id = \"\" + value;\n }\n },\n\n \"pauseOnExit\": {\n enumerable: true,\n get: function() {\n return _pauseOnExit;\n },\n set: function(value) {\n _pauseOnExit = !!value;\n }\n },\n\n \"startTime\": {\n enumerable: true,\n get: function() {\n return _startTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n _startTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"endTime\": {\n enumerable: true,\n get: function() {\n return _endTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n _endTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"text\": {\n enumerable: true,\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n },\n\n \"region\": {\n enumerable: true,\n get: function() {\n return _region;\n },\n set: function(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n },\n\n \"vertical\": {\n enumerable: true,\n get: function() {\n return _vertical;\n },\n set: function(value) {\n var setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n }\n _vertical = setting;\n this.hasBeenReset = true;\n }\n },\n\n \"snapToLines\": {\n enumerable: true,\n get: function() {\n return _snapToLines;\n },\n set: function(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n },\n\n \"line\": {\n enumerable: true,\n get: function() {\n return _line;\n },\n set: function(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n }\n _line = value;\n this.hasBeenReset = true;\n }\n },\n\n \"lineAlign\": {\n enumerable: true,\n get: function() {\n return _lineAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n } else {\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"position\": {\n enumerable: true,\n get: function() {\n return _position;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n _position = value;\n this.hasBeenReset = true;\n }\n },\n\n \"positionAlign\": {\n enumerable: true,\n get: function() {\n return _positionAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n } else {\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"size\": {\n enumerable: true,\n get: function() {\n return _size;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n _size = value;\n this.hasBeenReset = true;\n }\n },\n\n \"align\": {\n enumerable: true,\n get: function() {\n return _align;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n }\n _align = setting;\n this.hasBeenReset = true;\n }\n }\n });\n\n /**\n * Other spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n \"\": true,\n \"up\": true\n};\n\nfunction findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function() {\n return _lines;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function() {\n return _regionAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function() {\n return _regionAnchorX;\n },\n set: function(value) {\n if(!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorX;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function() {\n return _scroll;\n },\n set: function(value) {\n var setting = findScrollSetting(value);\n // Have to check for false as an empty string is a legal value.\n if (setting === false) {\n console.warn(\"Scroll: an invalid or illegal string was specified.\");\n } else {\n _scroll = setting;\n }\n }\n }\n });\n}\n\nmodule.exports = VTTRegion;\n","/* (ignored) */","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * Dom7 4.0.6\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2023, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: February 2, 2023\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n if (typeof items === 'number') {\n super(items);\n } else {\n super(...(items || []));\n makeReactive(this);\n }\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionStart(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionstart', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionstart', fireCallBack);\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, transitionStart, trigger, val, value, width };\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","import { getWindow } from 'ssr-window';\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n\n return breakpoint || 'max';\n}","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\nexport default {\n setBreakpoint,\n getBreakpoint\n};","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const {\n activeIndex,\n initialized,\n loopedSlides = 0,\n params,\n $el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters\n\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n\n swiper.emitContainerClasses();\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}","function checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\n\nexport default {\n checkOverflow\n};","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n $el,\n device,\n support\n } = swiper; // prettier-ignore\n\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'pointer-events': !support.touch\n }, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\nexport default {\n addClasses,\n removeClasses\n};","export default function removeClasses() {\n const swiper = this;\n const {\n $el,\n classNames\n } = swiper;\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\nimport eventsEmitter from './events-emitter.js';\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images\n};\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n } // Swiper Instance\n\n\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n }); // Extend defaults with modules params\n\n const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params\n\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params); // add event listeners\n\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n } // Save Dom lib\n\n\n swiper.$ = $; // Extend Swiper\n\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEvents: function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3]\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2]\n };\n return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper'); // Init\n\n if (swiper.params.init) {\n swiper.init();\n } // Return app instance\n\n\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n let translated;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (!translated) {\n setTranslate();\n }\n }\n\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n\n swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.each(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true; // Find el\n\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items\n\n res.children = options => $el.children(options);\n\n return res;\n }\n\n return $el.children(getWrapperSelector());\n }; // Find Wrapper\n\n\n let $wrapperEl = getWrapper();\n\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each(slideEl => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box'\n });\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit'); // Set breakpoint\n\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n } // Add Classes\n\n\n swiper.addClasses(); // Create loop\n\n if (swiper.params.loop) {\n swiper.loopCreate();\n } // Update size\n\n\n swiper.updateSize(); // Update slides\n\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n } // Set Grab Cursor\n\n\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n } // Slide To Initial Slide\n\n\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n } // Attach events\n\n\n swiper.attachEvents(); // Init Flag\n\n swiper.initialized = true; // Emit\n\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n $el,\n $wrapperEl,\n slides\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy'); // Init Flag\n\n swiper.initialized = false; // Detach events\n\n swiper.detachEvents(); // Destroy loop\n\n if (params.loop) {\n swiper.loopDestroy();\n } // Cleanup styles\n\n\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n\n if (slides && slides.length) {\n slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy'); // Detach emitter events\n\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n\n swiper.destroyed = true;\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n\n Swiper.installModule(module);\n return Swiper;\n }\n\n}\n\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\nexport default Swiper;","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};","/* eslint-disable no-underscore-dangle */\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n\n function onceHandler(...args) {\n self.off(events, onceHandler);\n\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n\n handler.apply(self, args);\n }\n\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n};","import { getDocument } from 'ssr-window';\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\nlet dummyEventAttached = false;\n\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n touchEvents,\n el,\n wrapperEl,\n device,\n support\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method; // Touch Events\n\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? {\n passive: false,\n capture\n } : capture);\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n } // Prevent Links Clicks\n\n\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n } // Resize handler\n\n\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n support\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents\n};","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}","export default function onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n } // Save locks\n\n\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper; // Disable locks on resize\n\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n } // Return locks after resize\n\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}","export default function onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n } // eslint-disable-next-line\n\n\n if (swiper.translate === -0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}","import { now, nextTick } from '../../shared/utils.js';\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n\n data.allowTouchCallbacks = false;\n\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n\n data.isMoved = false;\n data.startMoving = false;\n return;\n } // Return Grab Cursor\n\n\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n } // Time diff\n\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click\n\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);\n swiper.emit('tap click', e);\n\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n } // Find current slide\n\n\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n } // Find current slide size\n\n\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n return;\n }\n\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n\n return;\n }\n\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n\n if (!data.startMoving) {\n return;\n }\n\n swiper.allowClick = false;\n\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n\n data.allowMomentumBounce = false; // Grab Cursor\n\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n\n swiper.emit('sliderFirstMove', e);\n }\n\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n } // Directions locks\n\n\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n } // Threshold\n\n\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return; // Update active index in free mode\n\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n } // Update progress\n\n\n swiper.updateProgress(data.currentTranslate); // Update translate\n\n swiper.setTranslate(data.currentTranslate);\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js'; // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\n\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return; // change target el for shadow root component\n\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element\n\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n\n if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) {\n e.preventDefault();\n }\n }\n\n swiper.emit('touchStart', e);\n}","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\nexport default {\n setGrabCursor,\n unsetGrabCursor\n};","export default function setGrabCursor(moving) {\n const swiper = this;\n if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}","export default function unsetGrabCursor() {\n const swiper = this;\n\n if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\nexport default {\n loadImage,\n preloadImages\n};","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n\n function onReady() {\n if (callback) callback();\n }\n\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n\n if (sizes) {\n image.sizes = sizes;\n }\n\n if (srcset) {\n image.srcset = srcset;\n }\n\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n }\n}","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\nexport default {\n loopCreate,\n loopFix,\n loopDestroy\n};","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n $wrapperEl\n } = swiper; // Remove duplicated slides\n\n const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl;\n $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n let slides = $selector.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $selector.append(blankNode);\n }\n\n slides = $selector.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n\n slide.attr('data-swiper-slide-index', index);\n });\n\n for (let i = 0; i < appendSlides.length; i += 1) {\n $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}","export default function loopDestroy() {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n slides\n } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}","export default function loopFix() {\n const swiper = this;\n swiper.emit('beforeLoopFix');\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding\n\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n}","import { extend } from '../shared/utils.js';\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) {\n params[moduleParamName] = {\n auto: true\n };\n }\n\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}","import { getWindow } from 'ssr-window';\nexport default function Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n\n const init = () => {\n if (!swiper.params.observer) return;\n\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n } // Observe container\n\n\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren\n }); // Observe wrapper\n\n attach(swiper.$wrapperEl[0], {\n attributes: false\n });\n };\n\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}","import { getWindow } from 'ssr-window';\nexport default function Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n animating,\n enabled,\n params\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n animating,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n\n let prevIndex = 0;\n\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n\n if (params.rewind && swiper.isBeginning) {\n return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);\n } // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n\n\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex]; // Update progress\n\n swiper.updateProgress(translate); // Normalize slideIndex\n\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n } // Directions locks\n\n\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index\n\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex); // Update Height\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n swiper.updateSlidesClasses();\n\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n\n return false;\n }\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._swiperImmediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n\n return true;\n}","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nexport default function slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n $wrapperEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}","export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\nexport default {\n setTransition,\n transitionStart,\n transitionEnd\n};","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}","export default function transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n\n swiper.emit(`slideChangeTransition${step}`);\n\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}","import { getTranslate } from '../../shared/utils.js';\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n $wrapperEl\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}","export default function minTranslate() {\n return -this.snapGrid[0];\n}","export default function setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n $wrapperEl,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress\n\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n } // Normalize slideIndex\n\n\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n\n return;\n } // Get real index\n\n\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];\n }\n\n return swiper.slides.eq(index)[0];\n }; // Find slides currently in view\n\n\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n } // Find new height from highest slide in view\n\n\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n } // Update Height\n\n\n if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}","import $ from '../../shared/dom.js';\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}","export default function updateProgress(translate) {\n const swiper = this;\n\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line\n\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n } // Subtract paddings\n\n\n width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10);\n height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}","import { setCSSProperty } from '../../shared/utils.js';\nexport default function updateSlides() {\n const swiper = this;\n\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n } // prettier-ignore\n\n\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n const {\n $wrapperEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n\n if (typeof swiperSize === 'undefined') {\n return;\n }\n\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween; // reset margins\n\n if (rtl) slides.css({\n marginLeft: '',\n marginBottom: '',\n marginTop: ''\n });else slides.css({\n marginRight: '',\n marginBottom: '',\n marginTop: ''\n }); // reset cssMode offsets\n\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n } // Calc slides\n\n\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide[0];\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({\n width: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n } // Remove last grid elements depending on width\n\n\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n\n snapGrid = newSlidesGrid;\n\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n\n if (slideIndex === slides.length - 1) {\n return false;\n }\n\n return true;\n }).css({\n [key]: `${spaceBetween}px`\n });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}","export default function updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n $wrapperEl,\n activeIndex,\n realIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n let activeSlide;\n\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n } // Active classes\n\n\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n }\n } // Next Slide\n\n\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n } // Prev Slide\n\n\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n }\n\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n }\n }\n\n swiper.emitSlidesClasses();\n}","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate; // Visible Slides\n\n slides.removeClass(params.slideVisibleClass);\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n\n swiper.visibleSlides = $(swiper.visibleSlides);\n}","import classesToSelector from '../../shared/classes-to-selector.js';\nimport $ from '../../shared/dom.js';\nexport default function A11y({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n a11y: {\n enabled: true,\n notificationClass: 'swiper-notification',\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n slideLabelMessage: '{{index}} / {{slidesLength}}',\n containerMessage: null,\n containerRoleDescriptionMessage: null,\n itemRoleDescriptionMessage: null,\n slideRole: 'group'\n }\n });\n let liveRegion = null;\n\n function notify(message) {\n const notification = liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n }\n\n function getRandomNumber(size = 16) {\n const randomChar = () => Math.round(16 * Math.random()).toString(16);\n\n return 'x'.repeat(size).replace(/x/g, randomChar);\n }\n\n function makeElFocusable($el) {\n $el.attr('tabIndex', '0');\n }\n\n function makeElNotFocusable($el) {\n $el.attr('tabIndex', '-1');\n }\n\n function addElRole($el, role) {\n $el.attr('role', role);\n }\n\n function addElRoleDescription($el, description) {\n $el.attr('aria-roledescription', description);\n }\n\n function addElControls($el, controls) {\n $el.attr('aria-controls', controls);\n }\n\n function addElLabel($el, label) {\n $el.attr('aria-label', label);\n }\n\n function addElId($el, id) {\n $el.attr('id', id);\n }\n\n function addElLive($el, live) {\n $el.attr('aria-live', live);\n }\n\n function disableEl($el) {\n $el.attr('aria-disabled', true);\n }\n\n function enableEl($el) {\n $el.attr('aria-disabled', false);\n }\n\n function onEnterOrSpaceKey(e) {\n if (e.keyCode !== 13 && e.keyCode !== 32) return;\n const params = swiper.params.a11y;\n const $targetEl = $(e.target);\n\n if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n if (!(swiper.isEnd && !swiper.params.loop)) {\n swiper.slideNext();\n }\n\n if (swiper.isEnd) {\n notify(params.lastSlideMessage);\n } else {\n notify(params.nextSlideMessage);\n }\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n if (!(swiper.isBeginning && !swiper.params.loop)) {\n swiper.slidePrev();\n }\n\n if (swiper.isBeginning) {\n notify(params.firstSlideMessage);\n } else {\n notify(params.prevSlideMessage);\n }\n }\n\n if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) {\n $targetEl[0].click();\n }\n }\n\n function updateNavigation() {\n if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($prevEl && $prevEl.length > 0) {\n if (swiper.isBeginning) {\n disableEl($prevEl);\n makeElNotFocusable($prevEl);\n } else {\n enableEl($prevEl);\n makeElFocusable($prevEl);\n }\n }\n\n if ($nextEl && $nextEl.length > 0) {\n if (swiper.isEnd) {\n disableEl($nextEl);\n makeElNotFocusable($nextEl);\n } else {\n enableEl($nextEl);\n makeElFocusable($nextEl);\n }\n }\n }\n\n function hasPagination() {\n return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;\n }\n\n function hasClickablePagination() {\n return hasPagination() && swiper.params.pagination.clickable;\n }\n\n function updatePagination() {\n const params = swiper.params.a11y;\n if (!hasPagination()) return;\n swiper.pagination.bullets.each(bulletEl => {\n const $bulletEl = $(bulletEl);\n\n if (swiper.params.pagination.clickable) {\n makeElFocusable($bulletEl);\n\n if (!swiper.params.pagination.renderBullet) {\n addElRole($bulletEl, 'button');\n addElLabel($bulletEl, params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1));\n }\n }\n\n if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {\n $bulletEl.attr('aria-current', 'true');\n } else {\n $bulletEl.removeAttr('aria-current');\n }\n });\n }\n\n const initNavEl = ($el, wrapperId, message) => {\n makeElFocusable($el);\n\n if ($el[0].tagName !== 'BUTTON') {\n addElRole($el, 'button');\n $el.on('keydown', onEnterOrSpaceKey);\n }\n\n addElLabel($el, message);\n addElControls($el, wrapperId);\n };\n\n function init() {\n const params = swiper.params.a11y;\n swiper.$el.append(liveRegion); // Container\n\n const $containerEl = swiper.$el;\n\n if (params.containerRoleDescriptionMessage) {\n addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);\n }\n\n if (params.containerMessage) {\n addElLabel($containerEl, params.containerMessage);\n } // Wrapper\n\n\n const $wrapperEl = swiper.$wrapperEl;\n const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;\n const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';\n addElId($wrapperEl, wrapperId);\n addElLive($wrapperEl, live); // Slide\n\n if (params.itemRoleDescriptionMessage) {\n addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);\n }\n\n addElRole($(swiper.slides), params.slideRole);\n const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length;\n swiper.slides.each((slideEl, index) => {\n const $slideEl = $(slideEl);\n const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index;\n const ariaLabelMessage = params.slideLabelMessage.replace(/\\{\\{index\\}\\}/, slideIndex + 1).replace(/\\{\\{slidesLength\\}\\}/, slidesLength);\n addElLabel($slideEl, ariaLabelMessage);\n }); // Navigation\n\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl && $nextEl.length) {\n initNavEl($nextEl, wrapperId, params.nextSlideMessage);\n }\n\n if ($prevEl && $prevEl.length) {\n initNavEl($prevEl, wrapperId, params.prevSlideMessage);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n function destroy() {\n if (liveRegion && liveRegion.length > 0) liveRegion.remove();\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl) {\n $nextEl.off('keydown', onEnterOrSpaceKey);\n }\n\n if ($prevEl) {\n $prevEl.off('keydown', onEnterOrSpaceKey);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n on('beforeInit', () => {\n liveRegion = $(``);\n });\n on('afterInit', () => {\n if (!swiper.params.a11y.enabled) return;\n init();\n updateNavigation();\n });\n on('toEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('fromEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('paginationUpdate', () => {\n if (!swiper.params.a11y.enabled) return;\n updatePagination();\n });\n on('destroy', () => {\n if (!swiper.params.a11y.enabled) return;\n destroy();\n });\n}","/* eslint no-underscore-dangle: \"off\" */\n\n/* eslint no-use-before-define: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport { nextTick } from '../../shared/utils.js';\nexport default function Autoplay({\n swiper,\n extendParams,\n on,\n emit\n}) {\n let timeout;\n swiper.autoplay = {\n running: false,\n paused: false\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n\n function run() {\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n\n clearTimeout(timeout);\n timeout = nextTick(() => {\n let autoplayResult;\n\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isBeginning) {\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isEnd) {\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n\n if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) {\n run();\n }\n }, delay);\n }\n\n function start() {\n if (typeof timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n emit('autoplayStart');\n run();\n return true;\n }\n\n function stop() {\n if (!swiper.autoplay.running) return false;\n if (typeof timeout === 'undefined') return false;\n\n if (timeout) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n\n swiper.autoplay.running = false;\n emit('autoplayStop');\n return true;\n }\n\n function pause(speed) {\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (timeout) clearTimeout(timeout);\n swiper.autoplay.paused = true;\n\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n run();\n } else {\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd);\n });\n }\n }\n\n function onVisibilityChange() {\n const document = getDocument();\n\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n pause();\n }\n\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n run();\n swiper.autoplay.paused = false;\n }\n }\n\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== swiper.$wrapperEl[0]) return;\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n swiper.autoplay.paused = false;\n\n if (!swiper.autoplay.running) {\n stop();\n } else {\n run();\n }\n }\n\n function onMouseEnter() {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n }\n\n function onMouseLeave() {\n if (swiper.params.autoplay.disableOnInteraction) {\n return;\n }\n\n swiper.autoplay.paused = false;\n run();\n }\n\n function attachMouseEvents() {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.$el.on('mouseenter', onMouseEnter);\n swiper.$el.on('mouseleave', onMouseLeave);\n }\n }\n\n function detachMouseEvents() {\n swiper.$el.off('mouseenter', onMouseEnter);\n swiper.$el.off('mouseleave', onMouseLeave);\n }\n\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n start();\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n attachMouseEvents();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n stop();\n }\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n }\n });\n on('touchEnd', () => {\n if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n run();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n\n if (swiper.autoplay.running) {\n stop();\n }\n\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n });\n Object.assign(swiper.autoplay, {\n pause,\n run,\n start,\n stop\n });\n}","/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\nimport { nextTick } from '../../shared/utils.js';\nexport default function Controller({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n controller: {\n control: undefined,\n inverse: false,\n by: 'slide' // or 'container'\n\n }\n });\n swiper.controller = {\n control: undefined\n };\n\n function LinearSpline(x, y) {\n const binarySearch = function search() {\n let maxIndex;\n let minIndex;\n let guess;\n return (array, val) => {\n minIndex = -1;\n maxIndex = array.length;\n\n while (maxIndex - minIndex > 1) {\n guess = maxIndex + minIndex >> 1;\n\n if (array[guess] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n }\n\n return maxIndex;\n };\n }();\n\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n\n let i1;\n let i3;\n\n this.interpolate = function interpolate(x2) {\n if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n\n return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n\n return this;\n } // xxx: for now i will just save one spline function to to\n\n\n function getInterpolateFunction(c) {\n if (!swiper.controller.spline) {\n swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);\n }\n }\n\n function setTranslate(_t, byController) {\n const controlled = swiper.controller.control;\n let multiplier;\n let controlledTranslate;\n const Swiper = swiper.constructor;\n\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n\n if (swiper.params.controller.by === 'slide') {\n getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n\n controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n }\n\n if (!controlledTranslate || swiper.params.controller.by === 'container') {\n multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n }\n\n if (swiper.params.controller.inverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n\n c.updateProgress(controlledTranslate);\n c.setTranslate(controlledTranslate, swiper);\n c.updateActiveIndex();\n c.updateSlidesClasses();\n }\n\n if (Array.isArray(controlled)) {\n for (let i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTranslate(controlled);\n }\n }\n\n function setTransition(duration, byController) {\n const Swiper = swiper.constructor;\n const controlled = swiper.controller.control;\n let i;\n\n function setControlledTransition(c) {\n c.setTransition(duration, swiper);\n\n if (duration !== 0) {\n c.transitionStart();\n\n if (c.params.autoHeight) {\n nextTick(() => {\n c.updateAutoHeight();\n });\n }\n\n c.$wrapperEl.transitionEnd(() => {\n if (!controlled) return;\n\n if (c.params.loop && swiper.params.controller.by === 'slide') {\n c.loopFix();\n }\n\n c.transitionEnd();\n });\n }\n }\n\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n\n function removeSpline() {\n if (!swiper.controller.control) return;\n\n if (swiper.controller.spline) {\n swiper.controller.spline = undefined;\n delete swiper.controller.spline;\n }\n }\n\n on('beforeInit', () => {\n swiper.controller.control = swiper.params.controller.control;\n });\n on('update', () => {\n removeSpline();\n });\n on('resize', () => {\n removeSpline();\n });\n on('observerUpdate', () => {\n removeSpline();\n });\n on('setTranslate', (_s, translate, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTranslate(translate, byController);\n });\n on('setTransition', (_s, duration, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTransition(duration, byController);\n });\n Object.assign(swiper.controller, {\n setTranslate,\n setTransition\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCards({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cardsEffect: {\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n activeIndex\n } = swiper;\n const params = swiper.params.cardsEffect;\n const {\n startTranslate,\n isTouched\n } = swiper.touchEventsData;\n const currentTranslate = swiper.translate;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max(slideProgress, -4), 4);\n let offset = $slideEl[0].swiperSlideOffset;\n\n if (swiper.params.centeredSlides && !swiper.params.cssMode) {\n swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`);\n }\n\n if (swiper.params.centeredSlides && swiper.params.cssMode) {\n offset -= slides[0].swiperSlideOffset;\n }\n\n let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let tY = 0;\n const tZ = -100 * Math.abs(progress);\n let scale = 1;\n let rotate = -2 * progress;\n let tXAdd = 8 - Math.abs(progress) * 0.75;\n const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;\n const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;\n\n if (isSwipeToNext || isSwipeToPrev) {\n const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;\n rotate += -28 * progress * subProgress;\n scale += -0.5 * subProgress;\n tXAdd += 96 * subProgress;\n tY = `${-25 * subProgress * Math.abs(progress)}%`;\n }\n\n if (progress < 0) {\n // next\n tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`;\n } else if (progress > 0) {\n // prev\n tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`;\n } else {\n tX = `${tX}px`;\n }\n\n if (!swiper.isHorizontal()) {\n const prevY = tY;\n tY = tX;\n tX = prevY;\n }\n\n const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;\n const transform = `\n translate3d(${tX}, ${tY}, ${tZ}px)\n rotateZ(${rotate}deg)\n scale(${scaleString})\n `;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowEl = $slideEl.find('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.cardsEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'cards',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nexport default function EffectCoverflow({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n scale: 1,\n modifier: 1,\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n width: swiperWidth,\n height: swiperHeight,\n slides,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform = swiper.translate;\n const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth; // Each slide offset from center\n\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier;\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0\n\n let translateZ = -translate * Math.abs(offsetMultiplier);\n let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders\n\n if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n stretch = parseFloat(params.stretch) / 100 * slideSize;\n }\n\n let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n let translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values\n\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n if (Math.abs(scale) < 0.001) scale = 0;\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(slideTransform);\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top');\n }\n\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom');\n }\n\n if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.coverflowEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n };\n\n effectInit({\n effect: 'coverflow',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCreative({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n creativeEffect: {\n transformEl: null,\n limitProgress: 1,\n shadowPerProgress: false,\n progressMultiplier: 1,\n perspective: true,\n prev: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n },\n next: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n }\n }\n });\n\n const getTranslateValue = value => {\n if (typeof value === 'string') return value;\n return `${value}px`;\n };\n\n const setTranslate = () => {\n const {\n slides,\n $wrapperEl,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.creativeEffect;\n const {\n progressMultiplier: multiplier\n } = params;\n const isCenteredSlides = swiper.params.centeredSlides;\n\n if (isCenteredSlides) {\n const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;\n $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`);\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress);\n let originalProgress = progress;\n\n if (!isCenteredSlides) {\n originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];\n const r = [0, 0, 0];\n let custom = false;\n\n if (!swiper.isHorizontal()) {\n t[1] = t[0];\n t[0] = 0;\n }\n\n let data = {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n scale: 1,\n opacity: 1\n };\n\n if (progress < 0) {\n data = params.next;\n custom = true;\n } else if (progress > 0) {\n data = params.prev;\n custom = true;\n } // set translate\n\n\n t.forEach((value, index) => {\n t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;\n }); // set rotates\n\n r.forEach((value, index) => {\n r[index] = data.rotate[index] * Math.abs(progress * multiplier);\n });\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const translateString = t.join(', ');\n const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;\n const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;\n const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;\n const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows\n\n if (custom && data.shadow || !custom) {\n let $shadowEl = $slideEl.children('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0 && data.shadow) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) {\n const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;\n $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);\n }\n }\n\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform).css({\n opacity: opacityString\n });\n\n if (data.origin) {\n $targetEl.css('transform-origin', data.origin);\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.creativeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'creative',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => swiper.params.creativeEffect.perspective,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import $ from '../../shared/dom.js';\nimport effectInit from '../../shared/effect-init.js';\nexport default function EffectCube({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cubeEffect: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n }\n });\n\n const setTranslate = () => {\n const {\n $el,\n $wrapperEl,\n slides,\n width: swiperWidth,\n height: swiperHeight,\n rtlTranslate: rtl,\n size: swiperSize,\n browser\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $wrapperEl.append($cubeShadowEl);\n }\n\n $cubeShadowEl.css({\n height: `${swiperWidth}px`\n });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + round * 4 * swiperSize;\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = 3 * swiperSize + swiperSize * 4 * round;\n }\n\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n\n if (progress <= 1 && progress > -1) {\n wrapperRotate = slideIndex * 90 + progress * 90;\n if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n }\n\n $slideEl.transform(transform);\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = $(`
`);\n $slideEl.append(shadowBefore);\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = $(`
`);\n $slideEl.append(shadowAfter);\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset = params.shadowOffset;\n $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);\n }\n }\n\n const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;\n $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);\n };\n\n const setTransition = duration => {\n const {\n $el,\n slides\n } = swiper;\n slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n };\n\n effectInit({\n effect: 'cube',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true\n })\n });\n}","import effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFade({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n fadeEffect: {\n crossFade: false,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides\n } = swiper;\n const params = swiper.params.fadeEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = swiper.slides.eq(i);\n const offset = $slideEl[0].swiperSlideOffset;\n let tx = -offset;\n if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n\n const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.css({\n opacity: slideOpacity\n }).transform(`translate3d(${tx}px, ${ty}px, 0px)`);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.fadeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'fade',\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFlip({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n flipEffect: {\n slideShadows: true,\n limitRotation: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n rtlTranslate: rtl\n } = swiper;\n const params = swiper.params.flipEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top');\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom');\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n\n const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.flipEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'flip',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import { now } from '../../shared/utils.js';\nexport default function freeMode({\n swiper,\n extendParams,\n emit,\n once\n}) {\n extendParams({\n freeMode: {\n enabled: false,\n momentum: true,\n momentumRatio: 1,\n momentumBounce: true,\n momentumBounceRatio: 1,\n momentumVelocityRatio: 1,\n sticky: false,\n minimumVelocity: 0.02\n }\n });\n\n function onTouchMove() {\n const {\n touchEventsData: data,\n touches\n } = swiper; // Velocity\n\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime\n });\n }\n\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: now()\n });\n }\n\n function onTouchEnd({\n currentPos\n }) {\n const {\n params,\n $wrapperEl,\n rtlTranslate: rtl,\n snapGrid,\n touchEventsData: data\n } = swiper; // Time diff\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n\n return;\n }\n\n if (params.freeMode.momentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n\n if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {\n swiper.velocity = 0;\n } // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n\n\n if (time > 150 || now() - lastMoveEvent.time > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n\n swiper.velocity *= params.freeMode.momentumVelocityRatio;\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeMode.momentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;\n let needsLoopFix;\n\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeMode.sticky) {\n let nextSlide;\n\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n\n newPosition = -newPosition;\n }\n\n if (needsLoopFix) {\n once('transitionEnd', () => {\n swiper.loopFix();\n });\n } // Fix duration\n\n\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n\n if (params.freeMode.sticky) {\n // If freeMode.sticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeMode.momentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n emit('_freeModeNoMomentumRelease');\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n } else if (params.freeMode) {\n emit('_freeModeNoMomentumRelease');\n }\n\n if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n }\n\n Object.assign(swiper, {\n freeMode: {\n onTouchMove,\n onTouchEnd\n }\n });\n}","export default function Grid({\n swiper,\n extendParams\n}) {\n extendParams({\n grid: {\n rows: 1,\n fill: 'column'\n }\n });\n let slidesNumberEvenToRows;\n let slidesPerRow;\n let numFullColumns;\n\n const initSlides = slidesLength => {\n const {\n slidesPerView\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid;\n slidesPerRow = slidesNumberEvenToRows / rows;\n numFullColumns = Math.floor(slidesLength / rows);\n\n if (Math.floor(slidesLength / rows) === slidesLength / rows) {\n slidesNumberEvenToRows = slidesLength;\n } else {\n slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;\n }\n\n if (slidesPerView !== 'auto' && fill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);\n }\n };\n\n const updateSlide = (i, slide, slidesLength, getDirectionLabel) => {\n const {\n slidesPerGroup,\n spaceBetween\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid; // Set slides order\n\n let newSlideOrderIndex;\n let column;\n let row;\n\n if (fill === 'row' && slidesPerGroup > 1) {\n const groupIndex = Math.floor(i / (slidesPerGroup * rows));\n const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;\n const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup);\n row = Math.floor(slideIndexInGroup / columnsInGroup);\n column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows;\n slide.css({\n '-webkit-order': newSlideOrderIndex,\n order: newSlideOrderIndex\n });\n } else if (fill === 'column') {\n column = Math.floor(i / rows);\n row = i - column * rows;\n\n if (column > numFullColumns || column === numFullColumns && row === rows - 1) {\n row += 1;\n\n if (row >= rows) {\n row = 0;\n column += 1;\n }\n }\n } else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n\n slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : '');\n };\n\n const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => {\n const {\n spaceBetween,\n centeredSlides,\n roundLengths\n } = swiper.params;\n const {\n rows\n } = swiper.params.grid;\n swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;\n swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;\n swiper.$wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px`\n });\n\n if (centeredSlides) {\n snapGrid.splice(0, snapGrid.length);\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n }\n\n snapGrid.push(...newSlidesGrid);\n }\n };\n\n swiper.grid = {\n initSlides,\n updateSlide,\n updateWrapperSize\n };\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function HashNavigation({\n swiper,\n extendParams,\n emit,\n on\n}) {\n let initialized = false;\n const document = getDocument();\n const window = getWindow();\n extendParams({\n hashNavigation: {\n enabled: false,\n replaceState: false,\n watchState: false\n }\n });\n\n const onHashChange = () => {\n emit('hashChange');\n const newHash = document.location.hash.replace('#', '');\n const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n\n if (newHash !== activeSlideHash) {\n const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash=\"${newHash}\"]`).index();\n if (typeof newIndex === 'undefined') return;\n swiper.slideTo(newIndex);\n }\n };\n\n const setHash = () => {\n if (!initialized || !swiper.params.hashNavigation.enabled) return;\n\n if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {\n window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '');\n emit('hashSet');\n } else {\n const slide = swiper.slides.eq(swiper.activeIndex);\n const hash = slide.attr('data-hash') || slide.attr('data-history');\n document.location.hash = hash || '';\n emit('hashSet');\n }\n };\n\n const init = () => {\n if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;\n initialized = true;\n const hash = document.location.hash.replace('#', '');\n\n if (hash) {\n const speed = 0;\n\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHash = slide.attr('data-hash') || slide.attr('data-history');\n\n if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n }\n }\n }\n\n if (swiper.params.hashNavigation.watchState) {\n $(window).on('hashchange', onHashChange);\n }\n };\n\n const destroy = () => {\n if (swiper.params.hashNavigation.watchState) {\n $(window).off('hashchange', onHashChange);\n }\n };\n\n on('init', () => {\n if (swiper.params.hashNavigation.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.hashNavigation.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHash();\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHash();\n }\n });\n}","import { getWindow } from 'ssr-window';\nexport default function History({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n history: {\n enabled: false,\n root: '',\n replaceState: false,\n key: 'slides'\n }\n });\n let initialized = false;\n let paths = {};\n\n const slugify = text => {\n return text.toString().replace(/\\s+/g, '-').replace(/[^\\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n };\n\n const getPathValues = urlOverride => {\n const window = getWindow();\n let location;\n\n if (urlOverride) {\n location = new URL(urlOverride);\n } else {\n location = window.location;\n }\n\n const pathArray = location.pathname.slice(1).split('/').filter(part => part !== '');\n const total = pathArray.length;\n const key = pathArray[total - 2];\n const value = pathArray[total - 1];\n return {\n key,\n value\n };\n };\n\n const setHistory = (key, index) => {\n const window = getWindow();\n if (!initialized || !swiper.params.history.enabled) return;\n let location;\n\n if (swiper.params.url) {\n location = new URL(swiper.params.url);\n } else {\n location = window.location;\n }\n\n const slide = swiper.slides.eq(index);\n let value = slugify(slide.attr('data-history'));\n\n if (swiper.params.history.root.length > 0) {\n let root = swiper.params.history.root;\n if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);\n value = `${root}/${key}/${value}`;\n } else if (!location.pathname.includes(key)) {\n value = `${key}/${value}`;\n }\n\n const currentState = window.history.state;\n\n if (currentState && currentState.value === value) {\n return;\n }\n\n if (swiper.params.history.replaceState) {\n window.history.replaceState({\n value\n }, null, value);\n } else {\n window.history.pushState({\n value\n }, null, value);\n }\n };\n\n const scrollToSlide = (speed, value, runCallbacks) => {\n if (value) {\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHistory = slugify(slide.attr('data-history'));\n\n if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, runCallbacks);\n }\n }\n } else {\n swiper.slideTo(0, speed, runCallbacks);\n }\n };\n\n const setHistoryPopState = () => {\n paths = getPathValues(swiper.params.url);\n scrollToSlide(swiper.params.speed, swiper.paths.value, false);\n };\n\n const init = () => {\n const window = getWindow();\n if (!swiper.params.history) return;\n\n if (!window.history || !window.history.pushState) {\n swiper.params.history.enabled = false;\n swiper.params.hashNavigation.enabled = true;\n return;\n }\n\n initialized = true;\n paths = getPathValues(swiper.params.url);\n if (!paths.key && !paths.value) return;\n scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);\n\n if (!swiper.params.history.replaceState) {\n window.addEventListener('popstate', setHistoryPopState);\n }\n };\n\n const destroy = () => {\n const window = getWindow();\n\n if (!swiper.params.history.replaceState) {\n window.removeEventListener('popstate', setHistoryPopState);\n }\n };\n\n on('init', () => {\n if (swiper.params.history.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.history.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n}","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Keyboard({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: false\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true\n }\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n const {\n rtlTranslate: rtl\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40; // Directions locks\n\n if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {\n return false;\n }\n\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n\n if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n\n if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {\n let inView = false; // Check that swiper should be inside of visible area of window\n\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n if (!inView) return undefined;\n }\n\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();\n if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n\n emit('keyPress', kc);\n return undefined;\n }\n\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n Object.assign(swiper.keyboard, {\n enable,\n disable\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Lazy({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n lazy: {\n checkInView: false,\n enabled: false,\n loadPrevNext: false,\n loadPrevNextAmount: 1,\n loadOnTransitionStart: false,\n scrollingElement: '',\n elementClass: 'swiper-lazy',\n loadingClass: 'swiper-lazy-loading',\n loadedClass: 'swiper-lazy-loaded',\n preloaderClass: 'swiper-lazy-preloader'\n }\n });\n swiper.lazy = {};\n let scrollHandlerAttached = false;\n let initialImageLoaded = false;\n\n function loadInSlide(index, loadInDuplicate = true) {\n const params = swiper.params.lazy;\n if (typeof index === 'undefined') return;\n if (swiper.slides.length === 0) return;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${index}\"]`) : swiper.slides.eq(index);\n const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);\n\n if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {\n $images.push($slideEl[0]);\n }\n\n if ($images.length === 0) return;\n $images.each(imageEl => {\n const $imageEl = $(imageEl);\n $imageEl.addClass(params.loadingClass);\n const background = $imageEl.attr('data-background');\n const src = $imageEl.attr('data-src');\n const srcset = $imageEl.attr('data-srcset');\n const sizes = $imageEl.attr('data-sizes');\n const $pictureEl = $imageEl.parent('picture');\n swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return;\n\n if (background) {\n $imageEl.css('background-image', `url(\"${background}\")`);\n $imageEl.removeAttr('data-background');\n } else {\n if (srcset) {\n $imageEl.attr('srcset', srcset);\n $imageEl.removeAttr('data-srcset');\n }\n\n if (sizes) {\n $imageEl.attr('sizes', sizes);\n $imageEl.removeAttr('data-sizes');\n }\n\n if ($pictureEl.length) {\n $pictureEl.children('source').each(sourceEl => {\n const $source = $(sourceEl);\n\n if ($source.attr('data-srcset')) {\n $source.attr('srcset', $source.attr('data-srcset'));\n $source.removeAttr('data-srcset');\n }\n });\n }\n\n if (src) {\n $imageEl.attr('src', src);\n $imageEl.removeAttr('data-src');\n }\n }\n\n $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n $slideEl.find(`.${params.preloaderClass}`).remove();\n\n if (swiper.params.loop && loadInDuplicate) {\n const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n\n if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index=\"${slideOriginalIndex}\"]:not(.${swiper.params.slideDuplicateClass})`);\n loadInSlide(originalSlide.index(), false);\n } else {\n const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index=\"${slideOriginalIndex}\"]`);\n loadInSlide(duplicatedSlide.index(), false);\n }\n }\n\n emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n });\n emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n });\n }\n\n function load() {\n const {\n $wrapperEl,\n params: swiperParams,\n slides,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n const params = swiperParams.lazy;\n let slidesPerView = swiperParams.slidesPerView;\n\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n\n function slideExist(index) {\n if (isVirtual) {\n if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index=\"${index}\"]`).length) {\n return true;\n }\n } else if (slides[index]) return true;\n\n return false;\n }\n\n function slideIndex(slideEl) {\n if (isVirtual) {\n return $(slideEl).attr('data-swiper-slide-index');\n }\n\n return $(slideEl).index();\n }\n\n if (!initialImageLoaded) initialImageLoaded = true;\n\n if (swiper.params.watchSlidesProgress) {\n $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => {\n const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();\n loadInSlide(index);\n });\n } else if (slidesPerView > 1) {\n for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n loadInSlide(activeIndex);\n }\n\n if (params.loadPrevNext) {\n if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) {\n const amount = params.loadPrevNextAmount;\n const spv = slidesPerView;\n const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides\n\n for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n } // Prev Slides\n\n\n for (let i = minIndex; i < activeIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);\n if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide));\n const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);\n if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide));\n }\n }\n }\n\n function checkInViewOnLoad() {\n const window = getWindow();\n if (!swiper || swiper.destroyed) return;\n const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window);\n const isWindow = $scrollElement[0] === window;\n const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth;\n const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight;\n const swiperOffset = swiper.$el.offset();\n const {\n rtlTranslate: rtl\n } = swiper;\n let inView = false;\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n\n if (inView) {\n load();\n $scrollElement.off('scroll', checkInViewOnLoad, passiveListener);\n } else if (!scrollHandlerAttached) {\n scrollHandlerAttached = true;\n $scrollElement.on('scroll', checkInViewOnLoad, passiveListener);\n }\n }\n\n on('beforeInit', () => {\n if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n swiper.params.preloadImages = false;\n }\n });\n on('init', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('scroll', () => {\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) {\n load();\n }\n });\n on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('transitionStart', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n }\n });\n on('transitionEnd', () => {\n if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('slideChange', () => {\n const {\n lazy,\n cssMode,\n watchSlidesProgress,\n touchReleaseOnEdges,\n resistanceRatio\n } = swiper.params;\n\n if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) {\n load();\n }\n });\n Object.assign(swiper.lazy, {\n load,\n loadInSlide\n });\n}","import appendSlide from './methods/appendSlide.js';\nimport prependSlide from './methods/prependSlide.js';\nimport addSlide from './methods/addSlide.js';\nimport removeSlide from './methods/removeSlide.js';\nimport removeAllSlides from './methods/removeAllSlides.js';\nexport default function Manipulation({\n swiper\n}) {\n Object.assign(swiper, {\n appendSlide: appendSlide.bind(swiper),\n prependSlide: prependSlide.bind(swiper),\n addSlide: addSlide.bind(swiper),\n removeSlide: removeSlide.bind(swiper),\n removeAllSlides: removeAllSlides.bind(swiper)\n });\n}","export default function addSlide(index, slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n const baseLength = swiper.slides.length;\n\n if (index <= 0) {\n swiper.prependSlide(slides);\n return;\n }\n\n if (index >= baseLength) {\n swiper.appendSlide(slides);\n return;\n }\n\n let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n const slidesBuffer = [];\n\n for (let i = baseLength - 1; i >= index; i -= 1) {\n const currentSlide = swiper.slides.eq(i);\n currentSlide.remove();\n slidesBuffer.unshift(currentSlide);\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n\n newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n } else {\n $wrapperEl.append(slides);\n }\n\n for (let i = 0; i < slidesBuffer.length; i += 1) {\n $wrapperEl.append(slidesBuffer[i]);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","export default function appendSlide(slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n } else {\n $wrapperEl.append(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n}","export default function prependSlide(slides) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n let newActiveIndex = activeIndex + 1;\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.prepend(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n } else {\n $wrapperEl.prepend(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n swiper.slideTo(newActiveIndex, 0, false);\n}","export default function removeAllSlides() {\n const swiper = this;\n const slidesIndexes = [];\n\n for (let i = 0; i < swiper.slides.length; i += 1) {\n slidesIndexes.push(i);\n }\n\n swiper.removeSlide(slidesIndexes);\n}","export default function removeSlide(slidesIndexes) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n let newActiveIndex = activeIndexBuffer;\n let indexToRemove;\n\n if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {\n for (let i = 0; i < slidesIndexes.length; i += 1) {\n indexToRemove = slidesIndexes[i];\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n }\n\n newActiveIndex = Math.max(newActiveIndex, 0);\n } else {\n indexToRemove = slidesIndexes;\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","/* eslint-disable consistent-return */\nimport { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now, nextTick } from '../../shared/utils.js';\nexport default function Mousewheel({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n mousewheel: {\n enabled: false,\n releaseOnEdges: false,\n invert: false,\n forceToAxis: false,\n sensitivity: 1,\n eventsTarget: 'container',\n thresholdDelta: null,\n thresholdTime: null\n }\n });\n swiper.mousewheel = {\n enabled: false\n };\n let timeout;\n let lastScrollTime = now();\n let lastEventBeforeSnap;\n const recentWheelEvents = [];\n\n function normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n let sX = 0;\n let sY = 0; // spinX, spinY\n\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n // Legacy\n\n if ('detail' in e) {\n sY = e.detail;\n }\n\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n } // side scrolling on FF with DOMMouseScroll\n\n\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) {\n // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n } // Fall-back if spin cannot be determined\n\n\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }\n\n function handleMouseEnter() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = true;\n }\n\n function handleMouseLeave() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = false;\n }\n\n function animateSlider(newEvent) {\n if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) {\n // Prevent if delta of wheel scroll delta is below configured threshold\n return false;\n }\n\n if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {\n // Prevent if time between scrolls is below configured threshold\n return false;\n } // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n\n\n if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {\n // Return false as a default\n return true;\n } // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n\n\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n emit('scroll', newEvent.raw);\n } // If you got here is because an animation has been triggered so store the current time\n\n\n lastScrollTime = new window.Date().getTime(); // Return false as a default\n\n return false;\n }\n\n function releaseScroll(newEvent) {\n const params = swiper.params.mousewheel;\n\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n\n return false;\n }\n\n function handle(event) {\n let e = event;\n let disableParentSwiper = true;\n if (!swiper.enabled) return;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n const data = normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true;\n } else {\n delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n if (params.invert) delta = -delta; // Get the scroll positions\n\n let positions = swiper.getTranslate() + delta * params.sensitivity;\n if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();\n if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true:\n // the disableParentSwiper will be true.\n // When loop is false:\n // if the scroll positions is not on edge,\n // then the disableParentSwiper will be true.\n // if the scroll on edge positions,\n // then the disableParentSwiper will be false.\n\n disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());\n if (disableParentSwiper && swiper.params.nested) e.stopPropagation();\n\n if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event\n }; // Keep the most recent events\n\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n recentWheelEvents.push(newEvent); // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n\n if (prevEvent) {\n if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n animateSlider(newEvent);\n }\n } else {\n animateSlider(newEvent);\n } // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n\n\n if (releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta)\n };\n const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;\n\n if (!ignoreWheelEvents) {\n lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n\n let position = swiper.getTranslate() + delta * params.sensitivity;\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode.sticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momentum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(timeout);\n timeout = undefined;\n\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n\n if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n timeout = nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n\n if (!timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n timeout = nextTick(() => {\n const snapToThreshold = 0.5;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n } // Emit event\n\n\n if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay\n\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions\n\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n return false;\n }\n\n function events(method) {\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n target[method]('mouseenter', handleMouseEnter);\n target[method]('mouseleave', handleMouseLeave);\n target[method]('wheel', handle);\n }\n\n function enable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener('wheel', handle);\n return true;\n }\n\n if (swiper.mousewheel.enabled) return false;\n events('on');\n swiper.mousewheel.enabled = true;\n return true;\n }\n\n function disable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, handle);\n return true;\n }\n\n if (!swiper.mousewheel.enabled) return false;\n events('off');\n swiper.mousewheel.enabled = false;\n return true;\n }\n\n on('init', () => {\n if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n disable();\n }\n\n if (swiper.params.mousewheel.enabled) enable();\n });\n on('destroy', () => {\n if (swiper.params.cssMode) {\n enable();\n }\n\n if (swiper.mousewheel.enabled) disable();\n });\n Object.assign(swiper.mousewheel, {\n enable,\n disable\n });\n}","import createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nimport $ from '../../shared/dom.js';\nexport default function Navigation({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock'\n }\n });\n swiper.navigation = {\n nextEl: null,\n $nextEl: null,\n prevEl: null,\n $prevEl: null\n };\n\n function getEl(el) {\n let $el;\n\n if (el) {\n $el = $(el);\n\n if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) {\n $el = swiper.$el.find(el);\n }\n }\n\n return $el;\n }\n\n function toggleEl($el, disabled) {\n const params = swiper.params.navigation;\n\n if ($el && $el.length > 0) {\n $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass);\n if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled;\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n }\n\n function update() {\n // Update Navigation Buttons\n if (swiper.params.loop) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n }\n\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n }\n\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n const $nextEl = getEl(params.nextEl);\n const $prevEl = getEl(params.prevEl);\n\n if ($nextEl && $nextEl.length > 0) {\n $nextEl.on('click', onNextClick);\n }\n\n if ($prevEl && $prevEl.length > 0) {\n $prevEl.on('click', onPrevClick);\n }\n\n Object.assign(swiper.navigation, {\n $nextEl,\n nextEl: $nextEl && $nextEl[0],\n $prevEl,\n prevEl: $prevEl && $prevEl[0]\n });\n\n if (!swiper.enabled) {\n if ($nextEl) $nextEl.addClass(params.lockClass);\n if ($prevEl) $prevEl.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl && $nextEl.length) {\n $nextEl.off('click', onNextClick);\n $nextEl.removeClass(swiper.params.navigation.disabledClass);\n }\n\n if ($prevEl && $prevEl.length) {\n $prevEl.off('click', onPrevClick);\n $prevEl.removeClass(swiper.params.navigation.disabledClass);\n }\n }\n\n on('init', () => {\n init();\n update();\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl) {\n $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n\n if ($prevEl) {\n $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n });\n on('click', (_s, e) => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n const targetEl = e.target;\n\n if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n\n if ($nextEl) {\n isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n } else if ($prevEl) {\n isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n }\n\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n\n if ($nextEl) {\n $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n\n if ($prevEl) {\n $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n }\n });\n Object.assign(swiper.navigation, {\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nimport classesToSelector from '../../shared/classes-to-selector.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Pagination({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`\n }\n });\n swiper.pagination = {\n el: null,\n $el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0;\n }\n\n function setSideBullets($bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`);\n }\n\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el; // Current/Total\n\n let current;\n const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.loop) {\n current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n\n if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n current -= slidesLength - swiper.loopedSlides * 2;\n }\n\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n } // Types\n\n\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n\n if (params.dynamicBullets) {\n bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);\n\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);\n\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n\n bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' '));\n\n if ($el.length > 1) {\n bullets.each(bullet => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (bulletIndex === firstIndex) {\n setSideBullets($bullet, 'prev');\n }\n\n if (bulletIndex === lastIndex) {\n setSideBullets($bullet, 'next');\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n }\n }\n\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n\n if (params.type === 'fraction') {\n $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1));\n $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total));\n }\n\n if (params.type === 'progressbar') {\n let progressbarDirection;\n\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n\n $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);\n }\n\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n emit('paginationRender', $el[0]);\n } else {\n emit('paginationUpdate', $el[0]);\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\">`;\n }\n }\n\n $el.html(paginationHTML);\n swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass));\n }\n\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type !== 'custom') {\n emit('paginationRender', swiper.pagination.$el[0]);\n }\n }\n\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) {\n $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper\n\n if ($el.length > 1) {\n $el = $el.filter(el => {\n if ($(el).parents('.swiper')[0] !== swiper.el) return false;\n return true;\n });\n }\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n $el.addClass(params.modifierClass + swiper.params.direction);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', classesToSelector(params.bulletClass), function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Object.assign(swiper.pagination, {\n $el,\n el: $el[0]\n });\n\n if (!swiper.enabled) {\n $el.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const $el = swiper.pagination.$el;\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n $el.removeClass(params.modifierClass + swiper.params.direction);\n if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n\n if (params.clickable) {\n $el.off('click', classesToSelector(params.bulletClass));\n }\n }\n\n on('init', () => {\n init();\n render();\n update();\n });\n on('activeIndexChange', () => {\n if (swiper.params.loop) {\n update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n if (!swiper.params.loop) {\n update();\n }\n });\n on('slidesLengthChange', () => {\n if (swiper.params.loop) {\n render();\n update();\n }\n });\n on('snapGridLengthChange', () => {\n if (!swiper.params.loop) {\n render();\n update();\n }\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.pagination;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass);\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const {\n $el\n } = swiper.pagination;\n\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass);\n\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n\n $el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n });\n Object.assign(swiper.pagination, {\n render,\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nexport default function Parallax({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n parallax: {\n enabled: false\n }\n });\n\n const setTransform = (el, progress) => {\n const {\n rtl\n } = swiper;\n const $el = $(el);\n const rtlFactor = rtl ? -1 : 1;\n const p = $el.attr('data-swiper-parallax') || '0';\n let x = $el.attr('data-swiper-parallax-x');\n let y = $el.attr('data-swiper-parallax-y');\n const scale = $el.attr('data-swiper-parallax-scale');\n const opacity = $el.attr('data-swiper-parallax-opacity');\n\n if (x || y) {\n x = x || '0';\n y = y || '0';\n } else if (swiper.isHorizontal()) {\n x = p;\n y = '0';\n } else {\n y = p;\n x = '0';\n }\n\n if (x.indexOf('%') >= 0) {\n x = `${parseInt(x, 10) * progress * rtlFactor}%`;\n } else {\n x = `${x * progress * rtlFactor}px`;\n }\n\n if (y.indexOf('%') >= 0) {\n y = `${parseInt(y, 10) * progress}%`;\n } else {\n y = `${y * progress}px`;\n }\n\n if (typeof opacity !== 'undefined' && opacity !== null) {\n const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n $el[0].style.opacity = currentOpacity;\n }\n\n if (typeof scale === 'undefined' || scale === null) {\n $el.transform(`translate3d(${x}, ${y}, 0px)`);\n } else {\n const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);\n }\n };\n\n const setTranslate = () => {\n const {\n $el,\n slides,\n progress,\n snapGrid\n } = swiper;\n $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, progress);\n });\n slides.each((slideEl, slideIndex) => {\n let slideProgress = slideEl.progress;\n\n if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n }\n\n slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, slideProgress);\n });\n });\n };\n\n const setTransition = (duration = swiper.params.speed) => {\n const {\n $el\n } = swiper;\n $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => {\n const $parallaxEl = $(parallaxEl);\n let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n $parallaxEl.transition(parallaxDuration);\n });\n };\n\n on('beforeInit', () => {\n if (!swiper.params.parallax.enabled) return;\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('init', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTranslate', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTransition', (_swiper, duration) => {\n if (!swiper.params.parallax.enabled) return;\n setTransition(duration);\n });\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Scrollbar({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag'\n }\n });\n swiper.scrollbar = {\n el: null,\n dragEl: null,\n $el: null,\n $dragEl: null\n };\n\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar,\n rtlTranslate: rtl,\n progress\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n const params = swiper.params.scrollbar;\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n\n if (rtl) {\n newPos = -newPos;\n\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n\n if (params.hide) {\n clearTimeout(timeout);\n $el[0].style.opacity = 1;\n timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n }\n\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n }\n\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));\n\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function getPointerPosition(e) {\n if (swiper.isHorizontal()) {\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX;\n }\n\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY;\n }\n\n function setDragPosition(e) {\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n $el\n } = scrollbar;\n let positionRatio;\n positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n isTouched = true;\n dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n setDragPosition(e);\n clearTimeout(dragTimeout);\n $el.transition(0);\n\n if (params.hide) {\n $el.css('opacity', 1);\n }\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n\n emit('scrollbarDragStart', e);\n }\n\n function onDragMove(e) {\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n emit('scrollbarDragMove', e);\n }\n\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el\n } = scrollbar;\n if (!isTouched) return;\n isTouched = false;\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n\n emit('scrollbarDragEnd', e);\n\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n\n function events(method) {\n const {\n scrollbar,\n touchEventsTouch,\n touchEventsDesktop,\n params,\n support\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = support.passiveListener && params.passiveListeners ? {\n passive: false,\n capture: false\n } : false;\n const passiveListener = support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n\n if (!support.touch) {\n target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener);\n document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener);\n document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener);\n } else {\n target[eventMethod](touchEventsTouch.start, onDragStart, activeListener);\n target[eventMethod](touchEventsTouch.move, onDragMove, activeListener);\n target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener);\n }\n }\n\n function enableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('on');\n }\n\n function disableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('off');\n }\n\n function init() {\n const {\n scrollbar,\n $el: $swiperEl\n } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {\n el: 'swiper-scrollbar'\n });\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n let $el = $(params.el);\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n\n if ($dragEl.length === 0) {\n $dragEl = $(`
`);\n $el.append($dragEl);\n }\n\n Object.assign(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0]\n });\n\n if (params.draggable) {\n enableDraggable();\n }\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function destroy() {\n disableDraggable();\n }\n\n on('init', () => {\n init();\n updateSize();\n setTranslate();\n });\n on('update resize observerUpdate lock unlock', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.scrollbar;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n Object.assign(swiper.scrollbar, {\n updateSize,\n setTranslate,\n init,\n destroy\n });\n}","import { isObject } from '../../shared/utils.js';\nimport $ from '../../shared/dom.js';\nexport default function Thumb({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-thumbs'\n }\n });\n let initialized = false;\n let swiperCreated = false;\n swiper.thumbs = {\n swiper: null\n };\n\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n\n if (swiper.params.loop) {\n let currentIndex = swiper.activeIndex;\n\n if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n currentIndex = swiper.activeIndex;\n }\n\n const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;\n }\n\n swiper.slideTo(slideToIndex);\n }\n\n function init() {\n const {\n thumbs: thumbsParams\n } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n\n swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n let currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n\n if (thumbsSwiper.params.loop) {\n if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {\n thumbsSwiper.loopFix(); // eslint-disable-next-line\n\n thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n currentThumbsIndex = thumbsSwiper.activeIndex;\n } // Find actual thumbs index to slide to\n\n\n const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n\n if (typeof prevThumbsIndex === 'undefined') {\n newThumbsIndex = nextThumbsIndex;\n } else if (typeof nextThumbsIndex === 'undefined') {\n newThumbsIndex = prevThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = nextThumbsIndex;\n } else {\n newThumbsIndex = prevThumbsIndex;\n }\n\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n\n if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n }\n\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n } // Activate thumbs\n\n\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n\n thumbsToActivate = Math.floor(thumbsToActivate);\n thumbsSwiper.slides.removeClass(thumbActiveClass);\n\n if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`).addClass(thumbActiveClass);\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);\n }\n }\n }\n\n on('beforeInit', () => {\n const {\n thumbs\n } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n init();\n update(true);\n });\n on('slideChange update resize observerUpdate', () => {\n if (!swiper.thumbs.swiper) return;\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n\n if (swiperCreated && thumbsSwiper) {\n thumbsSwiper.destroy();\n }\n });\n Object.assign(swiper.thumbs, {\n init,\n update\n });\n}","import $ from '../../shared/dom.js';\nimport { setCSSProperty } from '../../shared/utils.js';\nexport default function Virtual({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n virtual: {\n enabled: false,\n slides: [],\n cache: true,\n renderSlide: null,\n renderExternal: null,\n renderExternalUpdate: true,\n addSlidesBefore: 0,\n addSlidesAfter: 0\n }\n });\n let cssModeTimeout;\n swiper.virtual = {\n cache: {},\n from: undefined,\n to: undefined,\n slides: [],\n offset: 0,\n slidesGrid: []\n };\n\n function renderSlide(slide, index) {\n const params = swiper.params.virtual;\n\n if (params.cache && swiper.virtual.cache[index]) {\n return swiper.virtual.cache[index];\n }\n\n const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
${slide}
`);\n if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n if (params.cache) swiper.virtual.cache[index] = $slideEl;\n return $slideEl;\n }\n\n function update(force) {\n const {\n slidesPerView,\n slidesPerGroup,\n centeredSlides\n } = swiper.params;\n const {\n addSlidesBefore,\n addSlidesAfter\n } = swiper.params.virtual;\n const {\n from: previousFrom,\n to: previousTo,\n slides,\n slidesGrid: previousSlidesGrid,\n offset: previousOffset\n } = swiper.virtual;\n\n if (!swiper.params.cssMode) {\n swiper.updateActiveIndex();\n }\n\n const activeIndex = swiper.activeIndex || 0;\n let offsetProp;\n if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n let slidesAfter;\n let slidesBefore;\n\n if (centeredSlides) {\n slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n } else {\n slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;\n slidesBefore = slidesPerGroup + addSlidesBefore;\n }\n\n const from = Math.max((activeIndex || 0) - slidesBefore, 0);\n const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n Object.assign(swiper.virtual, {\n from,\n to,\n offset,\n slidesGrid: swiper.slidesGrid\n });\n\n function onRendered() {\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n if (swiper.lazy && swiper.params.lazy.enabled) {\n swiper.lazy.load();\n }\n }\n\n if (previousFrom === from && previousTo === to && !force) {\n if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n swiper.slides.css(offsetProp, `${offset}px`);\n }\n\n swiper.updateProgress();\n return;\n }\n\n if (swiper.params.virtual.renderExternal) {\n swiper.params.virtual.renderExternal.call(swiper, {\n offset,\n from,\n to,\n slides: function getSlides() {\n const slidesToRender = [];\n\n for (let i = from; i <= to; i += 1) {\n slidesToRender.push(slides[i]);\n }\n\n return slidesToRender;\n }()\n });\n\n if (swiper.params.virtual.renderExternalUpdate) {\n onRendered();\n }\n\n return;\n }\n\n const prependIndexes = [];\n const appendIndexes = [];\n\n if (force) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();\n } else {\n for (let i = previousFrom; i <= previousTo; i += 1) {\n if (i < from || i > to) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${i}\"]`).remove();\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n if (i >= from && i <= to) {\n if (typeof previousTo === 'undefined' || force) {\n appendIndexes.push(i);\n } else {\n if (i > previousTo) appendIndexes.push(i);\n if (i < previousFrom) prependIndexes.push(i);\n }\n }\n }\n\n appendIndexes.forEach(index => {\n swiper.$wrapperEl.append(renderSlide(slides[index], index));\n });\n prependIndexes.sort((a, b) => b - a).forEach(index => {\n swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n });\n swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);\n onRendered();\n }\n\n function appendSlide(slides) {\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.push(slides[i]);\n }\n } else {\n swiper.virtual.slides.push(slides);\n }\n\n update(true);\n }\n\n function prependSlide(slides) {\n const activeIndex = swiper.activeIndex;\n let newActiveIndex = activeIndex + 1;\n let numberOfNewSlides = 1;\n\n if (Array.isArray(slides)) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n numberOfNewSlides = slides.length;\n } else {\n swiper.virtual.slides.unshift(slides);\n }\n\n if (swiper.params.virtual.cache) {\n const cache = swiper.virtual.cache;\n const newCache = {};\n Object.keys(cache).forEach(cachedIndex => {\n const $cachedEl = cache[cachedIndex];\n const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n\n if (cachedElIndex) {\n $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides);\n }\n\n newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n });\n swiper.virtual.cache = newCache;\n }\n\n update(true);\n swiper.slideTo(newActiveIndex, 0);\n }\n\n function removeSlide(slidesIndexes) {\n if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n let activeIndex = swiper.activeIndex;\n\n if (Array.isArray(slidesIndexes)) {\n for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n swiper.virtual.slides.splice(slidesIndexes[i], 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes[i]];\n }\n\n if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n } else {\n swiper.virtual.slides.splice(slidesIndexes, 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes];\n }\n\n if (slidesIndexes < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n\n update(true);\n swiper.slideTo(activeIndex, 0);\n }\n\n function removeAllSlides() {\n swiper.virtual.slides = [];\n\n if (swiper.params.virtual.cache) {\n swiper.virtual.cache = {};\n }\n\n update(true);\n swiper.slideTo(0, 0);\n }\n\n on('beforeInit', () => {\n if (!swiper.params.virtual.enabled) return;\n swiper.virtual.slides = swiper.params.virtual.slides;\n swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n\n if (!swiper.params.initialSlide) {\n update();\n }\n });\n on('setTranslate', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode && !swiper._immediateVirtual) {\n clearTimeout(cssModeTimeout);\n cssModeTimeout = setTimeout(() => {\n update();\n }, 100);\n } else {\n update();\n }\n });\n on('init update resize', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`);\n }\n });\n Object.assign(swiper.virtual, {\n appendSlide,\n prependSlide,\n removeSlide,\n removeAllSlides,\n update\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { getTranslate } from '../../shared/utils.js';\nexport default function Zoom({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed'\n }\n });\n swiper.zoom = {\n enabled: false\n };\n let currentScale = 1;\n let isScaling = false;\n let gesturesEnabled;\n let fakeGestureTouched;\n let fakeGestureMoved;\n const gesture = {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3\n };\n const image = {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n };\n const velocity = {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n };\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n\n set(value) {\n if (scale !== value) {\n const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined;\n const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined;\n emit('zoomChange', value, imageEl, slideEl);\n }\n\n scale = value;\n }\n\n });\n\n function getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n return distance;\n } // Events\n\n\n function onGestureStart(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n\n if (!support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureTouched = true;\n gesture.scaleStart = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n\n isScaling = true;\n }\n\n function onGestureChange(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureMoved = true;\n gesture.scaleMove = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) {\n if (e.type === 'gesturechange') onGestureStart(e);\n return;\n }\n\n if (support.gestures) {\n zoom.scale = e.scale * currentScale;\n } else {\n zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale;\n }\n\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;\n }\n\n if (zoom.scale < params.minRatio) {\n zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;\n }\n\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function onGestureEnd(e) {\n const device = swiper.device;\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (!fakeGestureTouched || !fakeGestureMoved) {\n return;\n }\n\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) {\n return;\n }\n\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n currentScale = zoom.scale;\n isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n }\n\n function onTouchStart(e) {\n const device = swiper.device;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n }\n\n function onTouchMove(e) {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n } // Define if we need image drag\n\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !isScaling) {\n if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {\n image.isTouched = false;\n return;\n }\n\n if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {\n image.isTouched = false;\n return;\n }\n }\n\n if (e.cancelable) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n image.isMoved = true;\n image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;\n }\n\n if (image.currentX > image.maxX) {\n image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;\n }\n\n if (image.currentY < image.minY) {\n image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;\n }\n\n if (image.currentY > image.maxY) {\n image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;\n } // Velocity\n\n\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTouchEnd() {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY; // Fix duration\n\n if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n image.currentX = newPositionX;\n image.currentY = newPositionY; // Define if we need image drag\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTransitionEnd() {\n const zoom = swiper.zoom;\n\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n }\n\n function zoomIn(e) {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (e && e.target) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n }\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.touchAction = 'none';\n }\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left + window.scrollX;\n offsetY = gesture.$slideEl.offset().top + window.scrollY;\n diffX = offsetX + slideWidth / 2 - touchX;\n diffY = offsetY + slideHeight / 2 - touchY;\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n\n gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function zoomOut() {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.style.touchAction = '';\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n } // Toggle Zoom\n\n\n function zoomToggle(e) {\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoomOut();\n } else {\n // Zoom In\n zoomIn(e);\n }\n }\n\n function getListeners() {\n const support = swiper.support;\n const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n const activeListenerWithCapture = support.passiveListener ? {\n passive: false,\n capture: true\n } : true;\n return {\n passiveListener,\n activeListenerWithCapture\n };\n }\n\n function getSlideSelector() {\n return `.${swiper.params.slideClass}`;\n }\n\n function toggleGestures(method) {\n const {\n passiveListener\n } = getListeners();\n const slideSelector = getSlideSelector();\n swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener);\n swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener);\n }\n\n function enableGestures() {\n if (gesturesEnabled) return;\n gesturesEnabled = true;\n toggleGestures('on');\n }\n\n function disableGestures() {\n if (!gesturesEnabled) return;\n gesturesEnabled = false;\n toggleGestures('off');\n } // Attach/Detach Events\n\n\n function enable() {\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n const support = swiper.support;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n function disable() {\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n const support = swiper.support;\n zoom.enabled = false;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n on('init', () => {\n if (swiper.params.zoom.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n disable();\n });\n on('touchStart', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchStart(e);\n });\n on('touchEnd', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchEnd(e);\n });\n on('doubleTap', (_s, e) => {\n if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n zoomToggle(e);\n }\n });\n on('transitionEnd', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n onTransitionEnd();\n }\n });\n on('slideChange', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n onTransitionEnd();\n }\n });\n Object.assign(swiper.zoom, {\n enable,\n disable,\n in: zoomIn,\n out: zoomOut,\n toggle: zoomToggle\n });\n}","export default function classesToSelector(classes = '') {\n return `.${classes.trim().replace(/([\\.:!\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}","import { getDocument } from 'ssr-window';\nexport default function createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n const document = getDocument();\n\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = swiper.$el.children(`.${checkProps[key]}`)[0];\n\n if (!element) {\n element = document.createElement('div');\n element.className = checkProps[key];\n swiper.$el.append(element);\n }\n\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n\n return params;\n}","import $ from './dom.js';\nexport default function createShadow(params, $slideEl, side) {\n const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`;\n const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;\n let $shadowEl = $shadowContainer.children(`.${shadowClass}`);\n\n if (!$shadowEl.length) {\n $shadowEl = $(`
`);\n $shadowContainer.append($shadowEl);\n }\n\n return $shadowEl;\n}","import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, styles, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove } from 'dom7';\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove\n};\nObject.keys(Methods).forEach(methodName => {\n Object.defineProperty($.fn, methodName, {\n value: Methods[methodName],\n writable: true\n });\n});\nexport default $;","export default function effectInit(params) {\n const {\n effect,\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams,\n perspective\n } = params;\n on('beforeInit', () => {\n if (swiper.params.effect !== effect) return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`);\n\n if (perspective && perspective()) {\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n }\n\n const overwriteParamsResult = overwriteParams ? overwriteParams() : {};\n Object.assign(swiper.params, overwriteParamsResult);\n Object.assign(swiper.originalParams, overwriteParamsResult);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== effect) return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== effect) return;\n setTransition(duration);\n });\n}","export default function effectTarget(effectParams, $slideEl) {\n if (effectParams.transformEl) {\n return $slideEl.find(effectParams.transformEl).css({\n 'backface-visibility': 'hidden',\n '-webkit-backface-visibility': 'hidden'\n });\n }\n\n return $slideEl;\n}","export default function effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides\n}) {\n const {\n slides,\n activeIndex,\n $wrapperEl\n } = swiper;\n\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n let $transitionEndTarget;\n\n if (allSlides) {\n $transitionEndTarget = transformEl ? slides.find(transformEl) : slides;\n } else {\n $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex);\n }\n\n $transitionEndTarget.transitionEnd(() => {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n}","import { getWindow } from 'ssr-window';\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n\n return browser;\n}\n\nexport { getBrowser };","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\nlet deviceCached;\n\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel'; // iPadOs 13 fix\n\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n } // Android\n\n\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n } // Export object\n\n\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n\n return deviceCached;\n}\n\nexport { getDevice };","import { getWindow, getDocument } from 'ssr-window';\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),\n passiveListener: function checkPassiveListener() {\n let supportsPassive = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n }\n\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {// No support\n }\n\n return supportsPassive;\n }(),\n gestures: function checkGestures() {\n return 'ongesturestart' in window;\n }()\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n\n return support;\n}\n\nexport { getSupport };","import { getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {// no getter for object\n }\n\n try {\n delete object[key];\n } catch (e) {// something got wrong\n }\n });\n}\n\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\n\nfunction now() {\n return Date.now();\n}\n\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\n\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n } // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n\n\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n\n return curTransform || 0;\n}\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\n\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\n\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n\n return to;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n\n const animate = () => {\n time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n\n animate();\n}\n\nexport { animateCSSModeScroll, deleteProps, nextTick, now, getTranslate, isObject, extend, getComputedStyle, setCSSProperty };","/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n\nexport { default as Swiper, default } from './core/core.js';\nexport { default as Virtual } from './modules/virtual/virtual.js';\nexport { default as Keyboard } from './modules/keyboard/keyboard.js';\nexport { default as Mousewheel } from './modules/mousewheel/mousewheel.js';\nexport { default as Navigation } from './modules/navigation/navigation.js';\nexport { default as Pagination } from './modules/pagination/pagination.js';\nexport { default as Scrollbar } from './modules/scrollbar/scrollbar.js';\nexport { default as Parallax } from './modules/parallax/parallax.js';\nexport { default as Zoom } from './modules/zoom/zoom.js';\nexport { default as Lazy } from './modules/lazy/lazy.js';\nexport { default as Controller } from './modules/controller/controller.js';\nexport { default as A11y } from './modules/a11y/a11y.js';\nexport { default as History } from './modules/history/history.js';\nexport { default as HashNavigation } from './modules/hash-navigation/hash-navigation.js';\nexport { default as Autoplay } from './modules/autoplay/autoplay.js';\nexport { default as Thumbs } from './modules/thumbs/thumbs.js';\nexport { default as FreeMode } from './modules/free-mode/free-mode.js';\nexport { default as Grid } from './modules/grid/grid.js';\nexport { default as Manipulation } from './modules/manipulation/manipulation.js';\nexport { default as EffectFade } from './modules/effect-fade/effect-fade.js';\nexport { default as EffectCube } from './modules/effect-cube/effect-cube.js';\nexport { default as EffectFlip } from './modules/effect-flip/effect-flip.js';\nexport { default as EffectCoverflow } from './modules/effect-coverflow/effect-coverflow.js';\nexport { default as EffectCreative } from './modules/effect-creative/effect-creative.js';\nexport { default as EffectCards } from './modules/effect-cards/effect-cards.js';","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Fancybox } from '@fancyapps/ui'\r\n\r\nimport { changeMenu } from './components/burger-menu'\r\nimport { addSmoothScroll } from '../js/components/scroll-smooth'\r\nimport { initializationSliders } from '../js/components/sliders'\r\nimport { toggleAccordion } from '../js/components/accordion'\r\nimport { addVideoPlayer } from '../js/components/video-player'\r\nimport { paintBtn } from '../js/components/paint-btn'\r\n\r\nchangeMenu()\r\naddVideoPlayer()\r\ninitializationSliders()\r\naddSmoothScroll()\r\ntoggleAccordion()\r\npaintBtn()\r\n"],"names":["items","document","querySelectorAll","title","toggleAccordion","forEach","question","addEventListener","thisItem","parentNode","item","classList","toggle","remove","burger","querySelector","menu","menuLinks","changeMenu","contains","body","style","overflowY","el","btnNext","paintBtn","scrollToTop","top","window","scrollY","add","e","console","log","SmoothScroll","header","btnUpWrapper","addSmoothScroll","scroll","speed","Swiper","Navigation","Pagination","Autoplay","use","initializationSliders","recomendationsSlider","slidesPerView","navigation","nextEl","prevEl","loop","goodsSlider","pagination","clickable","breakpoints","professionalSlider","paginationClickable","initialSlide","centeredSlides","zoom","maxRatio","spaceBetween","allowTouchMove","interviewSlider","partnersSlider","freeMode","grabCursor","autoplay","enabled","delay","disableOnInteraction","freeModeMomentum","stop","start","running","error","videojs","playBtn","videoTitle","videoText","videoLink","videoGradient","videoIntro","videoMask","videoJsTech","addVideoPlayer","isPreviewVideo","videoPlayer","getElementById","muted","controls","playToggle","loadMainVideo","desktopUrl","mobileUrl","screen","width","src","type","volume","changePlayerStatus","play","addClass","on","played","removeClass","pause","fluid","objectFit","currentTime","Fancybox"],"sourceRoot":""} \ No newline at end of file diff --git a/src/partials/accordion.html b/src/partials/accordion.html index 2d293d3..6d4f6a7 100644 --- a/src/partials/accordion.html +++ b/src/partials/accordion.html @@ -63,13 +63,13 @@ Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург

- Беркут, Российская ул., 206А, Красондар + Беркут, Российская ул., 206А, Краснодар

- Техдок, Ялтинская ул., 18, Красондар + Техдок, Ялтинская ул., 18, Краснодар

- Триалл, Черкасская ул., 66/1, Красондар + Триалл, Черкасская ул., 66/1, Краснодар

БестВей, Коминтерна, 47А1, Нижний Новгород diff --git a/yarn.lock b/yarn.lock index e1fead3..384da8c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.22.13": +"@babel/code-frame@^7.22.13": version "7.22.13" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz" integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== @@ -23,7 +23,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.16.7", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0": +"@babel/core@^7.16.7": version "7.22.17" resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.17.tgz" integrity sha512-2EENLmhpwplDux5PSsZnSbnSkB3tZ6QTksgO25xwEL7pIDcNOMhF5v/s6RzwjMZzZzw9Ofc30gHv5ChCC8pifQ== @@ -939,11 +939,6 @@ resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@csstools/selector-specificity@^2.0.2": - version "2.2.0" - resolved "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz" - integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== - "@dabh/diagnostics@^2.0.2": version "2.0.3" resolved "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz" @@ -1011,7 +1006,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -1100,26 +1095,11 @@ resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== -"@types/minimist@^1.2.0": - version "1.2.5" - resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz" - integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== - "@types/node@*", "@types/node@>=10.0.0": version "20.6.0" resolved "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz" integrity sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg== -"@types/normalize-package-data@^2.4.0": - version "2.4.4" - resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz" - integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== - -"@types/parse-json@^4.0.0": - version "4.0.2" - resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz" - integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== - "@types/q@^1.5.1": version "1.5.6" resolved "https://registry.npmjs.org/@types/q/-/q-1.5.6.tgz" @@ -1152,19 +1132,19 @@ mux.js "7.0.1" video.js "^7 || ^8" -"@videojs/vhs-utils@^3.0.5": - version "3.0.5" - resolved "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz" - integrity sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw== +"@videojs/vhs-utils@4.0.0", "@videojs/vhs-utils@^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz" + integrity sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg== dependencies: "@babel/runtime" "^7.12.5" global "^4.4.0" url-toolkit "^2.2.1" -"@videojs/vhs-utils@^4.0.0", "@videojs/vhs-utils@4.0.0": - version "4.0.0" - resolved "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz" - integrity sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg== +"@videojs/vhs-utils@^3.0.5": + version "3.0.5" + resolved "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz" + integrity sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw== dependencies: "@babel/runtime" "^7.12.5" global "^4.4.0" @@ -1179,7 +1159,7 @@ global "~4.4.0" is-function "^1.0.1" -"@webassemblyjs/ast@^1.11.5", "@webassemblyjs/ast@1.11.6": +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz" integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== @@ -1280,7 +1260,7 @@ "@webassemblyjs/wasm-gen" "1.11.6" "@webassemblyjs/wasm-parser" "1.11.6" -"@webassemblyjs/wasm-parser@^1.11.5", "@webassemblyjs/wasm-parser@1.11.6": +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": version "1.11.6" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz" integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== @@ -1333,12 +1313,12 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== -acorn@^8, acorn@^8.7.1, acorn@^8.8.2: +acorn@^8.7.1, acorn@^8.8.2: version "8.10.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== -aes-decrypter@^4.0.1, aes-decrypter@4.0.1: +aes-decrypter@4.0.1, aes-decrypter@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-4.0.1.tgz" integrity sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg== @@ -1368,7 +1348,7 @@ ajv-keywords@^3.5.2: resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: +ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1378,16 +1358,6 @@ ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz" @@ -1445,21 +1415,14 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-wrap@^0.1.0, ansi-wrap@0.1.0: +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz" integrity sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw== @@ -1648,11 +1611,6 @@ arraybuffer.prototype.slice@^1.0.1: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - asn1@~0.2.3: version "0.2.6" resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" @@ -1660,7 +1618,7 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -assert-plus@^1.0.0, assert-plus@1.0.0: +assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== @@ -1670,11 +1628,6 @@ assign-symbols@^1.0.0: resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz" integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-done@^1.2.0, async-done@^1.2.2: version "1.3.2" resolved "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz" @@ -1813,10 +1766,15 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -balanced-match@^2.0.0: +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base64id@2.0.0, base64id@~2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz" - integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== + resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== base@^0.11.1: version "0.11.2" @@ -1831,16 +1789,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64id@~2.0.0, base64id@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" - integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== - batch@0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" @@ -1921,6 +1869,13 @@ binaryextensions@^2.2.0: resolved "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz" integrity sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bl@^1.0.0: version "1.2.3" resolved "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz" @@ -2031,7 +1986,7 @@ browser-sync@^2.26.14: ua-parser-js "^1.0.33" yargs "^17.3.1" -browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.21.10, browserslist@^4.21.9, "browserslist@>= 4.21.0": +browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.21.10, browserslist@^4.21.9: version "4.21.10" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== @@ -2128,11 +2083,6 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - camel-case@3.0.x: version "3.0.0" resolved "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz" @@ -2149,15 +2099,6 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - camelcase@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" @@ -2173,11 +2114,6 @@ camelcase@^5.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - can-use-dom@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/can-use-dom/-/can-use-dom-0.1.0.tgz" @@ -2203,18 +2139,15 @@ caw@^2.0.0, caw@^2.0.1: tunnel-agent "^0.6.0" url-to-options "^1.0.1" -chalk@^1.0.0: - version "1.1.3" - resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" - integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== +chalk@4.1.2, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== @@ -2242,22 +2175,6 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - cheerio@0.*: version "0.22.0" resolved "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz" @@ -2280,6 +2197,21 @@ cheerio@0.*: lodash.reject "^4.4.0" lodash.some "^4.4.0" +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chokidar@^2.0.0: version "2.1.8" resolved "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz" @@ -2299,21 +2231,6 @@ chokidar@^2.0.0: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.5.1, "chokidar@>=3.0.0 <4.0.0": - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - chownr@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" @@ -2480,7 +2397,7 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@^1.0.0, color-name@1.1.3: +color-name@1.1.3, color-name@^1.0.0: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== @@ -2511,11 +2428,6 @@ color@^3.1.3: color-convert "^1.9.3" color-string "^1.6.0" -colord@^2.9.3: - version "2.9.3" - resolved "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz" - integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== - colorspace@1.1.x: version "1.1.4" resolved "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz" @@ -2531,7 +2443,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.2.0, commander@^2.8.1, commander@2.17.x: +commander@2.17.x, commander@^2.2.0, commander@^2.8.1: version "2.17.1" resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== @@ -2661,16 +2573,16 @@ core-js@^3.0.1: resolved "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz" integrity sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw== -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - core-util-is@1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + cors@~2.8.5: version "2.8.5" resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" @@ -2679,17 +2591,6 @@ cors@~2.8.5: object-assign "^4" vary "^1" -cosmiconfig@^7.1.0: - version "7.1.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" @@ -2719,11 +2620,6 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-functions-list@^3.1.0: - version "3.2.1" - resolved "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz" - integrity sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ== - css-select-base-adapter@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz" @@ -2765,6 +2661,14 @@ css-selector-parser@^1.4.1: resolved "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz" integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g== +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz" + integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz" @@ -2773,13 +2677,10 @@ css-tree@^1.1.2, css-tree@^1.1.3: mdn-data "2.0.14" source-map "^0.6.1" -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" +css-what@2.1: + version "2.1.3" + resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== css-what@^3.2.1: version "3.4.2" @@ -2791,11 +2692,6 @@ css-what@^6.0.1: resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -css-what@2.1: - version "2.1.3" - resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" @@ -2834,7 +2730,7 @@ cwebp-bin@^5.0.0: bin-wrapper "^4.0.1" logalot "^2.1.0" -d@^1.0.1, d@1: +d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz" integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== @@ -2849,41 +2745,20 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@^2.2.0: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^2.3.3: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@4.3.2: version "4.3.2" resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" @@ -2891,15 +2766,7 @@ debug@4.3.2: dependencies: ms "2.1.2" -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: +decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== @@ -3037,16 +2904,16 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + destroy@~1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" @@ -3069,6 +2936,14 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +dom-serializer@0, dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + dom-serializer@^1.0.1: version "1.4.1" resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz" @@ -3078,14 +2953,6 @@ dom-serializer@^1.0.1: domhandler "^4.2.0" entities "^2.0.0" -dom-serializer@~0.1.0, dom-serializer@0: - version "0.1.1" - resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz" @@ -3098,7 +2965,7 @@ dom7@^4.0.2: dependencies: ssr-window "^4.0.0" -domelementtype@^1.3.0, domelementtype@^1.3.1, domelementtype@1: +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== @@ -3122,7 +2989,7 @@ domhandler@^4.2.0, domhandler@^4.3.1: dependencies: domelementtype "^2.2.0" -domutils@^1.5.1, domutils@1.5.1: +domutils@1.5.1, domutils@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz" integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== @@ -3345,7 +3212,7 @@ errno@^0.1.3: dependencies: prr "~1.0.1" -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.2.0: version "1.3.2" resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -3535,7 +3402,7 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@^1.8.1, etag@~1.8.1, etag@1.8.1: +etag@1.8.1, etag@^1.8.1, etag@~1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== @@ -3702,7 +3569,7 @@ extract-zip@^1.6.5: mkdirp "^0.5.4" yauzl "^2.10.0" -extsprintf@^1.2.0, extsprintf@1.3.0: +extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== @@ -3727,7 +3594,7 @@ fast-fifo@^1.1.0: resolved "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.0.3, fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.0.3, fast-glob@^3.2.9: version "3.3.1" resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== @@ -3755,11 +3622,6 @@ fast-xml-parser@^4.1.3: dependencies: strnum "^1.0.5" -fastest-levenshtein@^1.0.16: - version "1.0.16" - resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - fastq@^1.6.0: version "1.15.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" @@ -3787,12 +3649,10 @@ figures@^1.3.5: escape-string-regexp "^1.0.5" object-assign "^4.1.0" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" +file-type@5.2.0, file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz" + integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== file-type@^10.4.0: version "10.11.0" @@ -3809,21 +3669,11 @@ file-type@^3.8.0: resolved "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz" integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== -file-type@^4.2.0: - version "4.4.0" - resolved "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz" - integrity sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ== - -file-type@^4.3.0: +file-type@^4.2.0, file-type@^4.3.0: version "4.4.0" resolved "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz" integrity sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ== -file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz" - integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== - file-type@^6.1.0: version "6.2.0" resolved "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz" @@ -3834,10 +3684,10 @@ file-type@^8.1.0: resolved "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz" integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== -file-type@5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz" - integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== filename-reserved-regex@^2.0.0: version "2.0.0" @@ -3966,25 +3816,11 @@ flagged-respawn@^1.0.0: resolved "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz" integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - flatnest@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/flatnest/-/flatnest-1.0.0.tgz" integrity sha512-gZgJm7mqdtSRhfy9CDd7qlE/1z0kWhf2qtkdeHoEL31TIu+Q2K7UjifBqED6vWdNXm4A+OXDmbd0PWfWZVq/kA== -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz" @@ -4048,7 +3884,7 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@^0.5.2, fresh@0.5.2: +fresh@0.5.2, fresh@^0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== @@ -4066,15 +3902,6 @@ fs-constants@^1.0.0: resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz" - integrity sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - fs-extra@3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz" @@ -4084,6 +3911,15 @@ fs-extra@3.0.1: jsonfile "^3.0.0" universalify "^0.1.0" +fs-extra@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz" + integrity sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" @@ -4104,6 +3940,19 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@^1.2.7: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -4161,6 +4010,11 @@ get-stdin@^4.0.1: resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" integrity sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw== +get-stream@3.0.0, get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" + integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== + get-stream@^2.2.0: version "2.3.1" resolved "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz" @@ -4169,11 +4023,6 @@ get-stream@^2.2.0: object-assign "^4.0.1" pinkie-promise "^2.0.0" -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - get-stream@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" @@ -4193,11 +4042,6 @@ get-stream@^6.0.0: resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -get-stream@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" @@ -4297,13 +4141,6 @@ global-modules@^1.0.0: is-windows "^1.0.1" resolve-dir "^1.0.0" -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz" @@ -4315,16 +4152,7 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@^4.3.1, global@^4.4.0, global@~4.4.0, global@4.4.0: +global@4.4.0, global@^4.3.1, global@^4.4.0, global@~4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/global/-/global-4.4.0.tgz" integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== @@ -4358,7 +4186,7 @@ globby@^10.0.0: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1, globby@^11.1.0: +globby@^11.0.1: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -4370,11 +4198,6 @@ globby@^11.0.1, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globjoin@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz" - integrity sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg== - glogg@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz" @@ -4691,7 +4514,7 @@ gulp-zip@^5.1.0: vinyl "^2.1.0" yazl "^2.5.1" -gulp@^4.0.2, gulp@>=4: +gulp@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz" integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== @@ -4721,11 +4544,6 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" @@ -4847,13 +4665,6 @@ hosted-git-info@^2.1.4: resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - html-minifier@^3.5.20: version "3.5.21" resolved "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz" @@ -4867,11 +4678,6 @@ html-minifier@^3.5.20: relateurl "0.2.x" uglify-js "3.4.x" -html-tags@^3.2.0: - version "3.3.1" - resolved "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz" - integrity sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ== - htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz" @@ -4889,16 +4695,6 @@ http-cache-semantics@3.8.1: resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" @@ -4910,6 +4706,16 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + http-proxy@^1.18.1: version "1.18.1" resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" @@ -4953,7 +4759,7 @@ ieee754@^1.1.13: resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.1: +ignore@^5.1.1, ignore@^5.2.0: version "5.2.4" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -5025,29 +4831,11 @@ immutable@^4.0.0: resolved "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz" integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - import-lazy@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz" integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== -import-lazy@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz" - integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - indent-string@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz" @@ -5073,7 +4861,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5083,7 +4871,7 @@ inherits@2.0.3: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -ini@^1.3.4, ini@^1.3.5: +ini@^1.3.4: version "1.3.8" resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -5210,7 +4998,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.13.0, is-core-module@^2.5.0: +is-core-module@^2.13.0: version "2.13.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -5268,11 +5056,6 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz" @@ -5404,21 +5187,7 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== -is-plain-object@^2.0.1: - version "2.0.4" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-plain-object@^2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-plain-object@^2.0.4: +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== @@ -5549,20 +5318,20 @@ is@^3.2.1: resolved "https://registry.npmjs.org/is/-/is-3.3.0.tgz" integrity sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg== -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== -isarray@~1.0.0, isarray@1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isexe@^2.0.0: version "2.0.0" @@ -5644,12 +5413,7 @@ json-buffer@3.0.0: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: +json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -5659,11 +5423,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-schema@0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" @@ -5733,13 +5492,6 @@ keycode@2.2.0: resolved "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz" integrity sha512-ps3I9jAdNtRpJrbBvQjpzyFbss/skHqzS+eu4RxKLaEAtFqkjZaB6TZMSivPbLxf4K7VI4SjR0P5mRCX5+Q25A== -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - keyv@3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz" @@ -5752,14 +5504,7 @@ kind-of@^1.1.0: resolved "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz" integrity sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g== -kind-of@^3.0.2, kind-of@^3.0.3: - version "3.2.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== - dependencies: - is-buffer "^1.1.5" - -kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -5778,17 +5523,7 @@ kind-of@^5.0.0, kind-of@^5.0.2: resolved "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kind-of@^6.0.3: +kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -5800,11 +5535,6 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -known-css-properties@^0.26.0: - version "0.26.0" - resolved "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz" - integrity sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg== - kuler@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz" @@ -5858,11 +5588,6 @@ limiter@^1.0.5: resolved "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz" integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" @@ -6020,12 +5745,7 @@ lodash.throttle@^4.0.1, lodash.throttle@^4.1.1: resolved "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz" integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.21, lodash@>=4.17.20: +lodash@>=4.17.20, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6076,16 +5796,16 @@ lower-case@^1.1.1: resolved "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz" integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - lowercase-keys@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz" integrity sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A== +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + lpad-align@^1.0.1: version "1.1.2" resolved "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz" @@ -6111,13 +5831,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - m3u8-parser@^6.0.0: version "6.2.0" resolved "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-6.2.0.tgz" @@ -6136,14 +5849,7 @@ m3u8-parser@^7.1.0: "@videojs/vhs-utils" "^3.0.5" global "^4.4.0" -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^1.2.0: +make-dir@^1.0.0, make-dir@^1.2.0: version "1.3.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz" integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== @@ -6174,11 +5880,6 @@ map-obj@^1.0.0, map-obj@^1.0.1: resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - map-visit@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz" @@ -6196,11 +5897,6 @@ matchdep@^2.0.0: resolve "^1.4.0" stack-trace "0.0.10" -mathml-tag-names@^2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz" - integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== - mdn-data@2.0.14: version "2.0.14" resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz" @@ -6235,24 +5931,6 @@ meow@^3.3.0: redent "^1.0.0" trim-newlines "^1.0.0" -meow@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz" - integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize "^1.2.0" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" @@ -6263,26 +5941,7 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^3.0.4: - version "3.1.10" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -6301,7 +5960,7 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -6309,7 +5968,7 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -mime-db@^1.28.0, mime-db@1.52.0: +mime-db@1.52.0, mime-db@^1.28.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -6343,11 +6002,6 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -6355,15 +6009,6 @@ minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - minimist@^1.1.3, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -6402,14 +6047,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.4: - version "0.5.6" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^0.5.5, mkdirp@~0.5.1: +mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@~0.5.1: version "0.5.6" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -6445,16 +6083,16 @@ mpd-parser@^1.0.1, mpd-parser@^1.2.2: "@xmldom/xmldom" "^0.8.3" global "^4.4.0" -ms@^2.1.1, ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + mustache@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" @@ -6465,7 +6103,7 @@ mute-stdout@^1.0.0: resolved "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz" integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== -mux.js@^7.0.1, mux.js@7.0.1: +mux.js@7.0.1, mux.js@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/mux.js/-/mux.js-7.0.1.tgz" integrity sha512-Omz79uHqYpMP1V80JlvEdCiOW1hiw4mBvDh9gaZEpxvB+7WYb2soZSzfuSRrK2Kh9Pm6eugQNrIpY/Bnyhk4hw== @@ -6473,6 +6111,11 @@ mux.js@^7.0.1, mux.js@7.0.1: "@babel/runtime" "^7.11.2" global "^4.4.0" +nan@^2.12.1: + version "2.22.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.22.0.tgz#31bc433fc33213c97bad36404bb68063de604de3" + integrity sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw== + nanoid@^3.3.6: version "3.3.6" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz" @@ -6577,26 +6220,6 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz" @@ -6958,13 +6581,6 @@ param-case@2.1.x: dependencies: no-case "^2.2.0" -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - parse-filepath@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz" @@ -6981,16 +6597,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - parse-node-version@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz" @@ -7114,17 +6720,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^2.3.0: +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== @@ -7165,6 +6761,16 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" +plugin-error@1.0.1, plugin-error@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz" + integrity sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== + dependencies: + ansi-colors "^1.0.1" + arr-diff "^4.0.0" + arr-union "^3.1.0" + extend-shallow "^3.0.2" + plugin-error@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz" @@ -7176,16 +6782,6 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" -plugin-error@^1.0.1, plugin-error@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz" - integrity sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== - dependencies: - ansi-colors "^1.0.1" - arr-diff "^4.0.0" - arr-union "^3.1.0" - extend-shallow "^3.0.2" - plugin-error@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-2.0.1.tgz" @@ -7230,17 +6826,12 @@ postcss-resolve-nested-selector@^0.1.1: resolved "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz" integrity sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw== -postcss-safe-parser@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz" - integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== - postcss-scss@^4.0.2: version "4.0.8" resolved "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.8.tgz" integrity sha512-Cr0X8Eu7xMhE96PJck6ses/uVVXDtE5ghUTKNUYgm8ozgP2TkgV3LWs3WgLV1xaSSLq8ZFiXaUrj0LVgG1fGEA== -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11: +postcss-selector-parser@^6.0.11: version "6.0.13" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz" integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ== @@ -7258,15 +6849,7 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^7.0.17: - version "7.0.39" - resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz" - integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== - dependencies: - picocolors "^0.2.1" - source-map "^0.6.1" - -postcss@^7.0.32: +postcss@^7.0.17, postcss@^7.0.32: version "7.0.39" resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz" integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== @@ -7274,7 +6857,7 @@ postcss@^7.0.32: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.3.11, postcss@^8.3.3, postcss@^8.3.9, postcss@^8.4.19, postcss@^8.4.29, postcss@^8.4.5: +postcss@^8.3.11, postcss@^8.4.5: version "8.4.29" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz" integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== @@ -7407,11 +6990,6 @@ queue-tick@^1.0.1: resolved "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz" integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" @@ -7442,15 +7020,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz" @@ -7460,17 +7029,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6, "readable-stream@2 || 3": +"readable-stream@2 || 3", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -7483,34 +7042,7 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.2, readable-stream@3: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.1.1: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.4.0: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -7560,14 +7092,6 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz" @@ -7743,11 +7267,6 @@ require-directory@^2.1.1: resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" @@ -7771,16 +7290,6 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: expand-tilde "^2.0.0" global-modules "^1.0.0" -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - resolve-options@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz" @@ -7847,14 +7356,7 @@ rev-path@^2.0.0: dependencies: modify-filename "^1.0.0" -rimraf@^2.3.4: - version "2.7.1" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^2.5.4: +rimraf@^2.3.4, rimraf@^2.5.4: version "2.7.1" resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -7897,17 +7399,12 @@ safe-array-concat@^1.0.0: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@5.2.1: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@~5.1.1: +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -7940,7 +7437,7 @@ safe-stable-stringify@^2.3.1: resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== -safer-buffer@^2.0.2, safer-buffer@^2.1.0, "safer-buffer@>= 2.1.2 < 3", safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -7968,16 +7465,7 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.1.1: - version "3.3.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.2.0: +schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -8012,17 +7500,7 @@ semver-truncate@^1.1.2: dependencies: semver "^5.3.0" -semver@^5.3.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^5.5.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -8032,18 +7510,6 @@ semver@^6.0.0, semver@^6.3.1: resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.4: - version "7.6.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - -"semver@2 || 3 || 4 || 5": - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - send@0.16.2: version "0.16.2" resolved "https://registry.npmjs.org/send/-/send-0.16.2.tgz" @@ -8161,7 +7627,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -8190,15 +7656,6 @@ slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - smooth-scroll@^16.1.3: version "16.1.3" resolved "https://registry.npmjs.org/smooth-scroll/-/smooth-scroll-16.1.3.tgz" @@ -8293,7 +7750,7 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-map-js@^1.0.2, "source-map-js@>=0.6.2 <2.0.0": +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== @@ -8322,12 +7779,7 @@ source-map-url@^0.4.0: resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz" integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== -source-map@^0.5.1: - version "0.5.7" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -source-map@^0.5.6: +source-map@^0.5.1, source-map@^0.5.6: version "0.5.7" resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== @@ -8427,6 +7879,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + "statuses@>= 1.4.0 < 2", statuses@~1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz" @@ -8437,11 +7894,6 @@ statuses@~1.3.1: resolved "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" integrity sha512-wuTCPGlJONk/a1kqZ4fQM2+908lC7fa7nPYpTC1EhnvqLX/IICbeP1OZGDtA374trpSq68YubKUMo8oRhN46yg== -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - stream-exhaust@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz" @@ -8473,18 +7925,6 @@ strict-uri-encode@^1.0.0: resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== -string_decoder@^1.1.1, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" @@ -8530,6 +7970,18 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.2.0" es-abstract "^1.22.1" +string_decoder@^1.1.1, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" @@ -8590,13 +8042,6 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz" @@ -8609,11 +8054,6 @@ strnum@^1.0.5: resolved "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz" integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== -style-search@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz" - integrity sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg== - stylelint-config-recommended-scss@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz" @@ -8661,50 +8101,6 @@ stylelint-scss@^4.0.0: postcss-selector-parser "^6.0.11" postcss-value-parser "^4.2.0" -stylelint@^14.0.0, "stylelint@^14.5.1 || ^15.0.0": - version "14.16.1" - resolved "https://registry.npmjs.org/stylelint/-/stylelint-14.16.1.tgz" - integrity sha512-ErlzR/T3hhbV+a925/gbfc3f3Fep9/bnspMiJPorfGEmcBbXdS+oo6LrVtoUZ/w9fqD6o6k7PtUlCOsCRdjX/A== - dependencies: - "@csstools/selector-specificity" "^2.0.2" - balanced-match "^2.0.0" - colord "^2.9.3" - cosmiconfig "^7.1.0" - css-functions-list "^3.1.0" - debug "^4.3.4" - fast-glob "^3.2.12" - fastest-levenshtein "^1.0.16" - file-entry-cache "^6.0.1" - global-modules "^2.0.0" - globby "^11.1.0" - globjoin "^0.1.4" - html-tags "^3.2.0" - ignore "^5.2.1" - import-lazy "^4.0.0" - imurmurhash "^0.1.4" - is-plain-object "^5.0.0" - known-css-properties "^0.26.0" - mathml-tag-names "^2.1.3" - meow "^9.0.0" - micromatch "^4.0.5" - normalize-path "^3.0.0" - picocolors "^1.0.0" - postcss "^8.4.19" - postcss-media-query-parser "^0.2.3" - postcss-resolve-nested-selector "^0.1.1" - postcss-safe-parser "^6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - resolve-from "^5.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - style-search "^0.1.0" - supports-hyperlinks "^2.3.0" - svg-tags "^1.0.0" - table "^6.8.1" - v8-compile-cache "^2.3.0" - write-file-atomic "^4.0.2" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" @@ -8717,35 +8113,21 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0: +supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.1.1: +supports-color@^8.0.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.3.0: +supports-hyperlinks@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz" integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== @@ -8789,11 +8171,6 @@ svg-sprite@^1.5.0: xpath "^0.0.32" yargs "^15.4.1" -svg-tags@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz" - integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA== - svgo@^1.3.2: version "1.3.2" resolved "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz" @@ -8839,17 +8216,6 @@ swiper@^7.4.1: dom7 "^4.0.2" ssr-window "^4.0.2" -table@^6.8.1: - version "6.8.2" - resolved "https://registry.npmjs.org/table/-/table-6.8.2.tgz" - integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" @@ -8946,11 +8312,6 @@ throttleit@^1.0.0: resolved "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz" integrity sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g== -through@^2.3.8: - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - through2-concurrent@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/through2-concurrent/-/through2-concurrent-2.0.0.tgz" @@ -8966,15 +8327,14 @@ through2-filter@^3.0.0: through2 "~2.0.0" xtend "~4.0.0" -through2@^0.6.3: - version "0.6.5" - resolved "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - integrity sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg== +through2@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" + readable-stream "2 || 3" -through2@^0.6.5: +through2@^0.6.3, through2@^0.6.5: version "0.6.5" resolved "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" integrity sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg== @@ -8982,15 +8342,7 @@ through2@^0.6.5: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@^2.0.3: +through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: version "2.0.5" resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -9013,20 +8365,10 @@ through2@^4.0.2: dependencies: readable-stream "3" -through2@~2.0.0: - version "2.0.5" - resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz" - integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== - dependencies: - readable-stream "2 || 3" +through@^2.3.8: + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== time-stamp@^1.0.0: version "1.1.0" @@ -9118,11 +8460,6 @@ trim-newlines@^1.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" integrity sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw== -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - trim-repeated@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz" @@ -9147,26 +8484,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - type@^1.0.1: version "1.2.0" resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz" @@ -9334,7 +8656,7 @@ universalify@^0.1.0: resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -9436,11 +8758,6 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -v8-compile-cache@^2.3.0: - version "2.4.0" - resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz" - integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== - v8flags@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz" @@ -9475,7 +8792,7 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -"video.js@^7 || ^8", video.js@^8, video.js@^8.6.1: +"video.js@^7 || ^8", video.js@^8.6.1: version "8.6.1" resolved "https://registry.npmjs.org/video.js/-/video.js-8.6.1.tgz" integrity sha512-CNYVJ5WWIZ7bOhbkkfcKqLGoc6WsE3Ft2RfS1lXdQTWk8UiSsPW2Ssk2JzPCA8qnIlUG9os/faCFsYWjyu4JcA== @@ -9561,7 +8878,7 @@ vinyl-sourcemap@^1.1.0: remove-bom-buffer "^3.0.0" vinyl "^2.0.0" -vinyl-sourcemaps-apply@^0.2.1, vinyl-sourcemaps-apply@0.2.1: +vinyl-sourcemaps-apply@0.2.1, vinyl-sourcemaps-apply@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz" integrity sha512-+oDh3KYZBoZC8hfocrbrxbLUeaYtQK7J5WU5Br9VqWqmCll3tFJqKp97GC9GmMsVIL0qnx2DgEDVxdo5EZ5sSw== @@ -9635,7 +8952,7 @@ webpack-stream@^7.0.0: through "^2.3.8" vinyl "^2.2.1" -webpack@^5.1.0, webpack@^5.21.2, webpack@^5.65.0, webpack@>=2: +webpack@^5.65.0: version "5.88.2" resolved "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz" integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ== @@ -9705,7 +9022,7 @@ which-typed-array@^1.1.10, which-typed-array@^1.1.11: gopd "^1.0.1" has-tostringtag "^1.0.0" -which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -9776,14 +9093,6 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - ws@~8.11.0: version "8.11.0" resolved "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz" @@ -9799,7 +9108,7 @@ xpath@^0.0.32: resolved "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz" integrity sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw== -xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0, xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -9834,10 +9143,10 @@ yallist@^4.0.0: resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0: - version "1.10.2" - resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yargs-parser@>=5.0.0-security.0, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs-parser@^18.1.2: version "18.1.3" @@ -9852,16 +9161,6 @@ yargs-parser@^20.2.2: resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1, yargs-parser@>=5.0.0-security.0: - version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - yargs-parser@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz" @@ -9870,6 +9169,19 @@ yargs-parser@^5.0.1: camelcase "^3.0.0" object.assign "^4.1.0" +yargs@17.1.1: + version "17.1.1" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz" + integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^15.4.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" @@ -9919,19 +9231,6 @@ yargs@^7.1.0: y18n "^3.2.1" yargs-parser "^5.0.1" -yargs@17.1.1: - version "17.1.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz" - integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - yarn@^1.22.22: version "1.22.22" resolved "https://registry.npmjs.org/yarn/-/yarn-1.22.22.tgz" -- GitLab From 0ec58df46aabfcf3314d0bfb08d365e5ba6cc07d Mon Sep 17 00:00:00 2001 From: Kirill_Kuzmin Date: Wed, 11 Dec 2024 13:42:03 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/css/components/professional.css | 559 +- app/css/components/professional.css.map | 1 - app/css/components/recommendations.css | 290 +- app/css/components/recommendations.css.map | 1 - app/css/main.css | 4686 +- app/css/main.css.map | 1 - app/css/vendor.css | 4201 +- app/css/vendor.css.map | 1 - app/history-1.html | 693 +- app/history-2.html | 683 +- app/history-3.html | 680 +- app/index.html | 1925 +- app/js/main.js | 80238 +------------------ app/js/main.js.LICENSE.txt | 29 + app/js/main.js.map | 1 - 15 files changed, 45 insertions(+), 93944 deletions(-) delete mode 100644 app/css/components/professional.css.map delete mode 100644 app/css/components/recommendations.css.map delete mode 100644 app/css/main.css.map delete mode 100644 app/css/vendor.css.map create mode 100644 app/js/main.js.LICENSE.txt delete mode 100644 app/js/main.js.map diff --git a/app/css/components/professional.css b/app/css/components/professional.css index d25123c..d728ae1 100644 --- a/app/css/components/professional.css +++ b/app/css/components/professional.css @@ -1,558 +1 @@ -.professional { - position: relative; - overflow: hidden; - margin-top: 85px; - background-color: var(--blue-middle); -} -.professional__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - position: relative; -} -.professional__content { - width: 50%; - padding: 85px 0 55px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - z-index: 11; - color: var(--light); -} -.professional__content::before { - content: ""; - position: absolute; - right: 26%; - bottom: 0; - width: 66vw; - height: 100%; - background-image: linear-gradient(108deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%); - z-index: -1; - -webkit-transform: skewX(17deg); - -ms-transform: skewX(17deg); - transform: skewX(17deg); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; -} -.professional__title { - margin-bottom: 24px; -} -.professional__subtitle { - line-height: 1; - font-size: 36px; - font-weight: 600; - margin-top: -5px; - margin-bottom: 70px; -} -.professional__text { - font-size: 24px; - font-weight: 200; - line-height: 1.17; - max-width: 560px; - width: 100%; -} -.professional__text-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 30px; - margin-bottom: 44px; -} -.professional__slider-container { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - max-width: 1440px; - left: 50%; - -webkit-transform: translateX(-50%); - -ms-transform: translateX(-50%); - transform: translateX(-50%); - overflow: hidden; -} -.professional__slider { - width: 70%; - position: absolute; - top: 160px; - right: -6%; -} -.professional__slider-wrapper { - padding: 40px 0; -} -.professional__slider-item { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-filter: grayscale(100%); - filter: grayscale(100%); - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - -webkit-transition: -webkit-transform var(--transition); - transition: -webkit-transform var(--transition); - transition: transform var(--transition); - transition: transform var(--transition), -webkit-transform var(--transition); -} -.professional__slider-item img { - margin: auto; - height: 220px; - width: 400px; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.3); - -ms-transform: scale(1.3); - transform: scale(1.3); - z-index: 11; - -webkit-filter: grayscale(0); - filter: grayscale(0); -} -.professional__slider-item.swiper-slide-active .professional__slider-link { - -webkit-box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45); - box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45); -} -.professional__slider-item.swiper-slide-active .professional__slider-link::before { - background-color: rgba(0, 0, 0, 0.1); -} -.professional__slider-item.swiper-slide-active .professional__slider-icon { - opacity: 1; -} -.professional__slider-item.swiper-slide-active img { - width: 350px; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-item--hide { - -webkit-filter: grayscale(100%) !important; - filter: grayscale(100%) !important; - pointer-events: none; -} -.professional__slider-link { - position: relative; - -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); - box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-link::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.25); - z-index: 1; -} -.professional__slider-icon { - position: absolute; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - width: 80px; - height: 66px; - overflow: hidden; - top: 50%; - left: 50%; - display: flex; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - z-index: 1; - opacity: 0; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-icon svg path { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-icon:hover svg path:nth-child(1) { - fill: var(--blue-dark); -} -.professional__slider-icon:hover svg path:nth-child(2) { - fill: var(--light); -} -.professional__slider-btn { - -webkit-box-shadow: none; - box-shadow: none; - background-color: var(--light); - border-radius: 50%; - border: none; - width: 56px; - height: 56px; - padding: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - top: 150px; -} -.professional__slider-btn::after { - content: ""; -} -.professional__slider-btn svg { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); -} -.professional__slider-btn.swiper-button-disabled { - opacity: 0.5; -} -.professional__slider-navigation-prev { - left: 19%; -} -.professional__slider-navigation-next { - right: 19%; -} -.professional__slider-info { - margin: 0 auto; - display: block; - max-width: 420px; - font-weight: 600; - color: #fff; - text-align: center; - font-size: 20px; - line-height: 1.17; -} -.professional__slider-pagination { - width: auto !important; - position: static !important; - padding-top: 16px; - margin-bottom: 32px; -} -.professional__slider-pagination .swiper-pagination-bullet { - width: 56px; - height: 3px; - padding: 0; - border-radius: 0; - margin: 0 9px !important; - background-color: var(--light); - opacity: 0.5; - bottom: 0; -} -.professional__slider-pagination .swiper-pagination-bullet-active { - background-color: var(--light) !important; - opacity: 1; -} - -@media (max-width: 1440px) { - .professional__content::before { - right: 20%; - } - .professional__slider { - width: 66%; - right: -108px; - } - .professional__slider-item img { - height: 220px; - } - .professional__slider-navigation-prev { - left: 16%; - } - .professional__slider-navigation-next { - right: 16%; - } -} -@media (max-width: 1280px) { - .professional { - margin-top: 60px; - } - .professional__content { - padding: 60px 0 80px; - } - .professional__content::before { - right: 23%; - } - .professional__subtitle { - font-size: 25px; - margin-bottom: 50px; - } - .professional__text { - font-size: 17px; - max-width: 520px; - } - .professional__text-wrapper { - margin-bottom: 38px; - } - .professional__slider { - top: 128px; - right: -80px; - } - .professional__slider-item img { - height: 194px; - width: 400px; - } - .professional__slider-item.swiper-slide-active img { - width: 300px; - } - .professional__slider-btn { - top: 130px; - } - .professional__slider-pagination { - padding-top: 2px; - margin-bottom: 27px; - } - .professional__slider-pagination .swiper-pagination-bullet { - width: 50px; - } - .professional__slider-info { - font-size: 14px; - max-width: 290px; - } -} -@media (max-width: 1140px) { - .professional__content::before { - right: 17%; - } - .professional__slider-navigation-prev { - left: 14%; - } - .professional__slider-navigation-next { - right: 14%; - } -} -@media (max-width: 1024px) { - .professional { - padding-bottom: 70px; - } - .professional__content { - padding: 60px 0 70px; - } - .professional__content::before { - right: 13%; - } - .professional__subtitle { - margin-bottom: 55px; - } - .professional__text { - max-width: 420px; - } - .professional__text-wrapper { - margin-bottom: 56px; - gap: 20px; - } - .professional__slider-item.swiper-slide-active img { - width: 240px; - } - .professional__slider-item img { - height: 150px; - width: 300px; - } - .professional__slider-icon { - width: 56px; - height: 46px; - } - .professional__slider-btn { - width: 42px; - height: 42px; - top: 116px; - } - .professional__slider-navigation-prev { - left: 18%; - } - .professional__slider-navigation-next { - right: 18%; - } - .professional__slider-pagination { - padding-top: 0; - } - .professional__slider-pagination .swiper-pagination-bullet { - width: 38px; - } -} -@media (max-width: 992px) { - .professional__content { - width: 100%; - padding-bottom: 45px; - } - .professional__content::before { - display: none; - } - .professional__subtitle { - margin-bottom: 33px; - } - .professional__text-wrapper { - margin-bottom: 0; - } - .professional__text { - max-width: 520px; - } - .professional__slider { - position: static; - width: 100%; - } - .professional__slider-decor { - position: relative; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); - z-index: 1; - } - .professional__slider-decor::before { - content: ""; - position: absolute; - z-index: 2; - left: 0; - top: 0; - right: 0; - height: 1000px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(39.39%, #cd1338), color-stop(127.43%, rgba(205, 19, 56, 0.46))); - background-image: linear-gradient(180deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%); - -webkit-transform: skewY(343deg) rotate(180deg); - -ms-transform: skewY(343deg) rotate(180deg); - transform: skewY(343deg) rotate(180deg); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); - } - .professional__slider-container { - padding: 0 var(--container-offset); - max-width: var(--container-width); - position: static; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - margin: 0 auto 52px auto; - } - .professional__slider-item img { - height: 160px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.5); - -ms-transform: scale(1.5); - transform: scale(1.5); - } - .professional__slider-item.swiper-slide-active img { - width: 250px; - } - .professional__slider-btn { - top: 122px; - } - .professional__slider-pagination { - margin-bottom: 20px; - } - .professional__slider-navigation-prev { - left: 20%; - } - .professional__slider-navigation-next { - right: 20%; - } -} -@media (max-width: 768px) { - .professional { - margin-top: 60px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.4); - -ms-transform: scale(1.4); - transform: scale(1.4); - } -} -@media (max-width: 700px) { - .professional__subtitle { - font-size: 16px; - } - .professional__text { - font-size: 14px; - line-height: 18px; - max-width: 340px; - } - .professional__slider-decor { - padding-top: 10px; - } - .professional__slider-decor::before { - top: -30px; - } - .professional__slider-item img { - height: 140px; - } - .professional__slider-item.swiper-slide-active img { - width: 230px; - } - .professional__slider-icon { - width: 50px; - height: 40px; - } - .professional__slider-btn { - top: 110px; - width: 38px; - height: 38px; - } - .professional__slider-btn svg { - -webkit-transform: scale(0.6); - -ms-transform: scale(0.6); - transform: scale(0.6); - } - .professional__slider-navigation-prev { - left: 28%; - } - .professional__slider-navigation-next { - right: 28%; - } -} -@media (max-width: 500px) { - .professional__content { - padding: 45px 0 10px; - } - .professional__slider-decor { - padding-top: 30px; - } - .professional__slider-container { - padding-left: 0; - padding-right: 0; - margin-bottom: 40px; - } - .professional__slider-pagination { - padding-top: 10px; - } - .professional__slider-navigation-prev { - left: 14%; - } - .professional__slider-navigation-next { - right: 14%; - } -} -@media (max-width: 360px) { - .professional__slider-container { - padding-top: 0; - } - .professional__slider-btn { - top: 115px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} -/*# sourceMappingURL=professional.css.map */ \ No newline at end of file +.professional{position:relative;overflow:hidden;margin-top:85px;background-color:var(--blue-middle)}.professional__inner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.professional__content{width:50%;padding:85px 0 55px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;z-index:11;color:var(--light)}.professional__content::before{content:"";position:absolute;right:26%;bottom:0;width:66vw;height:100%;background-image:linear-gradient(108deg,#cd1338 39.39%,rgba(205,19,56,.46) 127.43%);z-index:-1;-webkit-transform:skewX(17deg);-ms-transform:skewX(17deg);transform:skewX(17deg);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top}.professional__title{margin-bottom:24px}.professional__subtitle{line-height:1;font-size:36px;font-weight:600;margin-top:-5px;margin-bottom:70px}.professional__text{font-size:24px;font-weight:200;line-height:1.17;max-width:560px;width:100%}.professional__text-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:30px;margin-bottom:44px}.professional__slider-container{position:absolute;top:0;bottom:0;width:100%;max-width:1440px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);overflow:hidden}.professional__slider{width:70%;position:absolute;top:160px;right:-6%}.professional__slider-wrapper{padding:40px 0}.professional__slider-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform var(--transition);transition:-webkit-transform var(--transition);transition:transform var(--transition);transition:transform var(--transition),-webkit-transform var(--transition)}.professional__slider-item img{margin:auto;height:220px;width:400px;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.3);-ms-transform:scale(1.3);transform:scale(1.3);z-index:11;-webkit-filter:grayscale(0);filter:grayscale(0)}.professional__slider-item.swiper-slide-active .professional__slider-link{-webkit-box-shadow:0 10px 20px 0 rgba(0,0,0,.45);box-shadow:0 10px 20px 0 rgba(0,0,0,.45)}.professional__slider-item.swiper-slide-active .professional__slider-link::before{background-color:rgba(0,0,0,.1)}.professional__slider-item.swiper-slide-active .professional__slider-icon{opacity:1}.professional__slider-item.swiper-slide-active img{width:350px;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-item--hide{-webkit-filter:grayscale(100%)!important;filter:grayscale(100%)!important;pointer-events:none}.professional__slider-link{position:relative;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-link::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.25);z-index:1}.professional__slider-icon{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:80px;height:66px;overflow:hidden;top:50%;left:50%;display:flex;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1;opacity:0;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-icon svg path{-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-icon:hover svg path:nth-child(1){fill:var(--blue-dark)}.professional__slider-icon:hover svg path:nth-child(2){fill:var(--light)}.professional__slider-btn{-webkit-box-shadow:none;box-shadow:none;background-color:var(--light);border-radius:50%;border:none;width:56px;height:56px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;top:150px}.professional__slider-btn::after{content:""}.professional__slider-btn svg{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.professional__slider-btn.swiper-button-disabled{opacity:.5}.professional__slider-navigation-prev{left:19%}.professional__slider-navigation-next{right:19%}.professional__slider-info{margin:0 auto;display:block;max-width:420px;font-weight:600;color:#fff;text-align:center;font-size:20px;line-height:1.17}.professional__slider-pagination{width:auto!important;position:static!important;padding-top:16px;margin-bottom:32px}.professional__slider-pagination .swiper-pagination-bullet{width:56px;height:3px;padding:0;border-radius:0;margin:0 9px!important;background-color:var(--light);opacity:.5;bottom:0}.professional__slider-pagination .swiper-pagination-bullet-active{background-color:var(--light)!important;opacity:1}@media (max-width:1440px){.professional__content::before{right:20%}.professional__slider{width:66%;right:-108px}.professional__slider-item img{height:220px}.professional__slider-navigation-prev{left:16%}.professional__slider-navigation-next{right:16%}}@media (max-width:1280px){.professional{margin-top:60px}.professional__content{padding:60px 0 80px}.professional__content::before{right:23%}.professional__subtitle{font-size:25px;margin-bottom:50px}.professional__text{font-size:17px;max-width:520px}.professional__text-wrapper{margin-bottom:38px}.professional__slider{top:128px;right:-80px}.professional__slider-item img{height:194px;width:400px}.professional__slider-item.swiper-slide-active img{width:300px}.professional__slider-btn{top:130px}.professional__slider-pagination{padding-top:2px;margin-bottom:27px}.professional__slider-pagination .swiper-pagination-bullet{width:50px}.professional__slider-info{font-size:14px;max-width:290px}}@media (max-width:1140px){.professional__content::before{right:17%}.professional__slider-navigation-prev{left:14%}.professional__slider-navigation-next{right:14%}}@media (max-width:1024px){.professional{padding-bottom:70px}.professional__content{padding:60px 0 70px}.professional__content::before{right:13%}.professional__subtitle{margin-bottom:55px}.professional__text{max-width:420px}.professional__text-wrapper{margin-bottom:56px;gap:20px}.professional__slider-item.swiper-slide-active img{width:240px}.professional__slider-item img{height:150px;width:300px}.professional__slider-icon{width:56px;height:46px}.professional__slider-btn{width:42px;height:42px;top:116px}.professional__slider-navigation-prev{left:18%}.professional__slider-navigation-next{right:18%}.professional__slider-pagination{padding-top:0}.professional__slider-pagination .swiper-pagination-bullet{width:38px}}@media (max-width:992px){.professional__content{width:100%;padding-bottom:45px}.professional__content::before{display:none}.professional__subtitle{margin-bottom:33px}.professional__text-wrapper{margin-bottom:0}.professional__text{max-width:520px}.professional__slider{position:static;width:100%}.professional__slider-decor{position:relative;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);z-index:1}.professional__slider-decor::before{content:"";position:absolute;z-index:2;left:0;top:0;right:0;height:1000px;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(39.39%,#cd1338),color-stop(127.43%,rgba(205,19,56,.46)));background-image:linear-gradient(180deg,#cd1338 39.39%,rgba(205,19,56,.46) 127.43%);-webkit-transform:skewY(343deg) rotate(180deg);-ms-transform:skewY(343deg) rotate(180deg);transform:skewY(343deg) rotate(180deg);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.professional__slider-container{padding:0 var(--container-offset);max-width:var(--container-width);position:static;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);margin:0 auto 52px}.professional__slider-item img{height:160px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.5);-ms-transform:scale(1.5);transform:scale(1.5)}.professional__slider-item.swiper-slide-active img{width:250px}.professional__slider-btn{top:122px}.professional__slider-pagination{margin-bottom:20px}.professional__slider-navigation-prev{left:20%}.professional__slider-navigation-next{right:20%}}@media (max-width:768px){.professional{margin-top:60px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.4);-ms-transform:scale(1.4);transform:scale(1.4)}}@media (max-width:700px){.professional__subtitle{font-size:16px}.professional__text{font-size:14px;line-height:18px;max-width:340px}.professional__slider-decor{padding-top:10px}.professional__slider-decor::before{top:-30px}.professional__slider-item img{height:140px}.professional__slider-item.swiper-slide-active img{width:230px}.professional__slider-icon{width:50px;height:40px}.professional__slider-btn{top:110px;width:38px;height:38px}.professional__slider-btn svg{-webkit-transform:scale(.6);-ms-transform:scale(.6);transform:scale(.6)}.professional__slider-navigation-prev{left:28%}.professional__slider-navigation-next{right:28%}}@media (max-width:500px){.professional__content{padding:45px 0 10px}.professional__slider-decor{padding-top:30px}.professional__slider-container{padding-left:0;padding-right:0;margin-bottom:40px}.professional__slider-pagination{padding-top:10px}.professional__slider-navigation-prev{left:14%}.professional__slider-navigation-next{right:14%}}@media (max-width:360px){.professional__slider-container{padding-top:0}.professional__slider-btn{top:115px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}} \ No newline at end of file diff --git a/app/css/components/professional.css.map b/app/css/components/professional.css.map deleted file mode 100644 index 784a82e..0000000 --- a/app/css/components/professional.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["components/professional.scss","components/professional.css"],"names":[],"mappings":"AAAA;EACE,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,oCAAA;ACCF;ADCE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,kBAAA;ACCJ;ADEE;EACE,UAAA;EACA,oBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,kBAAA;EACA,WAAA;EACA,mBAAA;ACAJ;ADEI;EACE,WAAA;EACA,kBAAA;EACA,UAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,0FAAA;EAGA,WAAA;EACA,+BAAA;EAAA,2BAAA;EAAA,uBAAA;EACA,kCAAA;EAAA,0BAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;ACFN;ADME;EACE,mBAAA;ACJJ;ADOE;EACE,cAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;ACLJ;ADQE;EACE,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,WAAA;ACNJ;ADSE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,SAAA;EACA,mBAAA;ACPJ;ADUE;EACE,kBAAA;EACA,MAAA;EACA,SAAA;EACA,WAAA;EACA,iBAAA;EACA,SAAA;EACA,mCAAA;EAAA,+BAAA;EAAA,2BAAA;EACA,gBAAA;ACRJ;ADWE;EACE,UAAA;EACA,kBAAA;EACA,UAAA;EACA,UAAA;ACTJ;ADWI;EACE,eAAA;ACTN;ADYI;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,+BAAA;EAAA,uBAAA;EACA,2BAAA;EAAA,uBAAA;EAAA,mBAAA;EACA,uDAAA;EAAA,+CAAA;EAAA,uCAAA;EAAA,4EAAA;ACVN;ADYM;EACE,YAAA;EACA,aAAA;EACA,YAAA;EACA,yCAAA;EAAA,iCAAA;ACVR;ADaM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,WAAA;EACA,4BAAA;EAAA,oBAAA;ACXR;ADaQ;EACE,yDAAA;EAAA,iDAAA;ACXV;ADaU;EACE,oCAAA;ACXZ;ADeQ;EACE,UAAA;ACbV;ADgBQ;EACE,YAAA;EACA,yCAAA;EAAA,iCAAA;ACdV;ADmBM;EACE,0CAAA;EAAA,kCAAA;EACA,oBAAA;ACjBR;ADqBI;EACE,kBAAA;EACA,oDAAA;EAAA,4CAAA;EACA,yCAAA;EAAA,iCAAA;ACnBN;ADqBM;EACE,WAAA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,qCAAA;EACA,UAAA;ACnBR;ADuBI;EACE,kBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,QAAA;EACA,SAAA;EACA,aAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EACA,UAAA;EACA,UAAA;EACA,yCAAA;EAAA,iCAAA;ACrBN;ADuBM;EACE,yCAAA;EAAA,iCAAA;ACrBR;ADwBM;EACE,sBAAA;ACtBR;ADyBM;EACE,kBAAA;ACvBR;AD2BI;EACE,wBAAA;EAAA,gBAAA;EACA,8BAAA;EACA,kBAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAEA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,UAAA;AC1BN;AD4BM;EACE,WAAA;AC1BR;AD6BM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;AC3BR;AD+BI;EACE,YAAA;AC7BN;ADgCI;EACE,SAAA;AC9BN;ADiCI;EACE,UAAA;AC/BN;ADkCI;EACE,cAAA;EACA,cAAA;EACA,gBAAA;EACA,gBAAA;EACA,WAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;AChCN;ADoCE;EACE,sBAAA;EACA,2BAAA;EACA,iBAAA;EACA,mBAAA;AClCJ;ADqCE;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,wBAAA;EACA,8BAAA;EACA,YAAA;EACA,SAAA;ACnCJ;ADsCE;EACE,yCAAA;EACA,UAAA;ACpCJ;;ADwCA;EAEI;IACE,UAAA;ECtCJ;EDyCE;IACE,UAAA;IACA,aAAA;ECvCJ;ED0CM;IACE,aAAA;ECxCR;ED4CI;IACE,SAAA;EC1CN;ED6CI;IACE,UAAA;EC3CN;AACF;ADgDA;EACE;IACE,gBAAA;EC9CF;EDgDE;IACE,oBAAA;EC9CJ;EDgDI;IACE,UAAA;EC9CN;EDkDE;IACE,eAAA;IACA,mBAAA;EChDJ;EDmDE;IACE,eAAA;IACA,gBAAA;ECjDJ;EDoDE;IACE,mBAAA;EClDJ;EDqDE;IACE,UAAA;IACA,YAAA;ECnDJ;EDsDM;IACE,aAAA;IACA,YAAA;ECpDR;EDwDQ;IACE,YAAA;ECtDV;ED4DI;IACE,UAAA;EC1DN;ED6DI;IACE,gBAAA;IACA,mBAAA;EC3DN;ED6DM;IACE,WAAA;EC3DR;ED+DI;IACE,eAAA;IACA,gBAAA;EC7DN;AACF;ADkEA;EAEI;IACE,UAAA;ECjEJ;EDwEE;IACE,SAAA;ECtEJ;EDyEE;IACE,UAAA;ECvEJ;AACF;AD2EA;EACE;IACE,oBAAA;ECzEF;ED2EE;IACE,oBAAA;ECzEJ;ED2EI;IACE,UAAA;ECzEN;ED6EE;IACE,mBAAA;EC3EJ;ED8EE;IACE,gBAAA;EC5EJ;ED+EE;IACE,mBAAA;IACA,SAAA;EC7EJ;EDkFM;IACE,YAAA;EChFR;EDmFM;IACE,aAAA;IACA,YAAA;ECjFR;EDqFI;IACE,WAAA;IACA,YAAA;ECnFN;EDsFI;IACE,WAAA;IACA,YAAA;IACA,UAAA;ECpFN;EDuFI;IACE,SAAA;ECrFN;EDwFI;IACE,UAAA;ECtFN;EDyFI;IACE,cAAA;ECvFN;ED0FI;IACE,WAAA;ECxFN;AACF;AD6FA;EAEI;IACE,WAAA;IACA,oBAAA;EC5FJ;ED8FI;IACE,aAAA;EC5FN;EDgGE;IACE,mBAAA;EC9FJ;EDiGE;IACE,gBAAA;EC/FJ;EDkGE;IACE,gBAAA;EChGJ;EDmGE;IACE,gBAAA;IACA,WAAA;ECjGJ;EDmGI;IACE,kBAAA;IACA,iCAAA;IAAA,6BAAA;IAAA,yBAAA;IACA,UAAA;ECjGN;EDmGM;IACE,WAAA;IACA,kBAAA;IACA,UAAA;IACA,OAAA;IACA,MAAA;IACA,QAAA;IACA,cAAA;IACA,4IAAA;IAAA,0FAAA;IAGA,+CAAA;IAAA,2CAAA;IAAA,uCAAA;IACA,kCAAA;IAAA,0BAAA;ECnGR;EDuGI;IACE,kCAAA;IACA,iCAAA;IAEA,gBAAA;IACA,gCAAA;IAAA,4BAAA;IAAA,wBAAA;IACA,wBAAA;ECtGN;ED0GM;IACE,aAAA;ECxGR;ED2GM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ECzGR;ED4GM;IAEE,YAAA;EC3GR;ED+GI;IACE,UAAA;EC7GN;EDgHI;IACE,mBAAA;EC9GN;EDiHI;IACE,SAAA;EC/GN;EDkHI;IACE,UAAA;EChHN;AACF;ADqHA;EACE;IACE,gBAAA;ECnHF;EDuHM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ECrHR;AACF;AD2HA;EAGI;IACE,eAAA;EC3HJ;ED8HE;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;EC5HJ;EDgII;IACE,iBAAA;EC9HN;EDgIM;IACE,UAAA;EC9HR;EDmIM;IACE,aAAA;ECjIR;EDqIQ;IACE,YAAA;ECnIV;EDwII;IACE,WAAA;IACA,YAAA;ECtIN;EDyII;IACE,UAAA;IACA,WAAA;IACA,YAAA;ECvIN;EDyIM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ECvIR;ED2II;IACE,SAAA;ECzIN;ED4II;IACE,UAAA;EC1IN;AACF;AD+IA;EAEI;IACE,oBAAA;EC9IJ;EDkJI;IACE,iBAAA;EChJN;EDmJI;IACE,eAAA;IACA,gBAAA;IACA,mBAAA;ECjJN;EDoJI;IACE,iBAAA;EClJN;EDqJI;IACE,SAAA;ECnJN;EDsJI;IACE,UAAA;ECpJN;AACF;ADyJA;EAGM;IACE,cAAA;ECzJN;ED4JI;IACE,UAAA;EC1JN;ED6JI;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;EC3JN;AACF","file":"components/professional.css","sourcesContent":[".professional {\r\n position: relative;\r\n overflow: hidden;\r\n margin-top: 85px;\r\n background-color: var(--blue-middle);\r\n\r\n &__inner {\r\n display: flex;\r\n position: relative;\r\n }\r\n\r\n &__content {\r\n width: 50%;\r\n padding: 85px 0 55px;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n z-index: 11;\r\n color: var(--light);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n right: 26%;\r\n bottom: 0;\r\n width: 66vw;\r\n height: 100%;\r\n background-image: linear-gradient(108deg,\r\n #cd1338 39.39%,\r\n rgba(205, 19, 56, 0.46) 127.43%);\r\n z-index: -1;\r\n transform: skewX(17deg);\r\n backdrop-filter: blur(5px);\r\n transform-origin: top;\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 24px;\r\n }\r\n\r\n &__subtitle {\r\n line-height: 1;\r\n font-size: 36px;\r\n font-weight: 600;\r\n margin-top: -5px;\r\n margin-bottom: 70px;\r\n }\r\n\r\n &__text {\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 1.17;\r\n max-width: 560px;\r\n width: 100%;\r\n }\r\n\r\n &__text-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 30px;\r\n margin-bottom: 44px;\r\n }\r\n\r\n &__slider-container {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n width: 100%;\r\n max-width: 1440px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n overflow: hidden;\r\n }\r\n\r\n &__slider {\r\n width: 70%;\r\n position: absolute;\r\n top: 160px;\r\n right: -6%;\r\n\r\n &-wrapper {\r\n padding: 40px 0;\r\n }\r\n\r\n &-item {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n filter: grayscale(100%);\r\n transform: scale(1);\r\n transition: transform var(--transition);\r\n\r\n img {\r\n margin: auto;\r\n height: 220px;\r\n width: 400px;\r\n transition: all var(--transition);\r\n }\r\n\r\n &.swiper-slide-active {\r\n transform: scale(1.3);\r\n z-index: 11;\r\n filter: grayscale(0);\r\n\r\n .professional__slider-link {\r\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45);\r\n\r\n &::before {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n }\r\n }\r\n\r\n .professional__slider-icon {\r\n opacity: 1;\r\n }\r\n\r\n img {\r\n width: 350px;\r\n transition: all var(--transition);\r\n }\r\n }\r\n\r\n //TODO hide last slide\r\n &--hide {\r\n filter: grayscale(100%) !important;\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n &-link {\r\n position: relative;\r\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);\r\n transition: all var(--transition);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0, 0, 0, 0.25);\r\n z-index: 1;\r\n }\r\n }\r\n\r\n &-icon {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 80px;\r\n height: 66px;\r\n overflow: hidden;\r\n top: 50%;\r\n left: 50%;\r\n display: flex;\r\n transform: translate(-50%, -50%);\r\n z-index: 1;\r\n opacity: 0;\r\n transition: all var(--transition);\r\n\r\n & svg path {\r\n transition: all var(--transition);\r\n }\r\n\r\n &:hover svg path:nth-child(1) {\r\n fill: var(--blue-dark);\r\n }\r\n\r\n &:hover svg path:nth-child(2) {\r\n fill: var(--light);\r\n }\r\n }\r\n\r\n &-btn {\r\n box-shadow: none;\r\n background-color: var(--light);\r\n border-radius: 50%;\r\n border: none;\r\n width: 56px;\r\n height: 56px;\r\n padding: 0;\r\n display: flex;\r\n\r\n justify-content: center;\r\n align-items: center;\r\n top: 150px;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.8);\r\n }\r\n }\r\n\r\n &-btn.swiper-button-disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 19%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 19%;\r\n }\r\n\r\n &-info {\r\n margin: 0 auto;\r\n display: block;\r\n max-width: 420px;\r\n font-weight: 600;\r\n color: #fff;\r\n text-align: center;\r\n font-size: 20px;\r\n line-height: 1.17;\r\n }\r\n }\r\n\r\n &__slider-pagination {\r\n width: auto !important;\r\n position: static !important;\r\n padding-top: 16px;\r\n margin-bottom: 32px;\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet {\r\n width: 56px;\r\n height: 3px;\r\n padding: 0;\r\n border-radius: 0;\r\n margin: 0 9px !important;\r\n background-color: var(--light);\r\n opacity: 0.5;\r\n bottom: 0;\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet-active {\r\n background-color: var(--light) !important;\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .professional {\r\n &__content::before {\r\n right: 20%;\r\n }\r\n\r\n &__slider {\r\n width: 66%;\r\n right: -108px;\r\n\r\n &-item {\r\n img {\r\n height: 220px;\r\n }\r\n }\r\n\r\n &-navigation-prev {\r\n left: 16%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 16%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .professional {\r\n margin-top: 60px;\r\n\r\n &__content {\r\n padding: 60px 0 80px;\r\n\r\n &::before {\r\n right: 23%;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n font-size: 25px;\r\n margin-bottom: 50px;\r\n }\r\n\r\n &__text {\r\n font-size: 17px;\r\n max-width: 520px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 38px;\r\n }\r\n\r\n &__slider {\r\n top: 128px;\r\n right: -80px;\r\n\r\n &-item {\r\n & img {\r\n height: 194px;\r\n width: 400px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n img {\r\n width: 300px;\r\n // height: 200px;\r\n }\r\n }\r\n }\r\n\r\n &-btn {\r\n top: 130px;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 2px;\r\n margin-bottom: 27px;\r\n\r\n & .swiper-pagination-bullet {\r\n width: 50px;\r\n }\r\n }\r\n\r\n &-info {\r\n font-size: 14px;\r\n max-width: 290px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1140px) {\r\n .professional {\r\n &__content::before {\r\n right: 17%;\r\n }\r\n\r\n &__slider-item.swiper-slide-active img {\r\n // width: 270px;\r\n }\r\n\r\n &__slider-navigation-prev {\r\n left: 14%;\r\n }\r\n\r\n &__slider-navigation-next {\r\n right: 14%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .professional {\r\n padding-bottom: 70px;\r\n\r\n &__content {\r\n padding: 60px 0 70px;\r\n\r\n &::before {\r\n right: 13%;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n margin-bottom: 55px;\r\n }\r\n\r\n &__text {\r\n max-width: 420px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 56px;\r\n gap: 20px;\r\n }\r\n\r\n &__slider {\r\n &-item {\r\n &.swiper-slide-active img {\r\n width: 240px;\r\n }\r\n\r\n & img {\r\n height: 150px;\r\n width: 300px;\r\n }\r\n }\r\n\r\n &-icon {\r\n width: 56px;\r\n height: 46px;\r\n }\r\n\r\n &-btn {\r\n width: 42px;\r\n height: 42px;\r\n top: 116px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 18%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 18%;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 0;\r\n }\r\n\r\n &-pagination .swiper-pagination-bullet {\r\n width: 38px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 992px) {\r\n .professional {\r\n &__content {\r\n width: 100%;\r\n padding-bottom: 45px;\r\n\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n margin-bottom: 33px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 0;\r\n }\r\n\r\n &__text {\r\n max-width: 520px;\r\n }\r\n\r\n &__slider {\r\n position: static;\r\n width: 100%;\r\n\r\n &-decor {\r\n position: relative;\r\n transform: rotate(180deg);\r\n z-index: 1;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n z-index: 2;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n height: 1000px;\r\n background-image: linear-gradient(180deg,\r\n #cd1338 39.39%,\r\n rgba(205, 19, 56, 0.46) 127.43%);\r\n transform: skewY(343deg) rotate(180deg);\r\n backdrop-filter: blur(5px);\r\n }\r\n }\r\n\r\n &-container {\r\n padding: 0 var(--container-offset);\r\n max-width: var(--container-width);\r\n\r\n position: static;\r\n transform: translateX(0);\r\n margin: 0 auto 52px auto;\r\n }\r\n\r\n &-item {\r\n & img {\r\n height: 160px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n transform: scale(1.5);\r\n }\r\n\r\n &.swiper-slide-active img {\r\n // width: 230px;\r\n width: 250px;\r\n }\r\n }\r\n\r\n &-btn {\r\n top: 122px;\r\n }\r\n\r\n &-pagination {\r\n margin-bottom: 20px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 20%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 20%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .professional {\r\n margin-top: 60px;\r\n\r\n &__slider {\r\n &-item {\r\n &.swiper-slide-active {\r\n transform: scale(1.4);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .professional {\r\n\r\n &__subtitle {\r\n font-size: 16px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n line-height: 18px;\r\n max-width: 340px;\r\n }\r\n\r\n &__slider {\r\n &-decor {\r\n padding-top: 10px;\r\n\r\n &::before {\r\n top: -30px;\r\n }\r\n }\r\n\r\n &-item {\r\n img {\r\n height: 140px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n & img {\r\n width: 230px;\r\n }\r\n }\r\n }\r\n\r\n &-icon {\r\n width: 50px;\r\n height: 40px;\r\n }\r\n\r\n &-btn {\r\n top: 110px;\r\n width: 38px;\r\n height: 38px;\r\n\r\n & svg {\r\n transform: scale(0.6);\r\n }\r\n }\r\n\r\n &-navigation-prev {\r\n left: 28%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 28%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 500px) {\r\n .professional {\r\n &__content {\r\n padding: 45px 0 10px;\r\n }\r\n\r\n &__slider {\r\n &-decor {\r\n padding-top: 30px;\r\n }\r\n\r\n &-container {\r\n padding-left: 0;\r\n padding-right: 0;\r\n margin-bottom: 40px;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 10px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 14%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 14%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .professional {\r\n &__slider {\r\n &-container {\r\n padding-top: 0;\r\n }\r\n\r\n &-btn {\r\n top: 115px;\r\n }\r\n\r\n &-item.swiper-slide-active {\r\n transform: scale(1.2);\r\n }\r\n }\r\n }\r\n}",".professional {\n position: relative;\n overflow: hidden;\n margin-top: 85px;\n background-color: var(--blue-middle);\n}\n.professional__inner {\n display: flex;\n position: relative;\n}\n.professional__content {\n width: 50%;\n padding: 85px 0 55px;\n display: flex;\n flex-direction: column;\n position: relative;\n z-index: 11;\n color: var(--light);\n}\n.professional__content::before {\n content: \"\";\n position: absolute;\n right: 26%;\n bottom: 0;\n width: 66vw;\n height: 100%;\n background-image: linear-gradient(108deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%);\n z-index: -1;\n transform: skewX(17deg);\n backdrop-filter: blur(5px);\n transform-origin: top;\n}\n.professional__title {\n margin-bottom: 24px;\n}\n.professional__subtitle {\n line-height: 1;\n font-size: 36px;\n font-weight: 600;\n margin-top: -5px;\n margin-bottom: 70px;\n}\n.professional__text {\n font-size: 24px;\n font-weight: 200;\n line-height: 1.17;\n max-width: 560px;\n width: 100%;\n}\n.professional__text-wrapper {\n display: flex;\n flex-direction: column;\n gap: 30px;\n margin-bottom: 44px;\n}\n.professional__slider-container {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 100%;\n max-width: 1440px;\n left: 50%;\n transform: translateX(-50%);\n overflow: hidden;\n}\n.professional__slider {\n width: 70%;\n position: absolute;\n top: 160px;\n right: -6%;\n}\n.professional__slider-wrapper {\n padding: 40px 0;\n}\n.professional__slider-item {\n display: flex;\n justify-content: center;\n align-items: center;\n filter: grayscale(100%);\n transform: scale(1);\n transition: transform var(--transition);\n}\n.professional__slider-item img {\n margin: auto;\n height: 220px;\n width: 400px;\n transition: all var(--transition);\n}\n.professional__slider-item.swiper-slide-active {\n transform: scale(1.3);\n z-index: 11;\n filter: grayscale(0);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-link {\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-link::before {\n background-color: rgba(0, 0, 0, 0.1);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-icon {\n opacity: 1;\n}\n.professional__slider-item.swiper-slide-active img {\n width: 350px;\n transition: all var(--transition);\n}\n.professional__slider-item--hide {\n filter: grayscale(100%) !important;\n pointer-events: none;\n}\n.professional__slider-link {\n position: relative;\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);\n transition: all var(--transition);\n}\n.professional__slider-link::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n z-index: 1;\n}\n.professional__slider-icon {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 66px;\n overflow: hidden;\n top: 50%;\n left: 50%;\n display: flex;\n transform: translate(-50%, -50%);\n z-index: 1;\n opacity: 0;\n transition: all var(--transition);\n}\n.professional__slider-icon svg path {\n transition: all var(--transition);\n}\n.professional__slider-icon:hover svg path:nth-child(1) {\n fill: var(--blue-dark);\n}\n.professional__slider-icon:hover svg path:nth-child(2) {\n fill: var(--light);\n}\n.professional__slider-btn {\n box-shadow: none;\n background-color: var(--light);\n border-radius: 50%;\n border: none;\n width: 56px;\n height: 56px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n top: 150px;\n}\n.professional__slider-btn::after {\n content: \"\";\n}\n.professional__slider-btn svg {\n transform: scale(0.8);\n}\n.professional__slider-btn.swiper-button-disabled {\n opacity: 0.5;\n}\n.professional__slider-navigation-prev {\n left: 19%;\n}\n.professional__slider-navigation-next {\n right: 19%;\n}\n.professional__slider-info {\n margin: 0 auto;\n display: block;\n max-width: 420px;\n font-weight: 600;\n color: #fff;\n text-align: center;\n font-size: 20px;\n line-height: 1.17;\n}\n.professional__slider-pagination {\n width: auto !important;\n position: static !important;\n padding-top: 16px;\n margin-bottom: 32px;\n}\n.professional__slider-pagination .swiper-pagination-bullet {\n width: 56px;\n height: 3px;\n padding: 0;\n border-radius: 0;\n margin: 0 9px !important;\n background-color: var(--light);\n opacity: 0.5;\n bottom: 0;\n}\n.professional__slider-pagination .swiper-pagination-bullet-active {\n background-color: var(--light) !important;\n opacity: 1;\n}\n\n@media (max-width: 1440px) {\n .professional__content::before {\n right: 20%;\n }\n .professional__slider {\n width: 66%;\n right: -108px;\n }\n .professional__slider-item img {\n height: 220px;\n }\n .professional__slider-navigation-prev {\n left: 16%;\n }\n .professional__slider-navigation-next {\n right: 16%;\n }\n}\n@media (max-width: 1280px) {\n .professional {\n margin-top: 60px;\n }\n .professional__content {\n padding: 60px 0 80px;\n }\n .professional__content::before {\n right: 23%;\n }\n .professional__subtitle {\n font-size: 25px;\n margin-bottom: 50px;\n }\n .professional__text {\n font-size: 17px;\n max-width: 520px;\n }\n .professional__text-wrapper {\n margin-bottom: 38px;\n }\n .professional__slider {\n top: 128px;\n right: -80px;\n }\n .professional__slider-item img {\n height: 194px;\n width: 400px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 300px;\n }\n .professional__slider-btn {\n top: 130px;\n }\n .professional__slider-pagination {\n padding-top: 2px;\n margin-bottom: 27px;\n }\n .professional__slider-pagination .swiper-pagination-bullet {\n width: 50px;\n }\n .professional__slider-info {\n font-size: 14px;\n max-width: 290px;\n }\n}\n@media (max-width: 1140px) {\n .professional__content::before {\n right: 17%;\n }\n .professional__slider-navigation-prev {\n left: 14%;\n }\n .professional__slider-navigation-next {\n right: 14%;\n }\n}\n@media (max-width: 1024px) {\n .professional {\n padding-bottom: 70px;\n }\n .professional__content {\n padding: 60px 0 70px;\n }\n .professional__content::before {\n right: 13%;\n }\n .professional__subtitle {\n margin-bottom: 55px;\n }\n .professional__text {\n max-width: 420px;\n }\n .professional__text-wrapper {\n margin-bottom: 56px;\n gap: 20px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 240px;\n }\n .professional__slider-item img {\n height: 150px;\n width: 300px;\n }\n .professional__slider-icon {\n width: 56px;\n height: 46px;\n }\n .professional__slider-btn {\n width: 42px;\n height: 42px;\n top: 116px;\n }\n .professional__slider-navigation-prev {\n left: 18%;\n }\n .professional__slider-navigation-next {\n right: 18%;\n }\n .professional__slider-pagination {\n padding-top: 0;\n }\n .professional__slider-pagination .swiper-pagination-bullet {\n width: 38px;\n }\n}\n@media (max-width: 992px) {\n .professional__content {\n width: 100%;\n padding-bottom: 45px;\n }\n .professional__content::before {\n display: none;\n }\n .professional__subtitle {\n margin-bottom: 33px;\n }\n .professional__text-wrapper {\n margin-bottom: 0;\n }\n .professional__text {\n max-width: 520px;\n }\n .professional__slider {\n position: static;\n width: 100%;\n }\n .professional__slider-decor {\n position: relative;\n transform: rotate(180deg);\n z-index: 1;\n }\n .professional__slider-decor::before {\n content: \"\";\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n right: 0;\n height: 1000px;\n background-image: linear-gradient(180deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%);\n transform: skewY(343deg) rotate(180deg);\n backdrop-filter: blur(5px);\n }\n .professional__slider-container {\n padding: 0 var(--container-offset);\n max-width: var(--container-width);\n position: static;\n transform: translateX(0);\n margin: 0 auto 52px auto;\n }\n .professional__slider-item img {\n height: 160px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.5);\n }\n .professional__slider-item.swiper-slide-active img {\n width: 250px;\n }\n .professional__slider-btn {\n top: 122px;\n }\n .professional__slider-pagination {\n margin-bottom: 20px;\n }\n .professional__slider-navigation-prev {\n left: 20%;\n }\n .professional__slider-navigation-next {\n right: 20%;\n }\n}\n@media (max-width: 768px) {\n .professional {\n margin-top: 60px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.4);\n }\n}\n@media (max-width: 700px) {\n .professional__subtitle {\n font-size: 16px;\n }\n .professional__text {\n font-size: 14px;\n line-height: 18px;\n max-width: 340px;\n }\n .professional__slider-decor {\n padding-top: 10px;\n }\n .professional__slider-decor::before {\n top: -30px;\n }\n .professional__slider-item img {\n height: 140px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 230px;\n }\n .professional__slider-icon {\n width: 50px;\n height: 40px;\n }\n .professional__slider-btn {\n top: 110px;\n width: 38px;\n height: 38px;\n }\n .professional__slider-btn svg {\n transform: scale(0.6);\n }\n .professional__slider-navigation-prev {\n left: 28%;\n }\n .professional__slider-navigation-next {\n right: 28%;\n }\n}\n@media (max-width: 500px) {\n .professional__content {\n padding: 45px 0 10px;\n }\n .professional__slider-decor {\n padding-top: 30px;\n }\n .professional__slider-container {\n padding-left: 0;\n padding-right: 0;\n margin-bottom: 40px;\n }\n .professional__slider-pagination {\n padding-top: 10px;\n }\n .professional__slider-navigation-prev {\n left: 14%;\n }\n .professional__slider-navigation-next {\n right: 14%;\n }\n}\n@media (max-width: 360px) {\n .professional__slider-container {\n padding-top: 0;\n }\n .professional__slider-btn {\n top: 115px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.2);\n }\n}"]} \ No newline at end of file diff --git a/app/css/components/recommendations.css b/app/css/components/recommendations.css index e3e32a9..473ea38 100644 --- a/app/css/components/recommendations.css +++ b/app/css/components/recommendations.css @@ -1,289 +1 @@ -.recommendations { - padding: 85px 0 0; - margin-bottom: -1px; -} -.recommendations__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.recommendations__content { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - padding-left: 40px; - position: relative; - z-index: 11; -} -.recommendations__title { - margin-bottom: 24px; - color: var(--accent); -} -.recommendations__text { - color: var(--default); - font-size: 24px; - font-weight: 200; - line-height: 28px; - max-width: 540px; - width: 100%; -} -.recommendations__slider { - position: relative; - height: 660px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-inner { - width: 50%; - position: relative; - -webkit-clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%); - clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%); -} -.recommendations__slider-inner::before { - content: ""; - position: absolute; - bottom: 0; - right: 0; - width: calc(100% + 100vw - var(--content-width) / 2); - height: 100%; - background-color: var(--blue-middle); - z-index: -1; -} -.recommendations__slider-wrapper { - min-width: 0; - -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; - position: relative; -} -.recommendations__slider-container { - padding-right: 140px; -} -.recommendations__slider-item { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-link { - position: relative; -} -.recommendations__slider-link::before { - content: ""; - position: absolute; - background-image: url("./../img/svg/zoom.svg"); - background-position: center; - background-size: contain; - background-repeat: no-repeat; - right: 20px; - top: 10px; - width: 62px; - height: 66px; -} -.recommendations__slider-link img { - max-width: 370px; -} -.recommendations__slider-btn { - -webkit-box-shadow: none; - box-shadow: none; - background-color: transparent; - border: none; - width: 40px; - height: 42px; - padding: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-btn::after { - content: ""; -} -.recommendations__slider-btn svg { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); -} -.recommendations__slider-btn.swiper-button-disabled { - opacity: 0.5; -} -.recommendations__slider-navigation-prev { - left: -10px; -} -.recommendations__slider-navigation-next { - right: 130px; -} - -@media (max-width: 1280px) { - .recommendations { - padding: 60px 0 0; - } - .recommendations__slider { - height: 606px; - } - .recommendations__slider-inner { - width: 55%; - } - .recommendations__slider-link::before { - width: 50px; - height: 54px; - right: 6px; - } - .recommendations__slider-link img { - max-width: 350px; - } - .recommendations__text { - font-size: 17px; - line-height: 20px; - max-width: 376px; - } - .recommendations__content { - padding-left: 130px; - } -} -@media (max-width: 1024px) { - .recommendations__slider { - height: 506px; - } - .recommendations__slider-inner { - width: 62%; - } - .recommendations__slider-link img { - max-width: 290px; - } - .recommendations__content { - padding-left: 10px; - padding-bottom: 76px; - } -} -@media (max-width: 900px) { - .recommendations__slider { - height: 440px; - } - .recommendations__slider-inner { - width: 58%; - } - .recommendations__slider-link img { - max-width: 240px; - } - .recommendations__content { - padding-left: 0; - padding-bottom: 45px; - } -} -@media (max-width: 768px) { - .recommendations__title { - margin-bottom: 14px; - } - .recommendations__slider-link img { - max-width: 220px; - } - .recommendations__slider-link::before { - width: 30px; - height: 32px; - } -} -@media ((max-width: 768px) and (min-width: 701px)) { - .recommendations__slider-inner { - width: 58%; - } - .recommendations__slider-link img { - max-width: 200px; - } - .recommendations__content { - margin-left: -10px; - } -} -@media (max-width: 700px) { - .recommendations { - padding: 50px 0 0; - } - .recommendations__inner { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - } - .recommendations__content { - margin-bottom: 0; - margin-left: 0; - margin-bottom: 30px; - padding-bottom: 0; - } - .recommendations__slider { - height: 344px; - } - .recommendations__slider-link img { - max-width: 200px; - } - .recommendations__slider-inner { - width: 100%; - -webkit-box-ordinal-group: 3; - -ms-flex-order: 2; - order: 2; - -webkit-clip-path: none; - clip-path: none; - } - .recommendations__slider-inner::before { - -webkit-transform: skewX(0); - -ms-transform: skewX(0); - transform: skewX(0); - width: 100vw; - left: calc(var(--container-offset) * -1); - } - .recommendations__slider-wrapper { - margin: 0 calc(var(--container-offset) * -1); - } - .recommendations__slider-container { - padding-right: 0; - } - .recommendations__slider-navigation-prev { - left: 0; - } - .recommendations__slider-navigation-next { - right: 0; - } - .recommendations__text { - font-size: 14px; - line-height: 1.2; - } - .recommendations__title span { - font-size: 30px; - letter-spacing: 1.2px; - line-height: 32px; - } -} -@media (max-width: 360px) { - .recommendations__title { - font-size: 26px; - letter-spacing: 1px; - } -} -/*# sourceMappingURL=recommendations.css.map */ \ No newline at end of file +.recommendations{padding:85px 0 0;margin-bottom:-1px}.recommendations__inner{display:-webkit-box;display:-ms-flexbox;display:flex}.recommendations__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:40px;position:relative;z-index:11}.recommendations__title{margin-bottom:24px;color:var(--accent)}.recommendations__text{color:var(--default);font-size:24px;font-weight:200;line-height:28px;max-width:540px;width:100%}.recommendations__slider{position:relative;height:660px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-inner{width:50%;position:relative;-webkit-clip-path:polygon(var(--max-offset) 0,83% 0,100% 100%,var(--max-offset) 100%);clip-path:polygon(var(--max-offset) 0,83% 0,100% 100%,var(--max-offset) 100%)}.recommendations__slider-inner::before{content:"";position:absolute;bottom:0;right:0;width:calc(100% + 100vw - var(--content-width)/ 2);height:100%;background-color:var(--blue-middle);z-index:-1}.recommendations__slider-wrapper{min-width:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.recommendations__slider-container{padding-right:140px}.recommendations__slider-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-link{position:relative}.recommendations__slider-link::before{content:"";position:absolute;background-image:url(../img/svg/zoom.svg);background-position:center;background-size:contain;background-repeat:no-repeat;right:20px;top:10px;width:62px;height:66px}.recommendations__slider-link img{max-width:370px}.recommendations__slider-btn{-webkit-box-shadow:none;box-shadow:none;background-color:transparent;border:none;width:40px;height:42px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-btn::after{content:""}.recommendations__slider-btn svg{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.recommendations__slider-btn.swiper-button-disabled{opacity:.5}.recommendations__slider-navigation-prev{left:-10px}.recommendations__slider-navigation-next{right:130px}@media (max-width:1280px){.recommendations{padding:60px 0 0}.recommendations__slider{height:606px}.recommendations__slider-inner{width:55%}.recommendations__slider-link::before{width:50px;height:54px;right:6px}.recommendations__slider-link img{max-width:350px}.recommendations__text{font-size:17px;line-height:20px;max-width:376px}.recommendations__content{padding-left:130px}}@media (max-width:1024px){.recommendations__slider{height:506px}.recommendations__slider-inner{width:62%}.recommendations__slider-link img{max-width:290px}.recommendations__content{padding-left:10px;padding-bottom:76px}}@media (max-width:900px){.recommendations__slider{height:440px}.recommendations__slider-inner{width:58%}.recommendations__slider-link img{max-width:240px}.recommendations__content{padding-left:0;padding-bottom:45px}}@media (max-width:768px){.recommendations__title{margin-bottom:14px}.recommendations__slider-link img{max-width:220px}.recommendations__slider-link::before{width:30px;height:32px}}@media ((max-width:768px) and (min-width:701px)){.recommendations__slider-inner{width:58%}.recommendations__slider-link img{max-width:200px}.recommendations__content{margin-left:-10px}}@media (max-width:700px){.recommendations{padding:50px 0 0}.recommendations__inner{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.recommendations__content{margin-left:0;margin-bottom:30px;padding-bottom:0}.recommendations__slider{height:344px}.recommendations__slider-link img{max-width:200px}.recommendations__slider-inner{width:100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-clip-path:none;clip-path:none}.recommendations__slider-inner::before{-webkit-transform:skewX(0);-ms-transform:skewX(0);transform:skewX(0);width:100vw;left:calc(var(--container-offset) * -1)}.recommendations__slider-wrapper{margin:0 calc(var(--container-offset) * -1)}.recommendations__slider-container{padding-right:0}.recommendations__slider-navigation-prev{left:0}.recommendations__slider-navigation-next{right:0}.recommendations__text{font-size:14px;line-height:1.2}.recommendations__title span{font-size:30px;letter-spacing:1.2px;line-height:32px}}@media (max-width:360px){.recommendations__title{font-size:26px;letter-spacing:1px}} \ No newline at end of file diff --git a/app/css/components/recommendations.css.map b/app/css/components/recommendations.css.map deleted file mode 100644 index 38794cb..0000000 --- a/app/css/components/recommendations.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["components/recommendations.scss","components/recommendations.css"],"names":[],"mappings":"AAEA;EACE,iBAAA;EACA,mBAAA;ACDF;ADGE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;ACDJ;ADKE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,kBAAA;EACA,kBAAA;EACA,WAAA;ACHJ;ADME;EACE,mBAAA;EACA,oBAAA;ACJJ;ADOE;EACE,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,WAAA;ACLJ;ADQE;EACE,kBAAA;EACA,aApCY;EAqCZ,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;ACNJ;ADQI;EACE,UAAA;EACA,kBAAA;EACA,yFAAA;EAAA,iFAAA;ACNN;ADQM;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;EACA,oDAAA;EACA,YAAA;EACA,oCAAA;EACA,WAAA;ACNR;ADUI;EACE,YAAA;EACA,mBAAA;EAAA,oBAAA;EAAA,YAAA;EACA,kBAAA;ACRN;ADWI;EACE,oBAAA;ACTN;ADYI;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;ACVN;ADaI;EACE,kBAAA;ACXN;ADaM;EACE,WAAA;EACA,kBAAA;EACA,8CAAA;EACA,2BAAA;EACA,wBAAA;EACA,4BAAA;EACA,WAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;ACXR;ADeI;EACE,gBAAA;ACbN;ADgBI;EACE,wBAAA;EAAA,gBAAA;EACA,6BAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;ACdN;ADgBM;EACE,WAAA;ACdR;ADiBM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;ACfR;ADmBI;EACE,YAAA;ACjBN;ADoBI;EACE,WAAA;AClBN;ADqBI;EACE,YAAA;ACnBN;;ADwBA;EACE;IAqBE,iBAAA;ECzCF;EDqBE;IACE,aAAA;ECnBJ;EDqBI;IACE,UAAA;ECnBN;EDuBM;IACE,WAAA;IACA,YAAA;IACA,UAAA;ECrBR;EDyBI;IACE,gBAAA;ECvBN;ED6BE;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;EC3BJ;ED8BE;IACE,mBAAA;EC5BJ;AACF;ADgCA;EAEI;IAEE,aAAA;EChCJ;EDkCI;IACE,UAAA;EChCN;EDmCI;IACE,gBAAA;ECjCN;EDqCE;IACE,kBAAA;IACA,oBAAA;ECnCJ;AACF;ADuCA;EAEI;IACE,aAAA;ECtCJ;EDwCI;IACE,UAAA;ECtCN;EDyCI;IACE,gBAAA;ECvCN;ED2CE;IACE,eAAA;IACA,oBAAA;ECzCJ;AACF;AD6CA;EAEI;IACE,mBAAA;EC5CJ;EDgDI;IACE,gBAAA;EC9CN;EDkDM;IACE,WAAA;IACA,YAAA;EChDR;AACF;ADsDA;EAGM;IACE,UAAA;ECtDN;EDyDI;IACE,gBAAA;ECvDN;ED2DE;IACE,kBAAA;ECzDJ;AACF;AD+DA;EACE;IACE,iBAAA;EC7DF;ED+DE;IACE,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;EC7DJ;EDgEE;IACE,gBAAA;IACA,cAAA;IACA,mBAAA;IACA,iBAAA;EC9DJ;EDiEE;IACE,aAAA;EC/DJ;EDiEI;IACE,gBAAA;EC/DN;EDkEI;IACE,WAAA;IACA,4BAAA;IAAA,iBAAA;IAAA,QAAA;IACA,uBAAA;IAAA,eAAA;EChEN;EDkEM;IACE,2BAAA;IAAA,uBAAA;IAAA,mBAAA;IACA,YAAA;IACA,wCAAA;EChER;EDoEI;IACE,4CAAA;EClEN;EDqEI;IACE,gBAAA;ECnEN;EDsEI;IACE,OAAA;ECpEN;EDuEI;IACE,QAAA;ECrEN;EDyEE;IACE,eAAA;IACA,gBAAA;ECvEJ;ED2EI;IACE,eAAA;IACA,qBAAA;IACA,iBAAA;ECzEN;AACF;AD8EA;EAEI;IACE,eAAA;IACA,mBAAA;EC7EJ;AACF","file":"components/recommendations.css","sourcesContent":["$slider-height: 660px;\r\n\r\n.recommendations {\r\n padding: 85px 0 0;\r\n margin-bottom: -1px;\r\n\r\n &__inner {\r\n display: flex;\r\n\r\n }\r\n\r\n &__content {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n padding-left: 40px;\r\n position: relative;\r\n z-index: 11;\r\n }\r\n\r\n &__title {\r\n margin-bottom: 24px;\r\n color: var(--accent);\r\n }\r\n\r\n &__text {\r\n color: var(--default);\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 28px;\r\n max-width: 540px;\r\n width: 100%;\r\n }\r\n\r\n &__slider {\r\n position: relative;\r\n height: $slider-height;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n &-inner {\r\n width: 50%;\r\n position: relative;\r\n clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n width: calc(100% + (100vw - (var(--content-width) / 2)));\r\n height: 100%;\r\n background-color: var(--blue-middle);\r\n z-index: -1;\r\n }\r\n }\r\n\r\n &-wrapper {\r\n min-width: 0;\r\n flex-grow: 1;\r\n position: relative;\r\n }\r\n\r\n &-container {\r\n padding-right: 140px;\r\n }\r\n\r\n &-item {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n &-link {\r\n position: relative;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n background-image: url('./../img/svg/zoom.svg');\r\n background-position: center;\r\n background-size: contain;\r\n background-repeat: no-repeat;\r\n right: 20px;\r\n top: 10px;\r\n width: 62px;\r\n height: 66px;\r\n }\r\n }\r\n\r\n &-link img {\r\n max-width: 370px;\r\n }\r\n\r\n &-btn {\r\n box-shadow: none;\r\n background-color: transparent;\r\n border: none;\r\n width: 40px;\r\n height: 42px;\r\n padding: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.8);\r\n }\r\n }\r\n\r\n &-btn.swiper-button-disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &-navigation-prev {\r\n left: -10px;\r\n }\r\n\r\n &-navigation-next {\r\n right: 130px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .recommendations {\r\n &__slider {\r\n height: 606px;\r\n\r\n &-inner {\r\n width: 55%;\r\n }\r\n\r\n &-link {\r\n &::before {\r\n width: 50px;\r\n height: 54px;\r\n right: 6px;\r\n }\r\n }\r\n\r\n &-link img {\r\n max-width: 350px;\r\n }\r\n }\r\n\r\n padding: 60px 0 0;\r\n\r\n &__text {\r\n font-size: 17px;\r\n line-height: 20px;\r\n max-width: 376px;\r\n }\r\n\r\n &__content {\r\n padding-left: 130px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .recommendations {\r\n &__slider {\r\n\r\n height: 506px;\r\n\r\n &-inner {\r\n width: 62%;\r\n }\r\n\r\n &-link img {\r\n max-width: 290px;\r\n }\r\n }\r\n\r\n &__content {\r\n padding-left: 10px;\r\n padding-bottom: 76px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .recommendations {\r\n &__slider {\r\n height: 440px;\r\n\r\n &-inner {\r\n width: 58%;\r\n }\r\n\r\n &-link img {\r\n max-width: 240px;\r\n }\r\n }\r\n\r\n &__content {\r\n padding-left: 0;\r\n padding-bottom: 45px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .recommendations {\r\n &__title {\r\n margin-bottom: 14px;\r\n }\r\n\r\n &__slider {\r\n &-link img {\r\n max-width: 220px;\r\n }\r\n\r\n &-link {\r\n &::before {\r\n width: 30px;\r\n height: 32px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media ((max-width: 768px) and (min-width: 701px)) {\r\n .recommendations {\r\n &__slider {\r\n &-inner {\r\n width: 58%;\r\n }\r\n\r\n &-link img {\r\n max-width: 200px;\r\n }\r\n }\r\n\r\n &__content {\r\n margin-left: -10px;\r\n }\r\n\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .recommendations {\r\n padding: 50px 0 0;\r\n\r\n &__inner {\r\n flex-direction: column;\r\n justify-content: center;\r\n }\r\n\r\n &__content {\r\n margin-bottom: 0;\r\n margin-left: 0;\r\n margin-bottom: 30px;\r\n padding-bottom: 0;\r\n }\r\n\r\n &__slider {\r\n height: 344px;\r\n\r\n &-link img {\r\n max-width: 200px;\r\n }\r\n\r\n &-inner {\r\n width: 100%;\r\n order: 2;\r\n clip-path: none;\r\n\r\n &::before {\r\n transform: skewX(0);\r\n width: 100vw;\r\n left: calc(var(--container-offset)*-1);\r\n }\r\n }\r\n\r\n &-wrapper {\r\n margin: 0 calc(var(--container-offset) * -1);\r\n }\r\n\r\n &-container {\r\n padding-right: 0;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 0;\r\n }\r\n\r\n &-navigation-next {\r\n right: 0;\r\n }\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n line-height: 1.2;\r\n }\r\n\r\n &__title {\r\n & span {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n line-height: 32px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .recommendations {\r\n &__title {\r\n font-size: 26px;\r\n letter-spacing: 1px;\r\n }\r\n }\r\n}",".recommendations {\n padding: 85px 0 0;\n margin-bottom: -1px;\n}\n.recommendations__inner {\n display: flex;\n}\n.recommendations__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: 40px;\n position: relative;\n z-index: 11;\n}\n.recommendations__title {\n margin-bottom: 24px;\n color: var(--accent);\n}\n.recommendations__text {\n color: var(--default);\n font-size: 24px;\n font-weight: 200;\n line-height: 28px;\n max-width: 540px;\n width: 100%;\n}\n.recommendations__slider {\n position: relative;\n height: 660px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-inner {\n width: 50%;\n position: relative;\n clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%);\n}\n.recommendations__slider-inner::before {\n content: \"\";\n position: absolute;\n bottom: 0;\n right: 0;\n width: calc(100% + 100vw - var(--content-width) / 2);\n height: 100%;\n background-color: var(--blue-middle);\n z-index: -1;\n}\n.recommendations__slider-wrapper {\n min-width: 0;\n flex-grow: 1;\n position: relative;\n}\n.recommendations__slider-container {\n padding-right: 140px;\n}\n.recommendations__slider-item {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-link {\n position: relative;\n}\n.recommendations__slider-link::before {\n content: \"\";\n position: absolute;\n background-image: url(\"./../img/svg/zoom.svg\");\n background-position: center;\n background-size: contain;\n background-repeat: no-repeat;\n right: 20px;\n top: 10px;\n width: 62px;\n height: 66px;\n}\n.recommendations__slider-link img {\n max-width: 370px;\n}\n.recommendations__slider-btn {\n box-shadow: none;\n background-color: transparent;\n border: none;\n width: 40px;\n height: 42px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-btn::after {\n content: \"\";\n}\n.recommendations__slider-btn svg {\n transform: scale(0.8);\n}\n.recommendations__slider-btn.swiper-button-disabled {\n opacity: 0.5;\n}\n.recommendations__slider-navigation-prev {\n left: -10px;\n}\n.recommendations__slider-navigation-next {\n right: 130px;\n}\n\n@media (max-width: 1280px) {\n .recommendations {\n padding: 60px 0 0;\n }\n .recommendations__slider {\n height: 606px;\n }\n .recommendations__slider-inner {\n width: 55%;\n }\n .recommendations__slider-link::before {\n width: 50px;\n height: 54px;\n right: 6px;\n }\n .recommendations__slider-link img {\n max-width: 350px;\n }\n .recommendations__text {\n font-size: 17px;\n line-height: 20px;\n max-width: 376px;\n }\n .recommendations__content {\n padding-left: 130px;\n }\n}\n@media (max-width: 1024px) {\n .recommendations__slider {\n height: 506px;\n }\n .recommendations__slider-inner {\n width: 62%;\n }\n .recommendations__slider-link img {\n max-width: 290px;\n }\n .recommendations__content {\n padding-left: 10px;\n padding-bottom: 76px;\n }\n}\n@media (max-width: 900px) {\n .recommendations__slider {\n height: 440px;\n }\n .recommendations__slider-inner {\n width: 58%;\n }\n .recommendations__slider-link img {\n max-width: 240px;\n }\n .recommendations__content {\n padding-left: 0;\n padding-bottom: 45px;\n }\n}\n@media (max-width: 768px) {\n .recommendations__title {\n margin-bottom: 14px;\n }\n .recommendations__slider-link img {\n max-width: 220px;\n }\n .recommendations__slider-link::before {\n width: 30px;\n height: 32px;\n }\n}\n@media ((max-width: 768px) and (min-width: 701px)) {\n .recommendations__slider-inner {\n width: 58%;\n }\n .recommendations__slider-link img {\n max-width: 200px;\n }\n .recommendations__content {\n margin-left: -10px;\n }\n}\n@media (max-width: 700px) {\n .recommendations {\n padding: 50px 0 0;\n }\n .recommendations__inner {\n flex-direction: column;\n justify-content: center;\n }\n .recommendations__content {\n margin-bottom: 0;\n margin-left: 0;\n margin-bottom: 30px;\n padding-bottom: 0;\n }\n .recommendations__slider {\n height: 344px;\n }\n .recommendations__slider-link img {\n max-width: 200px;\n }\n .recommendations__slider-inner {\n width: 100%;\n order: 2;\n clip-path: none;\n }\n .recommendations__slider-inner::before {\n transform: skewX(0);\n width: 100vw;\n left: calc(var(--container-offset) * -1);\n }\n .recommendations__slider-wrapper {\n margin: 0 calc(var(--container-offset) * -1);\n }\n .recommendations__slider-container {\n padding-right: 0;\n }\n .recommendations__slider-navigation-prev {\n left: 0;\n }\n .recommendations__slider-navigation-next {\n right: 0;\n }\n .recommendations__text {\n font-size: 14px;\n line-height: 1.2;\n }\n .recommendations__title span {\n font-size: 30px;\n letter-spacing: 1.2px;\n line-height: 32px;\n }\n}\n@media (max-width: 360px) {\n .recommendations__title {\n font-size: 26px;\n letter-spacing: 1px;\n }\n}"]} \ No newline at end of file diff --git a/app/css/main.css b/app/css/main.css index 60cf11d..ece5a56 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -1,4685 +1 @@ -:root { - --font-family: "Roboto Flex", sans-serif; - --content-width: 1420px; - --container-fluid: 1920px; - --container-offset: 15px; - --container-width: calc(var(--content-width) + (var(--container-offset) * 2)); - --max-offset: calc(max(calc((100vw - var(--content-width)) / 2), var(--container-offset)) * -1); - --transition: 0.3s; - --scale-hover: scale(1.08); - --default: #5a5a5a; - --light: #fff; - --accent: #cd1338; - --blue-light: #1c60f6; - --blue-middle: #00406c; - --blue-dark: #1c2e44; - --gray: #aaa; - --big-desktop: 1600px; - --desktop: 1440px; - --small-desktop: 1280px; - --tablet: 1024px; - --small-tablet: 768px; - --mobile: 576px; - --index: calc(1vh + 1vw); -} - -@media (max-width: 1440px) { - :root { - --content-width: 1260px; - } -} -@media (max-width: 1280px) { - :root { - --content-width: 1160px; - } -} -@media (max-width: 1024px) { - :root { - --content-width: 900px; - } -} -@media (max-width: 800px) { - :root { - --content-width: 100%; - } -} -@font-face { - font-family: "Roboto Flex"; - font-style: normal; - font-display: swap; - src: local("Roboto Flex"), url("../fonts/Roboto-Flex.woff2") format("woff2"); - font-weight: 100 1000; - font-stretch: 25% 151%; -} -html { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -*, -*::before, -*::after { - -webkit-box-sizing: inherit; - box-sizing: inherit; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; -} - -*::-webkit-scrollbar { - width: 10px; -} - -*::-webkit-scrollbar-track { - background-color: var(--light); -} - -*::-webkit-scrollbar-thumb { - background-color: var(--blue-middle); -} - -* { - scrollbar-width: thin; - scrollbar-color: var(--blue-middle) #fff; -} - -.page { - font-size: 20px; - font-weight: 200; - line-height: 1.2; - color: var(--light); - height: 100%; - font-family: var(--font-family); - font-variation-settings: "wdth" 140, "wght" 200; -} - -.page__body { - margin: 0; - min-width: 320px; - min-height: 100%; -} - -img { - height: auto; - max-width: 100%; - -o-object-fit: cover; - object-fit: cover; - display: block; -} - -a { - text-decoration: none; - display: inline-block; -} - -.site-container { - overflow: hidden; -} - -.is-hidden { - display: none !important; -} - -.btn-reset { - border: none; - padding: 0; - background-color: transparent; - cursor: pointer; -} - -.list-reset { - list-style: none; - margin: 0; - padding: 0; -} - -.input-reset { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - border: none; - border-radius: 0; - background-color: #fff; -} -.input-reset::-webkit-search-decoration, .input-reset::-webkit-search-cancel-button, .input-reset::-webkit-search-results-button, .input-reset::-webkit-search-results-decoration { - display: none; -} - -.container { - margin: 0 auto; - padding: 0 var(--container-offset); - max-width: var(--container-width); -} - -.container-fluid { - margin: 0 auto; - max-width: var(--container-fluid); -} - -.js-focus-visible :focus:not(.focus-visible) { - outline: none; -} - -.centered { - text-align: center; -} - -.dis-scroll { - position: fixed; - left: 0; - top: 0; - overflow: hidden; - width: 100%; - height: 100vh; - -ms-scroll-chaining: none; - overscroll-behavior: none; -} - -.page--ios .dis-scroll { - position: relative; -} - -.btn { - cursor: pointer; - text-align: center; - font-size: 20px; - font-weight: 200; - font-stretch: 140%; - line-height: 40px; - letter-spacing: 0.1px; - background-color: var(--light); - border-radius: 50px; - border: none; - min-width: 220px; - text-transform: capitalize; - -webkit-transition: var(--transition); - transition: var(--transition); - color: var(--blue-dark); -} -.btn:hover { - background-color: var(--blue-dark); - color: var(--light); -} - -.btn--accent { - color: var(--accent); -} - -.btn-up-wrapper { - position: relative; - display: none; - -webkit-box-pack: end; - -ms-flex-pack: end; - justify-content: flex-end; -} - -.btn-up { - position: fixed; - z-index: 20; - right: 110px; - bottom: 165px; - width: 56px; - height: 56px; - padding: 0; - cursor: pointer; - min-width: auto; - border-radius: 50%; - border: none; - background-color: var(--accent); - border-color: var(--accent); - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.btn-up::before { - position: absolute; - left: 50%; - top: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - content: ""; - background-image: url("./../img/svg/up.svg"); - background-repeat: no-repeat; - width: 28px; - height: 28px; - background-position: center; - background-size: contain; - z-index: 1; -} - -.btn-up-wrapper.active { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.section-title { - font-variation-settings: "wght" 700, "opsz" 37, "wdth" 25, "slnt" -10; - font-size: 45px; - line-height: 47px; - letter-spacing: 1.8px; - text-transform: uppercase; - margin-bottom: 24px; - color: var(--light); -} - -.large-title { - font-variation-settings: "wght" 700, "opsz" 37, "wdth" 25, "slnt" -10; - font-size: 65px; - line-height: 1.1; - letter-spacing: 3.4px; - text-transform: uppercase; - color: var(--light); -} - -.section-title--reset { - display: inline-block; - margin-bottom: 0; -} - -.burger-js .line { - display: block; - height: 4px; - width: 100%; - border-radius: 10px; - background-color: var(--light); - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.burger-js.active .line1 { - -webkit-transform: rotate(45deg) translate(4px, -4px); - -ms-transform: rotate(45deg) translate(4px, -4px); - transform: rotate(45deg) translate(4px, -4px); - -webkit-transform-origin: left; - -ms-transform-origin: left; - transform-origin: left; -} -.burger-js.active .line2 { - opacity: 0; -} -.burger-js.active .line3 { - -webkit-transform: rotate(-45deg) translate(3px, 6px); - -ms-transform: rotate(-45deg) translate(3px, 6px); - transform: rotate(-45deg) translate(3px, 6px); - -webkit-transform-origin: left; - -ms-transform-origin: left; - transform-origin: left; -} - -@media (max-width: 1600px) { - .btn-up { - right: auto; - } -} -@media (max-width: 1280px) { - .btn { - font-size: 14px; - line-height: 32px; - min-width: 170px; - } - .section-title { - font-size: 32px; - line-height: 1; - border-radius: 30px; - line-height: 30px; - } - .large-title { - font-size: 46px; - letter-spacing: 2.4px; - } - .page { - font-size: 14px; - } -} -@media (max-width: 800px) { - .btn-up { - bottom: 50px; - width: 50px; - height: 50px; - } -} -@media (max-width: 700px) { - .section-title { - font-size: 30px; - letter-spacing: 1.2px; - } - .large-title { - font-size: 30px; - letter-spacing: 1.2px; - } -} -@media (max-width: 360px) { - .section-title { - font-size: 26px; - } -} -.carousel__track { - display: none !important; -} - -.header { - position: fixed; - left: 0; - right: 0; - top: 0; - z-index: 20; -} -.header.active { - background-image: -webkit-gradient(linear, left top, right top, color-stop(38.01%, var(--blue-dark)), color-stop(117.87%, rgba(0, 64, 108, 0.53))); - background-image: linear-gradient(90deg, var(--blue-dark) 38.01%, rgba(0, 64, 108, 0.53) 117.87%); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); -} -.header__burger, .header__mobile-logo { - display: none; -} - -.nav__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: end; - -ms-flex-pack: end; - justify-content: flex-end; - -webkit-column-gap: 66px; - -moz-column-gap: 66px; - column-gap: 66px; - padding: 20px 0; -} - -.nav__link { - font-size: 20px; - font-weight: 200; - line-height: 30px; - text-transform: uppercase; - border-bottom: 1px solid transparent; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.nav__link:hover { - color: var(--accent); -} - -@media (max-width: 1280px) { - .nav__list { - padding: 14px 0; - -webkit-column-gap: 40px; - -moz-column-gap: 40px; - column-gap: 40px; - } - .nav__link { - font-size: 14px; - } -} -@media (max-width: 992px) { - .header { - height: 60px; - background-color: var(--light); - } - .header__container { - max-width: 100%; - } - .header__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - } - .header.active { - background-image: none; - } - .header__mobile-logo { - display: block; - cursor: auto; - max-width: 190px; - } - .header__burger { - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - cursor: pointer; - height: 36px; - padding: 4px 0; - width: 36px; - z-index: 2; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - } - .header__burger .line { - display: block; - height: 4px; - width: 100%; - border-radius: 10px; - background-color: var(--blue-middle); - -webkit-transition: all var(--transition); - transition: all var(--transition); - } - .header__burger.active .line1 { - -webkit-transform: rotate(45deg) translate(4px, -4px); - -ms-transform: rotate(45deg) translate(4px, -4px); - transform: rotate(45deg) translate(4px, -4px); - -webkit-transform-origin: left; - -ms-transform-origin: left; - transform-origin: left; - } - .header__burger.active .line2 { - opacity: 0; - } - .header__burger.active .line3 { - -webkit-transform: rotate(-45deg) translate(3px, 6px); - -ms-transform: rotate(-45deg) translate(3px, 6px); - transform: rotate(-45deg) translate(3px, 6px); - -webkit-transform-origin: left; - -ms-transform-origin: left; - transform-origin: left; - } - .header__mobile-logo { - margin-left: calc(var(--container-offset) * -1); - } - .nav { - position: fixed; - background-color: var(--light); - top: 60px; - left: -100vw; - right: 100vw; - min-height: calc(100vh - 60px); - bottom: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-transition: all var(--transition); - transition: all var(--transition); - overflow-y: scroll; - text-align: center; - } - .nav__list { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - padding: 80px 20px 60px; - gap: 20px 0; - } - .nav__link { - color: var(--blue-middle); - font-size: 21px; - line-height: 1.5; - text-transform: uppercase; - padding: 20px; - -webkit-transition: all var(--transition); - transition: all var(--transition); - } - .nav__link:hover { - color: var(--accent); - } - .nav.active { - left: 0; - right: 0; - } -} -@media (max-width: 360px) { - .nav__list { - padding: 40px 20px 40px; - gap: 10px 0; - } - .nav__link { - padding: 10px 0; - } -} -.footer { - background-color: var(--blue-middle); -} -.footer__inner { - padding: 30px 0 12px; -} -.footer__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - gap: 0 100px; - font-size: 16px; - font-weight: 200; - line-height: 1.9; - letter-spacing: 0.32px; -} -.footer__item:first-child span:nth-child(2) { - display: block; - font-size: 10px; - line-height: 1.2; -} -.footer__item:last-child { - margin-left: auto; - height: 30px; - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; -} -.footer__link { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.footer__link:hover { - color: var(--accent); -} -.footer__source { - display: inline-block; - padding-top: 36px; - color: rgba(255, 255, 255, 0.5); - font-family: Roboto Flex; - font-size: 12px; - font-style: normal; - font-weight: 300; - line-height: 16px; -} - -.social-list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - gap: 0 5px; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.social-list__link { - height: 30px; - width: 30px; - border-radius: 50%; -} -.social-list__link svg path { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.social-list__link:hover svg path { - fill: red; -} -.social-list__item:nth-child(4) .social-list__link svg g:nth-child(2):hover path:nth-child(2) { - fill: red; -} - -@media (max-width: 1280px) { - .footer__list { - gap: 0 40px; - } - .footer__source { - font-size: 10px; - } -} -@media (max-width: 1024px) { - .footer__list { - font-size: 14px; - } - .social-list { - padding-left: 0; - } -} -@media (max-width: 900px) { - .footer__list { - gap: 0 15px; - } -} -@media (max-width: 800px) { - .footer__inner { - padding: 40px 0 50px; - } - .footer__list { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 20px 0; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - text-align: center; - } - .footer__item:first-child { - margin-right: 0; - max-width: 100%; - text-align: center; - } - .footer__item:last-child { - margin-top: 20px; - margin-left: initial; - } - .footer__source { - text-align: center; - } - .contacts-list { - text-align: center; - } -} -.top { - background-color: #183052; - overflow: hidden; - position: relative; -} -.top__background { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; -} -.top__background img { - position: absolute; - right: 0; - bottom: 0; - -o-object-fit: contain; - object-fit: contain; - height: 100%; - width: 100%; - -o-object-position: right bottom; - object-position: right bottom; -} -.top__inner { - position: relative; - max-width: 700px; - z-index: 1; -} -.top__container { - padding-top: 70px; - min-height: 100vh; - min-height: 100svh; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} -.top__logo { - position: relative; - margin: 63px 0 13%; - position: relative; - z-index: 1; - -ms-flex-item-align: start; - align-self: flex-start; - padding: 7px 60px 0 0; - height: 142px; - font-size: 130px; - cursor: auto; - pointer-events: none; -} -.top__logo::before { - content: ""; - position: absolute; - top: 0; - width: calc(100vw - var(--content-width) / 2); - height: 100%; - height: 100%; - right: 20px; - background-color: var(--accent); - z-index: -1; - -webkit-transform: skewX(351deg); - -ms-transform: skewX(351deg); - transform: skewX(351deg); -} -.top__logo-title { - line-height: 1; - letter-spacing: 3px; - margin: 0; - height: 100%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - font-size: inherit; - font-variation-settings: "ital" 1, "opsz" 30, "wdth" 36, "wght" 800, "slnt" -10; -} -.top__title { - font-variation-settings: "opsz" 51, "wdth" 25, "slnt" -10; - font-size: 85px; - line-height: 0.95; - letter-spacing: 5.95px; - margin-bottom: 22px; - text-transform: uppercase; - color: var(--light); -} -.top__subtitle { - font-size: 36px; - font-style: normal; - display: inline-block; - font-weight: 300; - line-height: 1.2; - letter-spacing: 0.18px; -} - -@media (min-width: 1920px) { - .top__container { - min-height: 1080px; - } -} -@media (max-width: 1920px) and (orientation: portrait) { - .top { - max-height: 1920px; - } - .top__logo { - position: relative; - margin: 63px 0 10% 0; - } -} -@media (max-width: 1440px) and (orientation: landscape) { - .top__logo { - margin: 63px 0 15% 0; - } -} -@media (max-width: 1280px) and (orientation: landscape) { - .top__container { - padding-top: 60px; - } - .top__logo { - margin: 28px 0 11%; - padding: 5px 40px 0 0; - height: 104px; - font-size: 90px; - } - .top__title { - font-variation-settings: "opsz" 33, "wdth" 25, "slnt" -10; - font-size: 54px; - letter-spacing: 3.8px; - } - .top__subtitle { - font-size: 25px; - } -} -@media (max-width: 1280px) and (orientation: portrait) { - .top__container { - padding-top: 60px; - } -} -@media (max-width: 1024px) and (orientation: portrait) { - .top { - background-size: 90%; - } - .top__logo { - padding: 5px 40px 0 0; - height: 104px; - font-size: 90px; - } -} -@media (max-width: 992px) and (orientation: landscape) { - .top__title { - padding-top: 80px; - } - .top__logo { - display: none; - } -} -@media (max-width: 992px) and (orientation: portrait) { - .top__logo { - display: none; - } - .top__title { - padding-top: 50px; - font-variation-settings: "opsz" 33, "wdth" 25, "slnt" -10; - font-size: 54px; - letter-spacing: 3.8px; - } - .top__subtitle { - font-size: 25px; - } -} -@media (max-width: 768px) and (orientation: landscape) { - .top__title { - font-variation-settings: "opsz" 25, "wdth" 25, "slnt" -10; - font-size: 43px; - letter-spacing: 3.1px; - } -} -@media (max-width: 768px) and (orientation: portrait) { - .top { - background-size: contain; - } - .top__logo { - display: none; - } -} -@media (max-width: 700px) and (orientation: landscape) { - .top__container { - padding-top: 60px; - } - .top__title { - font-variation-settings: "opsz" 17, "wdth" 25, "slnt" -10; - padding-top: 40px; - font-size: 30px; - margin-bottom: 15px; - letter-spacing: 1.2px; - } -} -@media (max-width: 700px) and (orientation: portrait) { - .top__container { - padding-top: 60px; - } - .top__title { - font-variation-settings: "opsz" 25, "wdth" 25, "slnt" -10; - font-size: 44px; - margin-bottom: 18px; - letter-spacing: 3.1px; - } -} -@media (max-width: 500px) and (orientation: portrait) { - .top__container { - width: 100%; - } - .top__title { - font-variation-settings: "opsz" 17, "wdth" 25, "slnt" -10; - font-size: 30px; - letter-spacing: 1.2px; - } -} -@media (max-width: 500px) and (orientation: landscape) { - .top__container { - width: 100%; - min-height: 320px; - } - .top__subtitle { - font-size: 20px; - } -} -@media (max-width: 400px) and (orientation: portrait) { - .top { - background-size: cover; - background-position: center bottom; - } - .top__background img { - width: 100%; - height: auto; - } - .top__subtitle { - font-size: 25px; - } -} -@media (max-width: 360px) and (orientation: portrait) { - .top__container { - min-height: 500px; - height: 100vh; - height: 100svh; - } - .top__title { - padding-top: 30px; - font-size: 24px; - letter-spacing: 1.68px; - margin-bottom: 10px; - } - .top__subtitle { - font-size: 22px; - } -} -.video { - background-image: url("./img/video-preview.jpg"); - background-repeat: no-repeat; - background-position: center; - background-size: cover; - position: relative; -} -.video__gradient { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - background: linear-gradient(75deg, #000 -10.46%, #000 -4.93%, rgba(0, 0, 0, 0) 65.31%); - z-index: 2; -} -.video__gradient::before { - content: ""; - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - background: rgba(0, 0, 0, 0.3); -} -.video__gradient.hide { - z-index: 0; -} -.video__intro { - background-color: #000; -} -.video__mask { - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 30px; - z-index: 0; -} -.video__mask.visible { - z-index: 10; -} -.video__player { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; - z-index: 1; -} -.video__player.play { - cursor: pointer; - -o-object-fit: cover; - object-fit: cover; -} -.video__player .vjs-tech { - -o-object-fit: cover; - object-fit: cover; -} -.video__player .vjs-paused .vjs-big-play-button { - display: none; -} -.video__inner { - min-height: 100vh; - position: relative; - -webkit-transition: all var(--transition); - transition: all var(--transition); - padding: 120px 0 198px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: end; - -ms-flex-pack: end; - justify-content: end; -} -.video__inner.active { - min-height: 100px; - padding: 0; - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - z-index: 2; -} -.video__title { - max-width: 660px; - z-index: 3; - margin-bottom: 30px; -} -.video__title.hide { - display: none; -} -.video__text { - max-width: 510px; - z-index: 3; - margin-bottom: 24px; -} -.video__text.hide { - display: none; -} -.video__link { - font-weight: 700; - z-index: 3; - -webkit-transition: color var(--transition); - transition: color var(--transition); - -ms-flex-item-align: start; - align-self: flex-start; -} -.video__link:hover { - color: var(--accent); -} -.video__link.hide { - display: none; -} -.video__btn { - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -webkit-transition: all var(--transition); - transition: all var(--transition); - z-index: 4; -} -.video__btn svg path { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.video__btn.hide { - display: none; -} -.video__btn.center-position { - position: absolute; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} -.video__btn:hover svg path:nth-child(1) { - fill: var(--blue-dark); -} -.video__btn:hover svg path:nth-child(2) { - fill: var(--light); -} - -@media (min-width: 1920px) or (min-height: 1080px) { - .video__inner { - min-height: 1080px; - } -} -@media (max-width: 1280px) { - .video__inner { - padding: 80px 0; - } - .video__title { - margin-bottom: 27px; - } - .video__btn svg { - width: 133.401px; - height: 109.86px; - } - .video__text { - padding-top: 0; - font-size: 14px; - line-height: 24px; - margin-bottom: 20px; - } -} -@media (max-width: 768px) { - .video { - background-image: url("./../img/video-preview-mobile.jpg"); - } -} -@media (max-width: 600px) { - .video__inner { - padding: 40px 0; - } - .video__title { - max-width: 440px; - margin-bottom: 20px; - } - .video__btn { - position: static; - -webkit-transform: none; - -ms-transform: none; - transform: none; - margin: 0 auto 150px; - } - .video__btn svg { - width: 100px; - height: 82px; - } -} -@media (max-width: 400px) { - .video__title { - max-width: 316px; - } -} -@media (max-width: 360px) { - .video__text { - font-size: 13px; - line-height: 22px; - font-stretch: 120%; - } - .video__btn { - margin: 0 auto 50px; - } -} -.video-js.active { - position: relative !important; - z-index: 2; - width: 100% !important; - height: auto !important; -} - -.vjs-poster.active { - position: absolute !important; - left: 0; - right: 0; - top: 0; - bottom: 0; - display: none; -} - -.choice { - padding-top: 78px; - margin-bottom: 90px; - background-color: var(--light); -} -.choice__title { - max-width: 820px; - text-transform: uppercase; - margin-bottom: 20px; -} -.choice__title span { - color: var(--blue-middle); -} -.choice__title--mobile { - display: none; -} -.choice__subtitle { - color: var(--blue-middle); - margin-bottom: 74px; - max-width: 580px; -} -.choice__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - color: var(--default); - gap: 12px 0; - -webkit-box-align: end; - -ms-flex-align: end; - align-items: flex-end; -} -.choice__item { - position: relative; - min-height: 134px; - padding: 11px 0 11px 110px; - background-color: #f5f5f5; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - gap: 0 110px; - font-weight: 300; - z-index: 1; - width: 100%; - -webkit-transition: all var(--transition); - transition: all var(--transition); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.choice__item::after { - content: ""; - position: absolute; - bottom: 0; - right: var(--max-offset); - width: max((100vw - var(--content-width)) / 2, var(--container-offset)); - height: 100%; - background-color: #f5f5f5; - z-index: -1; -} -.choice__item:hover { - -webkit-transform: var(--scale-hover); - -ms-transform: var(--scale-hover); - transform: var(--scale-hover); -} -.choice__item-text--mobile { - display: none; -} -.choice__item-bold { - font-weight: 700; -} -.choice__item-star { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - font-size: 8px; -} -.choice__item-star::before { - content: ""; -} -.choice__item-source { - padding-top: 10px; - font-size: 14px; - font-weight: 300; - line-height: 16px; -} -.choice__item-decor { - width: 100px; - position: absolute; - left: 0; - top: 0; - height: 100%; -} -.choice__item-decor::before { - content: ""; - position: absolute; - left: -40px; - top: -1px; - bottom: 0; - width: 80px; - background-color: var(--light); - -webkit-transform: skewX(-31deg); - -ms-transform: skewX(-31deg); - transform: skewX(-31deg); -} -.choice__item:nth-child(1) { - max-width: 1156px; -} -.choice__item:nth-child(2) { - max-width: 1244px; -} -.choice__item:nth-child(3) { - max-width: 1332px; -} -.choice__item:nth-child(4) { - max-width: 1420px; -} - -@media (max-width: 1440px) { - .choice__item { - gap: 0 95px; - } - .choice__item:nth-child(1) { - max-width: 855px; - } - .choice__item:nth-child(2) { - max-width: 940px; - } - .choice__item:nth-child(3) { - max-width: 1030px; - } - .choice__item:nth-child(4) { - max-width: 1115px; - } -} -@media (max-width: 1280px) { - .choice { - padding-top: 55px; - margin-bottom: 60px; - } - .choice__list { - gap: 10px 0; - } - .choice__subtitle { - max-width: 395px; - margin-bottom: 40px; - } - .choice__item { - min-height: 96px; - padding: 11px 0 11px 78px; - line-height: 18px; - gap: 0 70px; - } - .choice__item-source { - padding-top: 0; - font-size: 10px; - } - .choice__item:nth-child(1) { - max-width: 778px; - } - .choice__item:nth-child(1) img { - width: 84px; - } - .choice__item:nth-child(2) { - max-width: 842px; - } - .choice__item:nth-child(2) img { - width: 80px; - } - .choice__item:nth-child(3) { - max-width: 906px; - } - .choice__item:nth-child(3) img { - width: 80px; - } - .choice__item:nth-child(4) { - max-width: 970px; - } - .choice__item:nth-child(4) img { - width: 70px; - } -} -@media (max-width: 1024px) { - .choice__item:nth-child(1) { - max-width: 710px; - } - .choice__item:nth-child(1) img { - width: 84px; - } - .choice__item:nth-child(2) { - max-width: 775px; - } - .choice__item:nth-child(2) img { - width: 80px; - } - .choice__item:nth-child(3) { - max-width: 838px; - } - .choice__item:nth-child(3) img { - width: 80px; - } - .choice__item:nth-child(4) { - max-width: 900px; - } - .choice__item:nth-child(4) img { - width: 70px; - } -} -@media (max-width: 940px) { - .choice__item { - padding: 11px 0 11px 70px; - gap: 0 40px; - } - .choice__item:nth-child(1) { - max-width: 586px; - } - .choice__item:nth-child(1) img { - width: 84px; - } - .choice__item:nth-child(2) { - max-width: 648px; - } - .choice__item:nth-child(2) img { - width: 80px; - } - .choice__item:nth-child(3) { - max-width: 708px; - } - .choice__item:nth-child(3) img { - width: 80px; - } - .choice__item:nth-child(4) { - max-width: 768px; - } - .choice__item:nth-child(4) img { - width: 70px; - } -} -@media (max-width: 800px) { - .choice__item { - padding: 9px 0 8px 55px; - gap: 0 30px; - } - .choice__item-decor::before { - -webkit-transform: skewX(-20deg); - -ms-transform: skewX(-20deg); - transform: skewX(-20deg); - } - .choice__item:nth-child(1) { - max-width: 554px; - } - .choice__item:nth-child(1) img { - width: 54px; - } - .choice__item:nth-child(2) { - max-width: 592px; - } - .choice__item:nth-child(2) img { - width: 50px; - } - .choice__item:nth-child(3) { - max-width: 630px; - } - .choice__item:nth-child(3) img { - width: 50px; - } - .choice__item:nth-child(4) { - max-width: 668px; - } - .choice__item:nth-child(4) img { - width: 50px; - } -} -@media (max-width: 700px) { - .choice__item { - width: 100%; - max-width: 100% !important; - padding: 20px 0 8px 20px; - gap: 0 20px; - } - .choice__item::before { - display: none; - } - .choice__item img { - -ms-flex-item-align: start; - align-self: flex-start; - } - .choice__item-decor { - display: none; - } - .choice__item-text { - display: none; - } - .choice__item-source { - display: none; - } - .choice__item-text--mobile { - display: block; - max-width: 600px; - } - .choice__subtitle { - color: var(--default); - } -} -@media (max-width: 600px) { - .choice { - padding-top: 50px; - } - .choice__title { - font-size: 30px; - letter-spacing: 1.2px; - line-height: 32px; - margin-bottom: 20px; - } - .choice__subtitle { - margin-bottom: 30px; - } -} -@media (max-width: 500px) { - .choice { - padding-top: 50px; - } - .choice__title { - display: none; - } - .choice__title--mobile { - display: block; - } -} -@media (max-width: 360px) { - .choice__title--mobile { - font-size: 26px; - } -} -.professional { - position: relative; - overflow: hidden; - margin-top: 85px; - background-color: var(--blue-middle); -} -.professional__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - position: relative; -} -.professional__content { - width: 50%; - padding: 85px 0 55px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - z-index: 11; - color: var(--light); -} -.professional__content::before { - content: ""; - position: absolute; - right: 26%; - bottom: 0; - width: 66vw; - height: 100%; - background-image: linear-gradient(108deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%); - z-index: -1; - -webkit-transform: skewX(17deg); - -ms-transform: skewX(17deg); - transform: skewX(17deg); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; -} -.professional__title { - margin-bottom: 24px; -} -.professional__subtitle { - line-height: 1; - font-size: 36px; - font-weight: 600; - margin-top: -5px; - margin-bottom: 70px; -} -.professional__text { - font-size: 24px; - font-weight: 200; - line-height: 1.17; - max-width: 560px; - width: 100%; -} -.professional__text-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 30px; - margin-bottom: 44px; -} -.professional__slider-container { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - max-width: 1440px; - left: 50%; - -webkit-transform: translateX(-50%); - -ms-transform: translateX(-50%); - transform: translateX(-50%); - overflow: hidden; -} -.professional__slider { - width: 70%; - position: absolute; - top: 160px; - right: -6%; -} -.professional__slider-wrapper { - padding: 40px 0; -} -.professional__slider-item { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-filter: grayscale(100%); - filter: grayscale(100%); - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - -webkit-transition: -webkit-transform var(--transition); - transition: -webkit-transform var(--transition); - transition: transform var(--transition); - transition: transform var(--transition), -webkit-transform var(--transition); -} -.professional__slider-item img { - margin: auto; - height: 220px; - width: 400px; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.3); - -ms-transform: scale(1.3); - transform: scale(1.3); - z-index: 11; - -webkit-filter: grayscale(0); - filter: grayscale(0); -} -.professional__slider-item.swiper-slide-active .professional__slider-link { - -webkit-box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45); - box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45); -} -.professional__slider-item.swiper-slide-active .professional__slider-link::before { - background-color: rgba(0, 0, 0, 0.1); -} -.professional__slider-item.swiper-slide-active .professional__slider-icon { - opacity: 1; -} -.professional__slider-item.swiper-slide-active img { - width: 350px; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-item--hide { - -webkit-filter: grayscale(100%) !important; - filter: grayscale(100%) !important; - pointer-events: none; -} -.professional__slider-link { - position: relative; - -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); - box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-link::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.25); - z-index: 1; -} -.professional__slider-icon { - position: absolute; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - width: 80px; - height: 66px; - overflow: hidden; - top: 50%; - left: 50%; - display: flex; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - z-index: 1; - opacity: 0; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-icon svg path { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.professional__slider-icon:hover svg path:nth-child(1) { - fill: var(--blue-dark); -} -.professional__slider-icon:hover svg path:nth-child(2) { - fill: var(--light); -} -.professional__slider-btn { - -webkit-box-shadow: none; - box-shadow: none; - background-color: var(--light); - border-radius: 50%; - border: none; - width: 56px; - height: 56px; - padding: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - top: 150px; -} -.professional__slider-btn::after { - content: ""; -} -.professional__slider-btn svg { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); -} -.professional__slider-btn.swiper-button-disabled { - opacity: 0.5; -} -.professional__slider-navigation-prev { - left: 19%; -} -.professional__slider-navigation-next { - right: 19%; -} -.professional__slider-info { - margin: 0 auto; - display: block; - max-width: 420px; - font-weight: 600; - color: #fff; - text-align: center; - font-size: 20px; - line-height: 1.17; -} -.professional__slider-pagination { - width: auto !important; - position: static !important; - padding-top: 16px; - margin-bottom: 32px; -} -.professional__slider-pagination .swiper-pagination-bullet { - width: 56px; - height: 3px; - padding: 0; - border-radius: 0; - margin: 0 9px !important; - background-color: var(--light); - opacity: 0.5; - bottom: 0; -} -.professional__slider-pagination .swiper-pagination-bullet-active { - background-color: var(--light) !important; - opacity: 1; -} - -@media (max-width: 1440px) { - .professional__content::before { - right: 20%; - } - .professional__slider { - width: 66%; - right: -108px; - } - .professional__slider-item img { - height: 220px; - } - .professional__slider-navigation-prev { - left: 16%; - } - .professional__slider-navigation-next { - right: 16%; - } -} -@media (max-width: 1280px) { - .professional { - margin-top: 60px; - } - .professional__content { - padding: 60px 0 80px; - } - .professional__content::before { - right: 23%; - } - .professional__subtitle { - font-size: 25px; - margin-bottom: 50px; - } - .professional__text { - font-size: 17px; - max-width: 520px; - } - .professional__text-wrapper { - margin-bottom: 38px; - } - .professional__slider { - top: 128px; - right: -80px; - } - .professional__slider-item img { - height: 194px; - width: 400px; - } - .professional__slider-item.swiper-slide-active img { - width: 300px; - } - .professional__slider-btn { - top: 130px; - } - .professional__slider-pagination { - padding-top: 2px; - margin-bottom: 27px; - } - .professional__slider-pagination .swiper-pagination-bullet { - width: 50px; - } - .professional__slider-info { - font-size: 14px; - max-width: 290px; - } -} -@media (max-width: 1140px) { - .professional__content::before { - right: 17%; - } - .professional__slider-navigation-prev { - left: 14%; - } - .professional__slider-navigation-next { - right: 14%; - } -} -@media (max-width: 1024px) { - .professional { - padding-bottom: 70px; - } - .professional__content { - padding: 60px 0 70px; - } - .professional__content::before { - right: 13%; - } - .professional__subtitle { - margin-bottom: 55px; - } - .professional__text { - max-width: 420px; - } - .professional__text-wrapper { - margin-bottom: 56px; - gap: 20px; - } - .professional__slider-item.swiper-slide-active img { - width: 240px; - } - .professional__slider-item img { - height: 150px; - width: 300px; - } - .professional__slider-icon { - width: 56px; - height: 46px; - } - .professional__slider-btn { - width: 42px; - height: 42px; - top: 116px; - } - .professional__slider-navigation-prev { - left: 18%; - } - .professional__slider-navigation-next { - right: 18%; - } - .professional__slider-pagination { - padding-top: 0; - } - .professional__slider-pagination .swiper-pagination-bullet { - width: 38px; - } -} -@media (max-width: 992px) { - .professional__content { - width: 100%; - padding-bottom: 45px; - } - .professional__content::before { - display: none; - } - .professional__subtitle { - margin-bottom: 33px; - } - .professional__text-wrapper { - margin-bottom: 0; - } - .professional__text { - max-width: 520px; - } - .professional__slider { - position: static; - width: 100%; - } - .professional__slider-decor { - position: relative; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); - z-index: 1; - } - .professional__slider-decor::before { - content: ""; - position: absolute; - z-index: 2; - left: 0; - top: 0; - right: 0; - height: 1000px; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(39.39%, #cd1338), color-stop(127.43%, rgba(205, 19, 56, 0.46))); - background-image: linear-gradient(180deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%); - -webkit-transform: skewY(343deg) rotate(180deg); - -ms-transform: skewY(343deg) rotate(180deg); - transform: skewY(343deg) rotate(180deg); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); - } - .professional__slider-container { - padding: 0 var(--container-offset); - max-width: var(--container-width); - position: static; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - margin: 0 auto 52px auto; - } - .professional__slider-item img { - height: 160px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.5); - -ms-transform: scale(1.5); - transform: scale(1.5); - } - .professional__slider-item.swiper-slide-active img { - width: 250px; - } - .professional__slider-btn { - top: 122px; - } - .professional__slider-pagination { - margin-bottom: 20px; - } - .professional__slider-navigation-prev { - left: 20%; - } - .professional__slider-navigation-next { - right: 20%; - } -} -@media (max-width: 768px) { - .professional { - margin-top: 60px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.4); - -ms-transform: scale(1.4); - transform: scale(1.4); - } -} -@media (max-width: 700px) { - .professional__subtitle { - font-size: 16px; - } - .professional__text { - font-size: 14px; - line-height: 18px; - max-width: 340px; - } - .professional__slider-decor { - padding-top: 10px; - } - .professional__slider-decor::before { - top: -30px; - } - .professional__slider-item img { - height: 140px; - } - .professional__slider-item.swiper-slide-active img { - width: 230px; - } - .professional__slider-icon { - width: 50px; - height: 40px; - } - .professional__slider-btn { - top: 110px; - width: 38px; - height: 38px; - } - .professional__slider-btn svg { - -webkit-transform: scale(0.6); - -ms-transform: scale(0.6); - transform: scale(0.6); - } - .professional__slider-navigation-prev { - left: 28%; - } - .professional__slider-navigation-next { - right: 28%; - } -} -@media (max-width: 500px) { - .professional__content { - padding: 45px 0 10px; - } - .professional__slider-decor { - padding-top: 30px; - } - .professional__slider-container { - padding-left: 0; - padding-right: 0; - margin-bottom: 40px; - } - .professional__slider-pagination { - padding-top: 10px; - } - .professional__slider-navigation-prev { - left: 14%; - } - .professional__slider-navigation-next { - right: 14%; - } -} -@media (max-width: 360px) { - .professional__slider-container { - padding-top: 0; - } - .professional__slider-btn { - top: 115px; - } - .professional__slider-item.swiper-slide-active { - -webkit-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); - } -} -.interview { - --content-width: 800px; - --content-offset: 140px; - position: relative; - overflow: hidden; - background-color: var(--blue-middle); -} -.interview__slider-wrapper { - -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; -} -.interview__slider-content { - position: relative; - z-index: 1; - -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} -.interview__slider-inner { - padding: 200px var(--container-offset) 288px; - position: relative; - max-width: var(--content-width); - margin-left: auto; - margin-right: var(--content-offset); -} -.interview__slider-title { - font-size: 68px; - margin-bottom: 35px; -} -.interview__slider-info { - max-width: 280px; - margin-bottom: 120px; -} -.interview__slider-name { - font-size: 16px; - font-weight: 700; - line-height: 1.05; - margin-bottom: 22px; -} -.interview__slider-descr { - font-size: 16px; - font-weight: 200; - line-height: 18px; -} -.interview__slider-text { - font-size: 24px; - font-weight: 200; - line-height: 1.2; -} -.interview__slider-item { - height: auto; - position: relative; - overflow: hidden; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: end; - -ms-flex-align: end; - align-items: flex-end; -} -.interview__slider-item::before { - content: ""; - position: absolute; - left: 36%; - bottom: 0; - width: 100vw; - height: 100%; - z-index: 1; - -webkit-transform: skewX(-17deg); - -ms-transform: skewX(-17deg); - transform: skewX(-17deg); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - background-image: -webkit-gradient(linear, right top, left top, color-stop(38.01%, #00406C), color-stop(117.87%, rgba(0, 64, 108, 0.53))); - background-image: linear-gradient(270deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%); - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); -} -.interview__slider-item-content { - position: relative; - z-index: 11; -} -.interview__slider-img { - position: absolute; - height: 100%; - z-index: -1; -} -.interview__slider-img img { - height: 100%; -} -.interview__slider-link { - font-variation-settings: "wdth" 140, "wght" 700; - position: absolute; - bottom: 100px; - left: var(--container-offset); - right: var(--container-offset); - font-size: 24px; - font-weight: 700; - line-height: 56px; - letter-spacing: 0.12px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - text-transform: none; -} -.interview__slider-btn { - -webkit-box-shadow: none; - box-shadow: none; - background-color: var(--light); - border-radius: 50%; - border: none; - width: 56px; - height: 56px; - padding: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - bottom: 440px; - top: auto; -} -.interview__slider-btn::after { - content: ""; -} -.interview__slider-btn svg { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); -} -.interview__slider-navigation svg path { - fill: var(--light); -} -.interview__slider-navigation-prev { - left: auto; - right: var(--content-width); - background-color: var(--accent); -} -.interview__slider-navigation-next { - left: var(--content-width); - background-color: var(--accent); -} -.interview__slider-navigation-inner { - position: relative; - max-width: var(--content-width); - margin-left: auto; - margin-right: var(--content-offset); -} -.interview__slider-info { - margin-left: auto; - padding-right: 60px; -} -.interview__slider-navigation-container { - position: absolute; - left: 0; - right: 0; - bottom: 0; - z-index: 2; -} -.interview__slider-pagination { - width: auto !important; - bottom: 230px !important; - left: 50% !important; - -webkit-transform: translateX(-50%) !important; - -ms-transform: translateX(-50%) !important; - transform: translateX(-50%) !important; -} -.interview__slider-pagination { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - gap: 10px; -} -.interview__slider-pagination .swiper-pagination-bullet { - width: 70px; - height: 3px; - padding: 0; - border-radius: 0; - background-color: var(--light); - opacity: 0.5; - margin: 0; -} -.interview__slider-pagination .swiper-pagination-bullet-active { - background-color: var(--light) !important; - opacity: 1; -} - -@media (max-width: 1440px) { - .interview { - --content-offset: 60px; - --content-width: 760px; - } - .interview__slider-info { - padding-right: 134px; - } - .interview__slider-item::before { - left: 39%; - } -} -@media (max-width: 1280px) { - .interview { - --content-offset: 8%; - --content-width: 58%; - } - .interview__slider-inner { - padding: 90px 0 252px; - } - .interview__slider-item::before { - left: 34%; - } - .interview__slider-title { - font-size: 50px; - } - .interview__slider-info { - padding-right: 0; - margin-bottom: 50px; - } - .interview__slider-name { - font-size: 12px; - margin-bottom: 10px; - } - .interview__slider-descr { - font-size: 12px; - } - .interview__slider-text { - font-size: 17px; - max-width: 600px; - } - .interview__slider-link { - font-size: 17px; - line-height: 38px; - } - .interview__slider-pagination { - bottom: 190px !important; - } - .interview__slider-btn { - bottom: 350px; - } - .interview__slider-navigation-prev { - right: auto; - left: -80px; - } - .interview__slider-navigation-next { - left: auto; - right: -80px; - } -} -@media (max-width: 1024px) { - .interview { - --content-offset: 7%; - --content-width: 61%; - } - .interview__slider-img { - left: -50px; - } - .interview__slider-btn { - width: 46px; - height: 46px; - } - .interview__slider-text { - max-width: 470px; - } - .interview__slider-title { - font-size: 47px; - letter-spacing: 1.5px; - } - .interview__slider-navigation-prev { - left: -60px; - } - .interview__slider-navigation-next { - right: -60px; - } -} -@media (max-width: 900px) { - .interview { - --content-offset: 0; - --content-width: 560px; - } - .interview__slider-inner { - padding: 490px 0 210px; - margin-left: 0; - margin: 0 auto; - } - .interview__slider-info { - margin-bottom: 36px; - } - .interview__slider-link { - bottom: 90px; - left: 0; - right: 0; - } - .interview__slider-pagination { - bottom: 168px !important; - } - .interview__slider-title { - font-size: 50px; - letter-spacing: 2.5px; - } - .interview__slider-navigation-inner { - max-width: 100%; - } - .interview__slider-navigation-prev { - left: 0; - } - .interview__slider-navigation-next { - right: 0; - } - .interview__slider-item { - max-height: 100%; - } - .interview__slider-item::before { - -webkit-transform: skewX(0); - -ms-transform: skewX(0); - transform: skewX(0); - -webkit-transform: skewY(18deg); - -ms-transform: skewY(18deg); - transform: skewY(18deg); - left: 0; - right: 0; - top: 406px; - height: 100%; - background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%); - } - .interview__slider-img { - width: 100%; - left: 0; - } - .interview__slider-img img { - width: 100%; - } -} -@media (max-width: 700px) { - .interview__slider-title { - margin-bottom: 25px; - font-size: 32px; - letter-spacing: 1.6px; - } - .interview__slider-img img { - height: auto; - } - .interview__slider-info { - max-width: 220px; - } - .interview__slider-text { - font-size: 14px; - } - .interview__slider-pagination .swiper-pagination-bullet { - width: 46px; - } - .interview__slider-link { - line-height: 30px; - font-size: 14px; - } - .interview__slider-btn { - bottom: 150px; - width: 36px; - height: 36px; - } - .interview__slider-btn svg { - -webkit-transform: scale(0.6); - -ms-transform: scale(0.6); - transform: scale(0.6); - } -} -@media (max-width: 400px) { - .interview__slider-inner { - padding: 390px 0 210px; - } - .interview__slider-item::before { - top: 333px; - } -} -.chat { - position: relative; - padding: 54px 0 48px; - overflow: hidden; - background-image: url("./../img/chat-bg.webp"); - background-repeat: no-repeat; - background-size: cover; -} -.chat__inner { - position: relative; - z-index: 1; -} -.chat__title { - margin-bottom: 24px; -} -.chat__text { - max-width: 686px; - margin-bottom: 30px; - font-size: 24px; -} -.chat__mobile { - position: absolute; - right: 0; - top: 0; - z-index: -1; - -webkit-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); - -webkit-transform-origin: top right; - -ms-transform-origin: top right; - transform-origin: top right; -} -.chat__bottom { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-line-pack: center; - align-content: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - gap: 36px; -} -.chat__img { - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - width: 216px; -} -.chat__btn { - padding: 0 35px; - text-transform: initial; - font-size: 20px; -} - -@media (max-width: 1440px) { - .chat { - background-position: top right -100px; - } - .chat__mobile { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} -@media (max-width: 1280px) { - .chat__text { - max-width: 656px; - margin-bottom: 50px; - font-size: 17px; - } - .chat__mobile { - -webkit-transform: scale(0.9); - -ms-transform: scale(0.9); - transform: scale(0.9); - } - .chat__img { - width: 194px; - } - .chat__btn { - padding: 5px 35px; - } -} -@media (max-width: 1024px) { - .chat__text { - max-width: 570px; - margin-bottom: 50px; - font-size: 17px; - } - .chat__mobile { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); - } -} -@media (max-width: 900px) { - .chat__text { - max-width: 690px; - } - .chat__mobile { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - top: 173px; - right: 2%; - } -} -@media (max-width: 700px) { - .chat { - padding: 54px 0 0; - background-image: url("./../img/chat-bg-mobile.webp"); - background-position: top right 0; - } - .chat__mobile { - position: static; - max-width: 450px; - width: 100%; - margin: 0 auto; - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - .chat__text { - font-size: 14px; - line-height: 1.2; - margin-bottom: 30px; - } - .chat__bottom { - position: absolute; - z-index: 3; - bottom: 0; - padding-bottom: 56px; - left: 0; - right: 0; - } - .chat__bottom::before { - content: ""; - position: absolute; - left: calc(var(--container-offset) * -1); - right: calc(var(--container-offset) * -1); - bottom: 0; - height: 180px; - z-index: -1; - background-image: linear-gradient(-17deg, rgba(0, 64, 108, 0.5803921569) 40.01%, rgba(0, 64, 108, 0.53) 117.87%); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); - -webkit-clip-path: polygon(0px 60px, 100% 0%, 100% 100%, 0% 100%); - clip-path: polygon(0px 60px, 100% 0%, 100% 100%, 0% 100%); - } - .chat__img { - display: none; - } - .chat__btn { - max-width: 400px; - width: 100%; - margin: 0 auto; - font-size: 14px; - padding: 4px 35px; - } -} -@media (max-width: 400px) { - .chat { - padding: 34px 0 0; - } - .chat__btn { - padding: 4px 10px; - } - .chat__text { - max-width: 310px; - } -} -.accordion-mobile { - display: none; -} - -.accordion__item .accordion__title-wrapper { - -webkit-clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%); - clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%); -} -.accordion__item:nth-child(1) { - width: 408px; - margin-bottom: 20px; -} -.accordion__item:nth-child(2) { - width: 436px; -} -.accordion__item:nth-child(2) .accordion__title-wrapper { - color: var(--default); -} -.accordion__title-wrapper { - cursor: pointer; - padding: 13px 0 13px 16px; - background-color: var(--light); - color: var(--blue-middle); - font-size: 24px; - font-weight: 600; - line-height: 1.7; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.accordion__title { - display: inline-block; - padding-right: 18px; -} -.accordion__icon { - width: 32px; - height: 16px; - -webkit-transition: all 0.5s ease-in-out; - transition: all 0.5s ease-in-out; -} -.accordion__content { - max-height: 0; - overflow: hidden; - -webkit-transition: all 0.5s ease-in-out; - transition: all 0.5s ease-in-out; - color: var(--default); - font-size: 24px; - font-weight: 200; - background-color: #f5f5f5; - padding: 0 10px 0 14px; - margin: -1px 0 0 0; -} -.accordion__content-text { - line-height: 1.17; -} -.accordion__content-text span { - font-variation-settings: "wdth" 140, "wght" 600; -} -.accordion__content-text:not(:last-child) { - margin-bottom: 8px; -} -.accordion .active .accordion__content { - max-height: 600px; - padding: 10px 10px 10px 14px; - overflow-y: scroll; -} - -@media (max-width: 1280px) { - .accordion__content { - font-size: 17px; - padding: 0 10px 0 27px; - } - .accordion__content-text:not(:last-child) { - margin-bottom: 6px; - } - .accordion .active .accordion__content { - padding: 10px 10px 10px 27px; - } - .accordion__item:nth-child(1) { - width: 370px; - margin-bottom: 14px; - } - .accordion__item:nth-child(2) { - width: 390px; - } - .accordion__item .accordion__title-wrapper { - -webkit-clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%); - clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%); - } - .accordion__title-wrapper { - padding: 10px 0 10px 27px; - } - .accordion__title { - font-size: 17px; - } - .accordion__icon { - margin: 0 30px 0 auto; - } -} -@media (max-width: 992px) { - .accordion-desktop { - display: none; - } - .accordion-mobile { - display: block; - padding: 0 var(--container-offset); - max-width: var(--container-width); - margin-left: auto; - margin-right: auto; - } - .accordion__items { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - gap: 6px; - } - .accordion__item-wrapper { - padding: 10px 0 10px 16px; - } - .accordion__item:nth-child(1) { - width: 50%; - margin-bottom: 0; - } - .accordion__item:nth-child(2) { - width: 50%; - } - .accordion__item:nth-child(2) .accordion__title-wrapper { - -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 4% 100%); - clip-path: polygon(0 0, 100% 0, 100% 100%, 4% 100%); - } - .accordion__item:nth-child(2) .accordion__content { - margin-left: 1.9vw; - } - .accordion__item:nth-child(2) .accordion__icon { - margin: 0 12px 0 auto; - } - .accordion__title { - padding-right: 0; - } - .accordion__icon { - margin: 0 22px 0 auto; - } -} -@media (max-width: 700px) { - .accordion__items { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 14px; - } - .accordion__content { - font-size: 14px; - padding: 0 10px 0 12px; - } - .accordion__content-text:not(:last-child) { - margin-bottom: 4px; - } - .accordion .active .accordion__content { - padding: 10px 10px 10px 12px; - } - .accordion__item:nth-child(1) { - width: auto; - max-width: 320px; - } - .accordion__item:nth-child(2) { - width: auto; - max-width: 336px; - } - .accordion__item:nth-child(2) .accordion__content { - margin-left: 0; - } - .accordion__item:nth-child(2) .accordion__title-wrapper { - -webkit-clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%); - clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%); - } - .accordion__item:nth-child(2) .accordion__icon { - margin: 0 22px 0 auto; - } - .accordion__title-wrapper { - padding: 10px 10px 10px 12px; - } - .accordion__title { - font-size: 14px; - } - .accordion__icon { - width: 20px; - height: 10px; - } - .accordion__icon img { - -o-object-fit: contain; - object-fit: contain; - } -} -.banner { - margin-top: 85px; -} -.banner__background { - background-image: url("./../img/banner-bg.jpg"); - background-size: cover; - background-position: center; - background-repeat: no-repeat; -} -.banner__inner { - min-height: 96px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: end; - -ms-flex-pack: end; - justify-content: flex-end; -} -.banner__title { - font-size: 48px; - margin-right: 88px; - margin-bottom: 0; -} -.banner__btn { - margin-right: 140px; -} - -@media (max-width: 1280px) { - .banner { - margin-top: 60px; - } - .banner__inner { - min-height: 68px; - } - .banner__title { - font-size: 34px; - margin-right: 50px; - } - .banner__btn { - margin-right: 180px; - } -} -@media (max-width: 940px) { - .banner__btn { - margin-right: 0; - } -} -@media (max-width: 700px) { - .banner__inner { - min-height: 68px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - padding: 46px 0 20px; - } - .banner__title { - margin-bottom: 20px; - text-align: center; - margin-right: 0; - font-size: 30px; - letter-spacing: 1.2px; - line-height: 32px; - } -} -@media (max-width: 360px) { - .banner__title { - font-size: 26px; - } -} -.goods { - padding: 62px 0 10px; -} -.goods__slider { - margin-left: -5px; - margin-right: -5px; -} -.goods__slider-wrapper { - -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; -} -.goods__item { - height: auto; - padding: 10px 10px 14px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - background-color: var(--light); - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - text-align: center; -} -.goods__item-shadow { - -webkit-box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15); - box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15); - padding: 28px 10px 42px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - height: 100%; -} -.goods__item-bottom { - padding: 0 10px; - -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} -.goods__item img { - margin-left: auto; - margin-right: auto; - width: 310px; - max-height: 310px; - -o-object-fit: contain; - object-fit: contain; -} -.goods__item-title { - color: var(--blue-middle); - font-size: 20px; - font-weight: 629; - line-height: 22px; - margin-bottom: 5px; -} -.goods__item-subtitle { - display: inline-block; - margin-bottom: 18px; - font-size: 16px; - line-height: 18px; - font-weight: 200; - color: var(--gray); -} -.goods__item-text { - color: var(--default); - margin-bottom: 28px; - font-size: 16px; - font-weight: 200; - line-height: 18px; - text-align: left; -} -.goods__item-btn { - width: 100%; - margin-left: auto; - margin-right: auto; - opacity: 0.5; - margin-top: auto; -} -.goods__item-btn:hover { - background-color: var(--blue-dark); - opacity: 1; -} -.goods__item-img { - position: relative; - margin-bottom: 10px; -} -.goods__item.goods__item--icon .goods__item-img::before { - content: ""; - position: absolute; - bottom: 0px; - right: 16%; - width: 15px; - height: 15px; - background-size: cover; - -o-object-fit: cover; - object-fit: cover; - background-image: url("./../img/label-icon.png"); -} -.goods__slider-wrapper__arros { - position: relative; - padding: 0 38px; -} -.goods__slider-navigation { - left: 0; - right: 0; - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); -} -.goods__slider-btn { - background-color: transparent; - cursor: pointer; - border: none; - padding: 0; - width: 34px; - height: 42px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - margin-top: -50px; -} -.goods__slider-btn::after { - content: ""; -} -.goods__slider-btn svg { - -webkit-transform: scale(0.9); - -ms-transform: scale(0.9); - transform: scale(0.9); -} -.goods__slider-btn.swiper-button-disabled svg path { - stroke: var(--default); -} -.goods__slider-prev { - left: 2px; -} -.goods__slider-next { - right: 2px; -} -.goods__slider-pagination { - position: relative; - top: -5px; - margin-left: -5px; - margin-right: -5px; -} -.goods__slider-pagination .swiper-pagination-bullet { - width: 56px; - height: 2px; - padding: 5px 0; - border-radius: 0; - margin: 0 18px !important; - position: relative; - background-color: var(--light); - bottom: 0; -} -.goods__slider-pagination .swiper-pagination-bullet::before { - content: ""; - position: absolute; - top: 50%; - left: 0; - height: 3px; - width: 100%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - background-color: var(--default) !important; -} -.goods__slider-pagination .swiper-pagination-bullet-active::before { - background-color: var(--accent) !important; -} - -@media (max-width: 1440px) { - .goods__item-text { - margin-bottom: 25px; - } -} -@media (max-width: 1280px) { - .goods__item img { - width: 220px; - max-height: 220px; - } - .goods__item-title { - font-size: 14px; - line-height: 16px; - margin-bottom: 0; - } - .goods__item-subtitle { - font-size: 12px; - } - .goods__item-text { - font-size: 12px; - margin-bottom: 30px; - } - .goods__item-shadow { - padding: 16px 10px 28px; - } - .goods__item.goods__item--icon .goods__item-img::before { - right: 12%; - } - .goods__slider-pagination .swiper-pagination-bullet { - margin: 0 10px !important; - } -} -@media (max-width: 1024px) { - .goods__item-text { - margin-bottom: 15px; - } -} -@media (max-width: 1024px) and (min-width: 941px) { - .goods__item img { - width: 166px; - max-height: 166px; - } - .goods__item-btn { - min-width: 140px; - } -} -@media (max-width: 940px) { - .goods { - padding-top: 40px; - } - .goods__slider-pagination .swiper-pagination-bullet { - width: 48px; - margin: 0 7px !important; - } -} -@media (max-width: 768px) { - .goods__slider-pagination .swiper-pagination-bullet { - width: 35px; - margin: 0 5px !important; - } - .goods__item-text { - margin-bottom: 10px; - } - .goods__item.goods__item--icon .goods__item-img::before { - right: 12%; - } -} -@media (max-width: 600px) { - .goods__slider-pagination .swiper-pagination-bullet { - width: 18px; - margin: 0 5px !important; - } - .goods__item.goods__item--icon .goods__item-img::before { - right: 22%; - } -} -@media (max-width: 400px) { - .goods__slider-pagination .swiper-pagination-bullet { - width: 14px; - margin: 0 4px !important; - } - .goods__item.goods__item--icon .goods__item-img::before { - right: 16%; - } -} -.labels { - padding: 70px 0 108px; -} -.labels__title { - text-align: center; - color: var(--accent); - margin-bottom: 50px; - font-size: 48px; -} -.labels__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - gap: 42px; -} -.labels__item { - display: inherit; - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.labels__item:hover { - -webkit-transform: var(--scale-hover); - -ms-transform: var(--scale-hover); - transform: var(--scale-hover); -} -.labels__link img { - height: 47px; -} - -@media (max-width: 1440px) { - .labels { - padding: 70px 0 85px; - } - .labels__list { - gap: 32px; - } -} -@media (max-width: 1280px) { - .labels { - padding: 46px 0 50px; - } - .labels__list { - gap: 30px; - } - .labels__title { - font-size: 34px; - line-height: 34px; - margin-bottom: 37px; - } - .labels__link img { - height: 34px; - } -} -@media (max-width: 1024px) { - .labels__list { - gap: 26px; - } -} -@media (max-width: 900px) { - .labels { - padding: 46px 0 35px; - } - .labels__link img { - height: 45px; - } -} -@media (max-width: 700px) { - .labels { - padding: 46px 0 100px; - } - .labels__list { - gap: 16px 24px; - } - .labels__title { - font-size: 30px; - line-height: 1; - margin-bottom: 30px; - } - .labels__link img { - height: 34px; - } -} -@media (max-width: 400px) { - .labels__title { - margin-bottom: 24px; - } - .labels__link img { - height: 32px; - } -} -@media (max-width: 360px) { - .labels__title { - font-weight: 800; - font-size: 26px; - } - .labels__link img { - height: 28px; - } - .labels__list { - gap: 16px 20px; - } -} -.recommendations { - padding: 85px 0 0; - margin-bottom: -1px; -} -.recommendations__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.recommendations__content { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - padding-left: 40px; - position: relative; - z-index: 11; -} -.recommendations__title { - margin-bottom: 24px; - color: var(--accent); -} -.recommendations__text { - color: var(--default); - font-size: 24px; - font-weight: 200; - line-height: 28px; - max-width: 540px; - width: 100%; -} -.recommendations__slider { - position: relative; - height: 660px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-inner { - width: 50%; - position: relative; - -webkit-clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%); - clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%); -} -.recommendations__slider-inner::before { - content: ""; - position: absolute; - bottom: 0; - right: 0; - width: calc(100% + 100vw - var(--content-width) / 2); - height: 100%; - background-color: var(--blue-middle); - z-index: -1; -} -.recommendations__slider-wrapper { - min-width: 0; - -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; - position: relative; -} -.recommendations__slider-container { - padding-right: 140px; -} -.recommendations__slider-item { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-link { - position: relative; -} -.recommendations__slider-link::before { - content: ""; - position: absolute; - background-image: url("./../img/svg/zoom.svg"); - background-position: center; - background-size: contain; - background-repeat: no-repeat; - right: 20px; - top: 10px; - width: 62px; - height: 66px; -} -.recommendations__slider-link img { - max-width: 370px; -} -.recommendations__slider-btn { - -webkit-box-shadow: none; - box-shadow: none; - background-color: transparent; - border: none; - width: 40px; - height: 42px; - padding: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} -.recommendations__slider-btn::after { - content: ""; -} -.recommendations__slider-btn svg { - -webkit-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); -} -.recommendations__slider-btn.swiper-button-disabled { - opacity: 0.5; -} -.recommendations__slider-navigation-prev { - left: -10px; -} -.recommendations__slider-navigation-next { - right: 130px; -} - -@media (max-width: 1280px) { - .recommendations { - padding: 60px 0 0; - } - .recommendations__slider { - height: 606px; - } - .recommendations__slider-inner { - width: 55%; - } - .recommendations__slider-link::before { - width: 50px; - height: 54px; - right: 6px; - } - .recommendations__slider-link img { - max-width: 350px; - } - .recommendations__text { - font-size: 17px; - line-height: 20px; - max-width: 376px; - } - .recommendations__content { - padding-left: 130px; - } -} -@media (max-width: 1024px) { - .recommendations__slider { - height: 506px; - } - .recommendations__slider-inner { - width: 62%; - } - .recommendations__slider-link img { - max-width: 290px; - } - .recommendations__content { - padding-left: 10px; - padding-bottom: 76px; - } -} -@media (max-width: 900px) { - .recommendations__slider { - height: 440px; - } - .recommendations__slider-inner { - width: 58%; - } - .recommendations__slider-link img { - max-width: 240px; - } - .recommendations__content { - padding-left: 0; - padding-bottom: 45px; - } -} -@media (max-width: 768px) { - .recommendations__title { - margin-bottom: 14px; - } - .recommendations__slider-link img { - max-width: 220px; - } - .recommendations__slider-link::before { - width: 30px; - height: 32px; - } -} -@media ((max-width: 768px) and (min-width: 701px)) { - .recommendations__slider-inner { - width: 58%; - } - .recommendations__slider-link img { - max-width: 200px; - } - .recommendations__content { - margin-left: -10px; - } -} -@media (max-width: 700px) { - .recommendations { - padding: 50px 0 0; - } - .recommendations__inner { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - } - .recommendations__content { - margin-bottom: 0; - margin-left: 0; - margin-bottom: 30px; - padding-bottom: 0; - } - .recommendations__slider { - height: 344px; - } - .recommendations__slider-link img { - max-width: 200px; - } - .recommendations__slider-inner { - width: 100%; - -webkit-box-ordinal-group: 3; - -ms-flex-order: 2; - order: 2; - -webkit-clip-path: none; - clip-path: none; - } - .recommendations__slider-inner::before { - -webkit-transform: skewX(0); - -ms-transform: skewX(0); - transform: skewX(0); - width: 100vw; - left: calc(var(--container-offset) * -1); - } - .recommendations__slider-wrapper { - margin: 0 calc(var(--container-offset) * -1); - } - .recommendations__slider-container { - padding-right: 0; - } - .recommendations__slider-navigation-prev { - left: 0; - } - .recommendations__slider-navigation-next { - right: 0; - } - .recommendations__text { - font-size: 14px; - line-height: 1.2; - } - .recommendations__title span { - font-size: 30px; - letter-spacing: 1.2px; - line-height: 32px; - } -} -@media (max-width: 360px) { - .recommendations__title { - font-size: 26px; - letter-spacing: 1px; - } -} -.partners { - padding: 90px 0 30px; -} -.partners__title { - color: var(--accent); - margin-bottom: 60px; -} -.partners__list { - -webkit-transition-timing-function: linear !important; - transition-timing-function: linear !important; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; -} -.partners__item { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - width: auto !important; -} -.partners__item img { - max-height: 90px; - max-width: 200px; - width: 100%; - -webkit-filter: grayscale(100%); - filter: grayscale(100%); - -o-object-fit: contain; - object-fit: contain; -} - -.marquee { - -webkit-animation: scroll 30s linear infinite; - animation: scroll 30s linear infinite; -} - -@-webkit-keyframes scroll { - from { - -webkit-transform: translateX(0); - transform: translateX(0); - } - to { - -webkit-transform: translateX(calc(-100% - 86px)); - transform: translateX(calc(-100% - 86px)); - } -} - -@keyframes scroll { - from { - -webkit-transform: translateX(0); - transform: translateX(0); - } - to { - -webkit-transform: translateX(calc(-100% - 86px)); - transform: translateX(calc(-100% - 86px)); - } -} -@media (max-width: 1280px) { - .partners { - padding: 55px 0 0; - } -} -@media (max-width: 768px) { - @-webkit-keyframes scroll { - from { - -webkit-transform: translateX(0); - transform: translateX(0); - } - to { - -webkit-transform: translateX(calc(-100% - 60px)); - transform: translateX(calc(-100% - 60px)); - } - } - @keyframes scroll { - from { - -webkit-transform: translateX(0); - transform: translateX(0); - } - to { - -webkit-transform: translateX(calc(-100% - 60px)); - transform: translateX(calc(-100% - 60px)); - } - } - .partners__title { - margin-bottom: 40px; - } - .partners__item img { - max-height: 60px; - max-width: 140px; - } -} -@media (max-width: 700px) { - .partners { - padding: 50px 0 0; - } - .partners__title { - margin-bottom: 30px; - } -} -.header-history { - position: fixed; - left: 0; - right: 0; - top: 0; - z-index: 20; - background-color: var(--blue-middle); -} -.header-history__burger, .header-history__mobile-logo { - display: none; -} - -.nav-history__container { - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - height: 74px; -} -.nav-history__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-column-gap: 15px; - -moz-column-gap: 15px; - column-gap: 15px; -} -.nav-history__next.active { - color: var(--accent); -} -.nav-history__next.active svg path { - stroke: var(--accent); -} -.nav-history__item--back { - display: none; -} -.nav-history__link { - font-variation-settings: "wght" 700, "wdth" 25, "slnt" -10; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - gap: 6px; - font-size: 16px; - font-weight: 200; - line-height: 30px; - text-transform: uppercase; - border-bottom: 1px solid transparent; - -webkit-transition: all var(--transition); - transition: all var(--transition); - font-stretch: 25%; - line-height: 47px; - letter-spacing: 0; -} -.nav-history__link-icon { - margin-bottom: 2px; -} -.nav-history__link-icon path { - -webkit-transition: all var(--transition); - transition: all var(--transition); -} -.nav-history__link:hover { - color: var(--accent); -} -.nav-history__link:hover svg path { - stroke: var(--accent); -} -.nav-history__back { - margin-right: auto; -} - -@media (max-width: 1280px) { - .nav-history__link { - font-size: 13px; - } -} -@media (max-width: 1024px) { - .nav-history__list { - -webkit-column-gap: 10px; - -moz-column-gap: 10px; - column-gap: 10px; - } -} -@media (max-width: 900px) { - .header-history__inner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - } - .header-history__burger { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - } - .header-history.active { - background-image: none; - } - .header-history__mobile-logo { - display: block; - cursor: auto; - max-width: 190px; - } - .header-history__burger { - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - margin-left: auto; - cursor: pointer; - height: 36px; - padding: 4px 0; - width: 36px; - z-index: 2; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - } - .header-history__mobile-logo { - margin-left: calc(var(--container-offset) * -1); - } - .header-history__item--back { - display: block; - } - .nav-history { - position: fixed; - top: 60px; - left: -100vw; - right: 100vw; - min-height: calc(100vh - 60px); - bottom: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-transition: all var(--transition); - transition: all var(--transition); - background-color: var(--blue-middle); - overflow-y: auto; - text-align: center; - } - .nav-history__container { - height: 60px; - } - .nav-history__logo { - display: none; - } - .nav-history__item--back { - display: block; - } - .nav-history__list { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - padding: 80px 20px 60px; - gap: 20px 0; - } - .nav-history__link { - font-size: 21px; - } - .nav-history__next { - font-size: 13px; - } - .nav-history.active { - left: 0; - right: 0; - } -} -@media (max-width: 400px) { - .nav-history__next { - font-size: 10px; - } -} -@media (max-width: 360px) { - .nav-history__list { - padding: 40px 20px 40px; - gap: 10px 0; - } - .nav-history__link { - padding: 10px 0; - } -} -.history-top { - position: relative; - overflow: hidden; - margin-top: 74px; - background-color: var(--blue-middle); -} -.history-top__img { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; -} -.history-top__img img { - position: absolute; - right: 0; - height: 100%; - width: 50%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: top right; - object-position: top right; -} -.history-top__inner { - padding: 234px 0 200px 0; - position: relative; - z-index: 1; -} -.history-top__inner::before { - content: ""; - position: absolute; - right: 50%; - bottom: 0; - width: 100vw; - height: 100%; - z-index: -1; - -webkit-transform: skewX(17deg); - -ms-transform: skewX(17deg); - transform: skewX(17deg); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - background-image: -webkit-gradient(linear, left top, right top, color-stop(38.01%, #00406C), color-stop(117.87%, rgba(0, 64, 108, 0.53))); - background-image: linear-gradient(90deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%); - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); -} -.history-top__title { - margin-bottom: 40px; - font-size: 68px; -} -.history-top__name { - font-variation-settings: "wdth" 100, "wght" 700; - margin-bottom: 14px; - font-size: 20px; - font-style: normal; - line-height: 1.35; - font-stretch: normal; -} -.history-top__text { - max-width: 540px; - line-height: 1.2; -} - -@media (max-width: 1440px) { - .history-top__inner::before { - right: 44%; - } -} -@media (max-width: 1280px) { - .history-top__inner { - padding: 140px 0 248px 0; - } - .history-top__inner::before { - right: 46%; - } - .history-top__title { - margin-bottom: 70px; - font-size: 48px; - } - .history-top__name { - font-size: 14px; - margin-bottom: 20px; - } - .history-top__text { - font-size: 14px; - } -} -@media (max-width: 1024px) { - .history-top__inner { - padding: 140px 0 115px 0; - } - .history-top__inner::before { - right: 43%; - } - .history-top__img img { - -o-object-position: top center; - object-position: top center; - } -} -@media (max-width: 900px) { - .history-top { - margin-top: 60px; - } - .history-top__inner { - width: 100%; - position: absolute; - padding: 0 0 40px 0; - bottom: 0; - } - .history-top__inner::before { - -webkit-transform: skewX(0); - -ms-transform: skewX(0); - transform: skewX(0); - -webkit-transform: skewY(18deg); - -ms-transform: skewY(18deg); - transform: skewY(18deg); - left: calc(var(--container-offset) * -1); - right: calc(var(--container-offset) * -1); - top: -40px; - height: 200%; - background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%); - } - .history-top__img { - position: static; - } - .history-top__img img { - position: static; - width: 100%; - } - .history-top__title { - margin-bottom: 40px; - } - .history-top__name { - margin-bottom: 8px; - } -} -@media (max-width: 700px) { - .history-top { - padding-bottom: 100px; - } - .history-top__title { - font-size: 30px; - } -} -@media (max-width: 400px) { - .history-top { - padding-bottom: 120px; - } - .history-top__inner::before { - top: -60px; - } - .history-top__title { - margin-bottom: 40px; - font-size: 25px; - } -} -.history-question { - position: relative; - background-color: var(--blue-middle); -} -.history-question__img { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; -} -.history-question__img img { - position: absolute; - left: 0; - height: 100%; - width: 50%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: top left; - object-position: top left; -} -.history-question__inner { - min-height: 834px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding: 70px 0 70px 0; - max-width: 50%; - margin-left: auto; - position: relative; - z-index: 1; -} -.history-question__inner::before { - content: ""; - position: absolute; - left: -37%; - bottom: 0; - width: 100vw; - height: 100%; - z-index: -1; - -webkit-transform: skewX(17deg); - -ms-transform: skewX(17deg); - transform: skewX(17deg); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - background-color: var(--blue-middle); -} -.history-question__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 46px; -} -.history-question__title { - font-size: 40px; - line-height: 1.1; - letter-spacing: 2.3px; - margin-bottom: 18px; -} -.history-question__text { - font-size: 24px; - font-weight: 200; - line-height: 1.1; -} - -@media (max-width: 1440px) { - .history-question__inner::before { - left: -42%; - } -} -@media (max-width: 1280px) { - .history-question__inner { - max-width: 560px; - min-height: auto; - padding: 50px 0 50px 0; - } - .history-question__inner::before { - left: -30%; - } - .history-question__title { - font-size: 30px; - letter-spacing: 1.2px; - } - .history-question__list { - gap: 30px; - } - .history-question__text { - font-size: 17px; - } -} -@media (max-width: 1024px) { - .history-question__inner { - max-width: 450px; - } - .history-question__inner::before { - left: -40%; - } -} -@media (max-width: 900px) { - .history-question__inner { - max-width: 100%; - padding: 66px 0 100px 0; - } - .history-question__img { - position: static; - margin-bottom: 65px; - } - .history-question__img img { - position: static; - width: 100%; - } - .history-question__list { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - } -} -@media (max-width: 700px) { - .history-question__list { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - } -} -@media (max-width: 400px) { - .history-question__text { - font-size: 14px; - } - .history-question__list { - gap: 50px; - } -} -.history-quite__inner { - padding: 53px 0 51px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - gap: 30px; -} -.history-quite__inner--start { - -webkit-box-align: start; - -ms-flex-align: start; - align-items: start; -} -.history-quite__title { - color: var(--accent); - font-size: 40px; - max-width: 650px; - margin-bottom: 0; - line-height: 1.1; -} -.history-quite__text { - max-width: 620px; - color: var(--default); - font-size: 24px; - line-height: 1.2; -} - -@media (max-width: 1280px) { - .history-quite__title { - font-size: 30px; - } - .history-quite__text { - max-width: 522px; - font-size: 17px; - } -} -@media (max-width: 1024px) { - .history-quite__inner { - padding: 59px 0 53px; - } - .history-quite__title { - display: inline; - } - .history-quite__text { - max-width: 470px; - } -} -@media (max-width: 900px) { - .history-quite__title { - width: 50%; - } - .history-quite__text { - max-width: 100%; - width: 50%; - } -} -@media (max-width: 700px) { - .history-quite__inner { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - } - .history-quite__title { - width: 100%; - } - .history-quite__text { - width: 100%; - } -} -@media (max-width: 400px) { - .history-quite__inner { - padding: 50px 0 50px; - gap: 25px; - } - .history-quite__text { - font-size: 14px; - } -} -.history-question-right { - position: relative; - background-color: var(--blue-middle); -} -.history-question-right__img { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; -} -.history-question-right__img img { - position: absolute; - right: 0; - height: 100%; - width: 56%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: bottom right; - object-position: bottom right; -} -.history-question-right__inner { - min-height: 934px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding: 70px 0 70px 0; - max-width: 554px; - position: relative; - z-index: 1; -} -.history-question-right__inner::before { - content: ""; - position: absolute; - right: -13%; - bottom: 0; - width: 100vw; - height: 100%; - z-index: -1; - -webkit-transform: skewX(17deg); - -ms-transform: skewX(17deg); - transform: skewX(17deg); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - background-color: var(--blue-middle); -} -.history-question-right__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 46px; -} -.history-question-right__title { - font-size: 40px; - line-height: 1.1; - letter-spacing: 2.3px; - margin-bottom: 18px; -} -.history-question-right__title span { - display: block; - margin-bottom: 0; -} -.history-question-right__text { - font-size: 24px; - font-weight: 200; - line-height: 1.1; -} - -@media (max-width: 1440px) { - .history-question-right__inner::before { - right: 0; - } -} -@media (max-width: 1280px) { - .history-question-right__inner { - padding: 50px 0 50px 0; - min-height: 660px; - max-width: 520px; - } - .history-question-right__list { - gap: 32px; - } - .history-question-right__title { - margin-bottom: 14px; - font-size: 32px; - } - .history-question-right__title span { - font-size: 32px; - } - .history-question-right__text { - font-size: 17px; - line-height: 1.1; - } -} -@media (max-width: 1024px) { - .history-question-right__inner { - min-height: 564px; - max-width: 400px; - } - .history-question-right__inner::before { - right: 2%; - } - .history-question-right__title { - line-height: 1.1; - } -} -@media (max-width: 900px) { - .history-question-right__inner { - min-height: auto; - max-width: 100%; - } - .history-question-right__img { - position: static; - } - .history-question-right__img img { - position: static; - width: 100%; - } - .history-question-right__list { - display: -ms-grid; - display: grid; - -ms-grid-columns: 1fr 1fr; - grid-template-columns: 1fr 1fr; - gap: 54px; - } -} -@media (max-width: 700px) { - .history-question-right__list { - -ms-grid-columns: 1fr; - grid-template-columns: 1fr; - } - .history-question-right__title { - width: 100%; - } - .history-question-right__text { - width: 100%; - } -} -@media (max-width: 400px) { - .history-question-right__title { - font-size: 30px; - } - .history-question-right__title span { - font-size: 30px; - } - .history-question-right__list { - gap: 20px; - } - .history-question-right__text { - font-size: 14px; - } -} -.history-slogan__inner { - padding: 40px 0 50px; -} -.history-slogan__title { - color: var(--accent); - font-size: 40px; - line-height: 1.1; - letter-spacing: 1.6px; - margin-bottom: 0; -} -.history-slogan__text { - color: var(--default); - font-size: 24px; - line-height: 1.14; -} - -@media (max-width: 1280px) { - .history-slogan__title { - font-size: 30px; - letter-spacing: 1.2px; - letter-spacing: 1.2px; - } -} -@media (max-width: 900px) { - .history-slogan__inner { - padding: 40px 0 40px; - } - .history-slogan__title { - display: inline; - } -} -.history-blitz { - position: relative; - overflow: hidden; - background-color: var(--blue-middle); -} -.history-blitz__img { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; -} -.history-blitz__img img { - position: absolute; - left: 0; - height: 100%; - width: 42%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: top left; - object-position: top left; -} -.history-blitz__inner { - min-height: 834px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - padding: 70px 0 70px 0; - max-width: 850px; - margin-left: auto; - position: relative; - z-index: 1; -} -.history-blitz__inner::before { - content: ""; - position: absolute; - left: -10%; - bottom: -1px; - width: 100vw; - height: 100%; - z-index: -1; - -webkit-transform: skewX(-17deg); - -ms-transform: skewX(-17deg); - transform: skewX(-17deg); - -webkit-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - background-image: linear-gradient(76deg, rgba(0, 64, 108, 0.53), #00406C 25.01% 117.87%); - -webkit-backdrop-filter: blur(5px); - backdrop-filter: blur(5px); -} -.history-blitz__list { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - gap: 36px; -} -.history-blitz__item { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.history-blitz__item-title { - font-variation-settings: "wght" 700, "opsz" 16, "wdth" 25, "slnt" -10; - margin-bottom: 0; - font-size: 22px; - text-align: left; - letter-spacing: 0.9px; - line-height: 1.2; -} -.history-blitz__title { - font-size: 45px; - line-height: 1; - letter-spacing: 1.8px; - margin-bottom: 56px; - text-align: center; - letter-spacing: 0.9px; -} -.history-blitz__text { - max-width: 450px; - margin-left: auto; - font-size: 24px; - line-height: 1.2; -} - -@media (max-width: 1440px) { - .history-blitz__inner::before { - left: -4%; - } -} -@media (max-width: 1280px) { - .history-blitz__title { - font-variation-settings: "wght" 700, "opsz" 25, "wdth" 25, "slnt" -10; - font-size: 30px; - letter-spacing: 1.2px; - margin-bottom: 66px; - } - .history-blitz__inner { - max-width: 705px; - min-height: auto; - } - .history-blitz__list { - gap: 34px; - } - .history-blitz__item-title { - font-size: 18px; - letter-spacing: 0.9px; - } - .history-blitz__text { - max-width: 340px; - font-size: 17px; - } -} -@media (max-width: 1024px) { - .history-blitz__img img { - width: 50%; - } - .history-blitz__inner { - max-width: 524px; - } - .history-blitz__inner::before { - left: 5%; - } - .history-blitz__item-title { - max-width: 230px; - } - .history-blitz__text { - max-width: 264px; - } -} -@media (max-width: 900px) { - .history-blitz__inner { - min-height: auto; - max-width: 100%; - padding-top: 80px; - margin-top: -134px; - } - .history-blitz__inner::before { - -webkit-transform: skewY(18deg); - -ms-transform: skewY(18deg); - transform: skewY(18deg); - left: calc(var(--container-offset) * -1); - right: calc(var(--container-offset) * -1); - top: -30px; - background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%); - } - .history-blitz__title { - margin-bottom: 52px; - } - .history-blitz__img { - position: static; - } - .history-blitz__img img { - position: static; - width: 100%; - } - .history-blitz__item { - display: -ms-grid; - display: grid; - -ms-grid-columns: 264px 1fr; - grid-template-columns: 264px 1fr; - gap: 36px; - } - .history-blitz__item-title { - max-width: 100%; - } - .history-blitz__text { - max-width: 100%; - } -} -@media (max-width: 700px) { - .history-blitz__title { - text-align: left; - } - .history-blitz__item { - -ms-grid-columns: 1fr; - grid-template-columns: 1fr; - } -} -@media (max-width: 400px) { - .history-blitz__inner { - padding: 70px 0 50px 0; - margin-top: -65px; - } - .history-blitz__title { - text-align: left; - margin-bottom: 44px; - } - .history-blitz__text { - font-size: 14px; - } -} -/*# sourceMappingURL=main.css.map */ \ No newline at end of file +:root{--font-family:"Roboto Flex",sans-serif;--content-width:1420px;--container-fluid:1920px;--container-offset:15px;--container-width:calc(var(--content-width) + (var(--container-offset) * 2));--max-offset:calc(max(calc((100vw - var(--content-width)) / 2), var(--container-offset)) * -1);--transition:0.3s;--scale-hover:scale(1.08);--default:#5a5a5a;--light:#fff;--accent:#cd1338;--blue-light:#1c60f6;--blue-middle:#00406c;--blue-dark:#1c2e44;--gray:#aaa;--big-desktop:1600px;--desktop:1440px;--small-desktop:1280px;--tablet:1024px;--small-tablet:768px;--mobile:576px;--index:calc(1vh + 1vw)}@font-face{font-family:"Roboto Flex";font-style:normal;font-display:swap;src:local("Roboto Flex"),url(../fonts/Roboto-Flex.woff2) format("woff2");font-weight:100 1000;font-stretch:25% 151%}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}h1,h2,h3,h4,h5,h6{margin:0}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background-color:var(--light)}::-webkit-scrollbar-thumb{background-color:var(--blue-middle)}*{scrollbar-width:thin;scrollbar-color:var(--blue-middle) #fff}.page{font-size:20px;font-weight:200;line-height:1.2;color:var(--light);height:100%;font-family:var(--font-family);font-variation-settings:"wdth" 140,"wght" 200}.page__body{margin:0;min-width:320px;min-height:100%}img{height:auto;max-width:100%;-o-object-fit:cover;object-fit:cover;display:block}a{text-decoration:none;display:inline-block}.site-container{overflow:hidden}.is-hidden{display:none!important}.btn-reset{border:none;padding:0;background-color:transparent;cursor:pointer}.list-reset{list-style:none;margin:0;padding:0}.input-reset{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:0;background-color:#fff}.input-reset::-webkit-search-cancel-button,.input-reset::-webkit-search-decoration,.input-reset::-webkit-search-results-button,.input-reset::-webkit-search-results-decoration{display:none}.container{margin:0 auto;padding:0 var(--container-offset);max-width:var(--container-width)}.container-fluid{margin:0 auto;max-width:var(--container-fluid)}.js-focus-visible :focus:not(.focus-visible){outline:0}.centered{text-align:center}.dis-scroll{position:fixed;left:0;top:0;overflow:hidden;width:100%;height:100vh;-ms-scroll-chaining:none;overscroll-behavior:none}.page--ios .dis-scroll{position:relative}.btn{cursor:pointer;text-align:center;font-size:20px;font-weight:200;font-stretch:140%;line-height:40px;letter-spacing:.1px;background-color:var(--light);border-radius:50px;border:none;min-width:220px;text-transform:capitalize;-webkit-transition:var(--transition);transition:var(--transition);color:var(--blue-dark)}.btn:hover{background-color:var(--blue-dark);color:var(--light)}.btn--accent{color:var(--accent)}.btn-up-wrapper{position:relative;display:none;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.btn-up{position:fixed;z-index:20;right:110px;bottom:165px;width:56px;height:56px;padding:0;cursor:pointer;min-width:auto;border-radius:50%;border:none;background-color:var(--accent);border-color:var(--accent);-webkit-transition:all var(--transition);transition:all var(--transition)}.btn-up::before{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);content:"";background-image:url(../img/svg/up.svg);background-repeat:no-repeat;width:28px;height:28px;background-position:center;background-size:contain;z-index:1}.btn-up-wrapper.active{display:-webkit-box;display:-ms-flexbox;display:flex}.section-title{font-variation-settings:"wght" 700,"opsz" 37,"wdth" 25,"slnt" -10;font-size:45px;line-height:47px;letter-spacing:1.8px;text-transform:uppercase;margin-bottom:24px;color:var(--light)}.large-title{font-variation-settings:"wght" 700,"opsz" 37,"wdth" 25,"slnt" -10;font-size:65px;line-height:1.1;letter-spacing:3.4px;text-transform:uppercase;color:var(--light)}.section-title--reset{display:inline-block;margin-bottom:0}.burger-js .line{display:block;height:4px;width:100%;border-radius:10px;background-color:var(--light);-webkit-transition:all var(--transition);transition:all var(--transition)}.burger-js.active .line1{-webkit-transform:rotate(45deg) translate(4px,-4px);-ms-transform:rotate(45deg) translate(4px,-4px);transform:rotate(45deg) translate(4px,-4px);-webkit-transform-origin:left;-ms-transform-origin:left;transform-origin:left}.burger-js.active .line2{opacity:0}.burger-js.active .line3{-webkit-transform:rotate(-45deg) translate(3px,6px);-ms-transform:rotate(-45deg) translate(3px,6px);transform:rotate(-45deg) translate(3px,6px);-webkit-transform-origin:left;-ms-transform-origin:left;transform-origin:left}@media (max-width:1600px){.btn-up{right:auto}}@media (max-width:1280px){:root{--content-width:1160px}.btn{font-size:14px;line-height:32px;min-width:170px}.section-title{font-size:32px;border-radius:30px;line-height:30px}.large-title{font-size:46px;letter-spacing:2.4px}.page{font-size:14px}}@media (max-width:800px){:root{--content-width:100%}.btn-up{bottom:50px;width:50px;height:50px}}@media (max-width:700px){.large-title,.section-title{font-size:30px;letter-spacing:1.2px}}@media (max-width:360px){.section-title{font-size:26px}}.carousel__track{display:none!important}.header{position:fixed;left:0;right:0;top:0;z-index:20}.header.active{background-image:-webkit-gradient(linear,left top,right top,color-stop(38.01%,var(--blue-dark)),color-stop(117.87%,rgba(0,64,108,.53)));background-image:linear-gradient(90deg,var(--blue-dark) 38.01%,rgba(0,64,108,.53) 117.87%);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.header__burger,.header__mobile-logo{display:none}.nav__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-column-gap:66px;-moz-column-gap:66px;column-gap:66px;padding:20px 0}.nav__link{font-size:20px;font-weight:200;line-height:30px;text-transform:uppercase;border-bottom:1px solid transparent;-webkit-transition:all var(--transition);transition:all var(--transition)}.nav__link:hover{color:var(--accent)}@media (max-width:1280px){.nav__list{padding:14px 0;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.nav__link{font-size:14px}}@media (max-width:992px){.header{height:60px;background-color:var(--light)}.header__container{max-width:100%}.header__inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header.active{background-image:none}.header__mobile-logo{display:block;cursor:auto;max-width:190px;margin-left:calc(var(--container-offset) * -1)}.header__burger{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer;height:36px;padding:4px 0;width:36px;z-index:2;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header__burger .line{display:block;height:4px;width:100%;border-radius:10px;background-color:var(--blue-middle);-webkit-transition:all var(--transition);transition:all var(--transition)}.header__burger.active .line1{-webkit-transform:rotate(45deg) translate(4px,-4px);-ms-transform:rotate(45deg) translate(4px,-4px);transform:rotate(45deg) translate(4px,-4px);-webkit-transform-origin:left;-ms-transform-origin:left;transform-origin:left}.header__burger.active .line2{opacity:0}.header__burger.active .line3{-webkit-transform:rotate(-45deg) translate(3px,6px);-ms-transform:rotate(-45deg) translate(3px,6px);transform:rotate(-45deg) translate(3px,6px);-webkit-transform-origin:left;-ms-transform-origin:left;transform-origin:left}.nav{position:fixed;background-color:var(--light);top:60px;left:-100vw;right:100vw;min-height:calc(100vh - 60px);bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:all var(--transition);transition:all var(--transition);overflow-y:scroll;text-align:center}.nav__list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:80px 20px 60px;gap:20px 0}.nav__link{color:var(--blue-middle);font-size:21px;line-height:1.5;text-transform:uppercase;padding:20px;-webkit-transition:all var(--transition);transition:all var(--transition)}.nav__link:hover{color:var(--accent)}.nav.active{left:0;right:0}}@media (max-width:360px){.nav__list{padding:40px 20px;gap:10px 0}.nav__link{padding:10px 0}}.footer{background-color:var(--blue-middle)}.footer__inner{padding:30px 0 12px}.footer__list{display:-webkit-box;display:-ms-flexbox;display:flex;gap:0 100px;font-size:16px;font-weight:200;line-height:1.9;letter-spacing:.32px}.footer__item:first-child span:nth-child(2){display:block;font-size:10px;line-height:1.2}.footer__item:last-child{margin-left:auto;height:30px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.footer__link{-webkit-transition:all var(--transition);transition:all var(--transition)}.footer__link:hover{color:var(--accent)}.footer__source{display:inline-block;padding-top:36px;color:rgba(255,255,255,.5);font-family:Roboto Flex;font-size:12px;font-style:normal;font-weight:300;line-height:16px}.social-list{display:-webkit-box;display:-ms-flexbox;display:flex;gap:0 5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.social-list__link{height:30px;width:30px;border-radius:50%}.social-list__link svg path{-webkit-transition:all var(--transition);transition:all var(--transition)}.social-list__item:nth-child(4) .social-list__link svg g:nth-child(2):hover path:nth-child(2),.social-list__link:hover svg path{fill:red}@media (max-width:1280px){.footer__list{gap:0 40px}.footer__source{font-size:10px}}@media (max-width:1024px){:root{--content-width:900px}.footer__list{font-size:14px}.social-list{padding-left:0}}@media (max-width:900px){.footer__list{gap:0 15px}}@media (max-width:800px){.footer__inner{padding:40px 0 50px}.footer__list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:20px 0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center}.footer__item:first-child{margin-right:0;max-width:100%;text-align:center}.footer__item:last-child{margin-top:20px;margin-left:initial}.contacts-list,.footer__source{text-align:center}}.top{background-color:#183052;overflow:hidden;position:relative}.top__background{position:absolute;top:0;left:0;bottom:0;right:0}.top__background img{position:absolute;right:0;bottom:0;-o-object-fit:contain;object-fit:contain;height:100%;width:100%;-o-object-position:right bottom;object-position:right bottom}.top__inner{position:relative;max-width:700px;z-index:1}.top__container{padding-top:70px;min-height:100vh;min-height:100svh;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.top__logo{margin:63px 0 13%;position:relative;z-index:1;-ms-flex-item-align:start;align-self:flex-start;padding:7px 60px 0 0;height:142px;font-size:130px;cursor:auto;pointer-events:none}.top__logo::before{content:"";position:absolute;top:0;width:calc(100vw - var(--content-width)/ 2);height:100%;right:20px;background-color:var(--accent);z-index:-1;-webkit-transform:skewX(351deg);-ms-transform:skewX(351deg);transform:skewX(351deg)}.top__logo-title{line-height:1;letter-spacing:3px;margin:0;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:inherit;font-variation-settings:"ital" 1,"opsz" 30,"wdth" 36,"wght" 800,"slnt" -10}.top__title{font-variation-settings:"opsz" 51,"wdth" 25,"slnt" -10;font-size:85px;line-height:.95;letter-spacing:5.95px;margin-bottom:22px;text-transform:uppercase;color:var(--light)}.top__subtitle{font-size:36px;font-style:normal;display:inline-block;font-weight:300;line-height:1.2;letter-spacing:.18px}@media (min-width:1920px){.top__container{min-height:1080px}}@media (max-width:1920px) and (orientation:portrait){.top{max-height:1920px}.top__logo{position:relative;margin:63px 0 10%}}@media (max-width:1440px) and (orientation:landscape){.top__logo{margin:63px 0 15%}}@media (max-width:1280px) and (orientation:landscape){.top__container{padding-top:60px}.top__logo{margin:28px 0 11%;padding:5px 40px 0 0;height:104px;font-size:90px}.top__title{font-variation-settings:"opsz" 33,"wdth" 25,"slnt" -10;font-size:54px;letter-spacing:3.8px}.top__subtitle{font-size:25px}}@media (max-width:1280px) and (orientation:portrait){.top__container{padding-top:60px}}@media (max-width:1024px) and (orientation:portrait){.top{background-size:90%}.top__logo{padding:5px 40px 0 0;height:104px;font-size:90px}}@media (max-width:992px) and (orientation:landscape){.top__title{padding-top:80px}.top__logo{display:none}}@media (max-width:992px) and (orientation:portrait){.top__logo{display:none}.top__title{padding-top:50px;font-variation-settings:"opsz" 33,"wdth" 25,"slnt" -10;font-size:54px;letter-spacing:3.8px}.top__subtitle{font-size:25px}}@media (max-width:768px) and (orientation:landscape){.top__title{font-variation-settings:"opsz" 25,"wdth" 25,"slnt" -10;font-size:43px;letter-spacing:3.1px}}@media (max-width:768px) and (orientation:portrait){.top{background-size:contain}.top__logo{display:none}}@media (max-width:700px) and (orientation:landscape){.top__container{padding-top:60px}.top__title{font-variation-settings:"opsz" 17,"wdth" 25,"slnt" -10;padding-top:40px;font-size:30px;margin-bottom:15px;letter-spacing:1.2px}}@media (max-width:700px) and (orientation:portrait){.top__container{padding-top:60px}.top__title{font-variation-settings:"opsz" 25,"wdth" 25,"slnt" -10;font-size:44px;margin-bottom:18px;letter-spacing:3.1px}}@media (max-width:500px) and (orientation:portrait){.top__container{width:100%}.top__title{font-variation-settings:"opsz" 17,"wdth" 25,"slnt" -10;font-size:30px;letter-spacing:1.2px}}@media (max-width:500px) and (orientation:landscape){.top__container{width:100%;min-height:320px}.top__subtitle{font-size:20px}}@media (max-width:400px) and (orientation:portrait){.top{background-size:cover;background-position:center bottom}.top__background img{width:100%;height:auto}.top__subtitle{font-size:25px}}@media (max-width:360px) and (orientation:portrait){.top__container{min-height:500px;height:100vh;height:100svh}.top__title{padding-top:30px;font-size:24px;letter-spacing:1.68px;margin-bottom:10px}.top__subtitle{font-size:22px}}.video{background-image:url(img/video-preview.jpg);background-repeat:no-repeat;background-position:center;background-size:cover;position:relative}.video__gradient{position:absolute;left:0;top:0;bottom:0;right:0;background:linear-gradient(75deg,#000 -10.46%,#000 -4.93%,rgba(0,0,0,0) 65.31%);z-index:2}.video__gradient::before{content:"";position:absolute;left:0;top:0;bottom:0;right:0;background:rgba(0,0,0,.3)}.video__gradient.hide{z-index:0}.video__intro{background-color:#000}.video__mask{position:absolute;left:0;top:0;right:0;bottom:30px;z-index:0}.video__mask.visible{z-index:10}.video__player{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;z-index:1}.video__player.play{cursor:pointer;-o-object-fit:cover;object-fit:cover}.video__player .vjs-tech{-o-object-fit:cover;object-fit:cover}.video__player .vjs-paused .vjs-big-play-button{display:none}.video__inner{min-height:100vh;position:relative;-webkit-transition:all var(--transition);transition:all var(--transition);padding:120px 0 198px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end}.video__inner.active{min-height:100px;padding:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:2}.video__title{max-width:660px;z-index:3;margin-bottom:30px}.video__title.hide{display:none}.video__text{max-width:510px;z-index:3;margin-bottom:24px}.video__text.hide{display:none}.video__link{font-weight:700;z-index:3;-webkit-transition:color var(--transition);transition:color var(--transition);-ms-flex-item-align:start;align-self:flex-start}.video__link:hover{color:var(--accent)}.video__link.hide{display:none}.video__btn{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transition:all var(--transition);transition:all var(--transition);z-index:4}.video__btn svg path{-webkit-transition:all var(--transition);transition:all var(--transition)}.video__btn.hide{display:none}.video__btn.center-position{position:absolute;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.video__btn:hover svg path:nth-child(1){fill:var(--blue-dark)}.video__btn:hover svg path:nth-child(2){fill:var(--light)}@media (min-width:1920px) or (min-height:1080px){.video__inner{min-height:1080px}}@media (max-width:1280px){.video__inner{padding:80px 0}.video__title{margin-bottom:27px}.video__btn svg{width:133.401px;height:109.86px}.video__text{padding-top:0;font-size:14px;line-height:24px;margin-bottom:20px}}@media (max-width:600px){.video__inner{padding:40px 0}.video__title{max-width:440px;margin-bottom:20px}.video__btn{position:static;-webkit-transform:none;-ms-transform:none;transform:none;margin:0 auto 150px}.video__btn svg{width:100px;height:82px}}@media (max-width:400px){.video__title{max-width:316px}}@media (max-width:360px){.video__text{font-size:13px;line-height:22px;font-stretch:120%}.video__btn{margin:0 auto 50px}}.video-js.active{position:relative!important;z-index:2;width:100%!important;height:auto!important}.vjs-poster.active{position:absolute!important;left:0;right:0;top:0;bottom:0;display:none}.choice{padding-top:78px;margin-bottom:90px;background-color:var(--light)}.choice__title{max-width:820px;text-transform:uppercase;margin-bottom:20px}.choice__title span{color:var(--blue-middle)}.choice__title--mobile{display:none}.choice__subtitle{color:var(--blue-middle);margin-bottom:74px;max-width:580px}.choice__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;color:var(--default);gap:12px 0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.choice__item{position:relative;min-height:134px;padding:11px 0 11px 110px;background-color:#f5f5f5;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0 110px;font-weight:300;z-index:1;width:100%;-webkit-transition:all var(--transition);transition:all var(--transition);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.choice__item::after{content:"";position:absolute;bottom:0;right:var(--max-offset);width:max((100vw - var(--content-width)) / 2,var(--container-offset));height:100%;background-color:#f5f5f5;z-index:-1}.choice__item:hover{-webkit-transform:var(--scale-hover);-ms-transform:var(--scale-hover);transform:var(--scale-hover)}.choice__item-text--mobile{display:none}.choice__item-bold{font-weight:700}.choice__item-star{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:8px}.choice__item-star::before{content:""}.choice__item-source{padding-top:10px;font-size:14px;font-weight:300;line-height:16px}.choice__item-decor{width:100px;position:absolute;left:0;top:0;height:100%}.choice__item-decor::before{content:"";position:absolute;left:-40px;top:-1px;bottom:0;width:80px;background-color:var(--light);-webkit-transform:skewX(-31deg);-ms-transform:skewX(-31deg);transform:skewX(-31deg)}.choice__item:nth-child(1){max-width:1156px}.choice__item:nth-child(2){max-width:1244px}.choice__item:nth-child(3){max-width:1332px}.choice__item:nth-child(4){max-width:1420px}@media (max-width:1440px){:root{--content-width:1260px}.choice__item{gap:0 95px}.choice__item:nth-child(1){max-width:855px}.choice__item:nth-child(2){max-width:940px}.choice__item:nth-child(3){max-width:1030px}.choice__item:nth-child(4){max-width:1115px}}@media (max-width:1280px){.choice{padding-top:55px;margin-bottom:60px}.choice__list{gap:10px 0}.choice__subtitle{max-width:395px;margin-bottom:40px}.choice__item{min-height:96px;padding:11px 0 11px 78px;line-height:18px;gap:0 70px}.choice__item-source{padding-top:0;font-size:10px}.choice__item:nth-child(1){max-width:778px}.choice__item:nth-child(1) img{width:84px}.choice__item:nth-child(2){max-width:842px}.choice__item:nth-child(2) img{width:80px}.choice__item:nth-child(3){max-width:906px}.choice__item:nth-child(3) img{width:80px}.choice__item:nth-child(4){max-width:970px}.choice__item:nth-child(4) img{width:70px}}@media (max-width:1024px){.choice__item:nth-child(1){max-width:710px}.choice__item:nth-child(1) img{width:84px}.choice__item:nth-child(2){max-width:775px}.choice__item:nth-child(2) img{width:80px}.choice__item:nth-child(3){max-width:838px}.choice__item:nth-child(3) img{width:80px}.choice__item:nth-child(4){max-width:900px}.choice__item:nth-child(4) img{width:70px}}@media (max-width:940px){.choice__item{padding:11px 0 11px 70px;gap:0 40px}.choice__item:nth-child(1){max-width:586px}.choice__item:nth-child(1) img{width:84px}.choice__item:nth-child(2){max-width:648px}.choice__item:nth-child(2) img{width:80px}.choice__item:nth-child(3){max-width:708px}.choice__item:nth-child(3) img{width:80px}.choice__item:nth-child(4){max-width:768px}.choice__item:nth-child(4) img{width:70px}}@media (max-width:800px){.choice__item{padding:9px 0 8px 55px;gap:0 30px}.choice__item-decor::before{-webkit-transform:skewX(-20deg);-ms-transform:skewX(-20deg);transform:skewX(-20deg)}.choice__item:nth-child(1){max-width:554px}.choice__item:nth-child(1) img{width:54px}.choice__item:nth-child(2){max-width:592px}.choice__item:nth-child(2) img{width:50px}.choice__item:nth-child(3){max-width:630px}.choice__item:nth-child(3) img{width:50px}.choice__item:nth-child(4){max-width:668px}.choice__item:nth-child(4) img{width:50px}}@media (max-width:700px){.choice__item{width:100%;max-width:100%!important;padding:20px 0 8px 20px;gap:0 20px}.choice__item::before{display:none}.choice__item img{-ms-flex-item-align:start;align-self:flex-start}.choice__item-decor,.choice__item-source,.choice__item-text{display:none}.choice__item-text--mobile{display:block;max-width:600px}.choice__subtitle{color:var(--default)}}@media (max-width:600px){.choice{padding-top:50px}.choice__title{font-size:30px;letter-spacing:1.2px;line-height:32px;margin-bottom:20px}.choice__subtitle{margin-bottom:30px}}@media (max-width:500px){.choice{padding-top:50px}.choice__title{display:none}.choice__title--mobile{display:block}}@media (max-width:360px){.choice__title--mobile{font-size:26px}}.professional{position:relative;overflow:hidden;margin-top:85px;background-color:var(--blue-middle)}.professional__inner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.professional__content{width:50%;padding:85px 0 55px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;z-index:11;color:var(--light)}.professional__content::before{content:"";position:absolute;right:26%;bottom:0;width:66vw;height:100%;background-image:linear-gradient(108deg,#cd1338 39.39%,rgba(205,19,56,.46) 127.43%);z-index:-1;-webkit-transform:skewX(17deg);-ms-transform:skewX(17deg);transform:skewX(17deg);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top}.professional__title{margin-bottom:24px}.professional__subtitle{line-height:1;font-size:36px;font-weight:600;margin-top:-5px;margin-bottom:70px}.professional__text{font-size:24px;font-weight:200;line-height:1.17;max-width:560px;width:100%}.professional__text-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:30px;margin-bottom:44px}.professional__slider-container{position:absolute;top:0;bottom:0;width:100%;max-width:1440px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);overflow:hidden}.professional__slider{width:70%;position:absolute;top:160px;right:-6%}.professional__slider-wrapper{padding:40px 0}.professional__slider-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform var(--transition);transition:-webkit-transform var(--transition);transition:transform var(--transition);transition:transform var(--transition),-webkit-transform var(--transition)}.professional__slider-item img{margin:auto;height:220px;width:400px;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.3);-ms-transform:scale(1.3);transform:scale(1.3);z-index:11;-webkit-filter:grayscale(0);filter:grayscale(0)}.professional__slider-item.swiper-slide-active .professional__slider-link{-webkit-box-shadow:0 10px 20px 0 rgba(0,0,0,.45);box-shadow:0 10px 20px 0 rgba(0,0,0,.45)}.professional__slider-item.swiper-slide-active .professional__slider-link::before{background-color:rgba(0,0,0,.1)}.professional__slider-item.swiper-slide-active .professional__slider-icon{opacity:1}.professional__slider-item.swiper-slide-active img{width:350px;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-item--hide{-webkit-filter:grayscale(100%)!important;filter:grayscale(100%)!important;pointer-events:none}.professional__slider-link{position:relative;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-link::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.25);z-index:1}.professional__slider-icon{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:80px;height:66px;overflow:hidden;top:50%;left:50%;display:flex;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1;opacity:0;-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-icon svg path{-webkit-transition:all var(--transition);transition:all var(--transition)}.professional__slider-icon:hover svg path:nth-child(1){fill:var(--blue-dark)}.professional__slider-icon:hover svg path:nth-child(2){fill:var(--light)}.professional__slider-btn{-webkit-box-shadow:none;box-shadow:none;background-color:var(--light);border-radius:50%;border:none;width:56px;height:56px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;top:150px}.professional__slider-btn::after{content:""}.professional__slider-btn svg{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.professional__slider-btn.swiper-button-disabled{opacity:.5}.professional__slider-navigation-prev{left:19%}.professional__slider-navigation-next{right:19%}.professional__slider-info{margin:0 auto;display:block;max-width:420px;font-weight:600;color:#fff;text-align:center;font-size:20px;line-height:1.17}.professional__slider-pagination{width:auto!important;position:static!important;padding-top:16px;margin-bottom:32px}.professional__slider-pagination .swiper-pagination-bullet{width:56px;height:3px;padding:0;border-radius:0;margin:0 9px!important;background-color:var(--light);opacity:.5;bottom:0}.professional__slider-pagination .swiper-pagination-bullet-active{background-color:var(--light)!important;opacity:1}@media (max-width:1440px){.professional__content::before{right:20%}.professional__slider{width:66%;right:-108px}.professional__slider-item img{height:220px}.professional__slider-navigation-prev{left:16%}.professional__slider-navigation-next{right:16%}}@media (max-width:1280px){.professional{margin-top:60px}.professional__content{padding:60px 0 80px}.professional__content::before{right:23%}.professional__subtitle{font-size:25px;margin-bottom:50px}.professional__text{font-size:17px;max-width:520px}.professional__text-wrapper{margin-bottom:38px}.professional__slider{top:128px;right:-80px}.professional__slider-item img{height:194px;width:400px}.professional__slider-item.swiper-slide-active img{width:300px}.professional__slider-btn{top:130px}.professional__slider-pagination{padding-top:2px;margin-bottom:27px}.professional__slider-pagination .swiper-pagination-bullet{width:50px}.professional__slider-info{font-size:14px;max-width:290px}}@media (max-width:1140px){.professional__content::before{right:17%}.professional__slider-navigation-prev{left:14%}.professional__slider-navigation-next{right:14%}}@media (max-width:1024px){.professional{padding-bottom:70px}.professional__content{padding:60px 0 70px}.professional__content::before{right:13%}.professional__subtitle{margin-bottom:55px}.professional__text{max-width:420px}.professional__text-wrapper{margin-bottom:56px;gap:20px}.professional__slider-item.swiper-slide-active img{width:240px}.professional__slider-item img{height:150px;width:300px}.professional__slider-icon{width:56px;height:46px}.professional__slider-btn{width:42px;height:42px;top:116px}.professional__slider-navigation-prev{left:18%}.professional__slider-navigation-next{right:18%}.professional__slider-pagination{padding-top:0}.professional__slider-pagination .swiper-pagination-bullet{width:38px}}@media (max-width:992px){.professional__content{width:100%;padding-bottom:45px}.professional__content::before{display:none}.professional__subtitle{margin-bottom:33px}.professional__text-wrapper{margin-bottom:0}.professional__text{max-width:520px}.professional__slider{position:static;width:100%}.professional__slider-decor{position:relative;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);z-index:1}.professional__slider-decor::before{content:"";position:absolute;z-index:2;left:0;top:0;right:0;height:1000px;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(39.39%,#cd1338),color-stop(127.43%,rgba(205,19,56,.46)));background-image:linear-gradient(180deg,#cd1338 39.39%,rgba(205,19,56,.46) 127.43%);-webkit-transform:skewY(343deg) rotate(180deg);-ms-transform:skewY(343deg) rotate(180deg);transform:skewY(343deg) rotate(180deg);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.professional__slider-container{padding:0 var(--container-offset);max-width:var(--container-width);position:static;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);margin:0 auto 52px}.professional__slider-item img{height:160px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.5);-ms-transform:scale(1.5);transform:scale(1.5)}.professional__slider-item.swiper-slide-active img{width:250px}.professional__slider-btn{top:122px}.professional__slider-pagination{margin-bottom:20px}.professional__slider-navigation-prev{left:20%}.professional__slider-navigation-next{right:20%}}@media (max-width:768px){.video{background-image:url(../img/video-preview-mobile.jpg)}.professional{margin-top:60px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.4);-ms-transform:scale(1.4);transform:scale(1.4)}}@media (max-width:700px){.professional__subtitle{font-size:16px}.professional__text{font-size:14px;line-height:18px;max-width:340px}.professional__slider-decor{padding-top:10px}.professional__slider-decor::before{top:-30px}.professional__slider-item img{height:140px}.professional__slider-item.swiper-slide-active img{width:230px}.professional__slider-icon{width:50px;height:40px}.professional__slider-btn{top:110px;width:38px;height:38px}.professional__slider-btn svg{-webkit-transform:scale(.6);-ms-transform:scale(.6);transform:scale(.6)}.professional__slider-navigation-prev{left:28%}.professional__slider-navigation-next{right:28%}}@media (max-width:500px){.professional__content{padding:45px 0 10px}.professional__slider-decor{padding-top:30px}.professional__slider-container{padding-left:0;padding-right:0;margin-bottom:40px}.professional__slider-pagination{padding-top:10px}.professional__slider-navigation-prev{left:14%}.professional__slider-navigation-next{right:14%}}@media (max-width:360px){.professional__slider-container{padding-top:0}.professional__slider-btn{top:115px}.professional__slider-item.swiper-slide-active{-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}}.interview{--content-width:800px;--content-offset:140px;position:relative;overflow:hidden;background-color:var(--blue-middle)}.interview__slider-wrapper{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.interview__slider-content{position:relative;z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.interview__slider-inner{padding:200px var(--container-offset) 288px;position:relative;max-width:var(--content-width);margin-left:auto;margin-right:var(--content-offset)}.interview__slider-title{font-size:68px;margin-bottom:35px}.interview__slider-info{max-width:280px;margin-bottom:120px}.interview__slider-name{font-size:16px;font-weight:700;line-height:1.05;margin-bottom:22px}.interview__slider-descr{font-size:16px;font-weight:200;line-height:18px}.interview__slider-text{font-size:24px;font-weight:200;line-height:1.2}.interview__slider-item{height:auto;position:relative;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.interview__slider-item::before{content:"";position:absolute;left:36%;bottom:0;width:100vw;height:100%;z-index:1;-webkit-transform:skewX(-17deg);-ms-transform:skewX(-17deg);transform:skewX(-17deg);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;background-image:-webkit-gradient(linear,right top,left top,color-stop(38.01%,#00406c),color-stop(117.87%,rgba(0,64,108,.53)));background-image:linear-gradient(270deg,#00406c 38.01%,rgba(0,64,108,.53) 117.87%);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.interview__slider-item-content{position:relative;z-index:11}.interview__slider-img{position:absolute;height:100%;z-index:-1}.interview__slider-img img{height:100%}.interview__slider-link{font-variation-settings:"wdth" 140,"wght" 700;position:absolute;bottom:100px;left:var(--container-offset);right:var(--container-offset);font-size:24px;font-weight:700;line-height:56px;letter-spacing:.12px;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:none}.interview__slider-btn{-webkit-box-shadow:none;box-shadow:none;background-color:var(--light);border-radius:50%;border:none;width:56px;height:56px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:440px;top:auto}.interview__slider-btn::after{content:""}.interview__slider-btn svg{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.interview__slider-navigation svg path{fill:var(--light)}.interview__slider-navigation-prev{left:auto;right:var(--content-width);background-color:var(--accent)}.interview__slider-navigation-next{left:var(--content-width);background-color:var(--accent)}.interview__slider-navigation-inner{position:relative;max-width:var(--content-width);margin-left:auto;margin-right:var(--content-offset)}.interview__slider-info{margin-left:auto;padding-right:60px}.interview__slider-navigation-container{position:absolute;left:0;right:0;bottom:0;z-index:2}.interview__slider-pagination{width:auto!important;bottom:230px!important;left:50%!important;-webkit-transform:translateX(-50%)!important;-ms-transform:translateX(-50%)!important;transform:translateX(-50%)!important;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px}.interview__slider-pagination .swiper-pagination-bullet{width:70px;height:3px;padding:0;border-radius:0;background-color:var(--light);opacity:.5;margin:0}.interview__slider-pagination .swiper-pagination-bullet-active{background-color:var(--light)!important;opacity:1}@media (max-width:1440px){.interview{--content-offset:60px;--content-width:760px}.interview__slider-info{padding-right:134px}.interview__slider-item::before{left:39%}}@media (max-width:1280px){.interview{--content-offset:8%;--content-width:58%}.interview__slider-inner{padding:90px 0 252px}.interview__slider-item::before{left:34%}.interview__slider-title{font-size:50px}.interview__slider-info{padding-right:0;margin-bottom:50px}.interview__slider-name{font-size:12px;margin-bottom:10px}.interview__slider-descr{font-size:12px}.interview__slider-text{font-size:17px;max-width:600px}.interview__slider-link{font-size:17px;line-height:38px}.interview__slider-pagination{bottom:190px!important}.interview__slider-btn{bottom:350px}.interview__slider-navigation-prev{right:auto;left:-80px}.interview__slider-navigation-next{left:auto;right:-80px}}@media (max-width:1024px){.interview{--content-offset:7%;--content-width:61%}.interview__slider-img{left:-50px}.interview__slider-btn{width:46px;height:46px}.interview__slider-text{max-width:470px}.interview__slider-title{font-size:47px;letter-spacing:1.5px}.interview__slider-navigation-prev{left:-60px}.interview__slider-navigation-next{right:-60px}}@media (max-width:900px){.interview{--content-offset:0;--content-width:560px}.interview__slider-inner{padding:490px 0 210px;margin:0 auto}.interview__slider-info{margin-bottom:36px}.interview__slider-link{bottom:90px;left:0;right:0}.interview__slider-pagination{bottom:168px!important}.interview__slider-title{font-size:50px;letter-spacing:2.5px}.interview__slider-navigation-inner{max-width:100%}.interview__slider-navigation-prev{left:0}.interview__slider-navigation-next{right:0}.interview__slider-item{max-height:100%}.interview__slider-item::before{-webkit-transform:skewX(0);-ms-transform:skewX(0);transform:skewX(0);-webkit-transform:skewY(18deg);-ms-transform:skewY(18deg);transform:skewY(18deg);left:0;right:0;top:406px;height:100%;background-image:linear-gradient(-17deg,#00406c 40.01%,rgba(0,64,108,.53) 117.87%)}.interview__slider-img{width:100%;left:0}.interview__slider-img img{width:100%}}@media (max-width:700px){.interview__slider-title{margin-bottom:25px;font-size:32px;letter-spacing:1.6px}.interview__slider-img img{height:auto}.interview__slider-info{max-width:220px}.interview__slider-text{font-size:14px}.interview__slider-pagination .swiper-pagination-bullet{width:46px}.interview__slider-link{line-height:30px;font-size:14px}.interview__slider-btn{bottom:150px;width:36px;height:36px}.interview__slider-btn svg{-webkit-transform:scale(.6);-ms-transform:scale(.6);transform:scale(.6)}}@media (max-width:400px){.interview__slider-inner{padding:390px 0 210px}.interview__slider-item::before{top:333px}}.chat{position:relative;padding:54px 0 48px;overflow:hidden;background-image:url(../img/chat-bg.webp);background-repeat:no-repeat;background-size:cover}.chat__inner{position:relative;z-index:1}.chat__title{margin-bottom:24px}.chat__text{max-width:686px;margin-bottom:30px;font-size:24px}.chat__mobile{position:absolute;right:0;top:0;z-index:-1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1);-webkit-transform-origin:top right;-ms-transform-origin:top right;transform-origin:top right}.chat__bottom{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:36px}.chat__img{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:216px}.chat__btn{padding:0 35px;text-transform:initial;font-size:20px}@media (max-width:1440px){.chat{background-position:top right -100px}.chat__mobile{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}@media (max-width:1280px){.chat__text{max-width:656px;margin-bottom:50px;font-size:17px}.chat__mobile{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9)}.chat__img{width:194px}.chat__btn{padding:5px 35px}}@media (max-width:1024px){.chat__text{max-width:570px;margin-bottom:50px;font-size:17px}.chat__mobile{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}}@media (max-width:900px){.chat__text{max-width:690px}.chat__mobile{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);top:173px;right:2%}}@media (max-width:700px){.chat{padding:54px 0 0;background-image:url(../img/chat-bg-mobile.webp);background-position:top right 0}.chat__mobile{position:static;max-width:450px;width:100%;margin:0 auto;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.chat__text{font-size:14px;line-height:1.2;margin-bottom:30px}.chat__bottom{position:absolute;z-index:3;bottom:0;padding-bottom:56px;left:0;right:0}.chat__bottom::before{content:"";position:absolute;left:calc(var(--container-offset) * -1);right:calc(var(--container-offset) * -1);bottom:0;height:180px;z-index:-1;background-image:linear-gradient(-17deg,rgba(0,64,108,.5803921569) 40.01%,rgba(0,64,108,.53) 117.87%);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);-webkit-clip-path:polygon(0 60px,100% 0,100% 100%,0 100%);clip-path:polygon(0 60px,100% 0,100% 100%,0 100%)}.chat__img{display:none}.chat__btn{max-width:400px;width:100%;margin:0 auto;font-size:14px;padding:4px 35px}}@media (max-width:400px){.chat{padding:34px 0 0}.chat__btn{padding:4px 10px}.chat__text{max-width:310px}}.accordion-mobile{display:none}.accordion__item .accordion__title-wrapper{-webkit-clip-path:polygon(0 0,95% 0,100% 100%,0 100%);clip-path:polygon(0 0,95% 0,100% 100%,0 100%)}.accordion__item:nth-child(1){width:408px;margin-bottom:20px}.accordion__item:nth-child(2){width:436px}.accordion__item:nth-child(2) .accordion__title-wrapper{color:var(--default)}.accordion__title-wrapper{cursor:pointer;padding:13px 0 13px 16px;background-color:var(--light);color:var(--blue-middle);font-size:24px;font-weight:600;line-height:1.7;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.accordion__title{display:inline-block;padding-right:18px}.accordion__icon{width:32px;height:16px;-webkit-transition:.5s ease-in-out;transition:.5s ease-in-out}.accordion__content{max-height:0;overflow:hidden;-webkit-transition:.5s ease-in-out;transition:.5s ease-in-out;color:var(--default);font-size:24px;font-weight:200;background-color:#f5f5f5;padding:0 10px 0 14px;margin:-1px 0 0}.accordion__content-text{line-height:1.17}.accordion__content-text span{font-variation-settings:"wdth" 140,"wght" 600}.accordion__content-text:not(:last-child){margin-bottom:8px}.accordion .active .accordion__content{max-height:600px;padding:10px 10px 10px 14px;overflow-y:scroll}@media (max-width:1280px){.accordion__content{font-size:17px;padding:0 10px 0 27px}.accordion__content-text:not(:last-child){margin-bottom:6px}.accordion .active .accordion__content{padding:10px 10px 10px 27px}.accordion__item:nth-child(1){width:370px;margin-bottom:14px}.accordion__item:nth-child(2){width:390px}.accordion__item .accordion__title-wrapper{-webkit-clip-path:polygon(0 0,96% 0,100% 100%,0 100%);clip-path:polygon(0 0,96% 0,100% 100%,0 100%)}.accordion__title-wrapper{padding:10px 0 10px 27px}.accordion__title{font-size:17px}.accordion__icon{margin:0 30px 0 auto}}@media (max-width:992px){.accordion-desktop{display:none}.accordion-mobile{display:block;padding:0 var(--container-offset);max-width:var(--container-width);margin-left:auto;margin-right:auto}.accordion__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:6px}.accordion__item-wrapper{padding:10px 0 10px 16px}.accordion__item:nth-child(1){width:50%;margin-bottom:0}.accordion__item:nth-child(2){width:50%}.accordion__item:nth-child(2) .accordion__title-wrapper{-webkit-clip-path:polygon(0 0,100% 0,100% 100%,4% 100%);clip-path:polygon(0 0,100% 0,100% 100%,4% 100%)}.accordion__item:nth-child(2) .accordion__content{margin-left:1.9vw}.accordion__item:nth-child(2) .accordion__icon{margin:0 12px 0 auto}.accordion__title{padding-right:0}.accordion__icon{margin:0 22px 0 auto}}@media (max-width:700px){.accordion__items{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}.accordion__content{font-size:14px;padding:0 10px 0 12px}.accordion__content-text:not(:last-child){margin-bottom:4px}.accordion .active .accordion__content{padding:10px 10px 10px 12px}.accordion__item:nth-child(1){width:auto;max-width:320px}.accordion__item:nth-child(2){width:auto;max-width:336px}.accordion__item:nth-child(2) .accordion__content{margin-left:0}.accordion__item:nth-child(2) .accordion__title-wrapper{-webkit-clip-path:polygon(0 0,96% 0,100% 100%,0 100%);clip-path:polygon(0 0,96% 0,100% 100%,0 100%)}.accordion__item:nth-child(2) .accordion__icon{margin:0 22px 0 auto}.accordion__title-wrapper{padding:10px 10px 10px 12px}.accordion__title{font-size:14px}.accordion__icon{width:20px;height:10px}.accordion__icon img{-o-object-fit:contain;object-fit:contain}}.banner{margin-top:85px}.banner__background{background-image:url(../img/banner-bg.jpg);background-size:cover;background-position:center;background-repeat:no-repeat}.banner__inner{min-height:96px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.banner__title{font-size:48px;margin-right:88px;margin-bottom:0}.banner__btn{margin-right:140px}@media (max-width:1280px){.banner{margin-top:60px}.banner__inner{min-height:68px}.banner__title{font-size:34px;margin-right:50px}.banner__btn{margin-right:180px}}@media (max-width:940px){.banner__btn{margin-right:0}}@media (max-width:700px){.banner__inner{min-height:68px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:46px 0 20px}.banner__title{margin-bottom:20px;text-align:center;margin-right:0;font-size:30px;letter-spacing:1.2px;line-height:32px}}@media (max-width:360px){.banner__title{font-size:26px}}.goods{padding:62px 0 10px}.goods__slider{margin-left:-5px;margin-right:-5px}.goods__slider-wrapper{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.goods__item{height:auto;padding:10px 10px 14px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:var(--light);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.goods__item-shadow{-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.15);box-shadow:0 4px 10px 0 rgba(0,0,0,.15);padding:28px 10px 42px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.goods__item-bottom{padding:0 10px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.goods__item img{margin-left:auto;margin-right:auto;width:310px;max-height:310px;-o-object-fit:contain;object-fit:contain}.goods__item-title{color:var(--blue-middle);font-size:20px;font-weight:629;line-height:22px;margin-bottom:5px}.goods__item-subtitle{display:inline-block;margin-bottom:18px;font-size:16px;line-height:18px;font-weight:200;color:var(--gray)}.goods__item-text{color:var(--default);margin-bottom:28px;font-size:16px;font-weight:200;line-height:18px;text-align:left}.goods__item-btn{width:100%;margin-left:auto;margin-right:auto;opacity:.5;margin-top:auto}.goods__item-btn:hover{background-color:var(--blue-dark);opacity:1}.goods__item-img{position:relative;margin-bottom:10px}.goods__item.goods__item--icon .goods__item-img::before{content:"";position:absolute;bottom:0;right:16%;width:15px;height:15px;background-size:cover;-o-object-fit:cover;object-fit:cover;background-image:url(../img/label-icon.png)}.goods__slider-wrapper__arros{position:relative;padding:0 38px}.goods__slider-navigation{left:0;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.goods__slider-btn{background-color:transparent;cursor:pointer;border:none;padding:0;width:34px;height:42px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:-50px}.goods__slider-btn::after{content:""}.goods__slider-btn svg{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9)}.goods__slider-btn.swiper-button-disabled svg path{stroke:var(--default)}.goods__slider-prev{left:2px}.goods__slider-next{right:2px}.goods__slider-pagination{position:relative;top:-5px;margin-left:-5px;margin-right:-5px}.goods__slider-pagination .swiper-pagination-bullet{width:56px;height:2px;padding:5px 0;border-radius:0;margin:0 18px!important;position:relative;background-color:var(--light);bottom:0}.goods__slider-pagination .swiper-pagination-bullet::before{content:"";position:absolute;top:50%;left:0;height:3px;width:100%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);background-color:var(--default)!important}.goods__slider-pagination .swiper-pagination-bullet-active::before{background-color:var(--accent)!important}@media (max-width:1440px){.goods__item-text{margin-bottom:25px}}@media (max-width:1280px){.goods__item img{width:220px;max-height:220px}.goods__item-title{font-size:14px;line-height:16px;margin-bottom:0}.goods__item-subtitle{font-size:12px}.goods__item-text{font-size:12px;margin-bottom:30px}.goods__item-shadow{padding:16px 10px 28px}.goods__item.goods__item--icon .goods__item-img::before{right:12%}.goods__slider-pagination .swiper-pagination-bullet{margin:0 10px!important}}@media (max-width:1024px){.goods__item-text{margin-bottom:15px}}@media (max-width:1024px) and (min-width:941px){.goods__item img{width:166px;max-height:166px}.goods__item-btn{min-width:140px}}@media (max-width:940px){.goods{padding-top:40px}.goods__slider-pagination .swiper-pagination-bullet{width:48px;margin:0 7px!important}}@media (max-width:768px){.goods__slider-pagination .swiper-pagination-bullet{width:35px;margin:0 5px!important}.goods__item-text{margin-bottom:10px}.goods__item.goods__item--icon .goods__item-img::before{right:12%}}@media (max-width:600px){.goods__slider-pagination .swiper-pagination-bullet{width:18px;margin:0 5px!important}.goods__item.goods__item--icon .goods__item-img::before{right:22%}}.labels{padding:70px 0 108px}.labels__title{text-align:center;color:var(--accent);margin-bottom:50px;font-size:48px}.labels__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:42px}.labels__item{display:inherit;-webkit-transition:all var(--transition);transition:all var(--transition)}.labels__item:hover{-webkit-transform:var(--scale-hover);-ms-transform:var(--scale-hover);transform:var(--scale-hover)}.labels__link img{height:47px}@media (max-width:1440px){.labels{padding:70px 0 85px}.labels__list{gap:32px}}@media (max-width:1280px){.labels{padding:46px 0 50px}.labels__list{gap:30px}.labels__title{font-size:34px;line-height:34px;margin-bottom:37px}.labels__link img{height:34px}}@media (max-width:1024px){.labels__list{gap:26px}}@media (max-width:900px){.labels{padding:46px 0 35px}.labels__link img{height:45px}}@media (max-width:700px){.labels{padding:46px 0 100px}.labels__list{gap:16px 24px}.labels__title{font-size:30px;line-height:1;margin-bottom:30px}.labels__link img{height:34px}}@media (max-width:400px){.goods__slider-pagination .swiper-pagination-bullet{width:14px;margin:0 4px!important}.goods__item.goods__item--icon .goods__item-img::before{right:16%}.labels__title{margin-bottom:24px}.labels__link img{height:32px}}@media (max-width:360px){.labels__title{font-weight:800;font-size:26px}.labels__link img{height:28px}.labels__list{gap:16px 20px}}.recommendations{padding:85px 0 0;margin-bottom:-1px}.recommendations__inner{display:-webkit-box;display:-ms-flexbox;display:flex}.recommendations__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:40px;position:relative;z-index:11}.recommendations__title{margin-bottom:24px;color:var(--accent)}.recommendations__text{color:var(--default);font-size:24px;font-weight:200;line-height:28px;max-width:540px;width:100%}.recommendations__slider{position:relative;height:660px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-inner{width:50%;position:relative;-webkit-clip-path:polygon(var(--max-offset) 0,83% 0,100% 100%,var(--max-offset) 100%);clip-path:polygon(var(--max-offset) 0,83% 0,100% 100%,var(--max-offset) 100%)}.recommendations__slider-inner::before{content:"";position:absolute;bottom:0;right:0;width:calc(100% + 100vw - var(--content-width)/ 2);height:100%;background-color:var(--blue-middle);z-index:-1}.recommendations__slider-wrapper{min-width:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.recommendations__slider-container{padding-right:140px}.recommendations__slider-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-link{position:relative}.recommendations__slider-link::before{content:"";position:absolute;background-image:url(../img/svg/zoom.svg);background-position:center;background-size:contain;background-repeat:no-repeat;right:20px;top:10px;width:62px;height:66px}.recommendations__slider-link img{max-width:370px}.recommendations__slider-btn{-webkit-box-shadow:none;box-shadow:none;background-color:transparent;border:none;width:40px;height:42px;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.recommendations__slider-btn::after{content:""}.recommendations__slider-btn svg{-webkit-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.recommendations__slider-btn.swiper-button-disabled{opacity:.5}.recommendations__slider-navigation-prev{left:-10px}.recommendations__slider-navigation-next{right:130px}@media (max-width:1280px){.recommendations{padding:60px 0 0}.recommendations__slider{height:606px}.recommendations__slider-inner{width:55%}.recommendations__slider-link::before{width:50px;height:54px;right:6px}.recommendations__slider-link img{max-width:350px}.recommendations__text{font-size:17px;line-height:20px;max-width:376px}.recommendations__content{padding-left:130px}}@media (max-width:1024px){.recommendations__slider{height:506px}.recommendations__slider-inner{width:62%}.recommendations__slider-link img{max-width:290px}.recommendations__content{padding-left:10px;padding-bottom:76px}}@media (max-width:900px){.recommendations__slider{height:440px}.recommendations__slider-inner{width:58%}.recommendations__slider-link img{max-width:240px}.recommendations__content{padding-left:0;padding-bottom:45px}}@media (max-width:768px){.recommendations__title{margin-bottom:14px}.recommendations__slider-link img{max-width:220px}.recommendations__slider-link::before{width:30px;height:32px}}@media ((max-width:768px) and (min-width:701px)){.recommendations__slider-inner{width:58%}.recommendations__slider-link img{max-width:200px}.recommendations__content{margin-left:-10px}}@media (max-width:700px){.recommendations{padding:50px 0 0}.recommendations__inner{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.recommendations__content{margin-left:0;margin-bottom:30px;padding-bottom:0}.recommendations__slider{height:344px}.recommendations__slider-link img{max-width:200px}.recommendations__slider-inner{width:100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-clip-path:none;clip-path:none}.recommendations__slider-inner::before{-webkit-transform:skewX(0);-ms-transform:skewX(0);transform:skewX(0);width:100vw;left:calc(var(--container-offset) * -1)}.recommendations__slider-wrapper{margin:0 calc(var(--container-offset) * -1)}.recommendations__slider-container{padding-right:0}.recommendations__slider-navigation-prev{left:0}.recommendations__slider-navigation-next{right:0}.recommendations__text{font-size:14px;line-height:1.2}.recommendations__title span{font-size:30px;letter-spacing:1.2px;line-height:32px}}@media (max-width:360px){.recommendations__title{font-size:26px;letter-spacing:1px}}.partners{padding:90px 0 30px}.partners__title{color:var(--accent);margin-bottom:60px}.partners__list{-webkit-transition-timing-function:linear!important;transition-timing-function:linear!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.partners__item{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:auto!important}.partners__item img{max-height:90px;max-width:200px;width:100%;-webkit-filter:grayscale(100%);filter:grayscale(100%);-o-object-fit:contain;object-fit:contain}.marquee{-webkit-animation:30s linear infinite scroll;animation:30s linear infinite scroll}@-webkit-keyframes scroll{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(calc(-100% - 86px));transform:translateX(calc(-100% - 86px))}}@keyframes scroll{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(calc(-100% - 86px));transform:translateX(calc(-100% - 86px))}}@media (max-width:1280px){.partners{padding:55px 0 0}}@media (max-width:768px){@-webkit-keyframes scroll{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(calc(-100% - 60px));transform:translateX(calc(-100% - 60px))}}@keyframes scroll{from{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(calc(-100% - 60px));transform:translateX(calc(-100% - 60px))}}.partners__title{margin-bottom:40px}.partners__item img{max-height:60px;max-width:140px}}@media (max-width:700px){.partners{padding:50px 0 0}.partners__title{margin-bottom:30px}}.header-history{position:fixed;left:0;right:0;top:0;z-index:20;background-color:var(--blue-middle)}.header-history__burger,.header-history__mobile-logo{display:none}.nav-history__container{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:74px}.nav-history__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px}.nav-history__next.active{color:var(--accent)}.nav-history__next.active svg path{stroke:var(--accent)}.nav-history__item--back{display:none}.nav-history__link{font-variation-settings:"wght" 700,"wdth" 25,"slnt" -10;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;font-size:16px;font-weight:200;text-transform:uppercase;border-bottom:1px solid transparent;-webkit-transition:all var(--transition);transition:all var(--transition);font-stretch:25%;line-height:47px;letter-spacing:0}.nav-history__link-icon{margin-bottom:2px}.nav-history__link-icon path{-webkit-transition:all var(--transition);transition:all var(--transition)}.nav-history__link:hover{color:var(--accent)}.nav-history__link:hover svg path{stroke:var(--accent)}.nav-history__back{margin-right:auto}@media (max-width:1280px){.nav-history__link{font-size:13px}}@media (max-width:900px){.header-history__inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header-history__burger{display:-webkit-box;display:-ms-flexbox;display:flex}.header-history.active{background-image:none}.header-history__mobile-logo{display:block;cursor:auto;max-width:190px}.header-history__burger{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:auto;cursor:pointer;height:36px;padding:4px 0;width:36px;z-index:2;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header-history__mobile-logo{margin-left:calc(var(--container-offset) * -1)}.header-history__item--back{display:block}.nav-history{position:fixed;top:60px;left:-100vw;right:100vw;min-height:calc(100vh - 60px);bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:all var(--transition);transition:all var(--transition);background-color:var(--blue-middle);overflow-y:auto;text-align:center}.nav-history__container{height:60px}.nav-history__logo{display:none}.nav-history__item--back{display:block}.nav-history__list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:80px 20px 60px;gap:20px 0}.nav-history__link{font-size:21px}.nav-history__next{font-size:13px}.nav-history.active{left:0;right:0}}@media (max-width:400px){.nav-history__next{font-size:10px}}@media (max-width:360px){.nav-history__list{padding:40px 20px;gap:10px 0}.nav-history__link{padding:10px 0}}.history-top{position:relative;overflow:hidden;margin-top:74px;background-color:var(--blue-middle)}.history-top__img{position:absolute;left:0;top:0;bottom:0;right:0}.history-top__img img{position:absolute;right:0;height:100%;width:50%;-o-object-fit:cover;object-fit:cover;-o-object-position:top right;object-position:top right}.history-top__inner{padding:234px 0 200px;position:relative;z-index:1}.history-top__inner::before{content:"";position:absolute;right:50%;bottom:0;width:100vw;height:100%;z-index:-1;-webkit-transform:skewX(17deg);-ms-transform:skewX(17deg);transform:skewX(17deg);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;background-image:-webkit-gradient(linear,left top,right top,color-stop(38.01%,#00406c),color-stop(117.87%,rgba(0,64,108,.53)));background-image:linear-gradient(90deg,#00406c 38.01%,rgba(0,64,108,.53) 117.87%);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.history-top__title{margin-bottom:40px;font-size:68px}.history-top__name{font-variation-settings:"wdth" 100,"wght" 700;margin-bottom:14px;font-size:20px;font-style:normal;line-height:1.35;font-stretch:normal}.history-top__text{max-width:540px;line-height:1.2}@media (max-width:1440px){.history-top__inner::before{right:44%}}@media (max-width:1280px){.history-top__inner{padding:140px 0 248px}.history-top__inner::before{right:46%}.history-top__title{margin-bottom:70px;font-size:48px}.history-top__name{font-size:14px;margin-bottom:20px}.history-top__text{font-size:14px}}@media (max-width:1024px){.nav-history__list{-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}.history-top__inner{padding:140px 0 115px}.history-top__inner::before{right:43%}.history-top__img img{-o-object-position:top center;object-position:top center}}@media (max-width:900px){.history-top{margin-top:60px}.history-top__inner{width:100%;position:absolute;padding:0 0 40px;bottom:0}.history-top__inner::before{-webkit-transform:skewX(0);-ms-transform:skewX(0);transform:skewX(0);-webkit-transform:skewY(18deg);-ms-transform:skewY(18deg);transform:skewY(18deg);left:calc(var(--container-offset) * -1);right:calc(var(--container-offset) * -1);top:-40px;height:200%;background-image:linear-gradient(-17deg,#00406c 40.01%,rgba(0,64,108,.53) 117.87%)}.history-top__img{position:static}.history-top__img img{position:static;width:100%}.history-top__title{margin-bottom:40px}.history-top__name{margin-bottom:8px}}@media (max-width:700px){.history-top{padding-bottom:100px}.history-top__title{font-size:30px}}@media (max-width:400px){.history-top{padding-bottom:120px}.history-top__inner::before{top:-60px}.history-top__title{margin-bottom:40px;font-size:25px}}.history-question{position:relative;background-color:var(--blue-middle)}.history-question__img{position:absolute;left:0;top:0;bottom:0;right:0}.history-question__img img{position:absolute;left:0;height:100%;width:50%;-o-object-fit:cover;object-fit:cover;-o-object-position:top left;object-position:top left}.history-question__inner{min-height:834px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:70px 0;max-width:50%;margin-left:auto;position:relative;z-index:1}.history-question__inner::before{content:"";position:absolute;left:-37%;bottom:0;width:100vw;height:100%;z-index:-1;-webkit-transform:skewX(17deg);-ms-transform:skewX(17deg);transform:skewX(17deg);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;background-color:var(--blue-middle)}.history-question__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:46px}.history-question__title{font-size:40px;line-height:1.1;letter-spacing:2.3px;margin-bottom:18px}.history-question__text{font-size:24px;font-weight:200;line-height:1.1}@media (max-width:1440px){.history-question__inner::before{left:-42%}}@media (max-width:1280px){.history-question__inner{max-width:560px;min-height:auto;padding:50px 0}.history-question__inner::before{left:-30%}.history-question__title{font-size:30px;letter-spacing:1.2px}.history-question__list{gap:30px}.history-question__text{font-size:17px}}@media (max-width:1024px){.history-question__inner{max-width:450px}.history-question__inner::before{left:-40%}}@media (max-width:900px){.history-question__inner{max-width:100%;padding:66px 0 100px}.history-question__img{position:static;margin-bottom:65px}.history-question__img img{position:static;width:100%}.history-question__list{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media (max-width:700px){.history-question__list{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}@media (max-width:400px){.history-question__text{font-size:14px}.history-question__list{gap:50px}}.history-quite__inner{padding:53px 0 51px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:30px}.history-quite__inner--start{-webkit-box-align:start;-ms-flex-align:start;align-items:start}.history-quite__title{color:var(--accent);font-size:40px;max-width:650px;margin-bottom:0;line-height:1.1}.history-quite__text{max-width:620px;color:var(--default);font-size:24px;line-height:1.2}@media (max-width:1280px){.history-quite__title{font-size:30px}.history-quite__text{max-width:522px;font-size:17px}}@media (max-width:1024px){.history-quite__inner{padding:59px 0 53px}.history-quite__title{display:inline}.history-quite__text{max-width:470px}}@media (max-width:900px){.history-quite__title{width:50%}.history-quite__text{max-width:100%;width:50%}}@media (max-width:700px){.history-quite__inner{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.history-quite__text,.history-quite__title{width:100%}}@media (max-width:400px){.history-quite__inner{padding:50px 0;gap:25px}.history-quite__text{font-size:14px}}.history-question-right{position:relative;background-color:var(--blue-middle)}.history-question-right__img{position:absolute;left:0;top:0;bottom:0;right:0}.history-question-right__img img{position:absolute;right:0;height:100%;width:56%;-o-object-fit:cover;object-fit:cover;-o-object-position:bottom right;object-position:bottom right}.history-question-right__inner{min-height:934px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:70px 0;max-width:554px;position:relative;z-index:1}.history-question-right__inner::before{content:"";position:absolute;right:-13%;bottom:0;width:100vw;height:100%;z-index:-1;-webkit-transform:skewX(17deg);-ms-transform:skewX(17deg);transform:skewX(17deg);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;background-color:var(--blue-middle)}.history-question-right__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:46px}.history-question-right__title{font-size:40px;line-height:1.1;letter-spacing:2.3px;margin-bottom:18px}.history-question-right__title span{display:block;margin-bottom:0}.history-question-right__text{font-size:24px;font-weight:200;line-height:1.1}@media (max-width:1440px){.history-question-right__inner::before{right:0}}@media (max-width:1280px){.history-question-right__inner{padding:50px 0;min-height:660px;max-width:520px}.history-question-right__list{gap:32px}.history-question-right__title{margin-bottom:14px;font-size:32px}.history-question-right__title span{font-size:32px}.history-question-right__text{font-size:17px;line-height:1.1}}@media (max-width:1024px){.history-question-right__inner{min-height:564px;max-width:400px}.history-question-right__inner::before{right:2%}.history-question-right__title{line-height:1.1}}@media (max-width:900px){.history-question-right__inner{min-height:auto;max-width:100%}.history-question-right__img{position:static}.history-question-right__img img{position:static;width:100%}.history-question-right__list{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;gap:54px}}@media (max-width:700px){.history-question-right__list{-ms-grid-columns:1fr;grid-template-columns:1fr}.history-question-right__text,.history-question-right__title{width:100%}}@media (max-width:400px){.history-question-right__title,.history-question-right__title span{font-size:30px}.history-question-right__list{gap:20px}.history-question-right__text{font-size:14px}}.history-slogan__inner{padding:40px 0 50px}.history-slogan__title{color:var(--accent);font-size:40px;line-height:1.1;letter-spacing:1.6px;margin-bottom:0}.history-slogan__text{color:var(--default);font-size:24px;line-height:1.14}@media (max-width:1280px){.history-slogan__title{font-size:30px;letter-spacing:1.2px;letter-spacing:1.2px}}@media (max-width:900px){.history-slogan__inner{padding:40px 0}.history-slogan__title{display:inline}}.history-blitz{position:relative;overflow:hidden;background-color:var(--blue-middle)}.history-blitz__img{position:absolute;left:0;top:0;bottom:0;right:0}.history-blitz__img img{position:absolute;left:0;height:100%;width:42%;-o-object-fit:cover;object-fit:cover;-o-object-position:top left;object-position:top left}.history-blitz__inner{min-height:834px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:70px 0;max-width:850px;margin-left:auto;position:relative;z-index:1}.history-blitz__inner::before{content:"";position:absolute;left:-10%;bottom:-1px;width:100vw;height:100%;z-index:-1;-webkit-transform:skewX(-17deg);-ms-transform:skewX(-17deg);transform:skewX(-17deg);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;background-image:linear-gradient(76deg,rgba(0,64,108,.53),#00406c 25.01% 117.87%);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.history-blitz__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:36px}.history-blitz__item{display:-webkit-box;display:-ms-flexbox;display:flex}.history-blitz__item-title{font-variation-settings:"wght" 700,"opsz" 16,"wdth" 25,"slnt" -10;margin-bottom:0;font-size:22px;text-align:left;letter-spacing:.9px;line-height:1.2}.history-blitz__title{font-size:45px;line-height:1;letter-spacing:1.8px;margin-bottom:56px;text-align:center;letter-spacing:.9px}.history-blitz__text{max-width:450px;margin-left:auto;font-size:24px;line-height:1.2}@media (max-width:1440px){.history-blitz__inner::before{left:-4%}}@media (max-width:1280px){.history-blitz__title{font-variation-settings:"wght" 700,"opsz" 25,"wdth" 25,"slnt" -10;font-size:30px;letter-spacing:1.2px;margin-bottom:66px}.history-blitz__inner{max-width:705px;min-height:auto}.history-blitz__list{gap:34px}.history-blitz__item-title{font-size:18px;letter-spacing:.9px}.history-blitz__text{max-width:340px;font-size:17px}}@media (max-width:1024px){.history-blitz__img img{width:50%}.history-blitz__inner{max-width:524px}.history-blitz__inner::before{left:5%}.history-blitz__item-title{max-width:230px}.history-blitz__text{max-width:264px}}@media (max-width:900px){.history-blitz__inner{min-height:auto;max-width:100%;padding-top:80px;margin-top:-134px}.history-blitz__inner::before{-webkit-transform:skewY(18deg);-ms-transform:skewY(18deg);transform:skewY(18deg);left:calc(var(--container-offset) * -1);right:calc(var(--container-offset) * -1);top:-30px;background-image:linear-gradient(-17deg,#00406c 40.01%,rgba(0,64,108,.53) 117.87%)}.history-blitz__title{margin-bottom:52px}.history-blitz__img{position:static}.history-blitz__img img{position:static;width:100%}.history-blitz__item{display:-ms-grid;display:grid;-ms-grid-columns:264px 1fr;grid-template-columns:264px 1fr;gap:36px}.history-blitz__item-title,.history-blitz__text{max-width:100%}}@media (max-width:700px){.history-blitz__title{text-align:left}.history-blitz__item{-ms-grid-columns:1fr;grid-template-columns:1fr}}@media (max-width:400px){.history-blitz__inner{padding:70px 0 50px;margin-top:-65px}.history-blitz__title{text-align:left;margin-bottom:44px}.history-blitz__text{font-size:14px}} \ No newline at end of file diff --git a/app/css/main.css.map b/app/css/main.css.map deleted file mode 100644 index 75306b2..0000000 --- a/app/css/main.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["_vars.scss","main.css","_fonts.scss","_settings.scss","components/_header.scss","components/_footer.scss","components/_top.scss","components/_video.scss","components/_choice.scss","components/professional.scss","components/_interview.scss","components/_chat.scss","components/_accordion.scss","components/_banner.scss","components/_goods.scss","components/_labels.scss","components/recommendations.scss","components/_partners.scss","components/_history-header.scss","components/_history-top.scss","components/_history-question.scss","components/_history-quote.scss","components/_history-question-right.scss","components/_history-slogan.scss","components/_history-blitz.scss"],"names":[],"mappings":"AAAA;EACE,wCAAA;EACA,uBAAA;EACA,yBAAA;EACA,wBAAA;EACA,6EAAA;EACA,+FAAA;EAEA,kBAAA;EACA,0BAAA;EAEA,kBAAA;EACA,aAAA;EACA,iBAAA;EACA,qBAAA;EACA,sBAAA;EACA,oBAAA;EACA,YAAA;EAGA,qBAAA;EACA,iBAAA;EACA,uBAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,wBAAA;ACHF;;ADMA;EACE;IACE,uBAAA;ECHF;AACF;ADMA;EACE;IACE,uBAAA;ECJF;AACF;ADOA;EACE;IACE,sBAAA;ECLF;AACF;ADQA;EACE;IACE,qBAAA;ECNF;AACF;AC5CA;EACC,0BAAA;EACA,kBAAA;EACA,kBAAA;EACA,4EAAA;EAEA,qBAAA;EACA,sBAAA;AD6CD;AEpDA;EACE,8BAAA;EAAA,sBAAA;AFsDF;;AEnDA;;;EAGE,2BAAA;EAAA,mBAAA;AFsDF;;AEnDA;;;;;;EAME,SAAA;AFsDF;;AEnDA;EACE,WAAA;AFsDF;;AEnDA;EACE,8BAAA;AFsDF;;AEnDA;EACE,oCAAA;AFsDF;;AEnDA;EACE,qBAAA;EACA,wCAAA;AFsDF;;AEnDA;EACE,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,YAAA;EACA,+BAAA;EACA,+CAAA;AFsDF;;AEnDA;EACE,SAAA;EACA,gBAAA;EACA,gBAAA;AFsDF;;AEnDA;EACE,YAAA;EACA,eAAA;EACA,oBAAA;EAAA,iBAAA;EACA,cAAA;AFsDF;;AEnDA;EACE,qBAAA;EACA,qBAAA;AFsDF;;AEnDA;EACE,gBAAA;AFsDF;;AEnDA;EACE,wBAAA;AFsDF;;AEnDA;EACE,YAAA;EACA,UAAA;EACA,6BAAA;EACA,eAAA;AFsDF;;AEnDA;EACE,gBAAA;EACA,SAAA;EACA,UAAA;AFsDF;;AEnDA;EACE,wBAAA;EACA,qBAAA;EAAA,gBAAA;EACA,YAAA;EACA,gBAAA;EACA,sBAAA;AFsDF;AEpDE;EAIE,aAAA;AFmDJ;;AE/CA;EACE,cAAA;EACA,kCAAA;EACA,iCAAA;AFkDF;;AE/CA;EACE,cAAA;EACA,iCAAA;AFkDF;;AE/CA;EACE,aAAA;AFkDF;;AE/CA;EACE,kBAAA;AFkDF;;AE/CA;EACE,eAAA;EACA,OAAA;EACA,MAAA;EACA,gBAAA;EACA,WAAA;EACA,aAAA;EACA,yBAAA;EAAA,yBAAA;AFkDF;;AE/CA;EACE,kBAAA;AFkDF;;AE/CA;EACE,eAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,qBAAA;EACA,8BAAA;EACA,mBAAA;EACA,YAAA;EACA,gBAAA;EACA,0BAAA;EACA,qCAAA;EAAA,6BAAA;EACA,uBAAA;AFkDF;AEhDE;EACE,kCAAA;EACA,mBAAA;AFkDJ;;AE9CA;EACE,oBAAA;AFiDF;;AE9CA;EACE,kBAAA;EACA,aAAA;EACA,qBAAA;EAAA,kBAAA;EAAA,yBAAA;AFiDF;;AE9CA;EACE,eAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;EACA,eAAA;EACA,kBAAA;EACA,YAAA;EACA,+BAAA;EACA,2BAAA;EACA,yCAAA;EAAA,iCAAA;AFiDF;AE/CE;EACE,kBAAA;EACA,SAAA;EACA,QAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EACA,WAAA;EACA,4CAAA;EACA,4BAAA;EACA,WAAA;EACA,YAAA;EACA,2BAAA;EACA,wBAAA;EACA,UAAA;AFiDJ;;AE7CA;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;AFgDF;;AE7CA;EACE,qEAAA;EACA,eAAA;EACA,iBAAA;EACA,qBAAA;EACA,yBAAA;EACA,mBAAA;EACA,mBAAA;AFgDF;;AE7CA;EACE,qEAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,yBAAA;EACA,mBAAA;AFgDF;;AE7CA;EACE,qBAAA;EACA,gBAAA;AFgDF;;AE5CE;EACE,cAAA;EACA,WAAA;EACA,WAAA;EACA,mBAAA;EACA,8BAAA;EACA,yCAAA;EAAA,iCAAA;AF+CJ;AE3CI;EACE,qDAAA;EAAA,iDAAA;EAAA,6CAAA;EACA,8BAAA;EAAA,0BAAA;EAAA,sBAAA;AF6CN;AE1CI;EACE,UAAA;AF4CN;AEzCI;EACE,qDAAA;EAAA,iDAAA;EAAA,6CAAA;EACA,8BAAA;EAAA,0BAAA;EAAA,sBAAA;AF2CN;;AErCA;EACE;IACE,WAAA;EFwCF;AACF;AErCA;EACE;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;EFuCF;EEpCA;IACE,eAAA;IACA,cAAA;IACA,mBAAA;IACA,iBAAA;EFsCF;EEnCA;IACE,eAAA;IACA,qBAAA;EFqCF;EElCA;IACE,eAAA;EFoCF;AACF;AEjCA;EACE;IACE,YAAA;IACA,WAAA;IACA,YAAA;EFmCF;AACF;AEhCA;EACE;IACE,eAAA;IACA,qBAAA;EFkCF;EE/BA;IACE,eAAA;IACA,qBAAA;EFiCF;AACF;AE9BA;EACE;IACE,eAAA;EFgCF;AACF;AE7BA;EACE,wBAAA;AF+BF;;AGrVA;EACC,eAAA;EACA,OAAA;EACA,QAAA;EACA,MAAA;EACA,WAAA;AHwVD;AGtVC;EACC,kJAAA;EAAA,iGAAA;EAGA,kCAAA;EAAA,0BAAA;AHsVF;AGnVC;EAEC,aAAA;AHoVF;;AGhVA;EACC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,qBAAA;EAAA,kBAAA;EAAA,yBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,gBAAA;EACA,eAAA;AHmVD;;AGhVA;EACC,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,yBAAA;EACA,oCAAA;EACA,yCAAA;EAAA,iCAAA;AHmVD;AGjVC;EACC,oBAAA;AHmVF;;AG/UA;EAEE;IACC,eAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,gBAAA;EHiVD;EG9UA;IACC,eAAA;EHgVD;AACF;AG5UA;EACC;IACC,YAAA;IACA,8BAAA;EH8UA;EG5UA;IACC,eAAA;EH8UD;EG3UA;IACC,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,mBAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,8BAAA;EH6UD;EG1UA;IACC,sBAAA;EH4UD;EGzUA;IACC,cAAA;IACA,YAAA;IACA,gBAAA;EH2UD;EGxUA;IACC,2BAAA;IAAA,0BAAA;IAAA,kBAAA;IACA,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,eAAA;IACA,YAAA;IACA,cAAA;IACA,WAAA;IACA,UAAA;IACA,aAAA;IACA,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,8BAAA;EH0UD;EGxUC;IACC,cAAA;IACA,WAAA;IACA,WAAA;IACA,mBAAA;IACA,oCAAA;IACA,yCAAA;IAAA,iCAAA;EH0UF;EGtUE;IACC,qDAAA;IAAA,iDAAA;IAAA,6CAAA;IACA,8BAAA;IAAA,0BAAA;IAAA,sBAAA;EHwUH;EGrUE;IACC,UAAA;EHuUH;EGpUE;IACC,qDAAA;IAAA,iDAAA;IAAA,6CAAA;IACA,8BAAA;IAAA,0BAAA;IAAA,sBAAA;EHsUH;EGjUA;IACC,+CAAA;EHmUD;EG/TD;IACC,eAAA;IACA,8BAAA;IACA,SAAA;IACA,YAAA;IACA,YAAA;IACA,8BAAA;IACA,SAAA;IACA,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,yCAAA;IAAA,iCAAA;IACA,kBAAA;IACA,kBAAA;EHiUA;EG/TA;IACC,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,uBAAA;IACA,WAAA;EHiUD;EG9TA;IACC,yBAAA;IACA,eAAA;IACA,gBAAA;IACA,yBAAA;IACA,aAAA;IACA,yCAAA;IAAA,iCAAA;EHgUD;EG9TC;IACC,oBAAA;EHgUF;EG5TA;IACC,OAAA;IACA,QAAA;EH8TD;AACF;AG1TA;EAEE;IACC,uBAAA;IACA,WAAA;EH2TD;EGxTA;IACC,eAAA;EH0TD;AACF;AIteA;EACC,oCAAA;AJweD;AIteC;EACC,oBAAA;AJweF;AIreC;EACC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,YAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;AJueF;AIleE;EACC,cAAA;EACA,eAAA;EACA,gBAAA;AJoeH;AIheC;EACC,iBAAA;EACA,YAAA;EACA,2BAAA;EAAA,0BAAA;EAAA,kBAAA;AJkeF;AI/dC;EACC,yCAAA;EAAA,iCAAA;AJieF;AI/dE;EACC,oBAAA;AJieH;AI7dC;EACC,qBAAA;EACA,iBAAA;EACA,+BAAA;EACA,wBAAA;EACA,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;AJ+dF;;AI3dA;EACC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,UAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;AJ8dD;AI5dC;EACC,YAAA;EACA,WAAA;EACA,kBAAA;AJ8dF;AI5dE;EACC,yCAAA;EAAA,iCAAA;AJ8dH;AI3dE;EACC,SAAA;AJ6dH;AIzdC;EACC,SAAA;AJ2dF;;AIvdA;EAEE;IACC,WAAA;EJydD;EItdA;IACC,eAAA;EJwdD;AACF;AIpdA;EAEE;IACC,eAAA;EJqdD;EIhdD;IACC,eAAA;EJkdA;AACF;AI/cA;EAEE;IACC,WAAA;EJgdD;AACF;AI3cA;EAEE;IACC,oBAAA;EJ4cD;EIzcA;IACC,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,WAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,mBAAA;IACA,kBAAA;EJ2cD;EIxcA;IACC,eAAA;IACA,eAAA;IACA,kBAAA;EJ0cD;EIvcA;IACC,gBAAA;IACA,oBAAA;EJycD;EItcA;IACC,kBAAA;EJwcD;EIpcD;IACC,kBAAA;EJscA;AACF;AKllBA;EACE,yBAAA;EACA,gBAAA;EACA,kBAAA;ALolBF;AKllBE;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,SAAA;EACA,QAAA;ALolBJ;AKllBI;EACE,kBAAA;EACA,QAAA;EACA,SAAA;EACA,sBAAA;EAAA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,gCAAA;EAAA,6BAAA;ALolBN;AKhlBE;EACE,kBAAA;EACA,gBAAA;EACA,UAAA;ALklBJ;AK/kBE;EACE,iBAAA;EACA,iBAAA;EACA,kBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;ALilBJ;AK9kBE;EACE,kBAAA;EACA,kBAAA;EACA,kBAAA;EACA,UAAA;EACA,0BAAA;EAAA,sBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,YAAA;EACA,oBAAA;ALglBJ;AK9kBI;EACE,WAAA;EACA,kBAAA;EACA,MAAA;EACA,6CAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,+BAAA;EACA,WAAA;EACA,gCAAA;EAAA,4BAAA;EAAA,wBAAA;ALglBN;AK7kBI;EACE,cAAA;EACA,mBAAA;EACA,SAAA;EACA,YAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,kBAAA;EACA,+EAAA;AL+kBN;AK3kBE;EACE,yDAAA;EACA,eAAA;EACA,iBAAA;EACA,sBAAA;EACA,mBAAA;EACA,yBAAA;EACA,mBAAA;AL6kBJ;AK1kBE;EACE,eAAA;EACA,kBAAA;EACA,qBAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;AL4kBJ;;AKxkBA;EAEI;IACE,kBAAA;EL0kBJ;AACF;AKtkBA;EACE;IACE,kBAAA;ELwkBF;EKtkBE;IACE,kBAAA;IACA,oBAAA;ELwkBJ;AACF;AKpkBA;EAEI;IACE,oBAAA;ELqkBJ;AACF;AKjkBA;EAEI;IACE,iBAAA;ELkkBJ;EK/jBE;IACE,kBAAA;IACA,qBAAA;IACA,aAAA;IACA,eAAA;ELikBJ;EK9jBE;IACE,yDAAA;IACA,eAAA;IACA,qBAAA;ELgkBJ;EK7jBE;IACE,eAAA;EL+jBJ;AACF;AK3jBA;EAEI;IACE,iBAAA;EL4jBJ;AACF;AKxjBA;EACE;IACE,oBAAA;EL0jBF;EKxjBE;IACE,qBAAA;IACA,aAAA;IACA,eAAA;EL0jBJ;AACF;AKtjBA;EAEI;IACE,iBAAA;ELujBJ;EKpjBE;IACE,aAAA;ELsjBJ;AACF;AKljBA;EAII;IACE,aAAA;ELijBJ;EK9iBE;IACE,iBAAA;IACA,yDAAA;IACA,eAAA;IACA,qBAAA;ELgjBJ;EK7iBE;IACE,eAAA;EL+iBJ;AACF;AK3iBA;EAEI;IACE,yDAAA;IACA,eAAA;IACA,qBAAA;EL4iBJ;AACF;AKviBA;EACE;IACE,wBAAA;ELyiBF;EKviBE;IACE,aAAA;ELyiBJ;AACF;AKpiBA;EAEI;IACE,iBAAA;ELqiBJ;EKliBE;IACE,yDAAA;IACA,iBAAA;IACA,eAAA;IACA,mBAAA;IACA,qBAAA;ELoiBJ;AACF;AKhiBA;EAEI;IACE,iBAAA;ELiiBJ;EK9hBE;IACE,yDAAA;IACA,eAAA;IACA,mBAAA;IACA,qBAAA;ELgiBJ;AACF;AK5hBA;EAEI;IACE,WAAA;EL6hBJ;EK1hBE;IACE,yDAAA;IACA,eAAA;IACA,qBAAA;EL4hBJ;AACF;AKxhBA;EAEI;IACE,WAAA;IACA,iBAAA;ELyhBJ;EKthBE;IACE,eAAA;ELwhBJ;AACF;AKphBA;EACE;IASE,sBAAA;IACA,kCAAA;EL8gBF;EKrhBI;IACE,WAAA;IACA,YAAA;ELuhBN;EKhhBE;IACE,eAAA;ELkhBJ;AACF;AK9gBA;EAEI;IACE,iBAAA;IACA,aAAA;IACA,cAAA;EL+gBJ;EK5gBE;IACE,iBAAA;IACA,eAAA;IACA,sBAAA;IACA,mBAAA;EL8gBJ;EK3gBE;IACE,eAAA;EL6gBJ;AACF;AMx0BA;EACC,gDAAA;EACA,4BAAA;EACA,2BAAA;EACA,sBAAA;EACA,kBAAA;AN00BD;AMx0BC;EACC,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;EACA,sFAAA;EAIA,UAAA;ANu0BF;AMr0BE;EACC,WAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;EACA,8BAAA;ANu0BH;AMp0BE;EACC,UAAA;ANs0BH;AMl0BC;EACC,sBAAA;ANo0BF;AMj0BC;EACC,kBAAA;EACA,OAAA;EACA,MAAA;EACA,QAAA;EACA,YAAA;EACA,UAAA;ANm0BF;AMj0BE;EACC,WAAA;ANm0BH;AM/zBC;EACC,kBAAA;EACA,OAAA;EACA,MAAA;EACA,WAAA;EACA,YAAA;EACA,oBAAA;EAAA,iBAAA;EACA,UAAA;ANi0BF;AM/zBE;EACC,eAAA;EACA,oBAAA;EAAA,iBAAA;ANi0BH;AM9zBE;EACC,oBAAA;EAAA,iBAAA;ANg0BH;AM7zBE;EACC,aAAA;AN+zBH;AM3zBC;EACC,iBAAA;EACA,kBAAA;EACA,yCAAA;EAAA,iCAAA;EACA,sBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,qBAAA;EAAA,kBAAA;EAAA,oBAAA;AN6zBF;AM3zBE;EACC,iBAAA;EACA,UAAA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EACA,UAAA;AN6zBH;AMzzBC;EACC,gBAAA;EACA,UAAA;EACA,mBAAA;AN2zBF;AMzzBE;EACC,aAAA;AN2zBH;AMvzBC;EACC,gBAAA;EACA,UAAA;EACA,mBAAA;ANyzBF;AMvzBE;EACC,aAAA;ANyzBH;AMrzBC;EACC,gBAAA;EACA,UAAA;EACA,2CAAA;EAAA,mCAAA;EACA,0BAAA;EAAA,sBAAA;ANuzBF;AMrzBE;EACC,oBAAA;ANuzBH;AMpzBE;EACC,aAAA;ANszBH;AMlzBC;EACC,kBAAA;EACA,QAAA;EACA,SAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EACA,yCAAA;EAAA,iCAAA;EACA,UAAA;ANozBF;AMlzBE;EACC,yCAAA;EAAA,iCAAA;ANozBH;AMjzBE;EACC,aAAA;ANmzBH;AMhzBE;EACC,kBAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;ANkzBH;AM9yBC;EACC,sBAAA;ANgzBF;AM7yBC;EACC,kBAAA;AN+yBF;;AM3yBA;EAEE;IACC,kBAAA;EN6yBD;AACF;AMzyBA;EAEE;IACC,eAAA;EN0yBD;EMvyBA;IACC,mBAAA;ENyyBD;EMryBC;IACC,gBAAA;IACA,gBAAA;ENuyBF;EMnyBA;IACC,cAAA;IACA,eAAA;IACA,iBAAA;IACA,mBAAA;ENqyBD;AACF;AMjyBA;EACC;IACC,0DAAA;ENmyBA;AACF;AMhyBA;EAEE;IACC,eAAA;ENiyBD;EM9xBA;IACC,gBAAA;IACA,mBAAA;ENgyBD;EM7xBA;IACC,gBAAA;IACA,uBAAA;IAAA,mBAAA;IAAA,eAAA;IACA,oBAAA;EN+xBD;EM7xBC;IACC,YAAA;IACA,YAAA;EN+xBF;AACF;AM1xBA;EAEE;IACC,gBAAA;EN2xBD;AACF;AMvxBA;EAEE;IACC,eAAA;IACA,iBAAA;IACA,kBAAA;ENwxBD;EMrxBA;IACC,mBAAA;ENuxBD;AACF;AMnxBA;EACC,6BAAA;EACA,UAAA;EACA,sBAAA;EACA,uBAAA;ANqxBD;;AMlxBA;EACC,6BAAA;EACA,OAAA;EACA,QAAA;EACA,MAAA;EACA,SAAA;EACA,aAAA;ANqxBD;;AOxhCA;EACC,iBAAA;EACA,mBAAA;EACA,8BAAA;AP2hCD;AOzhCC;EACC,gBAAA;EACA,yBAAA;EACA,mBAAA;AP2hCF;AOzhCE;EACC,yBAAA;AP2hCH;AOvhCC;EACC,aAAA;APyhCF;AOthCC;EACC,yBAAA;EACA,mBAAA;EACA,gBAAA;APwhCF;AOrhCC;EACC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,qBAAA;EACA,WAAA;EACA,sBAAA;EAAA,mBAAA;EAAA,qBAAA;APuhCF;AOphCC;EACC,kBAAA;EACA,iBAAA;EACA,0BAAA;EACA,yBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,YAAA;EACA,gBAAA;EACA,UAAA;EACA,WAAA;EACA,yCAAA;EAAA,iCAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,qBAAA;EAAA,iBAAA;APshCF;AOphCE;EACC,WAAA;EACA,kBAAA;EACA,SAAA;EACA,wBAAA;EACA,uEAAA;EACA,YAAA;EACA,yBAAA;EACA,WAAA;APshCH;AOnhCE;EACC,qCAAA;EAAA,iCAAA;EAAA,6BAAA;APqhCH;AOlhCE;EACC,aAAA;APohCH;AOjhCE;EACC,gBAAA;APmhCH;AOhhCE;EACC,2BAAA;EAAA,2BAAA;EAAA,oBAAA;EAMA,cAAA;AP6gCH;AOjhCG;EACC,WAAA;APmhCJ;AO7gCE;EACC,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;AP+gCH;AO5gCE;EACC,YAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,YAAA;AP8gCH;AO5gCG;EACC,WAAA;EACA,kBAAA;EACA,WAAA;EACA,SAAA;EACA,SAAA;EACA,WAAA;EACA,8BAAA;EACA,gCAAA;EAAA,4BAAA;EAAA,wBAAA;AP8gCJ;AOzgCC;EACC,iBAAA;AP2gCF;AOxgCC;EACC,iBAAA;AP0gCF;AOvgCC;EACC,iBAAA;APygCF;AOtgCC;EACC,iBAAA;APwgCF;;AOpgCA;EAEE;IACC,WAAA;EPsgCD;EOngCA;IACC,gBAAA;EPqgCD;EOlgCA;IACC,gBAAA;EPogCD;EOjgCA;IACC,iBAAA;EPmgCD;EOhgCA;IACC,iBAAA;EPkgCD;AACF;AO9/BA;EACC;IACC,iBAAA;IACA,mBAAA;EPggCA;EO9/BA;IACC,WAAA;EPggCD;EO7/BA;IACC,gBAAA;IACA,mBAAA;EP+/BD;EO5/BA;IACC,gBAAA;IACA,yBAAA;IACA,iBAAA;IACA,WAAA;EP8/BD;EO5/BC;IACC,cAAA;IACA,eAAA;EP8/BF;EO1/BA;IACC,gBAAA;EP4/BD;EO1/BC;IACC,WAAA;EP4/BF;EOx/BA;IACC,gBAAA;EP0/BD;EOx/BC;IACC,WAAA;EP0/BF;EOt/BA;IACC,gBAAA;EPw/BD;EOt/BC;IACC,WAAA;EPw/BF;EOp/BA;IACC,gBAAA;EPs/BD;EOp/BC;IACC,WAAA;EPs/BF;AACF;AOj/BA;EAEE;IACC,gBAAA;EPk/BD;EOh/BC;IACC,WAAA;EPk/BF;EO9+BA;IACC,gBAAA;EPg/BD;EO9+BC;IACC,WAAA;EPg/BF;EO5+BA;IACC,gBAAA;EP8+BD;EO5+BC;IACC,WAAA;EP8+BF;EO1+BA;IACC,gBAAA;EP4+BD;EO1+BC;IACC,WAAA;EP4+BF;AACF;AOv+BA;EAEE;IACC,yBAAA;IACA,WAAA;EPw+BD;EOr+BA;IACC,gBAAA;EPu+BD;EOr+BC;IACC,WAAA;EPu+BF;EOn+BA;IACC,gBAAA;EPq+BD;EOn+BC;IACC,WAAA;EPq+BF;EOj+BA;IACC,gBAAA;EPm+BD;EOj+BC;IACC,WAAA;EPm+BF;EO/9BA;IACC,gBAAA;EPi+BD;EO/9BC;IACC,WAAA;EPi+BF;AACF;AO59BA;EAEE;IACC,uBAAA;IACA,WAAA;EP69BD;EO39BC;IACC,gCAAA;IAAA,4BAAA;IAAA,wBAAA;EP69BF;EOz9BA;IACC,gBAAA;EP29BD;EOz9BC;IACC,WAAA;EP29BF;EOv9BA;IACC,gBAAA;EPy9BD;EOv9BC;IACC,WAAA;EPy9BF;EOr9BA;IACC,gBAAA;EPu9BD;EOr9BC;IACC,WAAA;EPu9BF;EOn9BA;IACC,gBAAA;EPq9BD;EOn9BC;IACC,WAAA;EPq9BF;AACF;AOh9BA;EAGE;IACC,WAAA;IACA,0BAAA;IACA,wBAAA;IACA,WAAA;EPg9BD;EO98BC;IACC,aAAA;EPg9BF;EO78BC;IACC,0BAAA;IAAA,sBAAA;EP+8BF;EO58BC;IACC,aAAA;EP88BF;EO38BC;IACC,aAAA;EP68BF;EO18BC;IACC,aAAA;EP48BF;EOz8BC;IACC,cAAA;IACA,gBAAA;EP28BF;EOv8BA;IACC,qBAAA;EPy8BD;AACF;AOr8BA;EACC;IACC,iBAAA;EPu8BA;EOr8BA;IACC,eAAA;IACA,qBAAA;IAEA,iBAAA;IACA,mBAAA;EPs8BD;EOn8BA;IACC,mBAAA;EPq8BD;AACF;AOj8BA;EACC;IACC,iBAAA;EPm8BA;EOj8BA;IACC,aAAA;EPm8BD;EOh8BA;IACC,cAAA;EPk8BD;AACF;AO97BA;EAEE;IACC,eAAA;EP+7BD;AACF;AQt1CA;EACE,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,oCAAA;ARw1CF;AQt1CE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,kBAAA;ARw1CJ;AQr1CE;EACE,UAAA;EACA,oBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,kBAAA;EACA,WAAA;EACA,mBAAA;ARu1CJ;AQr1CI;EACE,WAAA;EACA,kBAAA;EACA,UAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,0FAAA;EAGA,WAAA;EACA,+BAAA;EAAA,2BAAA;EAAA,uBAAA;EACA,kCAAA;EAAA,0BAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;ARq1CN;AQj1CE;EACE,mBAAA;ARm1CJ;AQh1CE;EACE,cAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;ARk1CJ;AQ/0CE;EACE,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,WAAA;ARi1CJ;AQ90CE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,SAAA;EACA,mBAAA;ARg1CJ;AQ70CE;EACE,kBAAA;EACA,MAAA;EACA,SAAA;EACA,WAAA;EACA,iBAAA;EACA,SAAA;EACA,mCAAA;EAAA,+BAAA;EAAA,2BAAA;EACA,gBAAA;AR+0CJ;AQ50CE;EACE,UAAA;EACA,kBAAA;EACA,UAAA;EACA,UAAA;AR80CJ;AQ50CI;EACE,eAAA;AR80CN;AQ30CI;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,+BAAA;EAAA,uBAAA;EACA,2BAAA;EAAA,uBAAA;EAAA,mBAAA;EACA,uDAAA;EAAA,+CAAA;EAAA,uCAAA;EAAA,4EAAA;AR60CN;AQ30CM;EACE,YAAA;EACA,aAAA;EACA,YAAA;EACA,yCAAA;EAAA,iCAAA;AR60CR;AQ10CM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,WAAA;EACA,4BAAA;EAAA,oBAAA;AR40CR;AQ10CQ;EACE,yDAAA;EAAA,iDAAA;AR40CV;AQ10CU;EACE,oCAAA;AR40CZ;AQx0CQ;EACE,UAAA;AR00CV;AQv0CQ;EACE,YAAA;EACA,yCAAA;EAAA,iCAAA;ARy0CV;AQp0CM;EACE,0CAAA;EAAA,kCAAA;EACA,oBAAA;ARs0CR;AQl0CI;EACE,kBAAA;EACA,oDAAA;EAAA,4CAAA;EACA,yCAAA;EAAA,iCAAA;ARo0CN;AQl0CM;EACE,WAAA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,qCAAA;EACA,UAAA;ARo0CR;AQh0CI;EACE,kBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,QAAA;EACA,SAAA;EACA,aAAA;EACA,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EACA,UAAA;EACA,UAAA;EACA,yCAAA;EAAA,iCAAA;ARk0CN;AQh0CM;EACE,yCAAA;EAAA,iCAAA;ARk0CR;AQ/zCM;EACE,sBAAA;ARi0CR;AQ9zCM;EACE,kBAAA;ARg0CR;AQ5zCI;EACE,wBAAA;EAAA,gBAAA;EACA,8BAAA;EACA,kBAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAEA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,UAAA;AR6zCN;AQ3zCM;EACE,WAAA;AR6zCR;AQ1zCM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;AR4zCR;AQxzCI;EACE,YAAA;AR0zCN;AQvzCI;EACE,SAAA;ARyzCN;AQtzCI;EACE,UAAA;ARwzCN;AQrzCI;EACE,cAAA;EACA,cAAA;EACA,gBAAA;EACA,gBAAA;EACA,WAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;ARuzCN;AQnzCE;EACE,sBAAA;EACA,2BAAA;EACA,iBAAA;EACA,mBAAA;ARqzCJ;AQlzCE;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,wBAAA;EACA,8BAAA;EACA,YAAA;EACA,SAAA;ARozCJ;AQjzCE;EACE,yCAAA;EACA,UAAA;ARmzCJ;;AQ/yCA;EAEI;IACE,UAAA;ERizCJ;EQ9yCE;IACE,UAAA;IACA,aAAA;ERgzCJ;EQ7yCM;IACE,aAAA;ER+yCR;EQ3yCI;IACE,SAAA;ER6yCN;EQ1yCI;IACE,UAAA;ER4yCN;AACF;AQvyCA;EACE;IACE,gBAAA;ERyyCF;EQvyCE;IACE,oBAAA;ERyyCJ;EQvyCI;IACE,UAAA;ERyyCN;EQryCE;IACE,eAAA;IACA,mBAAA;ERuyCJ;EQpyCE;IACE,eAAA;IACA,gBAAA;ERsyCJ;EQnyCE;IACE,mBAAA;ERqyCJ;EQlyCE;IACE,UAAA;IACA,YAAA;ERoyCJ;EQjyCM;IACE,aAAA;IACA,YAAA;ERmyCR;EQ/xCQ;IACE,YAAA;ERiyCV;EQ3xCI;IACE,UAAA;ER6xCN;EQ1xCI;IACE,gBAAA;IACA,mBAAA;ER4xCN;EQ1xCM;IACE,WAAA;ER4xCR;EQxxCI;IACE,eAAA;IACA,gBAAA;ER0xCN;AACF;AQrxCA;EAEI;IACE,UAAA;ERsxCJ;EQ/wCE;IACE,SAAA;ERixCJ;EQ9wCE;IACE,UAAA;ERgxCJ;AACF;AQ5wCA;EACE;IACE,oBAAA;ER8wCF;EQ5wCE;IACE,oBAAA;ER8wCJ;EQ5wCI;IACE,UAAA;ER8wCN;EQ1wCE;IACE,mBAAA;ER4wCJ;EQzwCE;IACE,gBAAA;ER2wCJ;EQxwCE;IACE,mBAAA;IACA,SAAA;ER0wCJ;EQrwCM;IACE,YAAA;ERuwCR;EQpwCM;IACE,aAAA;IACA,YAAA;ERswCR;EQlwCI;IACE,WAAA;IACA,YAAA;ERowCN;EQjwCI;IACE,WAAA;IACA,YAAA;IACA,UAAA;ERmwCN;EQhwCI;IACE,SAAA;ERkwCN;EQ/vCI;IACE,UAAA;ERiwCN;EQ9vCI;IACE,cAAA;ERgwCN;EQ7vCI;IACE,WAAA;ER+vCN;AACF;AQ1vCA;EAEI;IACE,WAAA;IACA,oBAAA;ER2vCJ;EQzvCI;IACE,aAAA;ER2vCN;EQvvCE;IACE,mBAAA;ERyvCJ;EQtvCE;IACE,gBAAA;ERwvCJ;EQrvCE;IACE,gBAAA;ERuvCJ;EQpvCE;IACE,gBAAA;IACA,WAAA;ERsvCJ;EQpvCI;IACE,kBAAA;IACA,iCAAA;IAAA,6BAAA;IAAA,yBAAA;IACA,UAAA;ERsvCN;EQpvCM;IACE,WAAA;IACA,kBAAA;IACA,UAAA;IACA,OAAA;IACA,MAAA;IACA,QAAA;IACA,cAAA;IACA,4IAAA;IAAA,0FAAA;IAGA,+CAAA;IAAA,2CAAA;IAAA,uCAAA;IACA,kCAAA;IAAA,0BAAA;ERovCR;EQhvCI;IACE,kCAAA;IACA,iCAAA;IAEA,gBAAA;IACA,gCAAA;IAAA,4BAAA;IAAA,wBAAA;IACA,wBAAA;ERivCN;EQ7uCM;IACE,aAAA;ER+uCR;EQ5uCM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ER8uCR;EQ3uCM;IAEE,YAAA;ER4uCR;EQxuCI;IACE,UAAA;ER0uCN;EQvuCI;IACE,mBAAA;ERyuCN;EQtuCI;IACE,SAAA;ERwuCN;EQruCI;IACE,UAAA;ERuuCN;AACF;AQluCA;EACE;IACE,gBAAA;ERouCF;EQhuCM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ERkuCR;AACF;AQ5tCA;EAGI;IACE,eAAA;ER4tCJ;EQztCE;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;ER2tCJ;EQvtCI;IACE,iBAAA;ERytCN;EQvtCM;IACE,UAAA;ERytCR;EQptCM;IACE,aAAA;ERstCR;EQltCQ;IACE,YAAA;ERotCV;EQ/sCI;IACE,WAAA;IACA,YAAA;ERitCN;EQ9sCI;IACE,UAAA;IACA,WAAA;IACA,YAAA;ERgtCN;EQ9sCM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ERgtCR;EQ5sCI;IACE,SAAA;ER8sCN;EQ3sCI;IACE,UAAA;ER6sCN;AACF;AQxsCA;EAEI;IACE,oBAAA;ERysCJ;EQrsCI;IACE,iBAAA;ERusCN;EQpsCI;IACE,eAAA;IACA,gBAAA;IACA,mBAAA;ERssCN;EQnsCI;IACE,iBAAA;ERqsCN;EQlsCI;IACE,SAAA;ERosCN;EQjsCI;IACE,UAAA;ERmsCN;AACF;AQ9rCA;EAGM;IACE,cAAA;ER8rCN;EQ3rCI;IACE,UAAA;ER6rCN;EQ1rCI;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ER4rCN;AACF;ASxzDA;EACE,sBAAA;EACA,uBAAA;EACA,kBAAA;EACA,gBAAA;EACA,oCAAA;AT0zDF;ASvzDI;EACE,0BAAA;EAAA,uBAAA;EAAA,oBAAA;ATyzDN;AStzDI;EACE,kBAAA;EACA,UAAA;EACA,mBAAA;EAAA,oBAAA;EAAA,YAAA;ATwzDN;ASpzDI;EACE,4CAAA;EACA,kBAAA;EACA,+BAAA;EACA,iBAAA;EACA,mCAAA;ATszDN;ASlzDI;EACE,eAAA;EACA,mBAAA;ATozDN;ASjzDI;EACE,gBAAA;EACA,oBAAA;ATmzDN;AShzDI;EACE,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;ATkzDN;AS/yDI;EACE,eAAA;EACA,gBAAA;EACA,iBAAA;ATizDN;AS9yDI;EACE,eAAA;EACA,gBAAA;EACA,gBAAA;ATgzDN;AS7yDI;EACE,YAAA;EACA,kBAAA;EACA,gBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,sBAAA;EAAA,mBAAA;EAAA,qBAAA;AT+yDN;AS7yDM;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,YAAA;EACA,YAAA;EACA,UAAA;EACA,gCAAA;EAAA,4BAAA;EAAA,wBAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,yIAAA;EAAA,yFAAA;EACA,mCAAA;EAAA,2BAAA;AT+yDR;AS5yDM;EACE,kBAAA;EACA,WAAA;AT8yDR;ASzyDI;EACE,kBAAA;EACA,YAAA;EACA,WAAA;AT2yDN;ASzyDM;EACE,YAAA;AT2yDR;ASvyDI;EACE,+CAAA;EACA,kBAAA;EACA,aAAA;EACA,6BAAA;EACA,8BAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,sBAAA;EACA,8BAAA;EAAA,sBAAA;EACA,oBAAA;ATyyDN;AStyDI;EACE,wBAAA;EAAA,gBAAA;EACA,8BAAA;EACA,kBAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,aAAA;EACA,SAAA;ATwyDN;AStyDM;EACE,WAAA;ATwyDR;ASryDM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;ATuyDR;ASjyDM;EACE,kBAAA;ATmyDR;AShyDM;EACE,UAAA;EACA,2BAAA;EACA,+BAAA;ATkyDR;AS/xDM;EACE,0BAAA;EACA,+BAAA;ATiyDR;AS9xDM;EACE,kBAAA;EACA,+BAAA;EACA,iBAAA;EACA,mCAAA;ATgyDR;AS5xDI;EACE,iBAAA;EACA,mBAAA;AT8xDN;AS3xDI;EACE,kBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;AT6xDN;ASzxDE;EACE,sBAAA;EACA,wBAAA;EACA,oBAAA;EACA,8CAAA;EAAA,0CAAA;EAAA,sCAAA;AT2xDJ;ASxxDE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,SAAA;AT0xDJ;ASxxDI;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,8BAAA;EACA,YAAA;EACA,SAAA;AT0xDN;AStxDE;EACE,yCAAA;EACA,UAAA;ATwxDJ;;ASpxDA;EACE;IACE,sBAAA;IACA,sBAAA;ETuxDF;ESpxDI;IACE,oBAAA;ETsxDN;ESlxDM;IACE,SAAA;EToxDR;AACF;AS7wDA;EACE;IACE,oBAAA;IACA,oBAAA;ET+wDF;ES1wDI;IACE,qBAAA;ET4wDN;ESxwDM;IACE,SAAA;ET0wDR;EStwDI;IACE,eAAA;ETwwDN;ESrwDI;IACE,gBAAA;IACA,mBAAA;ETuwDN;ESpwDI;IACE,eAAA;IACA,mBAAA;ETswDN;ESnwDI;IACE,eAAA;ETqwDN;ESlwDI;IACE,eAAA;IACA,gBAAA;ETowDN;ESjwDI;IACE,eAAA;IACA,iBAAA;ETmwDN;EShwDI;IACE,wBAAA;ETkwDN;ES/vDI;IACE,aAAA;ETiwDN;ES7vDM;IACE,WAAA;IACA,WAAA;ET+vDR;ES5vDM;IACE,UAAA;IACA,YAAA;ET8vDR;AACF;ASxvDA;EACE;IACE,oBAAA;IACA,oBAAA;ET0vDF;ESvvDI;IACE,WAAA;ETyvDN;EStvDI;IACE,WAAA;IACA,YAAA;ETwvDN;ESrvDI;IACE,gBAAA;ETuvDN;ESpvDI;IACE,eAAA;IACA,qBAAA;ETsvDN;ESlvDM;IACE,WAAA;ETovDR;ESjvDM;IACE,YAAA;ETmvDR;AACF;AS5uDA;EACE;IACE,mBAAA;IACA,sBAAA;ET8uDF;ES1uDI;IACE,sBAAA;IACA,cAAA;IACA,cAAA;ET4uDN;ESzuDI;IACE,mBAAA;ET2uDN;ESxuDI;IACE,YAAA;IACA,OAAA;IACA,QAAA;ET0uDN;ESvuDI;IACE,wBAAA;ETyuDN;EStuDI;IACE,eAAA;IACA,qBAAA;ETwuDN;ESpuDM;IACE,eAAA;ETsuDR;ESnuDM;IACE,OAAA;ETquDR;ESluDM;IACE,QAAA;ETouDR;EShuDI;IACE,gBAAA;ETkuDN;EShuDM;IACE,2BAAA;IAAA,uBAAA;IAAA,mBAAA;IACA,+BAAA;IAAA,2BAAA;IAAA,uBAAA;IACA,OAAA;IACA,QAAA;IACA,UAAA;IACA,YAAA;IACA,yFAAA;ETkuDR;ES9tDI;IACE,WAAA;IACA,OAAA;ETguDN;ES9tDM;IACE,WAAA;ETguDR;AACF;ASztDA;EAIM;IACE,mBAAA;IACA,eAAA;IACA,qBAAA;ETwtDN;ESptDM;IACE,YAAA;ETstDR;ESltDI;IACE,gBAAA;ETotDN;ESjtDI;IACE,eAAA;ETmtDN;ES/sDM;IACE,WAAA;ETitDR;ES7sDI;IACE,iBAAA;IACA,eAAA;ET+sDN;ES5sDI;IACE,aAAA;IACA,WAAA;IACA,YAAA;ET8sDN;ES5sDM;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;ET8sDR;AACF;ASxsDA;EAIM;IACE,sBAAA;ETusDN;ESlsDM;IACE,UAAA;ETosDR;AACF;AU/oEA;EACE,kBAAA;EACA,oBAAA;EACA,gBAAA;EAEA,8CAAA;EACA,4BAAA;EACA,sBAAA;AVgpEF;AU9oEE;EACE,kBAAA;EACA,UAAA;AVgpEJ;AU7oEE;EACE,mBAAA;AV+oEJ;AU5oEE;EACE,gBAAA;EACA,mBAAA;EACA,eAAA;AV8oEJ;AU3oEE;EACE,kBAAA;EACA,QAAA;EACA,MAAA;EACA,WAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AV6oEJ;AU1oEE;EACE,2BAAA;EAAA,2BAAA;EAAA,oBAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,0BAAA;EAAA,qBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,SAAA;AV4oEJ;AUzoEE;EACE,2BAAA;EAAA,0BAAA;EAAA,kBAAA;EACA,YAAA;AV2oEJ;AUxoEE;EACE,eAAA;EACA,uBAAA;EACA,eAAA;AV0oEJ;;AUtoEA;EACE;IACE,qCAAA;EVyoEF;EUvoEE;IACE,2BAAA;IAAA,uBAAA;IAAA,mBAAA;EVyoEJ;AACF;AUroEA;EAEI;IACE,gBAAA;IACA,mBAAA;IACA,eAAA;EVsoEJ;EUnoEE;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;EVqoEJ;EUloEE;IACE,YAAA;EVooEJ;EUjoEE;IACE,iBAAA;EVmoEJ;AACF;AU/nEA;EAGI;IACE,gBAAA;IACA,mBAAA;IACA,eAAA;EV+nEJ;EU5nEE;IACE,6BAAA;IAAA,yBAAA;IAAA,qBAAA;EV8nEJ;AACF;AU1nEA;EAEI;IACE,gBAAA;EV2nEJ;EUvnEE;IACE,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,2BAAA;IAAA,uBAAA;IAAA,mBAAA;IACA,UAAA;IACA,SAAA;EVynEJ;AACF;AUrnEA;EAEE;IACE,iBAAA;IACA,qDAAA;IACA,gCAAA;EVsnEF;EUpnEE;IACE,gBAAA;IACA,gBAAA;IACA,WAAA;IACA,cAAA;IACA,2BAAA;IAAA,uBAAA;IAAA,mBAAA;EVsnEJ;EUnnEE;IACE,eAAA;IACA,gBAAA;IACA,mBAAA;EVqnEJ;EUlnEE;IACE,kBAAA;IACA,UAAA;IACA,SAAA;IACA,oBAAA;IACA,OAAA;IACA,QAAA;EVonEJ;EUlnEI;IACE,WAAA;IACA,kBAAA;IACA,wCAAA;IACA,yCAAA;IACA,SAAA;IACA,aAAA;IACA,WAAA;IACA,gHAAA;IACA,kCAAA;IAAA,0BAAA;IACA,iEAAA;IAAA,yDAAA;EVonEN;EUhnEE;IACE,aAAA;EVknEJ;EU/mEE;IACE,gBAAA;IACA,WAAA;IACA,cAAA;IACA,eAAA;IACA,iBAAA;EVinEJ;AACF;AU7mEA;EACE;IACE,iBAAA;EV+mEF;EU7mEE;IACE,iBAAA;EV+mEJ;EU5mEE;IACE,gBAAA;EV8mEJ;AACF;AWtyEA;EACE,aAAA;AXwyEF;;AWnyEI;EACE,0DAAA;EAAA,kDAAA;AXsyEN;AWlyEE;EACE,YAAA;EACA,mBAAA;AXoyEJ;AWjyEE;EACE,YAAA;AXmyEJ;AWjyEI;EACE,qBAAA;AXmyEN;AW/xEE;EACE,eAAA;EACA,yBAAA;EACA,8BAAA;EACA,yBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;AXiyEJ;AW9xEE;EACE,qBAAA;EACA,mBAAA;AXgyEJ;AW7xEE;EACE,WAAA;EACA,YAAA;EACA,wCAAA;EAAA,gCAAA;AX+xEJ;AW5xEE;EACE,aAAA;EACA,gBAAA;EACA,wCAAA;EAAA,gCAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,yBAAA;EACA,sBAAA;EACA,kBAAA;AX8xEJ;AW3xEE;EACE,iBAAA;AX6xEJ;AW3xEI;EACE,+CACE;AX4xER;AWxxEI;EACE,kBAAA;AX0xEN;AWtxEE;EACE,iBAAA;EACA,4BAAA;EACA,kBAAA;AXwxEJ;;AWpxEA;EAEI;IACE,eAAA;IACA,sBAAA;EXsxEJ;EWnxEM;IACE,kBAAA;EXqxER;EWhxEE;IACE,4BAAA;EXkxEJ;EW/wEE;IACE,YAAA;IACA,mBAAA;EXixEJ;EW9wEE;IACE,YAAA;EXgxEJ;EW7wEE;IACE,0DAAA;IAAA,kDAAA;EX+wEJ;EW5wEE;IACE,yBAAA;EX8wEJ;EW3wEE;IACE,eAAA;EX6wEJ;EW1wEE;IACE,qBAAA;EX4wEJ;AACF;AWxwEA;EACE;IACE,aAAA;EX0wEF;EWvwEA;IACE,cAAA;IACA,kCAAA;IACA,iCAAA;IACA,iBAAA;IACA,kBAAA;EXywEF;EWrwEE;IACE,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,8BAAA;IACA,QAAA;EXuwEJ;EWpwEE;IACE,yBAAA;EXswEJ;EWlwEI;IACE,UAAA;IACA,gBAAA;EXowEN;EWjwEI;IACE,UAAA;EXmwEN;EWjwEM;IACE,2DAAA;IAAA,mDAAA;EXmwER;EWhwEM;IACE,kBAAA;EXkwER;EW/vEM;IACE,qBAAA;EXiwER;EW5vEE;IACE,gBAAA;EX8vEJ;EW3vEE;IACE,qBAAA;EX6vEJ;AACF;AWzvEA;EAEI;IACE,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,SAAA;EX0vEJ;EWvvEE;IACE,eAAA;IACA,sBAAA;EXyvEJ;EWtvEM;IACE,kBAAA;EXwvER;EWnvEE;IACE,4BAAA;EXqvEJ;EWjvEI;IACE,WAAA;IACA,gBAAA;EXmvEN;EWhvEI;IACE,WAAA;IACA,gBAAA;EXkvEN;EWhvEM;IACE,cAAA;EXkvER;EW9uEI;IACE,0DAAA;IAAA,kDAAA;EXgvEN;EW7uEI;IACE,qBAAA;EX+uEN;EW3uEE;IACE,4BAAA;EX6uEJ;EW1uEE;IACE,eAAA;EX4uEJ;EWzuEE;IACE,WAAA;IACA,YAAA;EX2uEJ;EWzuEI;IACE,sBAAA;IAAA,mBAAA;EX2uEN;AACF;AY59EA;EACE,gBAAA;AZ89EF;AY59EE;EACE,+CAAA;EACA,sBAAA;EACA,2BAAA;EACA,4BAAA;AZ89EJ;AY39EE;EACE,gBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,qBAAA;EAAA,kBAAA;EAAA,yBAAA;AZ69EJ;AY19EE;EACE,eAAA;EACA,kBAAA;EACA,gBAAA;AZ49EJ;AYz9EE;EACE,mBAAA;AZ29EJ;;AYv9EA;EACE;IACE,gBAAA;EZ09EF;EYx9EE;IACE,gBAAA;EZ09EJ;EYv9EE;IACE,eAAA;IACA,kBAAA;EZy9EJ;EYt9EE;IACE,mBAAA;EZw9EJ;AACF;AY98EA;EAEI;IACE,eAAA;EZ+8EJ;AACF;AY38EA;EAEI;IACE,gBAAA;IACA,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,oBAAA;EZ48EJ;EYz8EE;IACE,mBAAA;IACA,kBAAA;IACA,eAAA;IACA,eAAA;IACA,qBAAA;IACA,iBAAA;EZ28EJ;AACF;AYv8EA;EAEI;IACE,eAAA;EZw8EJ;AACF;Aa9hFA;EACE,oBAAA;AbgiFF;Aa9hFE;EACE,iBAAA;EACA,kBAAA;AbgiFJ;Aa7hFE;EACE,0BAAA;EAAA,uBAAA;EAAA,oBAAA;Ab+hFJ;Aa5hFE;EACE,YAAA;EACA,uBAAA;EACA,8BAAA;EAAA,sBAAA;EACA,8BAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,kBAAA;Ab8hFJ;Aa5hFI;EACE,wDAAA;EAAA,gDAAA;EACA,uBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,YAAA;Ab8hFN;Aa3hFI;EACE,eAAA;EACA,mBAAA;EAAA,oBAAA;EAAA,YAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;Ab6hFN;Aa1hFI;EACE,iBAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EAAA,mBAAA;Ab4hFN;AazhFI;EACE,yBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,kBAAA;Ab2hFN;AaxhFI;EACE,qBAAA;EACA,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;Ab0hFN;AavhFI;EACE,qBAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;AbyhFN;AathFI;EAEE,WAAA;EACA,iBAAA;EACA,kBAAA;EACA,YAAA;EAOA,gBAAA;AbihFN;AathFM;EACE,kCAAA;EACA,UAAA;AbwhFR;AalhFI;EACE,kBAAA;EACA,mBAAA;AbohFN;AajhFI;EACE,WAAA;EACA,kBAAA;EACA,WAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,oBAAA;EAAA,iBAAA;EACA,gDAAA;AbmhFN;Aa/gFE;EACE,kBAAA;EACA,eAAA;AbihFJ;Aa9gFE;EACE,OAAA;EACA,QAAA;EACA,QAAA;EACA,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AbghFJ;Aa7gFE;EACE,6BAAA;EACA,eAAA;EACA,YAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,iBAAA;Ab+gFJ;Aa7gFI;EACE,WAAA;Ab+gFN;Aa5gFI;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;Ab8gFN;Aa1gFE;EACE,sBAAA;Ab4gFJ;AazgFE;EACE,SAAA;Ab2gFJ;AaxgFE;EACE,UAAA;Ab0gFJ;AavgFE;EACE,kBAAA;EACA,SAAA;EACA,iBAAA;EACA,kBAAA;AbygFJ;AatgFE;EACE,WAAA;EACA,WAAA;EACA,cAAA;EACA,gBAAA;EACA,yBAAA;EACA,kBAAA;EACA,8BAAA;EACA,SAAA;AbwgFJ;AatgFI;EACE,WAAA;EACA,kBAAA;EACA,QAAA;EACA,OAAA;EACA,WAAA;EACA,WAAA;EACA,mCAAA;EAAA,+BAAA;EAAA,2BAAA;EACA,2CAAA;AbwgFN;AangFI;EACE,0CAAA;AbqgFN;;AahgFA;EAEI;IACE,mBAAA;EbkgFJ;AACF;Aa9/EA;EAGM;IACE,YAAA;IACA,iBAAA;Eb8/EN;Ea3/EI;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;Eb6/EN;Ea1/EI;IACE,eAAA;Eb4/EN;Eaz/EI;IACE,eAAA;IACA,mBAAA;Eb2/EN;Eax/EI;IACE,uBAAA;Eb0/EN;Eav/EI;IACE,UAAA;Eby/EN;Eap/EA;IACE,yBAAA;Ebs/EF;AACF;Aan/EA;EAEI;IACE,mBAAA;Ebo/EJ;AACF;Aah/EA;EAEI;IACE,YAAA;IACA,iBAAA;Ebi/EJ;Ea9+EE;IACE,gBAAA;Ebg/EJ;AACF;Aa5+EA;EACE;IACE,iBAAA;Eb8+EF;Ea3+EI;IACE,WAAA;IACA,wBAAA;Eb6+EN;AACF;Aax+EA;EAGM;IACE,WAAA;IACA,wBAAA;Ebw+EN;Ean+EI;IACE,mBAAA;Ebq+EN;Eal+EI;IACE,UAAA;Ebo+EN;AACF;Aa/9EA;EAEI;IACE,WAAA;IACA,wBAAA;Ebg+EJ;Ea59EI;IACE,UAAA;Eb89EN;AACF;Aaz9EA;EAEI;IACE,WAAA;IACA,wBAAA;Eb09EJ;Eat9EI;IACE,UAAA;Ebw9EN;AACF;AchxFA;EACE,qBAAA;AdkxFF;AchxFE;EACE,kBAAA;EACA,oBAAA;EACA,mBAAA;EACA,eAAA;AdkxFJ;Ac/wFE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,mBAAA;EAAA,eAAA;EACA,SAAA;AdixFJ;Ac9wFE;EACE,gBAAA;EACA,yCAAA;EAAA,iCAAA;AdgxFJ;Ac9wFI;EACE,qCAAA;EAAA,iCAAA;EAAA,6BAAA;AdgxFN;Ac5wFE;EACE,YAAA;Ad8wFJ;;Ac1wFA;EACE;IACE,oBAAA;Ed6wFF;Ec3wFE;IACE,SAAA;Ed6wFJ;AACF;AczwFA;EACE;IACE,oBAAA;Ed2wFF;EczwFE;IACE,SAAA;Ed2wFJ;EcxwFE;IACE,eAAA;IACA,iBAAA;IACA,mBAAA;Ed0wFJ;EcvwFE;IACE,YAAA;EdywFJ;AACF;AcrwFA;EAEI;IACE,SAAA;EdswFJ;AACF;AchwFA;EACE;IACE,oBAAA;EdkwFF;EchwFE;IACE,YAAA;EdkwFJ;AACF;Ac9vFA;EACE;IACE,qBAAA;EdgwFF;Ec9vFE;IACE,cAAA;EdgwFJ;Ec7vFE;IACE,eAAA;IACA,cAAA;IACA,mBAAA;Ed+vFJ;Ec5vFE;IACE,YAAA;Ed8vFJ;AACF;Ac1vFA;EAEI;IACE,mBAAA;Ed2vFJ;EcxvFE;IACE,YAAA;Ed0vFJ;AACF;ActvFA;EAEI;IACE,gBAAA;IACA,eAAA;EduvFJ;EcpvFE;IACE,YAAA;EdsvFJ;EcnvFE;IACE,cAAA;EdqvFJ;AACF;Ael3FA;EACE,iBAAA;EACA,mBAAA;Afo3FF;Ael3FE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;Afo3FJ;Aeh3FE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,kBAAA;EACA,kBAAA;EACA,WAAA;Afk3FJ;Ae/2FE;EACE,mBAAA;EACA,oBAAA;Afi3FJ;Ae92FE;EACE,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,WAAA;Afg3FJ;Ae72FE;EACE,kBAAA;EACA,aApCY;EAqCZ,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;Af+2FJ;Ae72FI;EACE,UAAA;EACA,kBAAA;EACA,yFAAA;EAAA,iFAAA;Af+2FN;Ae72FM;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;EACA,oDAAA;EACA,YAAA;EACA,oCAAA;EACA,WAAA;Af+2FR;Ae32FI;EACE,YAAA;EACA,mBAAA;EAAA,oBAAA;EAAA,YAAA;EACA,kBAAA;Af62FN;Ae12FI;EACE,oBAAA;Af42FN;Aez2FI;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;Af22FN;Aex2FI;EACE,kBAAA;Af02FN;Aex2FM;EACE,WAAA;EACA,kBAAA;EACA,8CAAA;EACA,2BAAA;EACA,wBAAA;EACA,4BAAA;EACA,WAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;Af02FR;Aet2FI;EACE,gBAAA;Afw2FN;Aer2FI;EACE,wBAAA;EAAA,gBAAA;EACA,6BAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;Afu2FN;Aer2FM;EACE,WAAA;Afu2FR;Aep2FM;EACE,6BAAA;EAAA,yBAAA;EAAA,qBAAA;Afs2FR;Ael2FI;EACE,YAAA;Afo2FN;Aej2FI;EACE,WAAA;Afm2FN;Aeh2FI;EACE,YAAA;Afk2FN;;Ae71FA;EACE;IAqBE,iBAAA;Ef40FF;Eeh2FE;IACE,aAAA;Efk2FJ;Eeh2FI;IACE,UAAA;Efk2FN;Ee91FM;IACE,WAAA;IACA,YAAA;IACA,UAAA;Efg2FR;Ee51FI;IACE,gBAAA;Ef81FN;Eex1FE;IACE,eAAA;IACA,iBAAA;IACA,gBAAA;Ef01FJ;Eev1FE;IACE,mBAAA;Efy1FJ;AACF;Aer1FA;EAEI;IAEE,aAAA;Efq1FJ;Een1FI;IACE,UAAA;Efq1FN;Eel1FI;IACE,gBAAA;Efo1FN;Eeh1FE;IACE,kBAAA;IACA,oBAAA;Efk1FJ;AACF;Ae90FA;EAEI;IACE,aAAA;Ef+0FJ;Ee70FI;IACE,UAAA;Ef+0FN;Ee50FI;IACE,gBAAA;Ef80FN;Ee10FE;IACE,eAAA;IACA,oBAAA;Ef40FJ;AACF;Aex0FA;EAEI;IACE,mBAAA;Efy0FJ;Eer0FI;IACE,gBAAA;Efu0FN;Een0FM;IACE,WAAA;IACA,YAAA;Efq0FR;AACF;Ae/zFA;EAGM;IACE,UAAA;Ef+zFN;Ee5zFI;IACE,gBAAA;Ef8zFN;Ee1zFE;IACE,kBAAA;Ef4zFJ;AACF;AetzFA;EACE;IACE,iBAAA;EfwzFF;EetzFE;IACE,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;EfwzFJ;EerzFE;IACE,gBAAA;IACA,cAAA;IACA,mBAAA;IACA,iBAAA;EfuzFJ;EepzFE;IACE,aAAA;EfszFJ;EepzFI;IACE,gBAAA;EfszFN;EenzFI;IACE,WAAA;IACA,4BAAA;IAAA,iBAAA;IAAA,QAAA;IACA,uBAAA;IAAA,eAAA;EfqzFN;EenzFM;IACE,2BAAA;IAAA,uBAAA;IAAA,mBAAA;IACA,YAAA;IACA,wCAAA;EfqzFR;EejzFI;IACE,4CAAA;EfmzFN;EehzFI;IACE,gBAAA;EfkzFN;Ee/yFI;IACE,OAAA;EfizFN;Ee9yFI;IACE,QAAA;EfgzFN;Ee5yFE;IACE,eAAA;IACA,gBAAA;Ef8yFJ;Ee1yFI;IACE,eAAA;IACA,qBAAA;IACA,iBAAA;Ef4yFN;AACF;AevyFA;EAEI;IACE,eAAA;IACA,mBAAA;EfwyFJ;AACF;AgBzmGA;EACC,oBAAA;AhB2mGD;AgBzmGC;EACC,oBAAA;EACA,mBAAA;AhB2mGF;AgBxmGC;EACC,qDAAA;EAAA,6CAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAEA,2BAAA;EAAA,2BAAA;EAAA,oBAAA;AhBymGF;AgBtmGC;EACC,mBAAA;EAAA,kBAAA;EAAA,cAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,sBAAA;AhBwmGF;AgBtmGE;EACC,gBAAA;EACA,gBAAA;EACA,WAAA;EACA,+BAAA;EAAA,uBAAA;EACA,sBAAA;EAAA,mBAAA;AhBwmGH;;AgBnmGA;EACC,6CAAA;EAAA,qCAAA;AhBsmGD;;AgBnmGA;EACC;IACC,gCAAA;IAAA,wBAAA;EhBsmGA;EgBnmGD;IACC,iDAAA;IAAA,yCAAA;EhBqmGA;AACF;;AgB5mGA;EACC;IACC,gCAAA;IAAA,wBAAA;EhBsmGA;EgBnmGD;IACC,iDAAA;IAAA,yCAAA;EhBqmGA;AACF;AgBlmGA;EACC;IACC,iBAAA;EhBomGA;AACF;AgBhmGA;EACC;IACC;MACC,gCAAA;MAAA,wBAAA;IhBkmGC;IgB/lGF;MACC,iDAAA;MAAA,yCAAA;IhBimGC;EACF;EgBxmGD;IACC;MACC,gCAAA;MAAA,wBAAA;IhBkmGC;IgB/lGF;MACC,iDAAA;MAAA,yCAAA;IhBimGC;EACF;EgB5lGA;IACC,mBAAA;EhB8lGD;EgB3lGA;IACC,gBAAA;IACA,gBAAA;EhB6lGD;AACF;AgBzlGA;EACC;IACC,iBAAA;EhB2lGA;EgBzlGA;IACC,mBAAA;EhB2lGD;AACF;AiB9qGA;EACC,eAAA;EACA,OAAA;EACA,QAAA;EACA,MAAA;EACA,WAAA;EACA,oCAAA;AjBgrGD;AiB9qGC;EAEC,aAAA;AjB+qGF;;AiBzqGC;EACC,kBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,8BAAA;EACA,YAAA;AjB4qGF;AiBzqGC;EACC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,gBAAA;AjB2qGF;AiBxqGC;EACC,oBAAA;AjB0qGF;AiBxqGE;EACC,qBAAA;AjB0qGH;AiBtqGC;EACC,aAAA;AjBwqGF;AiBrqGC;EACC,0DAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,QAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,yBAAA;EACA,oCAAA;EACA,yCAAA;EAAA,iCAAA;EACA,iBAAA;EACA,iBAAA;EACA,iBAAA;AjBuqGF;AiBrqGE;EACC,kBAAA;AjBuqGH;AiBrqGG;EACC,yCAAA;EAAA,iCAAA;AjBuqGJ;AiBnqGE;EACC,oBAAA;AjBqqGH;AiBnqGG;EACC,qBAAA;AjBqqGJ;AiBhqGC;EACC,kBAAA;AjBkqGF;;AiB7pGA;EAEE;IACC,eAAA;EjB+pGD;AACF;AiB3pGA;EAEE;IACC,wBAAA;IAAA,qBAAA;IAAA,gBAAA;EjB4pGD;AACF;AiBxpGA;EAEE;IACC,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,mBAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,8BAAA;EjBypGD;EiBtpGA;IACC,oBAAA;IAAA,oBAAA;IAAA,aAAA;EjBwpGD;EiBrpGA;IACC,sBAAA;EjBupGD;EiBppGA;IACC,cAAA;IACA,YAAA;IACA,gBAAA;EjBspGD;EiBnpGA;IACC,2BAAA;IAAA,0BAAA;IAAA,kBAAA;IACA,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,iBAAA;IACA,eAAA;IACA,YAAA;IACA,cAAA;IACA,WAAA;IACA,UAAA;IACA,aAAA;IACA,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,yBAAA;IAAA,sBAAA;IAAA,8BAAA;EjBqpGD;EiBlpGA;IACC,+CAAA;EjBopGD;EiBjpGA;IACC,cAAA;EjBmpGD;EiB/oGD;IACC,eAAA;IACA,SAAA;IACA,YAAA;IACA,YAAA;IACA,8BAAA;IACA,SAAA;IACA,oBAAA;IAAA,oBAAA;IAAA,aAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,wBAAA;IAAA,qBAAA;IAAA,uBAAA;IACA,yCAAA;IAAA,iCAAA;IACA,oCAAA;IACA,gBAAA;IACA,kBAAA;EjBipGA;EiB/oGA;IACC,YAAA;EjBipGD;EiB9oGA;IACC,aAAA;EjBgpGD;EiB7oGA;IACC,cAAA;EjB+oGD;EiB5oGA;IACC,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;IACA,uBAAA;IACA,WAAA;EjB8oGD;EiB3oGA;IACC,eAAA;EjB6oGD;EiB1oGA;IACC,eAAA;EjB4oGD;EiBzoGA;IACC,OAAA;IACA,QAAA;EjB2oGD;AACF;AiBvoGA;EAEE;IACC,eAAA;EjBwoGD;AACF;AiBpoGA;EAGE;IACC,uBAAA;IACA,WAAA;EjBooGD;EiBjoGA;IACC,eAAA;EjBmoGD;AACF;AkBl1GA;EACE,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,oCAAA;AlBo1GF;AkBl1GE;EACE,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;AlBo1GJ;AkBj1GI;EACE,kBAAA;EACA,QAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,iBAAA;EACA,6BAAA;EAAA,0BAAA;AlBm1GN;AkB/0GE;EACE,wBAAA;EACA,kBAAA;EACA,UAAA;AlBi1GJ;AkB/0GI;EACE,WAAA;EACA,kBAAA;EACA,UAAA;EACA,SAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,+BAAA;EAAA,2BAAA;EAAA,uBAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,yIAAA;EAAA,wFAAA;EACA,mCAAA;EAAA,2BAAA;AlBi1GN;AkB50GE;EACE,mBAAA;EACA,eAAA;AlB80GJ;AkB30GE;EACE,+CAAA;EACA,mBAAA;EACA,eAAA;EACA,kBAAA;EACA,iBAAA;EACA,oBAAA;AlB60GJ;AkB10GE;EACE,gBAAA;EACA,gBAAA;AlB40GJ;;AkBt0GA;EAGM;IACE,UAAA;ElBu0GN;AACF;AkBj0GA;EAEI;IACE,wBAAA;ElBk0GJ;EkBh0GI;IACE,UAAA;ElBk0GN;EkB9zGE;IACE,mBAAA;IACA,eAAA;ElBg0GJ;EkB7zGE;IACE,eAAA;IACA,mBAAA;ElB+zGJ;EkB5zGE;IACE,eAAA;ElB8zGJ;AACF;AkBzzGA;EAEI;IACE,wBAAA;ElB0zGJ;EkBxzGI;IACE,UAAA;ElB0zGN;EkBrzGI;IACE,8BAAA;IAAA,2BAAA;ElBuzGN;AACF;AkBlzGA;EACE;IACE,gBAAA;ElBozGF;EkBlzGE;IACE,WAAA;IACA,kBAAA;IACA,mBAAA;IACA,SAAA;ElBozGJ;EkBlzGI;IACE,2BAAA;IAAA,uBAAA;IAAA,mBAAA;IACA,+BAAA;IAAA,2BAAA;IAAA,uBAAA;IACA,wCAAA;IACA,yCAAA;IACA,UAAA;IACA,YAAA;IACA,yFAAA;ElBozGN;EkBhzGE;IACE,gBAAA;ElBkzGJ;EkBhzGI;IACE,gBAAA;IACA,WAAA;ElBkzGN;EkB9yGE;IACE,mBAAA;ElBgzGJ;EkB7yGE;IACE,kBAAA;ElB+yGJ;AACF;AkB3yGA;EACE;IACE,qBAAA;ElB6yGF;EkB3yGE;IACE,eAAA;ElB6yGJ;AACF;AkBzyGA;EACE;IACE,qBAAA;ElB2yGF;EkBxyGI;IACE,UAAA;ElB0yGN;EkBtyGE;IACE,mBAAA;IACA,eAAA;ElBwyGJ;AACF;AmBl+GA;EACE,kBAAA;EACA,oCAAA;AnBo+GF;AmBl+GE;EACE,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;AnBo+GJ;AmBl+GI;EACE,kBAAA;EACA,OAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,iBAAA;EACA,4BAAA;EAAA,yBAAA;AnBo+GN;AmBh+GE;EACE,iBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,sBAAA;EAEA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,UAAA;AnBi+GJ;AmB/9GI;EACE,WAAA;EACA,kBAAA;EAEA,UAAA;EACA,SAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,+BAAA;EAAA,2BAAA;EAAA,uBAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,oCAAA;AnBg+GN;AmB59GE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,SAAA;AnB89GJ;AmB19GE;EACE,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,mBAAA;AnB49GJ;AmBx9GE;EACE,eAAA;EACA,gBAAA;EACA,gBAAA;AnB09GJ;;AmBt9GA;EAGM;IACE,UAAA;EnBu9GN;AACF;AmBl9GA;EAEI;IACE,gBAAA;IACA,gBAAA;IACA,sBAAA;EnBm9GJ;EmBj9GI;IACE,UAAA;EnBm9GN;EmB/8GE;IACE,eAAA;IACA,qBAAA;EnBi9GJ;EmB98GE;IACE,SAAA;EnBg9GJ;EmB78GE;IACE,eAAA;EnB+8GJ;AACF;AmB38GA;EAEI;IACE,gBAAA;EnB48GJ;EmB18GI;IACE,UAAA;EnB48GN;AACF;AmBv8GA;EAEI;IACE,eAAA;IACA,uBAAA;EnBw8GJ;EmBn8GE;IACE,gBAAA;IACA,mBAAA;EnBq8GJ;EmBn8GI;IACE,gBAAA;IACA,WAAA;EnBq8GN;EmBj8GE;IACE,8BAAA;IAAA,6BAAA;IAAA,uBAAA;IAAA,mBAAA;EnBm8GJ;AACF;AmB/7GA;EAEI;IACE,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;EnBg8GJ;AACF;AmB57GA;EAEI;IACE,eAAA;EnB67GJ;EmB17GE;IACE,SAAA;EnB47GJ;AACF;AoB1lHE;EACE,oBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,8BAAA;EACA,SAAA;ApB4lHJ;AoB1lHI;EACE,wBAAA;EAAA,qBAAA;EAAA,kBAAA;ApB4lHN;AoBxlHE;EACE,oBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,gBAAA;ApB0lHJ;AoBvlHE;EACE,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;ApBylHJ;;AoBrlHA;EAGI;IACE,eAAA;EpBslHJ;EoBnlHE;IACE,gBAAA;IACA,eAAA;EpBqlHJ;AACF;AoBjlHA;EAEI;IACE,oBAAA;EpBklHJ;EoB/kHE;IACE,eAAA;EpBilHJ;EoB9kHE;IACE,gBAAA;EpBglHJ;AACF;AoB5kHA;EAGI;IACE,UAAA;EpB4kHJ;EoBzkHE;IACE,eAAA;IACA,UAAA;EpB2kHJ;AACF;AoBtkHA;EAEI;IACE,4BAAA;IAAA,6BAAA;IAAA,0BAAA;IAAA,sBAAA;EpBukHJ;EoBpkHE;IACE,WAAA;EpBskHJ;EoBnkHE;IACE,WAAA;EpBqkHJ;AACF;AoBjkHA;EAEI;IACE,oBAAA;IACA,SAAA;EpBkkHJ;EoB/jHE;IACE,eAAA;EpBikHJ;AACF;AqBpqHA;EACE,kBAAA;EACA,oCAAA;ArBsqHF;AqBpqHE;EACE,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;ArBsqHJ;AqBpqHI;EACE,kBAAA;EACA,QAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,iBAAA;EACA,gCAAA;EAAA,6BAAA;ArBsqHN;AqBlqHE;EACE,iBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EACA,sBAAA;EACA,gBAAA;EACA,kBAAA;EACA,UAAA;ArBoqHJ;AqBlqHI;EACE,WAAA;EACA,kBAAA;EACA,WAAA;EACA,SAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,+BAAA;EAAA,2BAAA;EAAA,uBAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,oCAAA;ArBoqHN;AqBhqHE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,SAAA;ArBkqHJ;AqB/pHE;EACE,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,mBAAA;ArBiqHJ;AqB/pHI;EACE,cAAA;EACA,gBAAA;ArBiqHN;AqB7pHE;EACE,eAAA;EACA,gBAAA;EACA,gBAAA;ArB+pHJ;;AqB3pHA;EAGM;IACE,QAAA;ErB4pHN;AACF;AqBvpHA;EAGI;IACE,sBAAA;IACA,iBAAA;IACA,gBAAA;ErBupHJ;EqBppHE;IACE,SAAA;ErBspHJ;EqBnpHE;IACE,mBAAA;IACA,eAAA;ErBqpHJ;EqBnpHI;IACE,eAAA;ErBqpHN;EqBjpHE;IACE,eAAA;IACA,gBAAA;ErBmpHJ;AACF;AqB9oHA;EAEI;IACE,iBAAA;IACA,gBAAA;ErB+oHJ;EqB7oHI;IACE,SAAA;ErB+oHN;EqB3oHE;IACE,gBAAA;ErB6oHJ;AACF;AqBzoHA;EAGI;IACE,gBAAA;IACA,eAAA;ErByoHJ;EqBtoHE;IACE,gBAAA;ErBwoHJ;EqBtoHI;IACE,gBAAA;IACA,WAAA;ErBwoHN;EqBpoHE;IACE,iBAAA;IAAA,aAAA;IACA,yBAAA;IAAA,8BAAA;IACA,SAAA;ErBsoHJ;AACF;AqBjoHA;EAEI;IACE,qBAAA;IAAA,0BAAA;ErBkoHJ;EqB/nHE;IACE,WAAA;ErBioHJ;EqB9nHE;IACE,WAAA;ErBgoHJ;AACF;AqB5nHA;EAII;IACE,eAAA;ErB2nHJ;EqBznHI;IACE,eAAA;ErB2nHN;EqBvnHE;IACE,SAAA;ErBynHJ;EqBtnHE;IACE,eAAA;ErBwnHJ;AACF;AsBjzHE;EACE,oBAAA;AtBmzHJ;AsBhzHE;EACE,oBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,gBAAA;AtBkzHJ;AsB/yHE;EACE,qBAAA;EACA,eAAA;EACA,iBAAA;AtBizHJ;;AsB7yHA;EAGI;IACE,eAAA;IACA,qBAAA;IACA,qBAAA;EtB8yHJ;AACF;AsB1yHA;EAGI;IACE,oBAAA;EtB0yHJ;EsBvyHE;IACE,eAAA;EtByyHJ;AACF;AuBj1HA;EACE,kBAAA;EACA,gBAAA;EACA,oCAAA;AvBm1HF;AuBj1HE;EACE,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;AvBm1HJ;AuBj1HI;EACE,kBAAA;EACA,OAAA;EACA,YAAA;EACA,UAAA;EACA,oBAAA;EAAA,iBAAA;EACA,4BAAA;EAAA,yBAAA;AvBm1HN;AuB90HE;EACE,iBAAA;EACA,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EACA,sBAAA;EACA,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,UAAA;AvBg1HJ;AuB90HI;EACE,WAAA;EACA,kBAAA;EAEA,UAAA;EACA,YAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,gCAAA;EAAA,4BAAA;EAAA,wBAAA;EACA,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EACA,wFAAA;EACA,kCAAA;EAAA,0BAAA;AvB+0HN;AuB30HE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EACA,SAAA;AvB60HJ;AuB10HE;EACE,oBAAA;EAAA,oBAAA;EAAA,aAAA;AvB40HJ;AuB10HI;EACE,qEAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;EACA,gBAAA;AvB40HN;AuBv0HE;EACE,eAAA;EACA,cAAA;EACA,qBAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;AvBy0HJ;AuBt0HE;EACE,gBAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;AvBw0HJ;;AuBp0HA;EAGM;IACE,SAAA;EvBq0HN;AACF;AuB/zHA;EAGI;IACE,qEAAA;IACA,eAAA;IACA,qBAAA;IACA,mBAAA;EvB+zHJ;EuB5zHE;IACE,gBAAA;IACA,gBAAA;EvB8zHJ;EuB3zHE;IACE,SAAA;EvB6zHJ;EuB1zHE;IACE,eAAA;IACA,qBAAA;EvB4zHJ;EuBzzHE;IACE,gBAAA;IACA,eAAA;EvB2zHJ;AACF;AuBvzHA;EAEI;IACE,UAAA;EvBwzHJ;EuBrzHE;IACE,gBAAA;EvBuzHJ;EuBrzHI;IACE,QAAA;EvBuzHN;EuBlzHI;IACE,gBAAA;EvBozHN;EuBhzHE;IACE,gBAAA;EvBkzHJ;AACF;AuB9yHA;EAGI;IACE,gBAAA;IACA,eAAA;IACA,iBAAA;IACA,kBAAA;EvB8yHJ;EuB5yHI;IACE,+BAAA;IAAA,2BAAA;IAAA,uBAAA;IACA,wCAAA;IACA,yCAAA;IACA,UAAA;IACA,yFAAA;EvB8yHN;EuB1yHE;IACE,mBAAA;EvB4yHJ;EuBzyHE;IACE,gBAAA;EvB2yHJ;EuBzyHI;IACE,gBAAA;IACA,WAAA;EvB2yHN;EuBvyHE;IACE,iBAAA;IAAA,aAAA;IACA,2BAAA;IAAA,gCAAA;IACA,SAAA;EvByyHJ;EuBvyHI;IACE,eAAA;EvByyHN;EuBryHE;IACE,eAAA;EvBuyHJ;AACF;AuBnyHA;EAEI;IACE,gBAAA;EvBoyHJ;EuBjyHE;IACE,qBAAA;IAAA,0BAAA;EvBmyHJ;AACF;AuB/xHA;EAEI;IACE,sBAAA;IACA,iBAAA;EvBgyHJ;EuB7xHE;IACE,gBAAA;IACA,mBAAA;EvB+xHJ;EuB5xHE;IACE,eAAA;EvB8xHJ;AACF","file":"main.css","sourcesContent":[":root {\r\n --font-family: 'Roboto Flex', sans-serif;\r\n --content-width: 1420px;\r\n --container-fluid: 1920px;\r\n --container-offset: 15px;\r\n --container-width: calc(var(--content-width) + (var(--container-offset) * 2));\r\n --max-offset: calc(max(calc((100vw - var(--content-width)) / 2), var(--container-offset)) * -1);\r\n\r\n --transition: 0.3s;\r\n --scale-hover: scale(1.08);\r\n // colors\r\n --default: #5a5a5a;\r\n --light: #fff;\r\n --accent: #cd1338;\r\n --blue-light: #1c60f6;\r\n --blue-middle: #00406c;\r\n --blue-dark: #1c2e44;\r\n --gray: #aaa;\r\n\r\n // media\r\n --big-desktop: 1600px;\r\n --desktop: 1440px;\r\n --small-desktop: 1280px;\r\n --tablet: 1024px;\r\n --small-tablet: 768px;\r\n --mobile: 576px;\r\n --index: calc(1vh + 1vw);\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n :root {\r\n --content-width: 1260px;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n :root {\r\n --content-width: 1160px;\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n :root {\r\n --content-width: 900px;\r\n }\r\n}\r\n\r\n@media (max-width: 800px) {\r\n :root {\r\n --content-width: 100%;\r\n }\r\n}",":root {\n --font-family: \"Roboto Flex\", sans-serif;\n --content-width: 1420px;\n --container-fluid: 1920px;\n --container-offset: 15px;\n --container-width: calc(var(--content-width) + (var(--container-offset) * 2));\n --max-offset: calc(max(calc((100vw - var(--content-width)) / 2), var(--container-offset)) * -1);\n --transition: 0.3s;\n --scale-hover: scale(1.08);\n --default: #5a5a5a;\n --light: #fff;\n --accent: #cd1338;\n --blue-light: #1c60f6;\n --blue-middle: #00406c;\n --blue-dark: #1c2e44;\n --gray: #aaa;\n --big-desktop: 1600px;\n --desktop: 1440px;\n --small-desktop: 1280px;\n --tablet: 1024px;\n --small-tablet: 768px;\n --mobile: 576px;\n --index: calc(1vh + 1vw);\n}\n\n@media (max-width: 1440px) {\n :root {\n --content-width: 1260px;\n }\n}\n@media (max-width: 1280px) {\n :root {\n --content-width: 1160px;\n }\n}\n@media (max-width: 1024px) {\n :root {\n --content-width: 900px;\n }\n}\n@media (max-width: 800px) {\n :root {\n --content-width: 100%;\n }\n}\n@font-face {\n font-family: \"Roboto Flex\";\n font-style: normal;\n font-display: swap;\n src: local(\"Roboto Flex\"), url(\"../fonts/Roboto-Flex.woff2\") format(\"woff2\");\n font-weight: 100 1000;\n font-stretch: 25% 151%;\n}\nhtml {\n box-sizing: border-box;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: inherit;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n margin: 0;\n}\n\n*::-webkit-scrollbar {\n width: 10px;\n}\n\n*::-webkit-scrollbar-track {\n background-color: var(--light);\n}\n\n*::-webkit-scrollbar-thumb {\n background-color: var(--blue-middle);\n}\n\n* {\n scrollbar-width: thin;\n scrollbar-color: var(--blue-middle) #fff;\n}\n\n.page {\n font-size: 20px;\n font-weight: 200;\n line-height: 1.2;\n color: var(--light);\n height: 100%;\n font-family: var(--font-family);\n font-variation-settings: \"wdth\" 140, \"wght\" 200;\n}\n\n.page__body {\n margin: 0;\n min-width: 320px;\n min-height: 100%;\n}\n\nimg {\n height: auto;\n max-width: 100%;\n object-fit: cover;\n display: block;\n}\n\na {\n text-decoration: none;\n display: inline-block;\n}\n\n.site-container {\n overflow: hidden;\n}\n\n.is-hidden {\n display: none !important;\n}\n\n.btn-reset {\n border: none;\n padding: 0;\n background-color: transparent;\n cursor: pointer;\n}\n\n.list-reset {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.input-reset {\n -webkit-appearance: none;\n appearance: none;\n border: none;\n border-radius: 0;\n background-color: #fff;\n}\n.input-reset::-webkit-search-decoration, .input-reset::-webkit-search-cancel-button, .input-reset::-webkit-search-results-button, .input-reset::-webkit-search-results-decoration {\n display: none;\n}\n\n.container {\n margin: 0 auto;\n padding: 0 var(--container-offset);\n max-width: var(--container-width);\n}\n\n.container-fluid {\n margin: 0 auto;\n max-width: var(--container-fluid);\n}\n\n.js-focus-visible :focus:not(.focus-visible) {\n outline: none;\n}\n\n.centered {\n text-align: center;\n}\n\n.dis-scroll {\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n width: 100%;\n height: 100vh;\n overscroll-behavior: none;\n}\n\n.page--ios .dis-scroll {\n position: relative;\n}\n\n.btn {\n cursor: pointer;\n text-align: center;\n font-size: 20px;\n font-weight: 200;\n font-stretch: 140%;\n line-height: 40px;\n letter-spacing: 0.1px;\n background-color: var(--light);\n border-radius: 50px;\n border: none;\n min-width: 220px;\n text-transform: capitalize;\n transition: var(--transition);\n color: var(--blue-dark);\n}\n.btn:hover {\n background-color: var(--blue-dark);\n color: var(--light);\n}\n\n.btn--accent {\n color: var(--accent);\n}\n\n.btn-up-wrapper {\n position: relative;\n display: none;\n justify-content: flex-end;\n}\n\n.btn-up {\n position: fixed;\n z-index: 20;\n right: 110px;\n bottom: 165px;\n width: 56px;\n height: 56px;\n padding: 0;\n cursor: pointer;\n min-width: auto;\n border-radius: 50%;\n border: none;\n background-color: var(--accent);\n border-color: var(--accent);\n transition: all var(--transition);\n}\n.btn-up::before {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n content: \"\";\n background-image: url(\"./../img/svg/up.svg\");\n background-repeat: no-repeat;\n width: 28px;\n height: 28px;\n background-position: center;\n background-size: contain;\n z-index: 1;\n}\n\n.btn-up-wrapper.active {\n display: flex;\n}\n\n.section-title {\n font-variation-settings: \"wght\" 700, \"opsz\" 37, \"wdth\" 25, \"slnt\" -10;\n font-size: 45px;\n line-height: 47px;\n letter-spacing: 1.8px;\n text-transform: uppercase;\n margin-bottom: 24px;\n color: var(--light);\n}\n\n.large-title {\n font-variation-settings: \"wght\" 700, \"opsz\" 37, \"wdth\" 25, \"slnt\" -10;\n font-size: 65px;\n line-height: 1.1;\n letter-spacing: 3.4px;\n text-transform: uppercase;\n color: var(--light);\n}\n\n.section-title--reset {\n display: inline-block;\n margin-bottom: 0;\n}\n\n.burger-js .line {\n display: block;\n height: 4px;\n width: 100%;\n border-radius: 10px;\n background-color: var(--light);\n transition: all var(--transition);\n}\n.burger-js.active .line1 {\n transform: rotate(45deg) translate(4px, -4px);\n transform-origin: left;\n}\n.burger-js.active .line2 {\n opacity: 0;\n}\n.burger-js.active .line3 {\n transform: rotate(-45deg) translate(3px, 6px);\n transform-origin: left;\n}\n\n@media (max-width: 1600px) {\n .btn-up {\n right: auto;\n }\n}\n@media (max-width: 1280px) {\n .btn {\n font-size: 14px;\n line-height: 32px;\n min-width: 170px;\n }\n .section-title {\n font-size: 32px;\n line-height: 1;\n border-radius: 30px;\n line-height: 30px;\n }\n .large-title {\n font-size: 46px;\n letter-spacing: 2.4px;\n }\n .page {\n font-size: 14px;\n }\n}\n@media (max-width: 800px) {\n .btn-up {\n bottom: 50px;\n width: 50px;\n height: 50px;\n }\n}\n@media (max-width: 700px) {\n .section-title {\n font-size: 30px;\n letter-spacing: 1.2px;\n }\n .large-title {\n font-size: 30px;\n letter-spacing: 1.2px;\n }\n}\n@media (max-width: 360px) {\n .section-title {\n font-size: 26px;\n }\n}\n.carousel__track {\n display: none !important;\n}\n\n.header {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n z-index: 20;\n}\n.header.active {\n background-image: linear-gradient(90deg, var(--blue-dark) 38.01%, rgba(0, 64, 108, 0.53) 117.87%);\n backdrop-filter: blur(5px);\n}\n.header__burger, .header__mobile-logo {\n display: none;\n}\n\n.nav__list {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n column-gap: 66px;\n padding: 20px 0;\n}\n\n.nav__link {\n font-size: 20px;\n font-weight: 200;\n line-height: 30px;\n text-transform: uppercase;\n border-bottom: 1px solid transparent;\n transition: all var(--transition);\n}\n.nav__link:hover {\n color: var(--accent);\n}\n\n@media (max-width: 1280px) {\n .nav__list {\n padding: 14px 0;\n column-gap: 40px;\n }\n .nav__link {\n font-size: 14px;\n }\n}\n@media (max-width: 992px) {\n .header {\n height: 60px;\n background-color: var(--light);\n }\n .header__container {\n max-width: 100%;\n }\n .header__inner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .header.active {\n background-image: none;\n }\n .header__mobile-logo {\n display: block;\n cursor: auto;\n max-width: 190px;\n }\n .header__burger {\n align-self: center;\n display: flex;\n cursor: pointer;\n height: 36px;\n padding: 4px 0;\n width: 36px;\n z-index: 2;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n .header__burger .line {\n display: block;\n height: 4px;\n width: 100%;\n border-radius: 10px;\n background-color: var(--blue-middle);\n transition: all var(--transition);\n }\n .header__burger.active .line1 {\n transform: rotate(45deg) translate(4px, -4px);\n transform-origin: left;\n }\n .header__burger.active .line2 {\n opacity: 0;\n }\n .header__burger.active .line3 {\n transform: rotate(-45deg) translate(3px, 6px);\n transform-origin: left;\n }\n .header__mobile-logo {\n margin-left: calc(var(--container-offset) * -1);\n }\n .nav {\n position: fixed;\n background-color: var(--light);\n top: 60px;\n left: -100vw;\n right: 100vw;\n min-height: calc(100vh - 60px);\n bottom: 0;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n transition: all var(--transition);\n overflow-y: scroll;\n text-align: center;\n }\n .nav__list {\n flex-direction: column;\n padding: 80px 20px 60px;\n gap: 20px 0;\n }\n .nav__link {\n color: var(--blue-middle);\n font-size: 21px;\n line-height: 1.5;\n text-transform: uppercase;\n padding: 20px;\n transition: all var(--transition);\n }\n .nav__link:hover {\n color: var(--accent);\n }\n .nav.active {\n left: 0;\n right: 0;\n }\n}\n@media (max-width: 360px) {\n .nav__list {\n padding: 40px 20px 40px;\n gap: 10px 0;\n }\n .nav__link {\n padding: 10px 0;\n }\n}\n.footer {\n background-color: var(--blue-middle);\n}\n.footer__inner {\n padding: 30px 0 12px;\n}\n.footer__list {\n display: flex;\n gap: 0 100px;\n font-size: 16px;\n font-weight: 200;\n line-height: 1.9;\n letter-spacing: 0.32px;\n}\n.footer__item:first-child span:nth-child(2) {\n display: block;\n font-size: 10px;\n line-height: 1.2;\n}\n.footer__item:last-child {\n margin-left: auto;\n height: 30px;\n align-self: center;\n}\n.footer__link {\n transition: all var(--transition);\n}\n.footer__link:hover {\n color: var(--accent);\n}\n.footer__source {\n display: inline-block;\n padding-top: 36px;\n color: rgba(255, 255, 255, 0.5);\n font-family: Roboto Flex;\n font-size: 12px;\n font-style: normal;\n font-weight: 300;\n line-height: 16px;\n}\n\n.social-list {\n display: flex;\n gap: 0 5px;\n align-items: center;\n}\n.social-list__link {\n height: 30px;\n width: 30px;\n border-radius: 50%;\n}\n.social-list__link svg path {\n transition: all var(--transition);\n}\n.social-list__link:hover svg path {\n fill: red;\n}\n.social-list__item:nth-child(4) .social-list__link svg g:nth-child(2):hover path:nth-child(2) {\n fill: red;\n}\n\n@media (max-width: 1280px) {\n .footer__list {\n gap: 0 40px;\n }\n .footer__source {\n font-size: 10px;\n }\n}\n@media (max-width: 1024px) {\n .footer__list {\n font-size: 14px;\n }\n .social-list {\n padding-left: 0;\n }\n}\n@media (max-width: 900px) {\n .footer__list {\n gap: 0 15px;\n }\n}\n@media (max-width: 800px) {\n .footer__inner {\n padding: 40px 0 50px;\n }\n .footer__list {\n flex-direction: column;\n gap: 20px 0;\n align-items: center;\n text-align: center;\n }\n .footer__item:first-child {\n margin-right: 0;\n max-width: 100%;\n text-align: center;\n }\n .footer__item:last-child {\n margin-top: 20px;\n margin-left: initial;\n }\n .footer__source {\n text-align: center;\n }\n .contacts-list {\n text-align: center;\n }\n}\n.top {\n background-color: #183052;\n overflow: hidden;\n position: relative;\n}\n.top__background {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n.top__background img {\n position: absolute;\n right: 0;\n bottom: 0;\n object-fit: contain;\n height: 100%;\n width: 100%;\n object-position: right bottom;\n}\n.top__inner {\n position: relative;\n max-width: 700px;\n z-index: 1;\n}\n.top__container {\n padding-top: 70px;\n min-height: 100vh;\n min-height: 100svh;\n display: flex;\n flex-direction: column;\n}\n.top__logo {\n position: relative;\n margin: 63px 0 13%;\n position: relative;\n z-index: 1;\n align-self: flex-start;\n padding: 7px 60px 0 0;\n height: 142px;\n font-size: 130px;\n cursor: auto;\n pointer-events: none;\n}\n.top__logo::before {\n content: \"\";\n position: absolute;\n top: 0;\n width: calc(100vw - var(--content-width) / 2);\n height: 100%;\n height: 100%;\n right: 20px;\n background-color: var(--accent);\n z-index: -1;\n transform: skewX(351deg);\n}\n.top__logo-title {\n line-height: 1;\n letter-spacing: 3px;\n margin: 0;\n height: 100%;\n display: flex;\n align-items: center;\n font-size: inherit;\n font-variation-settings: \"ital\" 1, \"opsz\" 30, \"wdth\" 36, \"wght\" 800, \"slnt\" -10;\n}\n.top__title {\n font-variation-settings: \"opsz\" 51, \"wdth\" 25, \"slnt\" -10;\n font-size: 85px;\n line-height: 0.95;\n letter-spacing: 5.95px;\n margin-bottom: 22px;\n text-transform: uppercase;\n color: var(--light);\n}\n.top__subtitle {\n font-size: 36px;\n font-style: normal;\n display: inline-block;\n font-weight: 300;\n line-height: 1.2;\n letter-spacing: 0.18px;\n}\n\n@media (min-width: 1920px) {\n .top__container {\n min-height: 1080px;\n }\n}\n@media (max-width: 1920px) and (orientation: portrait) {\n .top {\n max-height: 1920px;\n }\n .top__logo {\n position: relative;\n margin: 63px 0 10% 0;\n }\n}\n@media (max-width: 1440px) and (orientation: landscape) {\n .top__logo {\n margin: 63px 0 15% 0;\n }\n}\n@media (max-width: 1280px) and (orientation: landscape) {\n .top__container {\n padding-top: 60px;\n }\n .top__logo {\n margin: 28px 0 11%;\n padding: 5px 40px 0 0;\n height: 104px;\n font-size: 90px;\n }\n .top__title {\n font-variation-settings: \"opsz\" 33, \"wdth\" 25, \"slnt\" -10;\n font-size: 54px;\n letter-spacing: 3.8px;\n }\n .top__subtitle {\n font-size: 25px;\n }\n}\n@media (max-width: 1280px) and (orientation: portrait) {\n .top__container {\n padding-top: 60px;\n }\n}\n@media (max-width: 1024px) and (orientation: portrait) {\n .top {\n background-size: 90%;\n }\n .top__logo {\n padding: 5px 40px 0 0;\n height: 104px;\n font-size: 90px;\n }\n}\n@media (max-width: 992px) and (orientation: landscape) {\n .top__title {\n padding-top: 80px;\n }\n .top__logo {\n display: none;\n }\n}\n@media (max-width: 992px) and (orientation: portrait) {\n .top__logo {\n display: none;\n }\n .top__title {\n padding-top: 50px;\n font-variation-settings: \"opsz\" 33, \"wdth\" 25, \"slnt\" -10;\n font-size: 54px;\n letter-spacing: 3.8px;\n }\n .top__subtitle {\n font-size: 25px;\n }\n}\n@media (max-width: 768px) and (orientation: landscape) {\n .top__title {\n font-variation-settings: \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\n font-size: 43px;\n letter-spacing: 3.1px;\n }\n}\n@media (max-width: 768px) and (orientation: portrait) {\n .top {\n background-size: contain;\n }\n .top__logo {\n display: none;\n }\n}\n@media (max-width: 700px) and (orientation: landscape) {\n .top__container {\n padding-top: 60px;\n }\n .top__title {\n font-variation-settings: \"opsz\" 17, \"wdth\" 25, \"slnt\" -10;\n padding-top: 40px;\n font-size: 30px;\n margin-bottom: 15px;\n letter-spacing: 1.2px;\n }\n}\n@media (max-width: 700px) and (orientation: portrait) {\n .top__container {\n padding-top: 60px;\n }\n .top__title {\n font-variation-settings: \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\n font-size: 44px;\n margin-bottom: 18px;\n letter-spacing: 3.1px;\n }\n}\n@media (max-width: 500px) and (orientation: portrait) {\n .top__container {\n width: 100%;\n }\n .top__title {\n font-variation-settings: \"opsz\" 17, \"wdth\" 25, \"slnt\" -10;\n font-size: 30px;\n letter-spacing: 1.2px;\n }\n}\n@media (max-width: 500px) and (orientation: landscape) {\n .top__container {\n width: 100%;\n min-height: 320px;\n }\n .top__subtitle {\n font-size: 20px;\n }\n}\n@media (max-width: 400px) and (orientation: portrait) {\n .top {\n background-size: cover;\n background-position: center bottom;\n }\n .top__background img {\n width: 100%;\n height: auto;\n }\n .top__subtitle {\n font-size: 25px;\n }\n}\n@media (max-width: 360px) and (orientation: portrait) {\n .top__container {\n min-height: 500px;\n height: 100vh;\n height: 100svh;\n }\n .top__title {\n padding-top: 30px;\n font-size: 24px;\n letter-spacing: 1.68px;\n margin-bottom: 10px;\n }\n .top__subtitle {\n font-size: 22px;\n }\n}\n.video {\n background-image: url(\"./img/video-preview.jpg\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n position: relative;\n}\n.video__gradient {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: linear-gradient(75deg, #000 -10.46%, #000 -4.93%, rgba(0, 0, 0, 0) 65.31%);\n z-index: 2;\n}\n.video__gradient::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.3);\n}\n.video__gradient.hide {\n z-index: 0;\n}\n.video__intro {\n background-color: #000;\n}\n.video__mask {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 30px;\n z-index: 0;\n}\n.video__mask.visible {\n z-index: 10;\n}\n.video__player {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 1;\n}\n.video__player.play {\n cursor: pointer;\n object-fit: cover;\n}\n.video__player .vjs-tech {\n object-fit: cover;\n}\n.video__player .vjs-paused .vjs-big-play-button {\n display: none;\n}\n.video__inner {\n min-height: 100vh;\n position: relative;\n transition: all var(--transition);\n padding: 120px 0 198px;\n display: flex;\n flex-direction: column;\n justify-content: end;\n}\n.video__inner.active {\n min-height: 100px;\n padding: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 2;\n}\n.video__title {\n max-width: 660px;\n z-index: 3;\n margin-bottom: 30px;\n}\n.video__title.hide {\n display: none;\n}\n.video__text {\n max-width: 510px;\n z-index: 3;\n margin-bottom: 24px;\n}\n.video__text.hide {\n display: none;\n}\n.video__link {\n font-weight: 700;\n z-index: 3;\n transition: color var(--transition);\n align-self: flex-start;\n}\n.video__link:hover {\n color: var(--accent);\n}\n.video__link.hide {\n display: none;\n}\n.video__btn {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--transition);\n z-index: 4;\n}\n.video__btn svg path {\n transition: all var(--transition);\n}\n.video__btn.hide {\n display: none;\n}\n.video__btn.center-position {\n position: absolute;\n transform: translate(-50%, -50%);\n}\n.video__btn:hover svg path:nth-child(1) {\n fill: var(--blue-dark);\n}\n.video__btn:hover svg path:nth-child(2) {\n fill: var(--light);\n}\n\n@media (min-width: 1920px) or (min-height: 1080px) {\n .video__inner {\n min-height: 1080px;\n }\n}\n@media (max-width: 1280px) {\n .video__inner {\n padding: 80px 0;\n }\n .video__title {\n margin-bottom: 27px;\n }\n .video__btn svg {\n width: 133.401px;\n height: 109.86px;\n }\n .video__text {\n padding-top: 0;\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 20px;\n }\n}\n@media (max-width: 768px) {\n .video {\n background-image: url(\"./../img/video-preview-mobile.jpg\");\n }\n}\n@media (max-width: 600px) {\n .video__inner {\n padding: 40px 0;\n }\n .video__title {\n max-width: 440px;\n margin-bottom: 20px;\n }\n .video__btn {\n position: static;\n transform: none;\n margin: 0 auto 150px;\n }\n .video__btn svg {\n width: 100px;\n height: 82px;\n }\n}\n@media (max-width: 400px) {\n .video__title {\n max-width: 316px;\n }\n}\n@media (max-width: 360px) {\n .video__text {\n font-size: 13px;\n line-height: 22px;\n font-stretch: 120%;\n }\n .video__btn {\n margin: 0 auto 50px;\n }\n}\n.video-js.active {\n position: relative !important;\n z-index: 2;\n width: 100% !important;\n height: auto !important;\n}\n\n.vjs-poster.active {\n position: absolute !important;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: none;\n}\n\n.choice {\n padding-top: 78px;\n margin-bottom: 90px;\n background-color: var(--light);\n}\n.choice__title {\n max-width: 820px;\n text-transform: uppercase;\n margin-bottom: 20px;\n}\n.choice__title span {\n color: var(--blue-middle);\n}\n.choice__title--mobile {\n display: none;\n}\n.choice__subtitle {\n color: var(--blue-middle);\n margin-bottom: 74px;\n max-width: 580px;\n}\n.choice__list {\n display: flex;\n flex-direction: column;\n color: var(--default);\n gap: 12px 0;\n align-items: flex-end;\n}\n.choice__item {\n position: relative;\n min-height: 134px;\n padding: 11px 0 11px 110px;\n background-color: #f5f5f5;\n display: flex;\n align-items: center;\n gap: 0 110px;\n font-weight: 300;\n z-index: 1;\n width: 100%;\n transition: all var(--transition);\n user-select: none;\n}\n.choice__item::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n right: var(--max-offset);\n width: max((100vw - var(--content-width)) / 2, var(--container-offset));\n height: 100%;\n background-color: #f5f5f5;\n z-index: -1;\n}\n.choice__item:hover {\n transform: var(--scale-hover);\n}\n.choice__item-text--mobile {\n display: none;\n}\n.choice__item-bold {\n font-weight: 700;\n}\n.choice__item-star {\n display: inline-flex;\n font-size: 8px;\n}\n.choice__item-star::before {\n content: \"\";\n}\n.choice__item-source {\n padding-top: 10px;\n font-size: 14px;\n font-weight: 300;\n line-height: 16px;\n}\n.choice__item-decor {\n width: 100px;\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n}\n.choice__item-decor::before {\n content: \"\";\n position: absolute;\n left: -40px;\n top: -1px;\n bottom: 0;\n width: 80px;\n background-color: var(--light);\n transform: skewX(-31deg);\n}\n.choice__item:nth-child(1) {\n max-width: 1156px;\n}\n.choice__item:nth-child(2) {\n max-width: 1244px;\n}\n.choice__item:nth-child(3) {\n max-width: 1332px;\n}\n.choice__item:nth-child(4) {\n max-width: 1420px;\n}\n\n@media (max-width: 1440px) {\n .choice__item {\n gap: 0 95px;\n }\n .choice__item:nth-child(1) {\n max-width: 855px;\n }\n .choice__item:nth-child(2) {\n max-width: 940px;\n }\n .choice__item:nth-child(3) {\n max-width: 1030px;\n }\n .choice__item:nth-child(4) {\n max-width: 1115px;\n }\n}\n@media (max-width: 1280px) {\n .choice {\n padding-top: 55px;\n margin-bottom: 60px;\n }\n .choice__list {\n gap: 10px 0;\n }\n .choice__subtitle {\n max-width: 395px;\n margin-bottom: 40px;\n }\n .choice__item {\n min-height: 96px;\n padding: 11px 0 11px 78px;\n line-height: 18px;\n gap: 0 70px;\n }\n .choice__item-source {\n padding-top: 0;\n font-size: 10px;\n }\n .choice__item:nth-child(1) {\n max-width: 778px;\n }\n .choice__item:nth-child(1) img {\n width: 84px;\n }\n .choice__item:nth-child(2) {\n max-width: 842px;\n }\n .choice__item:nth-child(2) img {\n width: 80px;\n }\n .choice__item:nth-child(3) {\n max-width: 906px;\n }\n .choice__item:nth-child(3) img {\n width: 80px;\n }\n .choice__item:nth-child(4) {\n max-width: 970px;\n }\n .choice__item:nth-child(4) img {\n width: 70px;\n }\n}\n@media (max-width: 1024px) {\n .choice__item:nth-child(1) {\n max-width: 710px;\n }\n .choice__item:nth-child(1) img {\n width: 84px;\n }\n .choice__item:nth-child(2) {\n max-width: 775px;\n }\n .choice__item:nth-child(2) img {\n width: 80px;\n }\n .choice__item:nth-child(3) {\n max-width: 838px;\n }\n .choice__item:nth-child(3) img {\n width: 80px;\n }\n .choice__item:nth-child(4) {\n max-width: 900px;\n }\n .choice__item:nth-child(4) img {\n width: 70px;\n }\n}\n@media (max-width: 940px) {\n .choice__item {\n padding: 11px 0 11px 70px;\n gap: 0 40px;\n }\n .choice__item:nth-child(1) {\n max-width: 586px;\n }\n .choice__item:nth-child(1) img {\n width: 84px;\n }\n .choice__item:nth-child(2) {\n max-width: 648px;\n }\n .choice__item:nth-child(2) img {\n width: 80px;\n }\n .choice__item:nth-child(3) {\n max-width: 708px;\n }\n .choice__item:nth-child(3) img {\n width: 80px;\n }\n .choice__item:nth-child(4) {\n max-width: 768px;\n }\n .choice__item:nth-child(4) img {\n width: 70px;\n }\n}\n@media (max-width: 800px) {\n .choice__item {\n padding: 9px 0 8px 55px;\n gap: 0 30px;\n }\n .choice__item-decor::before {\n transform: skewX(-20deg);\n }\n .choice__item:nth-child(1) {\n max-width: 554px;\n }\n .choice__item:nth-child(1) img {\n width: 54px;\n }\n .choice__item:nth-child(2) {\n max-width: 592px;\n }\n .choice__item:nth-child(2) img {\n width: 50px;\n }\n .choice__item:nth-child(3) {\n max-width: 630px;\n }\n .choice__item:nth-child(3) img {\n width: 50px;\n }\n .choice__item:nth-child(4) {\n max-width: 668px;\n }\n .choice__item:nth-child(4) img {\n width: 50px;\n }\n}\n@media (max-width: 700px) {\n .choice__item {\n width: 100%;\n max-width: 100% !important;\n padding: 20px 0 8px 20px;\n gap: 0 20px;\n }\n .choice__item::before {\n display: none;\n }\n .choice__item img {\n align-self: flex-start;\n }\n .choice__item-decor {\n display: none;\n }\n .choice__item-text {\n display: none;\n }\n .choice__item-source {\n display: none;\n }\n .choice__item-text--mobile {\n display: block;\n max-width: 600px;\n }\n .choice__subtitle {\n color: var(--default);\n }\n}\n@media (max-width: 600px) {\n .choice {\n padding-top: 50px;\n }\n .choice__title {\n font-size: 30px;\n letter-spacing: 1.2px;\n line-height: 32px;\n margin-bottom: 20px;\n }\n .choice__subtitle {\n margin-bottom: 30px;\n }\n}\n@media (max-width: 500px) {\n .choice {\n padding-top: 50px;\n }\n .choice__title {\n display: none;\n }\n .choice__title--mobile {\n display: block;\n }\n}\n@media (max-width: 360px) {\n .choice__title--mobile {\n font-size: 26px;\n }\n}\n.professional {\n position: relative;\n overflow: hidden;\n margin-top: 85px;\n background-color: var(--blue-middle);\n}\n.professional__inner {\n display: flex;\n position: relative;\n}\n.professional__content {\n width: 50%;\n padding: 85px 0 55px;\n display: flex;\n flex-direction: column;\n position: relative;\n z-index: 11;\n color: var(--light);\n}\n.professional__content::before {\n content: \"\";\n position: absolute;\n right: 26%;\n bottom: 0;\n width: 66vw;\n height: 100%;\n background-image: linear-gradient(108deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%);\n z-index: -1;\n transform: skewX(17deg);\n backdrop-filter: blur(5px);\n transform-origin: top;\n}\n.professional__title {\n margin-bottom: 24px;\n}\n.professional__subtitle {\n line-height: 1;\n font-size: 36px;\n font-weight: 600;\n margin-top: -5px;\n margin-bottom: 70px;\n}\n.professional__text {\n font-size: 24px;\n font-weight: 200;\n line-height: 1.17;\n max-width: 560px;\n width: 100%;\n}\n.professional__text-wrapper {\n display: flex;\n flex-direction: column;\n gap: 30px;\n margin-bottom: 44px;\n}\n.professional__slider-container {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 100%;\n max-width: 1440px;\n left: 50%;\n transform: translateX(-50%);\n overflow: hidden;\n}\n.professional__slider {\n width: 70%;\n position: absolute;\n top: 160px;\n right: -6%;\n}\n.professional__slider-wrapper {\n padding: 40px 0;\n}\n.professional__slider-item {\n display: flex;\n justify-content: center;\n align-items: center;\n filter: grayscale(100%);\n transform: scale(1);\n transition: transform var(--transition);\n}\n.professional__slider-item img {\n margin: auto;\n height: 220px;\n width: 400px;\n transition: all var(--transition);\n}\n.professional__slider-item.swiper-slide-active {\n transform: scale(1.3);\n z-index: 11;\n filter: grayscale(0);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-link {\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-link::before {\n background-color: rgba(0, 0, 0, 0.1);\n}\n.professional__slider-item.swiper-slide-active .professional__slider-icon {\n opacity: 1;\n}\n.professional__slider-item.swiper-slide-active img {\n width: 350px;\n transition: all var(--transition);\n}\n.professional__slider-item--hide {\n filter: grayscale(100%) !important;\n pointer-events: none;\n}\n.professional__slider-link {\n position: relative;\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);\n transition: all var(--transition);\n}\n.professional__slider-link::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n z-index: 1;\n}\n.professional__slider-icon {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 66px;\n overflow: hidden;\n top: 50%;\n left: 50%;\n display: flex;\n transform: translate(-50%, -50%);\n z-index: 1;\n opacity: 0;\n transition: all var(--transition);\n}\n.professional__slider-icon svg path {\n transition: all var(--transition);\n}\n.professional__slider-icon:hover svg path:nth-child(1) {\n fill: var(--blue-dark);\n}\n.professional__slider-icon:hover svg path:nth-child(2) {\n fill: var(--light);\n}\n.professional__slider-btn {\n box-shadow: none;\n background-color: var(--light);\n border-radius: 50%;\n border: none;\n width: 56px;\n height: 56px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n top: 150px;\n}\n.professional__slider-btn::after {\n content: \"\";\n}\n.professional__slider-btn svg {\n transform: scale(0.8);\n}\n.professional__slider-btn.swiper-button-disabled {\n opacity: 0.5;\n}\n.professional__slider-navigation-prev {\n left: 19%;\n}\n.professional__slider-navigation-next {\n right: 19%;\n}\n.professional__slider-info {\n margin: 0 auto;\n display: block;\n max-width: 420px;\n font-weight: 600;\n color: #fff;\n text-align: center;\n font-size: 20px;\n line-height: 1.17;\n}\n.professional__slider-pagination {\n width: auto !important;\n position: static !important;\n padding-top: 16px;\n margin-bottom: 32px;\n}\n.professional__slider-pagination .swiper-pagination-bullet {\n width: 56px;\n height: 3px;\n padding: 0;\n border-radius: 0;\n margin: 0 9px !important;\n background-color: var(--light);\n opacity: 0.5;\n bottom: 0;\n}\n.professional__slider-pagination .swiper-pagination-bullet-active {\n background-color: var(--light) !important;\n opacity: 1;\n}\n\n@media (max-width: 1440px) {\n .professional__content::before {\n right: 20%;\n }\n .professional__slider {\n width: 66%;\n right: -108px;\n }\n .professional__slider-item img {\n height: 220px;\n }\n .professional__slider-navigation-prev {\n left: 16%;\n }\n .professional__slider-navigation-next {\n right: 16%;\n }\n}\n@media (max-width: 1280px) {\n .professional {\n margin-top: 60px;\n }\n .professional__content {\n padding: 60px 0 80px;\n }\n .professional__content::before {\n right: 23%;\n }\n .professional__subtitle {\n font-size: 25px;\n margin-bottom: 50px;\n }\n .professional__text {\n font-size: 17px;\n max-width: 520px;\n }\n .professional__text-wrapper {\n margin-bottom: 38px;\n }\n .professional__slider {\n top: 128px;\n right: -80px;\n }\n .professional__slider-item img {\n height: 194px;\n width: 400px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 300px;\n }\n .professional__slider-btn {\n top: 130px;\n }\n .professional__slider-pagination {\n padding-top: 2px;\n margin-bottom: 27px;\n }\n .professional__slider-pagination .swiper-pagination-bullet {\n width: 50px;\n }\n .professional__slider-info {\n font-size: 14px;\n max-width: 290px;\n }\n}\n@media (max-width: 1140px) {\n .professional__content::before {\n right: 17%;\n }\n .professional__slider-navigation-prev {\n left: 14%;\n }\n .professional__slider-navigation-next {\n right: 14%;\n }\n}\n@media (max-width: 1024px) {\n .professional {\n padding-bottom: 70px;\n }\n .professional__content {\n padding: 60px 0 70px;\n }\n .professional__content::before {\n right: 13%;\n }\n .professional__subtitle {\n margin-bottom: 55px;\n }\n .professional__text {\n max-width: 420px;\n }\n .professional__text-wrapper {\n margin-bottom: 56px;\n gap: 20px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 240px;\n }\n .professional__slider-item img {\n height: 150px;\n width: 300px;\n }\n .professional__slider-icon {\n width: 56px;\n height: 46px;\n }\n .professional__slider-btn {\n width: 42px;\n height: 42px;\n top: 116px;\n }\n .professional__slider-navigation-prev {\n left: 18%;\n }\n .professional__slider-navigation-next {\n right: 18%;\n }\n .professional__slider-pagination {\n padding-top: 0;\n }\n .professional__slider-pagination .swiper-pagination-bullet {\n width: 38px;\n }\n}\n@media (max-width: 992px) {\n .professional__content {\n width: 100%;\n padding-bottom: 45px;\n }\n .professional__content::before {\n display: none;\n }\n .professional__subtitle {\n margin-bottom: 33px;\n }\n .professional__text-wrapper {\n margin-bottom: 0;\n }\n .professional__text {\n max-width: 520px;\n }\n .professional__slider {\n position: static;\n width: 100%;\n }\n .professional__slider-decor {\n position: relative;\n transform: rotate(180deg);\n z-index: 1;\n }\n .professional__slider-decor::before {\n content: \"\";\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n right: 0;\n height: 1000px;\n background-image: linear-gradient(180deg, #cd1338 39.39%, rgba(205, 19, 56, 0.46) 127.43%);\n transform: skewY(343deg) rotate(180deg);\n backdrop-filter: blur(5px);\n }\n .professional__slider-container {\n padding: 0 var(--container-offset);\n max-width: var(--container-width);\n position: static;\n transform: translateX(0);\n margin: 0 auto 52px auto;\n }\n .professional__slider-item img {\n height: 160px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.5);\n }\n .professional__slider-item.swiper-slide-active img {\n width: 250px;\n }\n .professional__slider-btn {\n top: 122px;\n }\n .professional__slider-pagination {\n margin-bottom: 20px;\n }\n .professional__slider-navigation-prev {\n left: 20%;\n }\n .professional__slider-navigation-next {\n right: 20%;\n }\n}\n@media (max-width: 768px) {\n .professional {\n margin-top: 60px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.4);\n }\n}\n@media (max-width: 700px) {\n .professional__subtitle {\n font-size: 16px;\n }\n .professional__text {\n font-size: 14px;\n line-height: 18px;\n max-width: 340px;\n }\n .professional__slider-decor {\n padding-top: 10px;\n }\n .professional__slider-decor::before {\n top: -30px;\n }\n .professional__slider-item img {\n height: 140px;\n }\n .professional__slider-item.swiper-slide-active img {\n width: 230px;\n }\n .professional__slider-icon {\n width: 50px;\n height: 40px;\n }\n .professional__slider-btn {\n top: 110px;\n width: 38px;\n height: 38px;\n }\n .professional__slider-btn svg {\n transform: scale(0.6);\n }\n .professional__slider-navigation-prev {\n left: 28%;\n }\n .professional__slider-navigation-next {\n right: 28%;\n }\n}\n@media (max-width: 500px) {\n .professional__content {\n padding: 45px 0 10px;\n }\n .professional__slider-decor {\n padding-top: 30px;\n }\n .professional__slider-container {\n padding-left: 0;\n padding-right: 0;\n margin-bottom: 40px;\n }\n .professional__slider-pagination {\n padding-top: 10px;\n }\n .professional__slider-navigation-prev {\n left: 14%;\n }\n .professional__slider-navigation-next {\n right: 14%;\n }\n}\n@media (max-width: 360px) {\n .professional__slider-container {\n padding-top: 0;\n }\n .professional__slider-btn {\n top: 115px;\n }\n .professional__slider-item.swiper-slide-active {\n transform: scale(1.2);\n }\n}\n.interview {\n --content-width: 800px;\n --content-offset: 140px;\n position: relative;\n overflow: hidden;\n background-color: var(--blue-middle);\n}\n.interview__slider-wrapper {\n align-items: stretch;\n}\n.interview__slider-content {\n position: relative;\n z-index: 1;\n flex-grow: 1;\n}\n.interview__slider-inner {\n padding: 200px var(--container-offset) 288px;\n position: relative;\n max-width: var(--content-width);\n margin-left: auto;\n margin-right: var(--content-offset);\n}\n.interview__slider-title {\n font-size: 68px;\n margin-bottom: 35px;\n}\n.interview__slider-info {\n max-width: 280px;\n margin-bottom: 120px;\n}\n.interview__slider-name {\n font-size: 16px;\n font-weight: 700;\n line-height: 1.05;\n margin-bottom: 22px;\n}\n.interview__slider-descr {\n font-size: 16px;\n font-weight: 200;\n line-height: 18px;\n}\n.interview__slider-text {\n font-size: 24px;\n font-weight: 200;\n line-height: 1.2;\n}\n.interview__slider-item {\n height: auto;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: flex-end;\n}\n.interview__slider-item::before {\n content: \"\";\n position: absolute;\n left: 36%;\n bottom: 0;\n width: 100vw;\n height: 100%;\n z-index: 1;\n transform: skewX(-17deg);\n transform-origin: top;\n background-image: linear-gradient(270deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%);\n backdrop-filter: blur(10px);\n}\n.interview__slider-item-content {\n position: relative;\n z-index: 11;\n}\n.interview__slider-img {\n position: absolute;\n height: 100%;\n z-index: -1;\n}\n.interview__slider-img img {\n height: 100%;\n}\n.interview__slider-link {\n font-variation-settings: \"wdth\" 140, \"wght\" 700;\n position: absolute;\n bottom: 100px;\n left: var(--container-offset);\n right: var(--container-offset);\n font-size: 24px;\n font-weight: 700;\n line-height: 56px;\n letter-spacing: 0.12px;\n box-sizing: border-box;\n text-transform: none;\n}\n.interview__slider-btn {\n box-shadow: none;\n background-color: var(--light);\n border-radius: 50%;\n border: none;\n width: 56px;\n height: 56px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n bottom: 440px;\n top: auto;\n}\n.interview__slider-btn::after {\n content: \"\";\n}\n.interview__slider-btn svg {\n transform: scale(0.8);\n}\n.interview__slider-navigation svg path {\n fill: var(--light);\n}\n.interview__slider-navigation-prev {\n left: auto;\n right: var(--content-width);\n background-color: var(--accent);\n}\n.interview__slider-navigation-next {\n left: var(--content-width);\n background-color: var(--accent);\n}\n.interview__slider-navigation-inner {\n position: relative;\n max-width: var(--content-width);\n margin-left: auto;\n margin-right: var(--content-offset);\n}\n.interview__slider-info {\n margin-left: auto;\n padding-right: 60px;\n}\n.interview__slider-navigation-container {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2;\n}\n.interview__slider-pagination {\n width: auto !important;\n bottom: 230px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n}\n.interview__slider-pagination {\n display: flex;\n gap: 10px;\n}\n.interview__slider-pagination .swiper-pagination-bullet {\n width: 70px;\n height: 3px;\n padding: 0;\n border-radius: 0;\n background-color: var(--light);\n opacity: 0.5;\n margin: 0;\n}\n.interview__slider-pagination .swiper-pagination-bullet-active {\n background-color: var(--light) !important;\n opacity: 1;\n}\n\n@media (max-width: 1440px) {\n .interview {\n --content-offset: 60px;\n --content-width: 760px;\n }\n .interview__slider-info {\n padding-right: 134px;\n }\n .interview__slider-item::before {\n left: 39%;\n }\n}\n@media (max-width: 1280px) {\n .interview {\n --content-offset: 8%;\n --content-width: 58%;\n }\n .interview__slider-inner {\n padding: 90px 0 252px;\n }\n .interview__slider-item::before {\n left: 34%;\n }\n .interview__slider-title {\n font-size: 50px;\n }\n .interview__slider-info {\n padding-right: 0;\n margin-bottom: 50px;\n }\n .interview__slider-name {\n font-size: 12px;\n margin-bottom: 10px;\n }\n .interview__slider-descr {\n font-size: 12px;\n }\n .interview__slider-text {\n font-size: 17px;\n max-width: 600px;\n }\n .interview__slider-link {\n font-size: 17px;\n line-height: 38px;\n }\n .interview__slider-pagination {\n bottom: 190px !important;\n }\n .interview__slider-btn {\n bottom: 350px;\n }\n .interview__slider-navigation-prev {\n right: auto;\n left: -80px;\n }\n .interview__slider-navigation-next {\n left: auto;\n right: -80px;\n }\n}\n@media (max-width: 1024px) {\n .interview {\n --content-offset: 7%;\n --content-width: 61%;\n }\n .interview__slider-img {\n left: -50px;\n }\n .interview__slider-btn {\n width: 46px;\n height: 46px;\n }\n .interview__slider-text {\n max-width: 470px;\n }\n .interview__slider-title {\n font-size: 47px;\n letter-spacing: 1.5px;\n }\n .interview__slider-navigation-prev {\n left: -60px;\n }\n .interview__slider-navigation-next {\n right: -60px;\n }\n}\n@media (max-width: 900px) {\n .interview {\n --content-offset: 0;\n --content-width: 560px;\n }\n .interview__slider-inner {\n padding: 490px 0 210px;\n margin-left: 0;\n margin: 0 auto;\n }\n .interview__slider-info {\n margin-bottom: 36px;\n }\n .interview__slider-link {\n bottom: 90px;\n left: 0;\n right: 0;\n }\n .interview__slider-pagination {\n bottom: 168px !important;\n }\n .interview__slider-title {\n font-size: 50px;\n letter-spacing: 2.5px;\n }\n .interview__slider-navigation-inner {\n max-width: 100%;\n }\n .interview__slider-navigation-prev {\n left: 0;\n }\n .interview__slider-navigation-next {\n right: 0;\n }\n .interview__slider-item {\n max-height: 100%;\n }\n .interview__slider-item::before {\n transform: skewX(0);\n transform: skewY(18deg);\n left: 0;\n right: 0;\n top: 406px;\n height: 100%;\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\n }\n .interview__slider-img {\n width: 100%;\n left: 0;\n }\n .interview__slider-img img {\n width: 100%;\n }\n}\n@media (max-width: 700px) {\n .interview__slider-title {\n margin-bottom: 25px;\n font-size: 32px;\n letter-spacing: 1.6px;\n }\n .interview__slider-img img {\n height: auto;\n }\n .interview__slider-info {\n max-width: 220px;\n }\n .interview__slider-text {\n font-size: 14px;\n }\n .interview__slider-pagination .swiper-pagination-bullet {\n width: 46px;\n }\n .interview__slider-link {\n line-height: 30px;\n font-size: 14px;\n }\n .interview__slider-btn {\n bottom: 150px;\n width: 36px;\n height: 36px;\n }\n .interview__slider-btn svg {\n transform: scale(0.6);\n }\n}\n@media (max-width: 400px) {\n .interview__slider-inner {\n padding: 390px 0 210px;\n }\n .interview__slider-item::before {\n top: 333px;\n }\n}\n.chat {\n position: relative;\n padding: 54px 0 48px;\n overflow: hidden;\n background-image: url(\"./../img/chat-bg.webp\");\n background-repeat: no-repeat;\n background-size: cover;\n}\n.chat__inner {\n position: relative;\n z-index: 1;\n}\n.chat__title {\n margin-bottom: 24px;\n}\n.chat__text {\n max-width: 686px;\n margin-bottom: 30px;\n font-size: 24px;\n}\n.chat__mobile {\n position: absolute;\n right: 0;\n top: 0;\n z-index: -1;\n transform: scale(1.1);\n transform-origin: top right;\n}\n.chat__bottom {\n display: inline-flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n gap: 36px;\n}\n.chat__img {\n align-self: center;\n width: 216px;\n}\n.chat__btn {\n padding: 0 35px;\n text-transform: initial;\n font-size: 20px;\n}\n\n@media (max-width: 1440px) {\n .chat {\n background-position: top right -100px;\n }\n .chat__mobile {\n transform: scale(1);\n }\n}\n@media (max-width: 1280px) {\n .chat__text {\n max-width: 656px;\n margin-bottom: 50px;\n font-size: 17px;\n }\n .chat__mobile {\n transform: scale(0.9);\n }\n .chat__img {\n width: 194px;\n }\n .chat__btn {\n padding: 5px 35px;\n }\n}\n@media (max-width: 1024px) {\n .chat__text {\n max-width: 570px;\n margin-bottom: 50px;\n font-size: 17px;\n }\n .chat__mobile {\n transform: scale(0.8);\n }\n}\n@media (max-width: 900px) {\n .chat__text {\n max-width: 690px;\n }\n .chat__mobile {\n display: flex;\n justify-content: center;\n transform: scale(1);\n top: 173px;\n right: 2%;\n }\n}\n@media (max-width: 700px) {\n .chat {\n padding: 54px 0 0;\n background-image: url(\"./../img/chat-bg-mobile.webp\");\n background-position: top right 0;\n }\n .chat__mobile {\n position: static;\n max-width: 450px;\n width: 100%;\n margin: 0 auto;\n transform: scale(1);\n }\n .chat__text {\n font-size: 14px;\n line-height: 1.2;\n margin-bottom: 30px;\n }\n .chat__bottom {\n position: absolute;\n z-index: 3;\n bottom: 0;\n padding-bottom: 56px;\n left: 0;\n right: 0;\n }\n .chat__bottom::before {\n content: \"\";\n position: absolute;\n left: calc(var(--container-offset) * -1);\n right: calc(var(--container-offset) * -1);\n bottom: 0;\n height: 180px;\n z-index: -1;\n background-image: linear-gradient(-17deg, rgba(0, 64, 108, 0.5803921569) 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\n backdrop-filter: blur(5px);\n clip-path: polygon(0px 60px, 100% 0%, 100% 100%, 0% 100%);\n }\n .chat__img {\n display: none;\n }\n .chat__btn {\n max-width: 400px;\n width: 100%;\n margin: 0 auto;\n font-size: 14px;\n padding: 4px 35px;\n }\n}\n@media (max-width: 400px) {\n .chat {\n padding: 34px 0 0;\n }\n .chat__btn {\n padding: 4px 10px;\n }\n .chat__text {\n max-width: 310px;\n }\n}\n.accordion-mobile {\n display: none;\n}\n\n.accordion__item .accordion__title-wrapper {\n clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%);\n}\n.accordion__item:nth-child(1) {\n width: 408px;\n margin-bottom: 20px;\n}\n.accordion__item:nth-child(2) {\n width: 436px;\n}\n.accordion__item:nth-child(2) .accordion__title-wrapper {\n color: var(--default);\n}\n.accordion__title-wrapper {\n cursor: pointer;\n padding: 13px 0 13px 16px;\n background-color: var(--light);\n color: var(--blue-middle);\n font-size: 24px;\n font-weight: 600;\n line-height: 1.7;\n display: flex;\n align-items: center;\n}\n.accordion__title {\n display: inline-block;\n padding-right: 18px;\n}\n.accordion__icon {\n width: 32px;\n height: 16px;\n transition: all 0.5s ease-in-out;\n}\n.accordion__content {\n max-height: 0;\n overflow: hidden;\n transition: all 0.5s ease-in-out;\n color: var(--default);\n font-size: 24px;\n font-weight: 200;\n background-color: #f5f5f5;\n padding: 0 10px 0 14px;\n margin: -1px 0 0 0;\n}\n.accordion__content-text {\n line-height: 1.17;\n}\n.accordion__content-text span {\n font-variation-settings: \"wdth\" 140, \"wght\" 600;\n}\n.accordion__content-text:not(:last-child) {\n margin-bottom: 8px;\n}\n.accordion .active .accordion__content {\n max-height: 600px;\n padding: 10px 10px 10px 14px;\n overflow-y: scroll;\n}\n\n@media (max-width: 1280px) {\n .accordion__content {\n font-size: 17px;\n padding: 0 10px 0 27px;\n }\n .accordion__content-text:not(:last-child) {\n margin-bottom: 6px;\n }\n .accordion .active .accordion__content {\n padding: 10px 10px 10px 27px;\n }\n .accordion__item:nth-child(1) {\n width: 370px;\n margin-bottom: 14px;\n }\n .accordion__item:nth-child(2) {\n width: 390px;\n }\n .accordion__item .accordion__title-wrapper {\n clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%);\n }\n .accordion__title-wrapper {\n padding: 10px 0 10px 27px;\n }\n .accordion__title {\n font-size: 17px;\n }\n .accordion__icon {\n margin: 0 30px 0 auto;\n }\n}\n@media (max-width: 992px) {\n .accordion-desktop {\n display: none;\n }\n .accordion-mobile {\n display: block;\n padding: 0 var(--container-offset);\n max-width: var(--container-width);\n margin-left: auto;\n margin-right: auto;\n }\n .accordion__items {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n }\n .accordion__item-wrapper {\n padding: 10px 0 10px 16px;\n }\n .accordion__item:nth-child(1) {\n width: 50%;\n margin-bottom: 0;\n }\n .accordion__item:nth-child(2) {\n width: 50%;\n }\n .accordion__item:nth-child(2) .accordion__title-wrapper {\n clip-path: polygon(0 0, 100% 0, 100% 100%, 4% 100%);\n }\n .accordion__item:nth-child(2) .accordion__content {\n margin-left: 1.9vw;\n }\n .accordion__item:nth-child(2) .accordion__icon {\n margin: 0 12px 0 auto;\n }\n .accordion__title {\n padding-right: 0;\n }\n .accordion__icon {\n margin: 0 22px 0 auto;\n }\n}\n@media (max-width: 700px) {\n .accordion__items {\n flex-direction: column;\n gap: 14px;\n }\n .accordion__content {\n font-size: 14px;\n padding: 0 10px 0 12px;\n }\n .accordion__content-text:not(:last-child) {\n margin-bottom: 4px;\n }\n .accordion .active .accordion__content {\n padding: 10px 10px 10px 12px;\n }\n .accordion__item:nth-child(1) {\n width: auto;\n max-width: 320px;\n }\n .accordion__item:nth-child(2) {\n width: auto;\n max-width: 336px;\n }\n .accordion__item:nth-child(2) .accordion__content {\n margin-left: 0;\n }\n .accordion__item:nth-child(2) .accordion__title-wrapper {\n clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%);\n }\n .accordion__item:nth-child(2) .accordion__icon {\n margin: 0 22px 0 auto;\n }\n .accordion__title-wrapper {\n padding: 10px 10px 10px 12px;\n }\n .accordion__title {\n font-size: 14px;\n }\n .accordion__icon {\n width: 20px;\n height: 10px;\n }\n .accordion__icon img {\n object-fit: contain;\n }\n}\n.banner {\n margin-top: 85px;\n}\n.banner__background {\n background-image: url(\"./../img/banner-bg.jpg\");\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n}\n.banner__inner {\n min-height: 96px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.banner__title {\n font-size: 48px;\n margin-right: 88px;\n margin-bottom: 0;\n}\n.banner__btn {\n margin-right: 140px;\n}\n\n@media (max-width: 1280px) {\n .banner {\n margin-top: 60px;\n }\n .banner__inner {\n min-height: 68px;\n }\n .banner__title {\n font-size: 34px;\n margin-right: 50px;\n }\n .banner__btn {\n margin-right: 180px;\n }\n}\n@media (max-width: 940px) {\n .banner__btn {\n margin-right: 0;\n }\n}\n@media (max-width: 700px) {\n .banner__inner {\n min-height: 68px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 46px 0 20px;\n }\n .banner__title {\n margin-bottom: 20px;\n text-align: center;\n margin-right: 0;\n font-size: 30px;\n letter-spacing: 1.2px;\n line-height: 32px;\n }\n}\n@media (max-width: 360px) {\n .banner__title {\n font-size: 26px;\n }\n}\n.goods {\n padding: 62px 0 10px;\n}\n.goods__slider {\n margin-left: -5px;\n margin-right: -5px;\n}\n.goods__slider-wrapper {\n align-items: stretch;\n}\n.goods__item {\n height: auto;\n padding: 10px 10px 14px;\n box-sizing: border-box;\n background-color: var(--light);\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n}\n.goods__item-shadow {\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);\n padding: 28px 10px 42px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n}\n.goods__item-bottom {\n padding: 0 10px;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n}\n.goods__item img {\n margin-left: auto;\n margin-right: auto;\n width: 310px;\n max-height: 310px;\n object-fit: contain;\n}\n.goods__item-title {\n color: var(--blue-middle);\n font-size: 20px;\n font-weight: 629;\n line-height: 22px;\n margin-bottom: 5px;\n}\n.goods__item-subtitle {\n display: inline-block;\n margin-bottom: 18px;\n font-size: 16px;\n line-height: 18px;\n font-weight: 200;\n color: var(--gray);\n}\n.goods__item-text {\n color: var(--default);\n margin-bottom: 28px;\n font-size: 16px;\n font-weight: 200;\n line-height: 18px;\n text-align: left;\n}\n.goods__item-btn {\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n opacity: 0.5;\n margin-top: auto;\n}\n.goods__item-btn:hover {\n background-color: var(--blue-dark);\n opacity: 1;\n}\n.goods__item-img {\n position: relative;\n margin-bottom: 10px;\n}\n.goods__item.goods__item--icon .goods__item-img::before {\n content: \"\";\n position: absolute;\n bottom: 0px;\n right: 16%;\n width: 15px;\n height: 15px;\n background-size: cover;\n object-fit: cover;\n background-image: url(\"./../img/label-icon.png\");\n}\n.goods__slider-wrapper__arros {\n position: relative;\n padding: 0 38px;\n}\n.goods__slider-navigation {\n left: 0;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n}\n.goods__slider-btn {\n background-color: transparent;\n cursor: pointer;\n border: none;\n padding: 0;\n width: 34px;\n height: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: -50px;\n}\n.goods__slider-btn::after {\n content: \"\";\n}\n.goods__slider-btn svg {\n transform: scale(0.9);\n}\n.goods__slider-btn.swiper-button-disabled svg path {\n stroke: var(--default);\n}\n.goods__slider-prev {\n left: 2px;\n}\n.goods__slider-next {\n right: 2px;\n}\n.goods__slider-pagination {\n position: relative;\n top: -5px;\n margin-left: -5px;\n margin-right: -5px;\n}\n.goods__slider-pagination .swiper-pagination-bullet {\n width: 56px;\n height: 2px;\n padding: 5px 0;\n border-radius: 0;\n margin: 0 18px !important;\n position: relative;\n background-color: var(--light);\n bottom: 0;\n}\n.goods__slider-pagination .swiper-pagination-bullet::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 0;\n height: 3px;\n width: 100%;\n transform: translateY(-50%);\n background-color: var(--default) !important;\n}\n.goods__slider-pagination .swiper-pagination-bullet-active::before {\n background-color: var(--accent) !important;\n}\n\n@media (max-width: 1440px) {\n .goods__item-text {\n margin-bottom: 25px;\n }\n}\n@media (max-width: 1280px) {\n .goods__item img {\n width: 220px;\n max-height: 220px;\n }\n .goods__item-title {\n font-size: 14px;\n line-height: 16px;\n margin-bottom: 0;\n }\n .goods__item-subtitle {\n font-size: 12px;\n }\n .goods__item-text {\n font-size: 12px;\n margin-bottom: 30px;\n }\n .goods__item-shadow {\n padding: 16px 10px 28px;\n }\n .goods__item.goods__item--icon .goods__item-img::before {\n right: 12%;\n }\n .goods__slider-pagination .swiper-pagination-bullet {\n margin: 0 10px !important;\n }\n}\n@media (max-width: 1024px) {\n .goods__item-text {\n margin-bottom: 15px;\n }\n}\n@media (max-width: 1024px) and (min-width: 941px) {\n .goods__item img {\n width: 166px;\n max-height: 166px;\n }\n .goods__item-btn {\n min-width: 140px;\n }\n}\n@media (max-width: 940px) {\n .goods {\n padding-top: 40px;\n }\n .goods__slider-pagination .swiper-pagination-bullet {\n width: 48px;\n margin: 0 7px !important;\n }\n}\n@media (max-width: 768px) {\n .goods__slider-pagination .swiper-pagination-bullet {\n width: 35px;\n margin: 0 5px !important;\n }\n .goods__item-text {\n margin-bottom: 10px;\n }\n .goods__item.goods__item--icon .goods__item-img::before {\n right: 12%;\n }\n}\n@media (max-width: 600px) {\n .goods__slider-pagination .swiper-pagination-bullet {\n width: 18px;\n margin: 0 5px !important;\n }\n .goods__item.goods__item--icon .goods__item-img::before {\n right: 22%;\n }\n}\n@media (max-width: 400px) {\n .goods__slider-pagination .swiper-pagination-bullet {\n width: 14px;\n margin: 0 4px !important;\n }\n .goods__item.goods__item--icon .goods__item-img::before {\n right: 16%;\n }\n}\n.labels {\n padding: 70px 0 108px;\n}\n.labels__title {\n text-align: center;\n color: var(--accent);\n margin-bottom: 50px;\n font-size: 48px;\n}\n.labels__list {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 42px;\n}\n.labels__item {\n display: inherit;\n transition: all var(--transition);\n}\n.labels__item:hover {\n transform: var(--scale-hover);\n}\n.labels__link img {\n height: 47px;\n}\n\n@media (max-width: 1440px) {\n .labels {\n padding: 70px 0 85px;\n }\n .labels__list {\n gap: 32px;\n }\n}\n@media (max-width: 1280px) {\n .labels {\n padding: 46px 0 50px;\n }\n .labels__list {\n gap: 30px;\n }\n .labels__title {\n font-size: 34px;\n line-height: 34px;\n margin-bottom: 37px;\n }\n .labels__link img {\n height: 34px;\n }\n}\n@media (max-width: 1024px) {\n .labels__list {\n gap: 26px;\n }\n}\n@media (max-width: 900px) {\n .labels {\n padding: 46px 0 35px;\n }\n .labels__link img {\n height: 45px;\n }\n}\n@media (max-width: 700px) {\n .labels {\n padding: 46px 0 100px;\n }\n .labels__list {\n gap: 16px 24px;\n }\n .labels__title {\n font-size: 30px;\n line-height: 1;\n margin-bottom: 30px;\n }\n .labels__link img {\n height: 34px;\n }\n}\n@media (max-width: 400px) {\n .labels__title {\n margin-bottom: 24px;\n }\n .labels__link img {\n height: 32px;\n }\n}\n@media (max-width: 360px) {\n .labels__title {\n font-weight: 800;\n font-size: 26px;\n }\n .labels__link img {\n height: 28px;\n }\n .labels__list {\n gap: 16px 20px;\n }\n}\n.recommendations {\n padding: 85px 0 0;\n margin-bottom: -1px;\n}\n.recommendations__inner {\n display: flex;\n}\n.recommendations__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: 40px;\n position: relative;\n z-index: 11;\n}\n.recommendations__title {\n margin-bottom: 24px;\n color: var(--accent);\n}\n.recommendations__text {\n color: var(--default);\n font-size: 24px;\n font-weight: 200;\n line-height: 28px;\n max-width: 540px;\n width: 100%;\n}\n.recommendations__slider {\n position: relative;\n height: 660px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-inner {\n width: 50%;\n position: relative;\n clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%);\n}\n.recommendations__slider-inner::before {\n content: \"\";\n position: absolute;\n bottom: 0;\n right: 0;\n width: calc(100% + 100vw - var(--content-width) / 2);\n height: 100%;\n background-color: var(--blue-middle);\n z-index: -1;\n}\n.recommendations__slider-wrapper {\n min-width: 0;\n flex-grow: 1;\n position: relative;\n}\n.recommendations__slider-container {\n padding-right: 140px;\n}\n.recommendations__slider-item {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-link {\n position: relative;\n}\n.recommendations__slider-link::before {\n content: \"\";\n position: absolute;\n background-image: url(\"./../img/svg/zoom.svg\");\n background-position: center;\n background-size: contain;\n background-repeat: no-repeat;\n right: 20px;\n top: 10px;\n width: 62px;\n height: 66px;\n}\n.recommendations__slider-link img {\n max-width: 370px;\n}\n.recommendations__slider-btn {\n box-shadow: none;\n background-color: transparent;\n border: none;\n width: 40px;\n height: 42px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.recommendations__slider-btn::after {\n content: \"\";\n}\n.recommendations__slider-btn svg {\n transform: scale(0.8);\n}\n.recommendations__slider-btn.swiper-button-disabled {\n opacity: 0.5;\n}\n.recommendations__slider-navigation-prev {\n left: -10px;\n}\n.recommendations__slider-navigation-next {\n right: 130px;\n}\n\n@media (max-width: 1280px) {\n .recommendations {\n padding: 60px 0 0;\n }\n .recommendations__slider {\n height: 606px;\n }\n .recommendations__slider-inner {\n width: 55%;\n }\n .recommendations__slider-link::before {\n width: 50px;\n height: 54px;\n right: 6px;\n }\n .recommendations__slider-link img {\n max-width: 350px;\n }\n .recommendations__text {\n font-size: 17px;\n line-height: 20px;\n max-width: 376px;\n }\n .recommendations__content {\n padding-left: 130px;\n }\n}\n@media (max-width: 1024px) {\n .recommendations__slider {\n height: 506px;\n }\n .recommendations__slider-inner {\n width: 62%;\n }\n .recommendations__slider-link img {\n max-width: 290px;\n }\n .recommendations__content {\n padding-left: 10px;\n padding-bottom: 76px;\n }\n}\n@media (max-width: 900px) {\n .recommendations__slider {\n height: 440px;\n }\n .recommendations__slider-inner {\n width: 58%;\n }\n .recommendations__slider-link img {\n max-width: 240px;\n }\n .recommendations__content {\n padding-left: 0;\n padding-bottom: 45px;\n }\n}\n@media (max-width: 768px) {\n .recommendations__title {\n margin-bottom: 14px;\n }\n .recommendations__slider-link img {\n max-width: 220px;\n }\n .recommendations__slider-link::before {\n width: 30px;\n height: 32px;\n }\n}\n@media ((max-width: 768px) and (min-width: 701px)) {\n .recommendations__slider-inner {\n width: 58%;\n }\n .recommendations__slider-link img {\n max-width: 200px;\n }\n .recommendations__content {\n margin-left: -10px;\n }\n}\n@media (max-width: 700px) {\n .recommendations {\n padding: 50px 0 0;\n }\n .recommendations__inner {\n flex-direction: column;\n justify-content: center;\n }\n .recommendations__content {\n margin-bottom: 0;\n margin-left: 0;\n margin-bottom: 30px;\n padding-bottom: 0;\n }\n .recommendations__slider {\n height: 344px;\n }\n .recommendations__slider-link img {\n max-width: 200px;\n }\n .recommendations__slider-inner {\n width: 100%;\n order: 2;\n clip-path: none;\n }\n .recommendations__slider-inner::before {\n transform: skewX(0);\n width: 100vw;\n left: calc(var(--container-offset) * -1);\n }\n .recommendations__slider-wrapper {\n margin: 0 calc(var(--container-offset) * -1);\n }\n .recommendations__slider-container {\n padding-right: 0;\n }\n .recommendations__slider-navigation-prev {\n left: 0;\n }\n .recommendations__slider-navigation-next {\n right: 0;\n }\n .recommendations__text {\n font-size: 14px;\n line-height: 1.2;\n }\n .recommendations__title span {\n font-size: 30px;\n letter-spacing: 1.2px;\n line-height: 32px;\n }\n}\n@media (max-width: 360px) {\n .recommendations__title {\n font-size: 26px;\n letter-spacing: 1px;\n }\n}\n.partners {\n padding: 90px 0 30px;\n}\n.partners__title {\n color: var(--accent);\n margin-bottom: 60px;\n}\n.partners__list {\n transition-timing-function: linear !important;\n align-items: center;\n display: inline-flex;\n}\n.partners__item {\n flex: 0 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n width: auto !important;\n}\n.partners__item img {\n max-height: 90px;\n max-width: 200px;\n width: 100%;\n filter: grayscale(100%);\n object-fit: contain;\n}\n\n.marquee {\n animation: scroll 30s linear infinite;\n}\n\n@keyframes scroll {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(calc(-100% - 86px));\n }\n}\n@media (max-width: 1280px) {\n .partners {\n padding: 55px 0 0;\n }\n}\n@media (max-width: 768px) {\n @keyframes scroll {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(calc(-100% - 60px));\n }\n }\n .partners__title {\n margin-bottom: 40px;\n }\n .partners__item img {\n max-height: 60px;\n max-width: 140px;\n }\n}\n@media (max-width: 700px) {\n .partners {\n padding: 50px 0 0;\n }\n .partners__title {\n margin-bottom: 30px;\n }\n}\n.header-history {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n z-index: 20;\n background-color: var(--blue-middle);\n}\n.header-history__burger, .header-history__mobile-logo {\n display: none;\n}\n\n.nav-history__container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 74px;\n}\n.nav-history__list {\n display: flex;\n align-items: center;\n column-gap: 15px;\n}\n.nav-history__next.active {\n color: var(--accent);\n}\n.nav-history__next.active svg path {\n stroke: var(--accent);\n}\n.nav-history__item--back {\n display: none;\n}\n.nav-history__link {\n font-variation-settings: \"wght\" 700, \"wdth\" 25, \"slnt\" -10;\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 16px;\n font-weight: 200;\n line-height: 30px;\n text-transform: uppercase;\n border-bottom: 1px solid transparent;\n transition: all var(--transition);\n font-stretch: 25%;\n line-height: 47px;\n letter-spacing: 0;\n}\n.nav-history__link-icon {\n margin-bottom: 2px;\n}\n.nav-history__link-icon path {\n transition: all var(--transition);\n}\n.nav-history__link:hover {\n color: var(--accent);\n}\n.nav-history__link:hover svg path {\n stroke: var(--accent);\n}\n.nav-history__back {\n margin-right: auto;\n}\n\n@media (max-width: 1280px) {\n .nav-history__link {\n font-size: 13px;\n }\n}\n@media (max-width: 1024px) {\n .nav-history__list {\n column-gap: 10px;\n }\n}\n@media (max-width: 900px) {\n .header-history__inner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .header-history__burger {\n display: flex;\n }\n .header-history.active {\n background-image: none;\n }\n .header-history__mobile-logo {\n display: block;\n cursor: auto;\n max-width: 190px;\n }\n .header-history__burger {\n align-self: center;\n display: flex;\n margin-left: auto;\n cursor: pointer;\n height: 36px;\n padding: 4px 0;\n width: 36px;\n z-index: 2;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n .header-history__mobile-logo {\n margin-left: calc(var(--container-offset) * -1);\n }\n .header-history__item--back {\n display: block;\n }\n .nav-history {\n position: fixed;\n top: 60px;\n left: -100vw;\n right: 100vw;\n min-height: calc(100vh - 60px);\n bottom: 0;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n transition: all var(--transition);\n background-color: var(--blue-middle);\n overflow-y: auto;\n text-align: center;\n }\n .nav-history__container {\n height: 60px;\n }\n .nav-history__logo {\n display: none;\n }\n .nav-history__item--back {\n display: block;\n }\n .nav-history__list {\n flex-direction: column;\n padding: 80px 20px 60px;\n gap: 20px 0;\n }\n .nav-history__link {\n font-size: 21px;\n }\n .nav-history__next {\n font-size: 13px;\n }\n .nav-history.active {\n left: 0;\n right: 0;\n }\n}\n@media (max-width: 400px) {\n .nav-history__next {\n font-size: 10px;\n }\n}\n@media (max-width: 360px) {\n .nav-history__list {\n padding: 40px 20px 40px;\n gap: 10px 0;\n }\n .nav-history__link {\n padding: 10px 0;\n }\n}\n.history-top {\n position: relative;\n overflow: hidden;\n margin-top: 74px;\n background-color: var(--blue-middle);\n}\n.history-top__img {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n.history-top__img img {\n position: absolute;\n right: 0;\n height: 100%;\n width: 50%;\n object-fit: cover;\n object-position: top right;\n}\n.history-top__inner {\n padding: 234px 0 200px 0;\n position: relative;\n z-index: 1;\n}\n.history-top__inner::before {\n content: \"\";\n position: absolute;\n right: 50%;\n bottom: 0;\n width: 100vw;\n height: 100%;\n z-index: -1;\n transform: skewX(17deg);\n transform-origin: top;\n background-image: linear-gradient(90deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%);\n backdrop-filter: blur(10px);\n}\n.history-top__title {\n margin-bottom: 40px;\n font-size: 68px;\n}\n.history-top__name {\n font-variation-settings: \"wdth\" 100, \"wght\" 700;\n margin-bottom: 14px;\n font-size: 20px;\n font-style: normal;\n line-height: 1.35;\n font-stretch: normal;\n}\n.history-top__text {\n max-width: 540px;\n line-height: 1.2;\n}\n\n@media (max-width: 1440px) {\n .history-top__inner::before {\n right: 44%;\n }\n}\n@media (max-width: 1280px) {\n .history-top__inner {\n padding: 140px 0 248px 0;\n }\n .history-top__inner::before {\n right: 46%;\n }\n .history-top__title {\n margin-bottom: 70px;\n font-size: 48px;\n }\n .history-top__name {\n font-size: 14px;\n margin-bottom: 20px;\n }\n .history-top__text {\n font-size: 14px;\n }\n}\n@media (max-width: 1024px) {\n .history-top__inner {\n padding: 140px 0 115px 0;\n }\n .history-top__inner::before {\n right: 43%;\n }\n .history-top__img img {\n object-position: top center;\n }\n}\n@media (max-width: 900px) {\n .history-top {\n margin-top: 60px;\n }\n .history-top__inner {\n width: 100%;\n position: absolute;\n padding: 0 0 40px 0;\n bottom: 0;\n }\n .history-top__inner::before {\n transform: skewX(0);\n transform: skewY(18deg);\n left: calc(var(--container-offset) * -1);\n right: calc(var(--container-offset) * -1);\n top: -40px;\n height: 200%;\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\n }\n .history-top__img {\n position: static;\n }\n .history-top__img img {\n position: static;\n width: 100%;\n }\n .history-top__title {\n margin-bottom: 40px;\n }\n .history-top__name {\n margin-bottom: 8px;\n }\n}\n@media (max-width: 700px) {\n .history-top {\n padding-bottom: 100px;\n }\n .history-top__title {\n font-size: 30px;\n }\n}\n@media (max-width: 400px) {\n .history-top {\n padding-bottom: 120px;\n }\n .history-top__inner::before {\n top: -60px;\n }\n .history-top__title {\n margin-bottom: 40px;\n font-size: 25px;\n }\n}\n.history-question {\n position: relative;\n background-color: var(--blue-middle);\n}\n.history-question__img {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n.history-question__img img {\n position: absolute;\n left: 0;\n height: 100%;\n width: 50%;\n object-fit: cover;\n object-position: top left;\n}\n.history-question__inner {\n min-height: 834px;\n display: flex;\n align-items: center;\n padding: 70px 0 70px 0;\n max-width: 50%;\n margin-left: auto;\n position: relative;\n z-index: 1;\n}\n.history-question__inner::before {\n content: \"\";\n position: absolute;\n left: -37%;\n bottom: 0;\n width: 100vw;\n height: 100%;\n z-index: -1;\n transform: skewX(17deg);\n transform-origin: top;\n background-color: var(--blue-middle);\n}\n.history-question__list {\n display: flex;\n flex-direction: column;\n gap: 46px;\n}\n.history-question__title {\n font-size: 40px;\n line-height: 1.1;\n letter-spacing: 2.3px;\n margin-bottom: 18px;\n}\n.history-question__text {\n font-size: 24px;\n font-weight: 200;\n line-height: 1.1;\n}\n\n@media (max-width: 1440px) {\n .history-question__inner::before {\n left: -42%;\n }\n}\n@media (max-width: 1280px) {\n .history-question__inner {\n max-width: 560px;\n min-height: auto;\n padding: 50px 0 50px 0;\n }\n .history-question__inner::before {\n left: -30%;\n }\n .history-question__title {\n font-size: 30px;\n letter-spacing: 1.2px;\n }\n .history-question__list {\n gap: 30px;\n }\n .history-question__text {\n font-size: 17px;\n }\n}\n@media (max-width: 1024px) {\n .history-question__inner {\n max-width: 450px;\n }\n .history-question__inner::before {\n left: -40%;\n }\n}\n@media (max-width: 900px) {\n .history-question__inner {\n max-width: 100%;\n padding: 66px 0 100px 0;\n }\n .history-question__img {\n position: static;\n margin-bottom: 65px;\n }\n .history-question__img img {\n position: static;\n width: 100%;\n }\n .history-question__list {\n flex-direction: row;\n }\n}\n@media (max-width: 700px) {\n .history-question__list {\n flex-direction: column;\n }\n}\n@media (max-width: 400px) {\n .history-question__text {\n font-size: 14px;\n }\n .history-question__list {\n gap: 50px;\n }\n}\n.history-quite__inner {\n padding: 53px 0 51px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 30px;\n}\n.history-quite__inner--start {\n align-items: start;\n}\n.history-quite__title {\n color: var(--accent);\n font-size: 40px;\n max-width: 650px;\n margin-bottom: 0;\n line-height: 1.1;\n}\n.history-quite__text {\n max-width: 620px;\n color: var(--default);\n font-size: 24px;\n line-height: 1.2;\n}\n\n@media (max-width: 1280px) {\n .history-quite__title {\n font-size: 30px;\n }\n .history-quite__text {\n max-width: 522px;\n font-size: 17px;\n }\n}\n@media (max-width: 1024px) {\n .history-quite__inner {\n padding: 59px 0 53px;\n }\n .history-quite__title {\n display: inline;\n }\n .history-quite__text {\n max-width: 470px;\n }\n}\n@media (max-width: 900px) {\n .history-quite__title {\n width: 50%;\n }\n .history-quite__text {\n max-width: 100%;\n width: 50%;\n }\n}\n@media (max-width: 700px) {\n .history-quite__inner {\n flex-direction: column;\n }\n .history-quite__title {\n width: 100%;\n }\n .history-quite__text {\n width: 100%;\n }\n}\n@media (max-width: 400px) {\n .history-quite__inner {\n padding: 50px 0 50px;\n gap: 25px;\n }\n .history-quite__text {\n font-size: 14px;\n }\n}\n.history-question-right {\n position: relative;\n background-color: var(--blue-middle);\n}\n.history-question-right__img {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n.history-question-right__img img {\n position: absolute;\n right: 0;\n height: 100%;\n width: 56%;\n object-fit: cover;\n object-position: bottom right;\n}\n.history-question-right__inner {\n min-height: 934px;\n display: flex;\n align-items: center;\n padding: 70px 0 70px 0;\n max-width: 554px;\n position: relative;\n z-index: 1;\n}\n.history-question-right__inner::before {\n content: \"\";\n position: absolute;\n right: -13%;\n bottom: 0;\n width: 100vw;\n height: 100%;\n z-index: -1;\n transform: skewX(17deg);\n transform-origin: top;\n background-color: var(--blue-middle);\n}\n.history-question-right__list {\n display: flex;\n flex-direction: column;\n gap: 46px;\n}\n.history-question-right__title {\n font-size: 40px;\n line-height: 1.1;\n letter-spacing: 2.3px;\n margin-bottom: 18px;\n}\n.history-question-right__title span {\n display: block;\n margin-bottom: 0;\n}\n.history-question-right__text {\n font-size: 24px;\n font-weight: 200;\n line-height: 1.1;\n}\n\n@media (max-width: 1440px) {\n .history-question-right__inner::before {\n right: 0;\n }\n}\n@media (max-width: 1280px) {\n .history-question-right__inner {\n padding: 50px 0 50px 0;\n min-height: 660px;\n max-width: 520px;\n }\n .history-question-right__list {\n gap: 32px;\n }\n .history-question-right__title {\n margin-bottom: 14px;\n font-size: 32px;\n }\n .history-question-right__title span {\n font-size: 32px;\n }\n .history-question-right__text {\n font-size: 17px;\n line-height: 1.1;\n }\n}\n@media (max-width: 1024px) {\n .history-question-right__inner {\n min-height: 564px;\n max-width: 400px;\n }\n .history-question-right__inner::before {\n right: 2%;\n }\n .history-question-right__title {\n line-height: 1.1;\n }\n}\n@media (max-width: 900px) {\n .history-question-right__inner {\n min-height: auto;\n max-width: 100%;\n }\n .history-question-right__img {\n position: static;\n }\n .history-question-right__img img {\n position: static;\n width: 100%;\n }\n .history-question-right__list {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 54px;\n }\n}\n@media (max-width: 700px) {\n .history-question-right__list {\n grid-template-columns: 1fr;\n }\n .history-question-right__title {\n width: 100%;\n }\n .history-question-right__text {\n width: 100%;\n }\n}\n@media (max-width: 400px) {\n .history-question-right__title {\n font-size: 30px;\n }\n .history-question-right__title span {\n font-size: 30px;\n }\n .history-question-right__list {\n gap: 20px;\n }\n .history-question-right__text {\n font-size: 14px;\n }\n}\n.history-slogan__inner {\n padding: 40px 0 50px;\n}\n.history-slogan__title {\n color: var(--accent);\n font-size: 40px;\n line-height: 1.1;\n letter-spacing: 1.6px;\n margin-bottom: 0;\n}\n.history-slogan__text {\n color: var(--default);\n font-size: 24px;\n line-height: 1.14;\n}\n\n@media (max-width: 1280px) {\n .history-slogan__title {\n font-size: 30px;\n letter-spacing: 1.2px;\n letter-spacing: 1.2px;\n }\n}\n@media (max-width: 900px) {\n .history-slogan__inner {\n padding: 40px 0 40px;\n }\n .history-slogan__title {\n display: inline;\n }\n}\n.history-blitz {\n position: relative;\n overflow: hidden;\n background-color: var(--blue-middle);\n}\n.history-blitz__img {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n.history-blitz__img img {\n position: absolute;\n left: 0;\n height: 100%;\n width: 42%;\n object-fit: cover;\n object-position: top left;\n}\n.history-blitz__inner {\n min-height: 834px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 70px 0 70px 0;\n max-width: 850px;\n margin-left: auto;\n position: relative;\n z-index: 1;\n}\n.history-blitz__inner::before {\n content: \"\";\n position: absolute;\n left: -10%;\n bottom: -1px;\n width: 100vw;\n height: 100%;\n z-index: -1;\n transform: skewX(-17deg);\n transform-origin: top;\n background-image: linear-gradient(76deg, rgba(0, 64, 108, 0.53), #00406C 25.01% 117.87%);\n backdrop-filter: blur(5px);\n}\n.history-blitz__list {\n display: flex;\n flex-direction: column;\n gap: 36px;\n}\n.history-blitz__item {\n display: flex;\n}\n.history-blitz__item-title {\n font-variation-settings: \"wght\" 700, \"opsz\" 16, \"wdth\" 25, \"slnt\" -10;\n margin-bottom: 0;\n font-size: 22px;\n text-align: left;\n letter-spacing: 0.9px;\n line-height: 1.2;\n}\n.history-blitz__title {\n font-size: 45px;\n line-height: 1;\n letter-spacing: 1.8px;\n margin-bottom: 56px;\n text-align: center;\n letter-spacing: 0.9px;\n}\n.history-blitz__text {\n max-width: 450px;\n margin-left: auto;\n font-size: 24px;\n line-height: 1.2;\n}\n\n@media (max-width: 1440px) {\n .history-blitz__inner::before {\n left: -4%;\n }\n}\n@media (max-width: 1280px) {\n .history-blitz__title {\n font-variation-settings: \"wght\" 700, \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\n font-size: 30px;\n letter-spacing: 1.2px;\n margin-bottom: 66px;\n }\n .history-blitz__inner {\n max-width: 705px;\n min-height: auto;\n }\n .history-blitz__list {\n gap: 34px;\n }\n .history-blitz__item-title {\n font-size: 18px;\n letter-spacing: 0.9px;\n }\n .history-blitz__text {\n max-width: 340px;\n font-size: 17px;\n }\n}\n@media (max-width: 1024px) {\n .history-blitz__img img {\n width: 50%;\n }\n .history-blitz__inner {\n max-width: 524px;\n }\n .history-blitz__inner::before {\n left: 5%;\n }\n .history-blitz__item-title {\n max-width: 230px;\n }\n .history-blitz__text {\n max-width: 264px;\n }\n}\n@media (max-width: 900px) {\n .history-blitz__inner {\n min-height: auto;\n max-width: 100%;\n padding-top: 80px;\n margin-top: -134px;\n }\n .history-blitz__inner::before {\n transform: skewY(18deg);\n left: calc(var(--container-offset) * -1);\n right: calc(var(--container-offset) * -1);\n top: -30px;\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\n }\n .history-blitz__title {\n margin-bottom: 52px;\n }\n .history-blitz__img {\n position: static;\n }\n .history-blitz__img img {\n position: static;\n width: 100%;\n }\n .history-blitz__item {\n display: grid;\n grid-template-columns: 264px 1fr;\n gap: 36px;\n }\n .history-blitz__item-title {\n max-width: 100%;\n }\n .history-blitz__text {\n max-width: 100%;\n }\n}\n@media (max-width: 700px) {\n .history-blitz__title {\n text-align: left;\n }\n .history-blitz__item {\n grid-template-columns: 1fr;\n }\n}\n@media (max-width: 400px) {\n .history-blitz__inner {\n padding: 70px 0 50px 0;\n margin-top: -65px;\n }\n .history-blitz__title {\n text-align: left;\n margin-bottom: 44px;\n }\n .history-blitz__text {\n font-size: 14px;\n }\n}","@font-face {\r\n\tfont-family: 'Roboto Flex';\r\n\tfont-style: normal;\r\n\tfont-display: swap;\r\n\tsrc: local('Roboto Flex'), url('../fonts/Roboto-Flex.woff2') format('woff2');\r\n\t// src: local('Roboto Flex'), url('../fonts/Roboto-Flex.woff2') format('woff2-variations');\r\n\tfont-weight: 100 1000;\r\n\tfont-stretch: 25% 151%;\r\n}","html {\r\n box-sizing: border-box;\r\n}\r\n\r\n*,\r\n*::before,\r\n*::after {\r\n box-sizing: inherit;\r\n}\r\n\r\nh1,\r\nh2,\r\nh3,\r\nh4,\r\nh5,\r\nh6 {\r\n margin: 0;\r\n}\r\n\r\n*::-webkit-scrollbar {\r\n width: 10px;\r\n}\r\n\r\n*::-webkit-scrollbar-track {\r\n background-color: var(--light);\r\n}\r\n\r\n*::-webkit-scrollbar-thumb {\r\n background-color: var(--blue-middle);\r\n}\r\n\r\n* {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--blue-middle) #fff;\r\n}\r\n\r\n.page {\r\n font-size: 20px;\r\n font-weight: 200;\r\n line-height: 1.2;\r\n color: var(--light);\r\n height: 100%;\r\n font-family: var(--font-family);\r\n font-variation-settings: \"wdth\" 140, \"wght\" 200;\r\n}\r\n\r\n.page__body {\r\n margin: 0;\r\n min-width: 320px;\r\n min-height: 100%;\r\n}\r\n\r\nimg {\r\n height: auto;\r\n max-width: 100%;\r\n object-fit: cover;\r\n display: block;\r\n}\r\n\r\na {\r\n text-decoration: none;\r\n display: inline-block;\r\n}\r\n\r\n.site-container {\r\n overflow: hidden;\r\n}\r\n\r\n.is-hidden {\r\n display: none !important;\r\n}\r\n\r\n.btn-reset {\r\n border: none;\r\n padding: 0;\r\n background-color: transparent;\r\n cursor: pointer;\r\n}\r\n\r\n.list-reset {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.input-reset {\r\n -webkit-appearance: none;\r\n appearance: none;\r\n border: none;\r\n border-radius: 0;\r\n background-color: #fff;\r\n\r\n &::-webkit-search-decoration,\r\n &::-webkit-search-cancel-button,\r\n &::-webkit-search-results-button,\r\n &::-webkit-search-results-decoration {\r\n display: none;\r\n }\r\n}\r\n\r\n.container {\r\n margin: 0 auto;\r\n padding: 0 var(--container-offset);\r\n max-width: var(--container-width);\r\n}\r\n\r\n.container-fluid {\r\n margin: 0 auto;\r\n max-width: var(--container-fluid);\r\n}\r\n\r\n.js-focus-visible :focus:not(.focus-visible) {\r\n outline: none;\r\n}\r\n\r\n.centered {\r\n text-align: center;\r\n}\r\n\r\n.dis-scroll {\r\n position: fixed;\r\n left: 0;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100vh;\r\n overscroll-behavior: none;\r\n}\r\n\r\n.page--ios .dis-scroll {\r\n position: relative;\r\n}\r\n\r\n.btn {\r\n cursor: pointer;\r\n text-align: center;\r\n font-size: 20px;\r\n font-weight: 200;\r\n font-stretch: 140%;\r\n line-height: 40px;\r\n letter-spacing: 0.1px;\r\n background-color: var(--light);\r\n border-radius: 50px;\r\n border: none;\r\n min-width: 220px;\r\n text-transform: capitalize;\r\n transition: var(--transition);\r\n color: var(--blue-dark);\r\n\r\n &:hover {\r\n background-color: var(--blue-dark);\r\n color: var(--light);\r\n }\r\n}\r\n\r\n.btn--accent {\r\n color: var(--accent);\r\n}\r\n\r\n.btn-up-wrapper {\r\n position: relative;\r\n display: none;\r\n justify-content: flex-end;\r\n}\r\n\r\n.btn-up {\r\n position: fixed;\r\n z-index: 20;\r\n right: 110px;\r\n bottom: 165px;\r\n width: 56px;\r\n height: 56px;\r\n padding: 0;\r\n cursor: pointer;\r\n min-width: auto;\r\n border-radius: 50%;\r\n border: none;\r\n background-color: var(--accent);\r\n border-color: var(--accent);\r\n transition: all var(--transition);\r\n\r\n &::before {\r\n position: absolute;\r\n left: 50%;\r\n top: 50%;\r\n transform: translate(-50%, -50%);\r\n content: '';\r\n background-image: url('./../img/svg/up.svg');\r\n background-repeat: no-repeat;\r\n width: 28px;\r\n height: 28px;\r\n background-position: center;\r\n background-size: contain;\r\n z-index: 1;\r\n }\r\n}\r\n\r\n.btn-up-wrapper.active {\r\n display: flex;\r\n}\r\n\r\n.section-title {\r\n font-variation-settings: \"wght\" 700, \"opsz\" 37, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 45px;\r\n line-height: 47px;\r\n letter-spacing: 1.8px;\r\n text-transform: uppercase;\r\n margin-bottom: 24px;\r\n color: var(--light);\r\n}\r\n\r\n.large-title {\r\n font-variation-settings: \"wght\" 700, \"opsz\" 37, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 65px;\r\n line-height: 1.1;\r\n letter-spacing: 3.4px;\r\n text-transform: uppercase;\r\n color: var(--light);\r\n}\r\n\r\n.section-title--reset {\r\n display: inline-block;\r\n margin-bottom: 0;\r\n}\r\n\r\n.burger-js {\r\n & .line {\r\n display: block;\r\n height: 4px;\r\n width: 100%;\r\n border-radius: 10px;\r\n background-color: var(--light);\r\n transition: all var(--transition);\r\n }\r\n\r\n &.active {\r\n .line1 {\r\n transform: rotate(45deg) translate(4px, -4px);\r\n transform-origin: left;\r\n }\r\n\r\n .line2 {\r\n opacity: 0;\r\n }\r\n\r\n .line3 {\r\n transform: rotate(-45deg) translate(3px, 6px);\r\n transform-origin: left;\r\n }\r\n }\r\n\r\n}\r\n\r\n@media (max-width: 1600px) {\r\n .btn-up {\r\n right: auto;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .btn {\r\n font-size: 14px;\r\n line-height: 32px;\r\n min-width: 170px;\r\n }\r\n\r\n .section-title {\r\n font-size: 32px;\r\n line-height: 1;\r\n border-radius: 30px;\r\n line-height: 30px;\r\n }\r\n\r\n .large-title {\r\n font-size: 46px;\r\n letter-spacing: 2.4px;\r\n }\r\n\r\n .page {\r\n font-size: 14px;\r\n }\r\n}\r\n\r\n@media (max-width: 800px) {\r\n .btn-up {\r\n bottom: 50px;\r\n width: 50px;\r\n height: 50px;\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .section-title {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n }\r\n\r\n .large-title {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .section-title {\r\n font-size: 26px;\r\n }\r\n}\r\n\r\n.carousel__track {\r\n display: none !important;\r\n}",".header {\r\n\tposition: fixed;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tz-index: 20;\r\n\r\n\t&.active {\r\n\t\tbackground-image: linear-gradient(90deg,\r\n\t\t\t\tvar(--blue-dark) 38.01%,\r\n\t\t\t\trgba(0, 64, 108, 0.53) 117.87%);\r\n\t\tbackdrop-filter: blur(5px);\r\n\t}\r\n\r\n\t&__burger,\r\n\t&__mobile-logo {\r\n\t\tdisplay: none;\r\n\t}\r\n}\r\n\r\n.nav__list {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: flex-end;\r\n\tcolumn-gap: 66px;\r\n\tpadding: 20px 0;\r\n}\r\n\r\n.nav__link {\r\n\tfont-size: 20px;\r\n\tfont-weight: 200;\r\n\tline-height: 30px;\r\n\ttext-transform: uppercase;\r\n\tborder-bottom: 1px solid transparent;\r\n\ttransition: all var(--transition);\r\n\r\n\t&:hover {\r\n\t\tcolor: var(--accent);\r\n\t}\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.nav {\r\n\t\t&__list {\r\n\t\t\tpadding: 14px 0;\r\n\t\t\tcolumn-gap: 40px;\r\n\t\t}\r\n\r\n\t\t&__link {\r\n\t\t\tfont-size: 14px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 992px) {\r\n\t.header {\r\n\t\theight: 60px;\r\n\t\tbackground-color: var(--light);\r\n\r\n\t\t&__container {\r\n\t\t\tmax-width: 100%;\r\n\t\t}\r\n\r\n\t\t&__inner {\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t\tjustify-content: space-between;\r\n\t\t}\r\n\r\n\t\t&.active {\r\n\t\t\tbackground-image: none;\r\n\t\t}\r\n\r\n\t\t&__mobile-logo {\r\n\t\t\tdisplay: block;\r\n\t\t\tcursor: auto;\r\n\t\t\tmax-width: 190px;\r\n\t\t}\r\n\r\n\t\t&__burger {\r\n\t\t\talign-self: center;\r\n\t\t\tdisplay: flex;\r\n\t\t\tcursor: pointer;\r\n\t\t\theight: 36px;\r\n\t\t\tpadding: 4px 0;\r\n\t\t\twidth: 36px;\r\n\t\t\tz-index: 2;\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-direction: column;\r\n\t\t\tjustify-content: space-between;\r\n\r\n\t\t\t& .line {\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\theight: 4px;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\tborder-radius: 10px;\r\n\t\t\t\tbackground-color: var(--blue-middle);\r\n\t\t\t\ttransition: all var(--transition);\r\n\t\t\t}\r\n\r\n\t\t\t&.active {\r\n\t\t\t\t.line1 {\r\n\t\t\t\t\ttransform: rotate(45deg) translate(4px, -4px);\r\n\t\t\t\t\ttransform-origin: left;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.line2 {\r\n\t\t\t\t\topacity: 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.line3 {\r\n\t\t\t\t\ttransform: rotate(-45deg) translate(3px, 6px);\r\n\t\t\t\t\ttransform-origin: left;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__mobile-logo {\r\n\t\t\tmargin-left: calc(var(--container-offset) * -1);\r\n\t\t}\r\n\t}\r\n\r\n\t.nav {\r\n\t\tposition: fixed;\r\n\t\tbackground-color: var(--light);\r\n\t\ttop: 60px;\r\n\t\tleft: -100vw;\r\n\t\tright: 100vw;\r\n\t\tmin-height: calc(100vh - 60px);\r\n\t\tbottom: 0;\r\n\t\tdisplay: flex;\r\n\t\talign-items: flex-start;\r\n\t\tjustify-content: center;\r\n\t\ttransition: all var(--transition);\r\n\t\toverflow-y: scroll;\r\n\t\ttext-align: center;\r\n\r\n\t\t&__list {\r\n\t\t\tflex-direction: column;\r\n\t\t\tpadding: 80px 20px 60px;\r\n\t\t\tgap: 20px 0;\r\n\t\t}\r\n\r\n\t\t&__link {\r\n\t\t\tcolor: var(--blue-middle);\r\n\t\t\tfont-size: 21px;\r\n\t\t\tline-height: 1.5;\r\n\t\t\ttext-transform: uppercase;\r\n\t\t\tpadding: 20px;\r\n\t\t\ttransition: all var(--transition);\r\n\r\n\t\t\t&:hover {\r\n\t\t\t\tcolor: var(--accent);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.active {\r\n\t\t\tleft: 0;\r\n\t\t\tright: 0;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 360px) {\r\n\t.nav {\r\n\t\t&__list {\r\n\t\t\tpadding: 40px 20px 40px;\r\n\t\t\tgap: 10px 0;\r\n\t\t}\r\n\r\n\t\t&__link {\r\n\t\t\tpadding: 10px 0;\r\n\t\t}\r\n\t}\r\n}",".footer {\r\n\tbackground-color: var(--blue-middle);\r\n\r\n\t&__inner {\r\n\t\tpadding: 30px 0 12px;\r\n\t}\r\n\r\n\t&__list {\r\n\t\tdisplay: flex;\r\n\t\tgap: 0 100px;\r\n\t\tfont-size: 16px;\r\n\t\tfont-weight: 200;\r\n\t\tline-height: 1.9;\r\n\t\tletter-spacing: 0.32px;\r\n\t}\r\n\r\n\t&__item:first-child {\r\n\r\n\t\tspan:nth-child(2) {\r\n\t\t\tdisplay: block;\r\n\t\t\tfont-size: 10px;\r\n\t\t\tline-height: 1.2;\r\n\t\t}\r\n\t}\r\n\r\n\t&__item:last-child {\r\n\t\tmargin-left: auto;\r\n\t\theight: 30px;\r\n\t\talign-self: center;\r\n\t}\r\n\r\n\t&__link {\r\n\t\ttransition: all var(--transition);\r\n\r\n\t\t&:hover {\r\n\t\t\tcolor: var(--accent);\r\n\t\t}\r\n\t}\r\n\r\n\t&__source {\r\n\t\tdisplay: inline-block;\r\n\t\tpadding-top: 36px;\r\n\t\tcolor: rgba(255, 255, 255, 0.50);\r\n\t\tfont-family: Roboto Flex;\r\n\t\tfont-size: 12px;\r\n\t\tfont-style: normal;\r\n\t\tfont-weight: 300;\r\n\t\tline-height: 16px;\r\n\t}\r\n}\r\n\r\n.social-list {\r\n\tdisplay: flex;\r\n\tgap: 0 5px;\r\n\talign-items: center;\r\n\r\n\t&__link {\r\n\t\theight: 30px;\r\n\t\twidth: 30px;\r\n\t\tborder-radius: 50%;\r\n\r\n\t\tsvg path {\r\n\t\t\ttransition: all var(--transition);\r\n\t\t}\r\n\r\n\t\t&:hover svg path {\r\n\t\t\tfill: red;\r\n\t\t}\r\n\t}\r\n\r\n\t&__item:nth-child(4) &__link svg g:nth-child(2):hover path:nth-child(2) {\r\n\t\tfill: red;\r\n\t}\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.footer {\r\n\t\t&__list {\r\n\t\t\tgap: 0 40px;\r\n\t\t}\r\n\r\n\t\t&__source {\r\n\t\t\tfont-size: 10px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n\t.footer {\r\n\t\t&__list {\r\n\t\t\tfont-size: 14px;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t.social-list {\r\n\t\tpadding-left: 0;\r\n\t}\r\n}\r\n\r\n@media (max-width: 900px) {\r\n\t.footer {\r\n\t\t&__list {\r\n\t\t\tgap: 0 15px;\r\n\t\t}\r\n\r\n\t}\r\n}\r\n\r\n@media (max-width: 800px) {\r\n\t.footer {\r\n\t\t&__inner {\r\n\t\t\tpadding: 40px 0 50px;\r\n\t\t}\r\n\r\n\t\t&__list {\r\n\t\t\tflex-direction: column;\r\n\t\t\tgap: 20px 0;\r\n\t\t\talign-items: center;\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\r\n\t\t&__item:first-child {\r\n\t\t\tmargin-right: 0;\r\n\t\t\tmax-width: 100%;\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\r\n\t\t&__item:last-child {\r\n\t\t\tmargin-top: 20px;\r\n\t\t\tmargin-left: initial;\r\n\t\t}\r\n\r\n\t\t&__source {\r\n\t\t\ttext-align: center;\r\n\t\t}\r\n\t}\r\n\r\n\t.contacts-list {\r\n\t\ttext-align: center;\r\n\t}\r\n}",".top {\r\n background-color: #183052;\r\n overflow: hidden;\r\n position: relative;\r\n\r\n &__background {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n bottom: 0;\r\n right: 0;\r\n\r\n img {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0;\r\n object-fit: contain;\r\n height: 100%;\r\n width: 100%;\r\n object-position: right bottom;\r\n }\r\n }\r\n\r\n &__inner {\r\n position: relative;\r\n max-width: 700px;\r\n z-index: 1;\r\n }\r\n\r\n &__container {\r\n padding-top: 70px;\r\n min-height: 100vh;\r\n min-height: 100svh;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n\r\n &__logo {\r\n position: relative;\r\n margin: 63px 0 13%;\r\n position: relative;\r\n z-index: 1;\r\n align-self: flex-start;\r\n padding: 7px 60px 0 0;\r\n height: 142px;\r\n font-size: 130px;\r\n cursor: auto;\r\n pointer-events: none;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n width: calc(100vw - var(--content-width) / 2);\r\n height: 100%;\r\n height: 100%;\r\n right: 20px;\r\n background-color: var(--accent);\r\n z-index: -1;\r\n transform: skewX(351deg);\r\n }\r\n\r\n &-title {\r\n line-height: 1;\r\n letter-spacing: 3px;\r\n margin: 0;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n font-size: inherit;\r\n font-variation-settings: \"ital\" 1, \"opsz\" 30, \"wdth\" 36, \"wght\" 800, \"slnt\" -10;\r\n }\r\n }\r\n\r\n &__title {\r\n font-variation-settings: \"opsz\" 51, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 85px;\r\n line-height: 0.95;\r\n letter-spacing: 5.95px;\r\n margin-bottom: 22px;\r\n text-transform: uppercase;\r\n color: var(--light);\r\n }\r\n\r\n &__subtitle {\r\n font-size: 36px;\r\n font-style: normal;\r\n display: inline-block;\r\n font-weight: 300;\r\n line-height: 1.2;\r\n letter-spacing: 0.18px;\r\n }\r\n}\r\n\r\n@media (min-width: 1920px) {\r\n .top {\r\n &__container {\r\n min-height: 1080px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1920px) and (orientation: portrait) {\r\n .top {\r\n max-height: 1920px;\r\n\r\n &__logo {\r\n position: relative;\r\n margin: 63px 0 10% 0;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) and (orientation: landscape) {\r\n .top {\r\n &__logo {\r\n margin: 63px 0 15% 0;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) and (orientation: landscape) {\r\n .top {\r\n &__container {\r\n padding-top: 60px;\r\n }\r\n\r\n &__logo {\r\n margin: 28px 0 11%;\r\n padding: 5px 40px 0 0;\r\n height: 104px;\r\n font-size: 90px;\r\n }\r\n\r\n &__title {\r\n font-variation-settings: \"opsz\" 33, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 54px;\r\n letter-spacing: 3.8px;\r\n }\r\n\r\n &__subtitle {\r\n font-size: 25px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) and (orientation: portrait) {\r\n .top {\r\n &__container {\r\n padding-top: 60px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) and (orientation: portrait) {\r\n .top {\r\n background-size: 90%;\r\n\r\n &__logo {\r\n padding: 5px 40px 0 0;\r\n height: 104px;\r\n font-size: 90px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 992px) and (orientation: landscape) {\r\n .top {\r\n &__title {\r\n padding-top: 80px;\r\n }\r\n\r\n &__logo {\r\n display: none;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 992px) and (orientation: portrait) {\r\n\r\n .top {\r\n\r\n &__logo {\r\n display: none;\r\n }\r\n\r\n &__title {\r\n padding-top: 50px;\r\n font-variation-settings: \"opsz\" 33, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 54px;\r\n letter-spacing: 3.8px;\r\n }\r\n\r\n &__subtitle {\r\n font-size: 25px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) and (orientation: landscape) {\r\n .top {\r\n &__title {\r\n font-variation-settings: \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 43px;\r\n letter-spacing: 3.1px;\r\n }\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 768px) and (orientation: portrait) {\r\n .top {\r\n background-size: contain;\r\n\r\n &__logo {\r\n display: none;\r\n }\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 700px) and (orientation: landscape) {\r\n .top {\r\n &__container {\r\n padding-top: 60px;\r\n }\r\n\r\n &__title {\r\n font-variation-settings: \"opsz\" 17, \"wdth\" 25, \"slnt\" -10;\r\n padding-top: 40px;\r\n font-size: 30px;\r\n margin-bottom: 15px;\r\n letter-spacing: 1.2px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) and (orientation: portrait) {\r\n .top {\r\n &__container {\r\n padding-top: 60px;\r\n }\r\n\r\n &__title {\r\n font-variation-settings: \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 44px;\r\n margin-bottom: 18px;\r\n letter-spacing: 3.1px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 500px) and (orientation: portrait) {\r\n .top {\r\n &__container {\r\n width: 100%;\r\n }\r\n\r\n &__title {\r\n font-variation-settings: \"opsz\" 17, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 500px) and (orientation: landscape) {\r\n .top {\r\n &__container {\r\n width: 100%;\r\n min-height: 320px;\r\n }\r\n\r\n &__subtitle {\r\n font-size: 20px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) and (orientation: portrait) {\r\n .top {\r\n\r\n &__background {\r\n img {\r\n width: 100%;\r\n height: auto;\r\n }\r\n }\r\n\r\n background-size: cover;\r\n background-position: center bottom;\r\n\r\n &__subtitle {\r\n font-size: 25px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) and (orientation: portrait) {\r\n .top {\r\n &__container {\r\n min-height: 500px;\r\n height: 100vh;\r\n height: 100svh;\r\n }\r\n\r\n &__title {\r\n padding-top: 30px;\r\n font-size: 24px;\r\n letter-spacing: 1.68px;\r\n margin-bottom: 10px;\r\n }\r\n\r\n &__subtitle {\r\n font-size: 22px;\r\n }\r\n }\r\n}",".video {\r\n\tbackground-image: url('./img/video-preview.jpg');\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center;\r\n\tbackground-size: cover;\r\n\tposition: relative;\r\n\r\n\t&__gradient {\r\n\t\tposition: absolute;\r\n\t\tleft: 0;\r\n\t\ttop: 0;\r\n\t\tbottom: 0;\r\n\t\tright: 0;\r\n\t\tbackground: linear-gradient(75deg,\r\n\t\t\t\t#000 -10.46%,\r\n\t\t\t\t#000 -4.93%,\r\n\t\t\t\trgba(0, 0, 0, 0) 65.31%);\r\n\t\tz-index: 2;\r\n\r\n\t\t&::before {\r\n\t\t\tcontent: '';\r\n\t\t\tposition: absolute;\r\n\t\t\tleft: 0;\r\n\t\t\ttop: 0;\r\n\t\t\tbottom: 0;\r\n\t\t\tright: 0;\r\n\t\t\tbackground: rgba(0, 0, 0, 0.3);\r\n\t\t}\r\n\r\n\t\t&.hide {\r\n\t\t\tz-index: 0;\r\n\t\t}\r\n\t}\r\n\r\n\t&__intro {\r\n\t\tbackground-color: #000;\r\n\t}\r\n\r\n\t&__mask {\r\n\t\tposition: absolute;\r\n\t\tleft: 0;\r\n\t\ttop: 0;\r\n\t\tright: 0;\r\n\t\tbottom: 30px;\r\n\t\tz-index: 0;\r\n\r\n\t\t&.visible {\r\n\t\t\tz-index: 10;\r\n\t\t}\r\n\t}\r\n\r\n\t&__player {\r\n\t\tposition: absolute;\r\n\t\tleft: 0;\r\n\t\ttop: 0;\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t\tobject-fit: cover;\r\n\t\tz-index: 1;\r\n\r\n\t\t&.play {\r\n\t\t\tcursor: pointer;\r\n\t\t\tobject-fit: cover;\r\n\t\t}\r\n\r\n\t\t& .vjs-tech {\r\n\t\t\tobject-fit: cover;\r\n\t\t}\r\n\r\n\t\t& .vjs-paused .vjs-big-play-button {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t&__inner {\r\n\t\tmin-height: 100vh;\r\n\t\tposition: relative;\r\n\t\ttransition: all var(--transition);\r\n\t\tpadding: 120px 0 198px;\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t\tjustify-content: end;\r\n\r\n\t\t&.active {\r\n\t\t\tmin-height: 100px;\r\n\t\t\tpadding: 0;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 50%;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%, -50%);\r\n\t\t\tz-index: 2;\r\n\t\t}\r\n\t}\r\n\r\n\t&__title {\r\n\t\tmax-width: 660px;\r\n\t\tz-index: 3;\r\n\t\tmargin-bottom: 30px;\r\n\r\n\t\t&.hide {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t&__text {\r\n\t\tmax-width: 510px;\r\n\t\tz-index: 3;\r\n\t\tmargin-bottom: 24px;\r\n\r\n\t\t&.hide {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t&__link {\r\n\t\tfont-weight: 700;\r\n\t\tz-index: 3;\r\n\t\ttransition: color var(--transition);\r\n\t\talign-self: flex-start;\r\n\r\n\t\t&:hover {\r\n\t\t\tcolor: var(--accent);\r\n\t\t}\r\n\r\n\t\t&.hide {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t&__btn {\r\n\t\tposition: absolute;\r\n\t\ttop: calc(50%);\r\n\t\tleft: 50%;\r\n\t\ttransform: translate(-50%, -50%);\r\n\t\ttransition: all var(--transition);\r\n\t\tz-index: 4;\r\n\r\n\t\t& svg path {\r\n\t\t\ttransition: all var(--transition);\r\n\t\t}\r\n\r\n\t\t&.hide {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&.center-position {\r\n\t\t\tposition: absolute;\r\n\t\t\ttransform: translate(-50%, -50%);\r\n\t\t}\r\n\t}\r\n\r\n\t&__btn:hover svg path:nth-child(1) {\r\n\t\tfill: var(--blue-dark);\r\n\t}\r\n\r\n\t&__btn:hover svg path:nth-child(2) {\r\n\t\tfill: var(--light);\r\n\t}\r\n}\r\n\r\n@media (min-width: 1920px) or (min-height: 1080px) {\r\n\t.video {\r\n\t\t&__inner {\r\n\t\t\tmin-height: 1080px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.video {\r\n\t\t&__inner {\r\n\t\t\tpadding: 80px 0;\r\n\t\t}\r\n\r\n\t\t&__title {\r\n\t\t\tmargin-bottom: 27px;\r\n\t\t}\r\n\r\n\t\t&__btn {\r\n\t\t\t& svg {\r\n\t\t\t\twidth: 133.401px;\r\n\t\t\t\theight: 109.86px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__text {\r\n\t\t\tpadding-top: 0;\r\n\t\t\tfont-size: 14px;\r\n\t\t\tline-height: 24px;\r\n\t\t\tmargin-bottom: 20px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 768px) {\r\n\t.video {\r\n\t\tbackground-image: url('./../img/video-preview-mobile.jpg');\r\n\t}\r\n}\r\n\r\n@media (max-width: 600px) {\r\n\t.video {\r\n\t\t&__inner {\r\n\t\t\tpadding: 40px 0;\r\n\t\t}\r\n\r\n\t\t&__title {\r\n\t\t\tmax-width: 440px;\r\n\t\t\tmargin-bottom: 20px;\r\n\t\t}\r\n\r\n\t\t&__btn {\r\n\t\t\tposition: static;\r\n\t\t\ttransform: none;\r\n\t\t\tmargin: 0 auto 150px;\r\n\r\n\t\t\tsvg {\r\n\t\t\t\twidth: 100px;\r\n\t\t\t\theight: 82px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 400px) {\r\n\t.video {\r\n\t\t&__title {\r\n\t\t\tmax-width: 316px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 360px) {\r\n\t.video {\r\n\t\t&__text {\r\n\t\t\tfont-size: 13px;\r\n\t\t\tline-height: 22px;\r\n\t\t\tfont-stretch: 120%;\r\n\t\t}\r\n\r\n\t\t&__btn {\r\n\t\t\tmargin: 0 auto 50px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.video-js.active {\r\n\tposition: relative !important;\r\n\tz-index: 2;\r\n\twidth: 100% !important;\r\n\theight: auto !important;\r\n}\r\n\r\n.vjs-poster.active {\r\n\tposition: absolute !important;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tbottom: 0;\r\n\tdisplay: none;\r\n}",".choice {\r\n\tpadding-top: 78px;\r\n\tmargin-bottom: 90px;\r\n\tbackground-color: var(--light);\r\n\r\n\t&__title {\r\n\t\tmax-width: 820px;\r\n\t\ttext-transform: uppercase;\r\n\t\tmargin-bottom: 20px;\r\n\r\n\t\t& span {\r\n\t\t\tcolor: var(--blue-middle);\r\n\t\t}\r\n\t}\r\n\r\n\t&__title--mobile {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t&__subtitle {\r\n\t\tcolor: var(--blue-middle);\r\n\t\tmargin-bottom: 74px;\r\n\t\tmax-width: 580px;\r\n\t}\r\n\r\n\t&__list {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t\tcolor: var(--default);\r\n\t\tgap: 12px 0;\r\n\t\talign-items: flex-end;\r\n\t}\r\n\r\n\t&__item {\r\n\t\tposition: relative;\r\n\t\tmin-height: 134px;\r\n\t\tpadding: 11px 0 11px 110px;\r\n\t\tbackground-color: #f5f5f5;\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tgap: 0 110px;\r\n\t\tfont-weight: 300;\r\n\t\tz-index: 1;\r\n\t\twidth: 100%;\r\n\t\ttransition: all var(--transition);\r\n\t\tuser-select: none;\r\n\r\n\t\t&::after {\r\n\t\t\tcontent: '';\r\n\t\t\tposition: absolute;\r\n\t\t\tbottom: 0;\r\n\t\t\tright: var(--max-offset);\r\n\t\t\twidth: max(calc((100vw - var(--content-width)) / 2), var(--container-offset));\r\n\t\t\theight: 100%;\r\n\t\t\tbackground-color: #f5f5f5;\r\n\t\t\tz-index: -1;\r\n\t\t}\r\n\r\n\t\t&:hover {\r\n\t\t\ttransform: var(--scale-hover);\r\n\t\t}\r\n\r\n\t\t&-text--mobile {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&-bold {\r\n\t\t\tfont-weight: 700;\r\n\t\t}\r\n\r\n\t\t&-star {\r\n\t\t\tdisplay: inline-flex;\r\n\r\n\t\t\t&::before {\r\n\t\t\t\tcontent: '';\r\n\t\t\t}\r\n\r\n\t\t\tfont-size: 8px;\r\n\t\t}\r\n\r\n\t\t&-source {\r\n\t\t\tpadding-top: 10px;\r\n\t\t\tfont-size: 14px;\r\n\t\t\tfont-weight: 300;\r\n\t\t\tline-height: 16px;\r\n\t\t}\r\n\r\n\t\t&-decor {\r\n\t\t\twidth: 100px;\r\n\t\t\tposition: absolute;\r\n\t\t\tleft: 0;\r\n\t\t\ttop: 0;\r\n\t\t\theight: 100%;\r\n\r\n\t\t\t&::before {\r\n\t\t\t\tcontent: '';\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tleft: -40px;\r\n\t\t\t\ttop: -1px;\r\n\t\t\t\tbottom: 0;\r\n\t\t\t\twidth: 80px;\r\n\t\t\t\tbackground-color: var(--light);\r\n\t\t\t\ttransform: skewX(-31deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&__item:nth-child(1) {\r\n\t\tmax-width: 1156px;\r\n\t}\r\n\r\n\t&__item:nth-child(2) {\r\n\t\tmax-width: 1244px;\r\n\t}\r\n\r\n\t&__item:nth-child(3) {\r\n\t\tmax-width: 1332px;\r\n\t}\r\n\r\n\t&__item:nth-child(4) {\r\n\t\tmax-width: 1420px;\r\n\t}\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n\t.choice {\r\n\t\t&__item {\r\n\t\t\tgap: 0 95px;\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(1) {\r\n\t\t\tmax-width: 855px;\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(2) {\r\n\t\t\tmax-width: 940px;\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(3) {\r\n\t\t\tmax-width: 1030px;\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(4) {\r\n\t\t\tmax-width: 1115px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.choice {\r\n\t\tpadding-top: 55px;\r\n\t\tmargin-bottom: 60px;\r\n\r\n\t\t&__list {\r\n\t\t\tgap: 10px 0;\r\n\t\t}\r\n\r\n\t\t&__subtitle {\r\n\t\t\tmax-width: 395px;\r\n\t\t\tmargin-bottom: 40px;\r\n\t\t}\r\n\r\n\t\t&__item {\r\n\t\t\tmin-height: 96px;\r\n\t\t\tpadding: 11px 0 11px 78px;\r\n\t\t\tline-height: 18px;\r\n\t\t\tgap: 0 70px;\r\n\r\n\t\t\t&-source {\r\n\t\t\t\tpadding-top: 0;\r\n\t\t\t\tfont-size: 10px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(1) {\r\n\t\t\tmax-width: 778px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 84px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(2) {\r\n\t\t\tmax-width: 842px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(3) {\r\n\t\t\tmax-width: 906px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(4) {\r\n\t\t\tmax-width: 970px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 70px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n\t.choice {\r\n\t\t&__item:nth-child(1) {\r\n\t\t\tmax-width: 710px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 84px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(2) {\r\n\t\t\tmax-width: 775px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(3) {\r\n\t\t\tmax-width: 838px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(4) {\r\n\t\t\tmax-width: 900px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 70px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 940px) {\r\n\t.choice {\r\n\t\t&__item {\r\n\t\t\tpadding: 11px 0 11px 70px;\r\n\t\t\tgap: 0 40px;\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(1) {\r\n\t\t\tmax-width: 586px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 84px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(2) {\r\n\t\t\tmax-width: 648px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(3) {\r\n\t\t\tmax-width: 708px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(4) {\r\n\t\t\tmax-width: 768px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 70px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 800px) {\r\n\t.choice {\r\n\t\t&__item {\r\n\t\t\tpadding: 9px 0 8px 55px;\r\n\t\t\tgap: 0 30px;\r\n\r\n\t\t\t&-decor::before {\r\n\t\t\t\ttransform: skewX(-20deg);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(1) {\r\n\t\t\tmax-width: 554px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 54px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(2) {\r\n\t\t\tmax-width: 592px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 50px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(3) {\r\n\t\t\tmax-width: 630px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 50px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__item:nth-child(4) {\r\n\t\t\tmax-width: 668px;\r\n\r\n\t\t\t& img {\r\n\t\t\t\twidth: 50px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 700px) {\r\n\t.choice {\r\n\r\n\t\t&__item {\r\n\t\t\twidth: 100%;\r\n\t\t\tmax-width: 100% !important;\r\n\t\t\tpadding: 20px 0 8px 20px;\r\n\t\t\tgap: 0 20px;\r\n\r\n\t\t\t&::before {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\r\n\t\t\t& img {\r\n\t\t\t\talign-self: flex-start;\r\n\t\t\t}\r\n\r\n\t\t\t&-decor {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\r\n\t\t\t&-text {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\r\n\t\t\t&-source {\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\r\n\t\t\t&-text--mobile {\r\n\t\t\t\tdisplay: block;\r\n\t\t\t\tmax-width: 600px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__subtitle {\r\n\t\t\tcolor: var(--default);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 600px) {\r\n\t.choice {\r\n\t\tpadding-top: 50px;\r\n\r\n\t\t&__title {\r\n\t\t\tfont-size: 30px;\r\n\t\t\tletter-spacing: 1.2px;\r\n\r\n\t\t\tline-height: 32px;\r\n\t\t\tmargin-bottom: 20px;\r\n\t\t}\r\n\r\n\t\t&__subtitle {\r\n\t\t\tmargin-bottom: 30px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 500px) {\r\n\t.choice {\r\n\t\tpadding-top: 50px;\r\n\r\n\t\t&__title {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&__title--mobile {\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 360px) {\r\n\t.choice {\r\n\t\t&__title--mobile {\r\n\t\t\tfont-size: 26px;\r\n\t\t}\r\n\t}\r\n}",".professional {\r\n position: relative;\r\n overflow: hidden;\r\n margin-top: 85px;\r\n background-color: var(--blue-middle);\r\n\r\n &__inner {\r\n display: flex;\r\n position: relative;\r\n }\r\n\r\n &__content {\r\n width: 50%;\r\n padding: 85px 0 55px;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n z-index: 11;\r\n color: var(--light);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n right: 26%;\r\n bottom: 0;\r\n width: 66vw;\r\n height: 100%;\r\n background-image: linear-gradient(108deg,\r\n #cd1338 39.39%,\r\n rgba(205, 19, 56, 0.46) 127.43%);\r\n z-index: -1;\r\n transform: skewX(17deg);\r\n backdrop-filter: blur(5px);\r\n transform-origin: top;\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 24px;\r\n }\r\n\r\n &__subtitle {\r\n line-height: 1;\r\n font-size: 36px;\r\n font-weight: 600;\r\n margin-top: -5px;\r\n margin-bottom: 70px;\r\n }\r\n\r\n &__text {\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 1.17;\r\n max-width: 560px;\r\n width: 100%;\r\n }\r\n\r\n &__text-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 30px;\r\n margin-bottom: 44px;\r\n }\r\n\r\n &__slider-container {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n width: 100%;\r\n max-width: 1440px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n overflow: hidden;\r\n }\r\n\r\n &__slider {\r\n width: 70%;\r\n position: absolute;\r\n top: 160px;\r\n right: -6%;\r\n\r\n &-wrapper {\r\n padding: 40px 0;\r\n }\r\n\r\n &-item {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n filter: grayscale(100%);\r\n transform: scale(1);\r\n transition: transform var(--transition);\r\n\r\n img {\r\n margin: auto;\r\n height: 220px;\r\n width: 400px;\r\n transition: all var(--transition);\r\n }\r\n\r\n &.swiper-slide-active {\r\n transform: scale(1.3);\r\n z-index: 11;\r\n filter: grayscale(0);\r\n\r\n .professional__slider-link {\r\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.45);\r\n\r\n &::before {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n }\r\n }\r\n\r\n .professional__slider-icon {\r\n opacity: 1;\r\n }\r\n\r\n img {\r\n width: 350px;\r\n transition: all var(--transition);\r\n }\r\n }\r\n\r\n //TODO hide last slide\r\n &--hide {\r\n filter: grayscale(100%) !important;\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n &-link {\r\n position: relative;\r\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);\r\n transition: all var(--transition);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0, 0, 0, 0.25);\r\n z-index: 1;\r\n }\r\n }\r\n\r\n &-icon {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 80px;\r\n height: 66px;\r\n overflow: hidden;\r\n top: 50%;\r\n left: 50%;\r\n display: flex;\r\n transform: translate(-50%, -50%);\r\n z-index: 1;\r\n opacity: 0;\r\n transition: all var(--transition);\r\n\r\n & svg path {\r\n transition: all var(--transition);\r\n }\r\n\r\n &:hover svg path:nth-child(1) {\r\n fill: var(--blue-dark);\r\n }\r\n\r\n &:hover svg path:nth-child(2) {\r\n fill: var(--light);\r\n }\r\n }\r\n\r\n &-btn {\r\n box-shadow: none;\r\n background-color: var(--light);\r\n border-radius: 50%;\r\n border: none;\r\n width: 56px;\r\n height: 56px;\r\n padding: 0;\r\n display: flex;\r\n\r\n justify-content: center;\r\n align-items: center;\r\n top: 150px;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.8);\r\n }\r\n }\r\n\r\n &-btn.swiper-button-disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 19%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 19%;\r\n }\r\n\r\n &-info {\r\n margin: 0 auto;\r\n display: block;\r\n max-width: 420px;\r\n font-weight: 600;\r\n color: #fff;\r\n text-align: center;\r\n font-size: 20px;\r\n line-height: 1.17;\r\n }\r\n }\r\n\r\n &__slider-pagination {\r\n width: auto !important;\r\n position: static !important;\r\n padding-top: 16px;\r\n margin-bottom: 32px;\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet {\r\n width: 56px;\r\n height: 3px;\r\n padding: 0;\r\n border-radius: 0;\r\n margin: 0 9px !important;\r\n background-color: var(--light);\r\n opacity: 0.5;\r\n bottom: 0;\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet-active {\r\n background-color: var(--light) !important;\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .professional {\r\n &__content::before {\r\n right: 20%;\r\n }\r\n\r\n &__slider {\r\n width: 66%;\r\n right: -108px;\r\n\r\n &-item {\r\n img {\r\n height: 220px;\r\n }\r\n }\r\n\r\n &-navigation-prev {\r\n left: 16%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 16%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .professional {\r\n margin-top: 60px;\r\n\r\n &__content {\r\n padding: 60px 0 80px;\r\n\r\n &::before {\r\n right: 23%;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n font-size: 25px;\r\n margin-bottom: 50px;\r\n }\r\n\r\n &__text {\r\n font-size: 17px;\r\n max-width: 520px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 38px;\r\n }\r\n\r\n &__slider {\r\n top: 128px;\r\n right: -80px;\r\n\r\n &-item {\r\n & img {\r\n height: 194px;\r\n width: 400px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n img {\r\n width: 300px;\r\n // height: 200px;\r\n }\r\n }\r\n }\r\n\r\n &-btn {\r\n top: 130px;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 2px;\r\n margin-bottom: 27px;\r\n\r\n & .swiper-pagination-bullet {\r\n width: 50px;\r\n }\r\n }\r\n\r\n &-info {\r\n font-size: 14px;\r\n max-width: 290px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1140px) {\r\n .professional {\r\n &__content::before {\r\n right: 17%;\r\n }\r\n\r\n &__slider-item.swiper-slide-active img {\r\n // width: 270px;\r\n }\r\n\r\n &__slider-navigation-prev {\r\n left: 14%;\r\n }\r\n\r\n &__slider-navigation-next {\r\n right: 14%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .professional {\r\n padding-bottom: 70px;\r\n\r\n &__content {\r\n padding: 60px 0 70px;\r\n\r\n &::before {\r\n right: 13%;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n margin-bottom: 55px;\r\n }\r\n\r\n &__text {\r\n max-width: 420px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 56px;\r\n gap: 20px;\r\n }\r\n\r\n &__slider {\r\n &-item {\r\n &.swiper-slide-active img {\r\n width: 240px;\r\n }\r\n\r\n & img {\r\n height: 150px;\r\n width: 300px;\r\n }\r\n }\r\n\r\n &-icon {\r\n width: 56px;\r\n height: 46px;\r\n }\r\n\r\n &-btn {\r\n width: 42px;\r\n height: 42px;\r\n top: 116px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 18%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 18%;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 0;\r\n }\r\n\r\n &-pagination .swiper-pagination-bullet {\r\n width: 38px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 992px) {\r\n .professional {\r\n &__content {\r\n width: 100%;\r\n padding-bottom: 45px;\r\n\r\n &::before {\r\n display: none;\r\n }\r\n }\r\n\r\n &__subtitle {\r\n margin-bottom: 33px;\r\n }\r\n\r\n &__text-wrapper {\r\n margin-bottom: 0;\r\n }\r\n\r\n &__text {\r\n max-width: 520px;\r\n }\r\n\r\n &__slider {\r\n position: static;\r\n width: 100%;\r\n\r\n &-decor {\r\n position: relative;\r\n transform: rotate(180deg);\r\n z-index: 1;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n z-index: 2;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n height: 1000px;\r\n background-image: linear-gradient(180deg,\r\n #cd1338 39.39%,\r\n rgba(205, 19, 56, 0.46) 127.43%);\r\n transform: skewY(343deg) rotate(180deg);\r\n backdrop-filter: blur(5px);\r\n }\r\n }\r\n\r\n &-container {\r\n padding: 0 var(--container-offset);\r\n max-width: var(--container-width);\r\n\r\n position: static;\r\n transform: translateX(0);\r\n margin: 0 auto 52px auto;\r\n }\r\n\r\n &-item {\r\n & img {\r\n height: 160px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n transform: scale(1.5);\r\n }\r\n\r\n &.swiper-slide-active img {\r\n // width: 230px;\r\n width: 250px;\r\n }\r\n }\r\n\r\n &-btn {\r\n top: 122px;\r\n }\r\n\r\n &-pagination {\r\n margin-bottom: 20px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 20%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 20%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .professional {\r\n margin-top: 60px;\r\n\r\n &__slider {\r\n &-item {\r\n &.swiper-slide-active {\r\n transform: scale(1.4);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .professional {\r\n\r\n &__subtitle {\r\n font-size: 16px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n line-height: 18px;\r\n max-width: 340px;\r\n }\r\n\r\n &__slider {\r\n &-decor {\r\n padding-top: 10px;\r\n\r\n &::before {\r\n top: -30px;\r\n }\r\n }\r\n\r\n &-item {\r\n img {\r\n height: 140px;\r\n }\r\n\r\n &.swiper-slide-active {\r\n & img {\r\n width: 230px;\r\n }\r\n }\r\n }\r\n\r\n &-icon {\r\n width: 50px;\r\n height: 40px;\r\n }\r\n\r\n &-btn {\r\n top: 110px;\r\n width: 38px;\r\n height: 38px;\r\n\r\n & svg {\r\n transform: scale(0.6);\r\n }\r\n }\r\n\r\n &-navigation-prev {\r\n left: 28%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 28%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 500px) {\r\n .professional {\r\n &__content {\r\n padding: 45px 0 10px;\r\n }\r\n\r\n &__slider {\r\n &-decor {\r\n padding-top: 30px;\r\n }\r\n\r\n &-container {\r\n padding-left: 0;\r\n padding-right: 0;\r\n margin-bottom: 40px;\r\n }\r\n\r\n &-pagination {\r\n padding-top: 10px;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 14%;\r\n }\r\n\r\n &-navigation-next {\r\n right: 14%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .professional {\r\n &__slider {\r\n &-container {\r\n padding-top: 0;\r\n }\r\n\r\n &-btn {\r\n top: 115px;\r\n }\r\n\r\n &-item.swiper-slide-active {\r\n transform: scale(1.2);\r\n }\r\n }\r\n }\r\n}",".interview {\r\n --content-width: 800px;\r\n --content-offset: 140px;\r\n position: relative;\r\n overflow: hidden;\r\n background-color: var(--blue-middle);\r\n\r\n &__slider {\r\n &-wrapper {\r\n align-items: stretch;\r\n }\r\n\r\n &-content {\r\n position: relative;\r\n z-index: 1;\r\n flex-grow: 1;\r\n\r\n }\r\n\r\n &-inner {\r\n padding: 200px var(--container-offset) 288px;\r\n position: relative;\r\n max-width: var(--content-width);\r\n margin-left: auto;\r\n margin-right: var(--content-offset);\r\n\r\n }\r\n\r\n &-title {\r\n font-size: 68px;\r\n margin-bottom: 35px;\r\n }\r\n\r\n &-info {\r\n max-width: 280px;\r\n margin-bottom: 120px;\r\n }\r\n\r\n &-name {\r\n font-size: 16px;\r\n font-weight: 700;\r\n line-height: 1.05;\r\n margin-bottom: 22px;\r\n }\r\n\r\n &-descr {\r\n font-size: 16px;\r\n font-weight: 200;\r\n line-height: 18px;\r\n }\r\n\r\n &-text {\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 1.2;\r\n }\r\n\r\n &-item {\r\n height: auto;\r\n position: relative;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: flex-end;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n left: 36%;\r\n bottom: 0;\r\n width: 100vw;\r\n height: 100%;\r\n z-index: 1;\r\n transform: skewX(-17deg);\r\n transform-origin: top;\r\n background-image: linear-gradient(270deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n backdrop-filter: blur(10px);\r\n }\r\n\r\n &-content {\r\n position: relative;\r\n z-index: 11;\r\n }\r\n\r\n }\r\n\r\n &-img {\r\n position: absolute;\r\n height: 100%;\r\n z-index: -1;\r\n\r\n img {\r\n height: 100%;\r\n }\r\n }\r\n\r\n &-link {\r\n font-variation-settings: \"wdth\" 140, \"wght\" 700;\r\n position: absolute;\r\n bottom: 100px;\r\n left: var(--container-offset);\r\n right: var(--container-offset);\r\n font-size: 24px;\r\n font-weight: 700;\r\n line-height: 56px;\r\n letter-spacing: 0.12px;\r\n box-sizing: border-box;\r\n text-transform: none;\r\n }\r\n\r\n &-btn {\r\n box-shadow: none;\r\n background-color: var(--light);\r\n border-radius: 50%;\r\n border: none;\r\n width: 56px;\r\n height: 56px;\r\n padding: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n bottom: 440px;\r\n top: auto;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.8);\r\n }\r\n }\r\n\r\n &-navigation {\r\n\r\n & svg path {\r\n fill: var(--light);\r\n }\r\n\r\n &-prev {\r\n left: auto;\r\n right: var(--content-width);\r\n background-color: var(--accent);\r\n }\r\n\r\n &-next {\r\n left: var(--content-width);\r\n background-color: var(--accent);\r\n }\r\n\r\n &-inner {\r\n position: relative;\r\n max-width: var(--content-width);\r\n margin-left: auto;\r\n margin-right: var(--content-offset);\r\n }\r\n }\r\n\r\n &-info {\r\n margin-left: auto;\r\n padding-right: 60px;\r\n }\r\n\r\n &-navigation-container {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 2;\r\n }\r\n }\r\n\r\n &__slider-pagination {\r\n width: auto !important;\r\n bottom: 230px !important;\r\n left: 50% !important;\r\n transform: translateX(-50%) !important;\r\n }\r\n\r\n &__slider-pagination {\r\n display: flex;\r\n gap: 10px;\r\n\r\n & .swiper-pagination-bullet {\r\n width: 70px;\r\n height: 3px;\r\n padding: 0;\r\n border-radius: 0;\r\n background-color: var(--light);\r\n opacity: 0.5;\r\n margin: 0;\r\n }\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet-active {\r\n background-color: var(--light) !important;\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .interview {\r\n --content-offset: 60px;\r\n --content-width: 760px;\r\n\r\n &__slider {\r\n &-info {\r\n padding-right: 134px;\r\n }\r\n\r\n &-item {\r\n &::before {\r\n left: 39%;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 1280px) {\r\n .interview {\r\n --content-offset: 8%;\r\n --content-width: 58%;\r\n\r\n\r\n &__slider {\r\n\r\n &-inner {\r\n padding: 90px 0 252px;\r\n }\r\n\r\n &-item {\r\n &::before {\r\n left: 34%;\r\n }\r\n }\r\n\r\n &-title {\r\n font-size: 50px;\r\n }\r\n\r\n &-info {\r\n padding-right: 0;\r\n margin-bottom: 50px;\r\n }\r\n\r\n &-name {\r\n font-size: 12px;\r\n margin-bottom: 10px;\r\n }\r\n\r\n &-descr {\r\n font-size: 12px;\r\n }\r\n\r\n &-text {\r\n font-size: 17px;\r\n max-width: 600px;\r\n }\r\n\r\n &-link {\r\n font-size: 17px;\r\n line-height: 38px;\r\n }\r\n\r\n &-pagination {\r\n bottom: 190px !important;\r\n }\r\n\r\n &-btn {\r\n bottom: 350px;\r\n }\r\n\r\n &-navigation {\r\n &-prev {\r\n right: auto;\r\n left: -80px;\r\n }\r\n\r\n &-next {\r\n left: auto;\r\n right: -80px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .interview {\r\n --content-offset: 7%;\r\n --content-width: 61%;\r\n\r\n &__slider {\r\n &-img {\r\n left: -50px;\r\n }\r\n\r\n &-btn {\r\n width: 46px;\r\n height: 46px;\r\n }\r\n\r\n &-text {\r\n max-width: 470px;\r\n }\r\n\r\n &-title {\r\n font-size: 47px;\r\n letter-spacing: 1.5px;\r\n }\r\n\r\n &-navigation {\r\n &-prev {\r\n left: -60px;\r\n }\r\n\r\n &-next {\r\n right: -60px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 900px) {\r\n .interview {\r\n --content-offset: 0;\r\n --content-width: 560px;\r\n\r\n &__slider {\r\n\r\n &-inner {\r\n padding: 490px 0 210px;\r\n margin-left: 0;\r\n margin: 0 auto;\r\n }\r\n\r\n &-info {\r\n margin-bottom: 36px;\r\n }\r\n\r\n &-link {\r\n bottom: 90px;\r\n left: 0;\r\n right: 0;\r\n }\r\n\r\n &-pagination {\r\n bottom: 168px !important;\r\n }\r\n\r\n &-title {\r\n font-size: 50px;\r\n letter-spacing: 2.5px;\r\n }\r\n\r\n &-navigation {\r\n &-inner {\r\n max-width: 100%;\r\n }\r\n\r\n &-prev {\r\n left: 0;\r\n }\r\n\r\n &-next {\r\n right: 0;\r\n }\r\n }\r\n\r\n &-item {\r\n max-height: 100%;\r\n\r\n &::before {\r\n transform: skewX(0);\r\n transform: skewY(18deg);\r\n left: 0;\r\n right: 0;\r\n top: 406px;\r\n height: 100%;\r\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n }\r\n }\r\n\r\n &-img {\r\n width: 100%;\r\n left: 0;\r\n\r\n img {\r\n width: 100%;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 700px) {\r\n .interview {\r\n\r\n &__slider {\r\n &-title {\r\n margin-bottom: 25px;\r\n font-size: 32px;\r\n letter-spacing: 1.6px;\r\n }\r\n\r\n &-img {\r\n & img {\r\n height: auto;\r\n }\r\n }\r\n\r\n &-info {\r\n max-width: 220px;\r\n }\r\n\r\n &-text {\r\n font-size: 14px;\r\n }\r\n\r\n &-pagination {\r\n & .swiper-pagination-bullet {\r\n width: 46px;\r\n }\r\n }\r\n\r\n &-link {\r\n line-height: 30px;\r\n font-size: 14px;\r\n }\r\n\r\n &-btn {\r\n bottom: 150px;\r\n width: 36px;\r\n height: 36px;\r\n\r\n & svg {\r\n transform: scale(0.6);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .interview {\r\n &__slider {\r\n\r\n &-inner {\r\n padding: 390px 0 210px;\r\n }\r\n\r\n &-item {\r\n\r\n &::before {\r\n top: 333px;\r\n }\r\n }\r\n\r\n }\r\n }\r\n}",".chat {\r\n position: relative;\r\n padding: 54px 0 48px;\r\n overflow: hidden;\r\n\r\n background-image: url('./../img/chat-bg.webp');\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n\r\n &__inner {\r\n position: relative;\r\n z-index: 1;\r\n }\r\n\r\n &__title {\r\n margin-bottom: 24px;\r\n }\r\n\r\n &__text {\r\n max-width: 686px;\r\n margin-bottom: 30px;\r\n font-size: 24px;\r\n }\r\n\r\n &__mobile {\r\n position: absolute;\r\n right: 0;\r\n top: 0;\r\n z-index: -1;\r\n transform: scale(1.1);\r\n transform-origin: top right;\r\n }\r\n\r\n &__bottom {\r\n display: inline-flex;\r\n flex-direction: column;\r\n align-content: center;\r\n justify-content: center;\r\n gap: 36px\r\n }\r\n\r\n &__img {\r\n align-self: center;\r\n width: 216px;\r\n }\r\n\r\n &__btn {\r\n padding: 0 35px;\r\n text-transform: initial;\r\n font-size: 20px;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .chat {\r\n background-position: top right -100px;\r\n\r\n &__mobile {\r\n transform: scale(1);\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .chat {\r\n &__text {\r\n max-width: 656px;\r\n margin-bottom: 50px;\r\n font-size: 17px;\r\n }\r\n\r\n &__mobile {\r\n transform: scale(0.9);\r\n }\r\n\r\n &__img {\r\n width: 194px;\r\n }\r\n\r\n &__btn {\r\n padding: 5px 35px\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .chat {\r\n\r\n &__text {\r\n max-width: 570px;\r\n margin-bottom: 50px;\r\n font-size: 17px;\r\n }\r\n\r\n &__mobile {\r\n transform: scale(0.8);\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .chat {\r\n &__text {\r\n max-width: 690px;\r\n\r\n }\r\n\r\n &__mobile {\r\n display: flex;\r\n justify-content: center;\r\n transform: scale(1);\r\n top: 173px;\r\n right: 2%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n\r\n .chat {\r\n padding: 54px 0 0;\r\n background-image: url('./../img/chat-bg-mobile.webp');\r\n background-position: top right 0;\r\n\r\n &__mobile {\r\n position: static;\r\n max-width: 450px;\r\n width: 100%;\r\n margin: 0 auto;\r\n transform: scale(1);\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n line-height: 1.2;\r\n margin-bottom: 30px;\r\n }\r\n\r\n &__bottom {\r\n position: absolute;\r\n z-index: 3;\r\n bottom: 0;\r\n padding-bottom: 56px;\r\n left: 0;\r\n right: 0;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n left: calc(var(--container-offset) * -1);\r\n right: calc(var(--container-offset) * -1);\r\n bottom: 0;\r\n height: 180px;\r\n z-index: -1;\r\n background-image: linear-gradient(-17deg, #00406c94 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n backdrop-filter: blur(5px);\r\n clip-path: polygon(0px 60px, 100% 0%, 100% 100%, 0% 100%);\r\n }\r\n }\r\n\r\n &__img {\r\n display: none;\r\n }\r\n\r\n &__btn {\r\n max-width: 400px;\r\n width: 100%;\r\n margin: 0 auto;\r\n font-size: 14px;\r\n padding: 4px 35px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .chat {\r\n padding: 34px 0 0;\r\n\r\n &__btn {\r\n padding: 4px 10px;\r\n }\r\n\r\n &__text {\r\n max-width: 310px;\r\n }\r\n\r\n }\r\n}",".accordion-mobile {\r\n display: none;\r\n}\r\n\r\n.accordion {\r\n &__item {\r\n .accordion__title-wrapper {\r\n clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%);\r\n }\r\n }\r\n\r\n &__item:nth-child(1) {\r\n width: 408px;\r\n margin-bottom: 20px;\r\n }\r\n\r\n &__item:nth-child(2) {\r\n width: 436px;\r\n\r\n & .accordion__title-wrapper {\r\n color: var(--default);\r\n }\r\n }\r\n\r\n &__title-wrapper {\r\n cursor: pointer;\r\n padding: 13px 0 13px 16px;\r\n background-color: var(--light);\r\n color: var(--blue-middle);\r\n font-size: 24px;\r\n font-weight: 600;\r\n line-height: 1.7;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n &__title {\r\n display: inline-block;\r\n padding-right: 18px;\r\n }\r\n\r\n &__icon {\r\n width: 32px;\r\n height: 16px;\r\n transition: all 0.5s ease-in-out;\r\n }\r\n\r\n &__content {\r\n max-height: 0;\r\n overflow: hidden;\r\n transition: all 0.5s ease-in-out;\r\n color: var(--default);\r\n font-size: 24px;\r\n font-weight: 200;\r\n background-color: #f5f5f5;\r\n padding: 0 10px 0 14px;\r\n margin: -1px 0 0 0;\r\n }\r\n\r\n &__content-text {\r\n line-height: 1.17;\r\n\r\n span {\r\n font-variation-settings:\r\n 'wdth' 140,\r\n 'wght' 600;\r\n }\r\n\r\n &:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n }\r\n\r\n & .active .accordion__content {\r\n max-height: 600px;\r\n padding: 10px 10px 10px 14px;\r\n overflow-y: scroll;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .accordion {\r\n &__content {\r\n font-size: 17px;\r\n padding: 0 10px 0 27px;\r\n\r\n &-text {\r\n &:not(:last-child) {\r\n margin-bottom: 6px;\r\n }\r\n }\r\n }\r\n\r\n & .active .accordion__content {\r\n padding: 10px 10px 10px 27px;\r\n }\r\n\r\n &__item:nth-child(1) {\r\n width: 370px;\r\n margin-bottom: 14px;\r\n }\r\n\r\n &__item:nth-child(2) {\r\n width: 390px;\r\n }\r\n\r\n &__item .accordion__title-wrapper {\r\n clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%);\r\n }\r\n\r\n &__title-wrapper {\r\n padding: 10px 0 10px 27px;\r\n }\r\n\r\n &__title {\r\n font-size: 17px;\r\n }\r\n\r\n &__icon {\r\n margin: 0 30px 0 auto;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 992px) {\r\n .accordion-desktop {\r\n display: none;\r\n }\r\n\r\n .accordion-mobile {\r\n display: block;\r\n padding: 0 var(--container-offset);\r\n max-width: var(--container-width);\r\n margin-left: auto;\r\n margin-right: auto;\r\n }\r\n\r\n .accordion {\r\n &__items {\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 6px;\r\n }\r\n\r\n &__item-wrapper {\r\n padding: 10px 0 10px 16px;\r\n }\r\n\r\n &__item {\r\n &:nth-child(1) {\r\n width: 50%;\r\n margin-bottom: 0;\r\n }\r\n\r\n &:nth-child(2) {\r\n width: 50%;\r\n\r\n & .accordion__title-wrapper {\r\n clip-path: polygon(0 0, 100% 0, 100% 100%, 4% 100%);\r\n }\r\n\r\n & .accordion__content {\r\n margin-left: 1.9vw;\r\n }\r\n\r\n & .accordion__icon {\r\n margin: 0 12px 0 auto;\r\n }\r\n }\r\n }\r\n\r\n &__title {\r\n padding-right: 0;\r\n }\r\n\r\n &__icon {\r\n margin: 0 22px 0 auto;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .accordion {\r\n &__items {\r\n flex-direction: column;\r\n gap: 14px;\r\n }\r\n\r\n &__content {\r\n font-size: 14px;\r\n padding: 0 10px 0 12px;\r\n\r\n &-text {\r\n &:not(:last-child) {\r\n margin-bottom: 4px;\r\n }\r\n }\r\n }\r\n\r\n & .active .accordion__content {\r\n padding: 10px 10px 10px 12px;\r\n }\r\n\r\n &__item {\r\n &:nth-child(1) {\r\n width: auto;\r\n max-width: 320px;\r\n }\r\n\r\n &:nth-child(2) {\r\n width: auto;\r\n max-width: 336px;\r\n\r\n & .accordion__content {\r\n margin-left: 0;\r\n }\r\n }\r\n\r\n &:nth-child(2) .accordion__title-wrapper {\r\n clip-path: polygon(0 0, 96% 0, 100% 100%, 0% 100%);\r\n }\r\n\r\n &:nth-child(2) .accordion__icon {\r\n margin: 0 22px 0 auto;\r\n }\r\n }\r\n\r\n &__title-wrapper {\r\n padding: 10px 10px 10px 12px;\r\n }\r\n\r\n &__title {\r\n font-size: 14px;\r\n }\r\n\r\n &__icon {\r\n width: 20px;\r\n height: 10px;\r\n\r\n & img {\r\n object-fit: contain;\r\n }\r\n }\r\n }\r\n}\r\n",".banner {\r\n margin-top: 85px;\r\n\r\n &__background {\r\n background-image: url('./../img/banner-bg.jpg');\r\n background-size: cover;\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n }\r\n\r\n &__inner {\r\n min-height: 96px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-end;\r\n }\r\n\r\n &__title {\r\n font-size: 48px;\r\n margin-right: 88px;\r\n margin-bottom: 0;\r\n }\r\n\r\n &__btn {\r\n margin-right: 140px;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .banner {\r\n margin-top: 60px;\r\n\r\n &__inner {\r\n min-height: 68px;\r\n }\r\n\r\n &__title {\r\n font-size: 34px;\r\n margin-right: 50px;\r\n }\r\n\r\n &__btn {\r\n margin-right: 180px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .banner {\r\n // padding-top: 40px;\r\n }\r\n}\r\n\r\n@media (max-width: 940px) {\r\n .banner {\r\n &__btn {\r\n margin-right: 0;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .banner {\r\n &__inner {\r\n min-height: 68px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n padding: 46px 0 20px;\r\n }\r\n\r\n &__title {\r\n margin-bottom: 20px;\r\n text-align: center;\r\n margin-right: 0;\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n line-height: 32px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .banner {\r\n &__title {\r\n font-size: 26px;\r\n }\r\n }\r\n}",".goods {\r\n padding: 62px 0 10px;\r\n\r\n &__slider {\r\n margin-left: -5px;\r\n margin-right: -5px;\r\n }\r\n\r\n &__slider-wrapper {\r\n align-items: stretch;\r\n }\r\n\r\n &__item {\r\n height: auto;\r\n padding: 10px 10px 14px;\r\n box-sizing: border-box;\r\n background-color: var(--light);\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n text-align: center;\r\n\r\n &-shadow {\r\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);\r\n padding: 28px 10px 42px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n height: 100%;\r\n }\r\n\r\n &-bottom {\r\n padding: 0 10px;\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n\r\n img {\r\n margin-left: auto;\r\n margin-right: auto;\r\n width: 310px;\r\n max-height: 310px;\r\n object-fit: contain;\r\n }\r\n\r\n &-title {\r\n color: var(--blue-middle);\r\n font-size: 20px;\r\n font-weight: 629;\r\n line-height: 22px;\r\n margin-bottom: 5px;\r\n }\r\n\r\n &-subtitle {\r\n display: inline-block;\r\n margin-bottom: 18px;\r\n font-size: 16px;\r\n line-height: 18px;\r\n font-weight: 200;\r\n color: var(--gray);\r\n }\r\n\r\n &-text {\r\n color: var(--default);\r\n margin-bottom: 28px;\r\n font-size: 16px;\r\n font-weight: 200;\r\n line-height: 18px;\r\n text-align: left;\r\n }\r\n\r\n &-btn {\r\n // max-width: 262px;\r\n width: 100%;\r\n margin-left: auto;\r\n margin-right: auto;\r\n opacity: 0.5;\r\n\r\n &:hover {\r\n background-color: var(--blue-dark);\r\n opacity: 1;\r\n }\r\n\r\n margin-top: auto;\r\n }\r\n\r\n &-img {\r\n position: relative;\r\n margin-bottom: 10px;\r\n }\r\n\r\n &.goods__item--icon .goods__item-img::before {\r\n content: '';\r\n position: absolute;\r\n bottom: 0px;\r\n right: 16%;\r\n width: 15px;\r\n height: 15px;\r\n background-size: cover;\r\n object-fit: cover;\r\n background-image: url('./../img/label-icon.png');\r\n }\r\n }\r\n\r\n &__slider-wrapper__arros {\r\n position: relative;\r\n padding: 0 38px;\r\n }\r\n\r\n &__slider-navigation {\r\n left: 0;\r\n right: 0;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n }\r\n\r\n &__slider-btn {\r\n background-color: transparent;\r\n cursor: pointer;\r\n border: none;\r\n padding: 0;\r\n width: 34px;\r\n height: 42px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-top: -50px;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.9);\r\n }\r\n }\r\n\r\n &__slider-btn.swiper-button-disabled svg path {\r\n stroke: var(--default);\r\n }\r\n\r\n &__slider-prev {\r\n left: 2px;\r\n }\r\n\r\n &__slider-next {\r\n right: 2px;\r\n }\r\n\r\n &__slider-pagination {\r\n position: relative;\r\n top: -5px;\r\n margin-left: -5px;\r\n margin-right: -5px;\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet {\r\n width: 56px;\r\n height: 2px;\r\n padding: 5px 0;\r\n border-radius: 0;\r\n margin: 0 18px !important;\r\n position: relative;\r\n background-color: var(--light);\r\n bottom: 0;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n height: 3px;\r\n width: 100%;\r\n transform: translateY(-50%);\r\n background-color: var(--default) !important;\r\n }\r\n }\r\n\r\n &__slider-pagination .swiper-pagination-bullet-active {\r\n &::before {\r\n background-color: var(--accent) !important;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .goods {\r\n &__item-text {\r\n margin-bottom: 25px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .goods {\r\n &__item {\r\n & img {\r\n width: 220px;\r\n max-height: 220px;\r\n }\r\n\r\n &-title {\r\n font-size: 14px;\r\n line-height: 16px;\r\n margin-bottom: 0;\r\n }\r\n\r\n &-subtitle {\r\n font-size: 12px;\r\n }\r\n\r\n &-text {\r\n font-size: 12px;\r\n margin-bottom: 30px;\r\n }\r\n\r\n &-shadow {\r\n padding: 16px 10px 28px;\r\n }\r\n\r\n &.goods__item--icon .goods__item-img::before {\r\n right: 12%;\r\n }\r\n }\r\n }\r\n\r\n .goods__slider-pagination .swiper-pagination-bullet {\r\n margin: 0 10px !important;\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .goods {\r\n &__item-text {\r\n margin-bottom: 15px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) and (min-width: 941px) {\r\n .goods {\r\n &__item img {\r\n width: 166px;\r\n max-height: 166px;\r\n }\r\n\r\n &__item-btn {\r\n min-width: 140px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 940px) {\r\n .goods {\r\n padding-top: 40px;\r\n\r\n &__slider {\r\n &-pagination .swiper-pagination-bullet {\r\n width: 48px;\r\n margin: 0 7px !important;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .goods {\r\n &__slider {\r\n &-pagination .swiper-pagination-bullet {\r\n width: 35px;\r\n margin: 0 5px !important;\r\n }\r\n }\r\n\r\n &__item {\r\n &-text {\r\n margin-bottom: 10px;\r\n }\r\n\r\n &.goods__item--icon .goods__item-img::before {\r\n right: 12%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 600px) {\r\n .goods {\r\n &__slider-pagination .swiper-pagination-bullet {\r\n width: 18px;\r\n margin: 0 5px !important;\r\n }\r\n\r\n &__item {\r\n &.goods__item--icon .goods__item-img::before {\r\n right: 22%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .goods {\r\n &__slider-pagination .swiper-pagination-bullet {\r\n width: 14px;\r\n margin: 0 4px !important;\r\n }\r\n\r\n &__item {\r\n &.goods__item--icon .goods__item-img::before {\r\n right: 16%;\r\n }\r\n }\r\n }\r\n}",".labels {\r\n padding: 70px 0 108px;\r\n\r\n &__title {\r\n text-align: center;\r\n color: var(--accent);\r\n margin-bottom: 50px;\r\n font-size: 48px;\r\n }\r\n\r\n &__list {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n gap: 42px;\r\n }\r\n\r\n &__item {\r\n display: inherit;\r\n transition: all var(--transition);\r\n\r\n &:hover {\r\n transform: var(--scale-hover);\r\n }\r\n }\r\n\r\n &__link img {\r\n height: 47px;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .labels {\r\n padding: 70px 0 85px;\r\n\r\n &__list {\r\n gap: 32px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .labels {\r\n padding: 46px 0 50px;\r\n\r\n &__list {\r\n gap: 30px;\r\n }\r\n\r\n &__title {\r\n font-size: 34px;\r\n line-height: 34px;\r\n margin-bottom: 37px;\r\n }\r\n\r\n &__link img {\r\n height: 34px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .labels {\r\n &__list {\r\n gap: 26px;\r\n }\r\n\r\n &__title {}\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .labels {\r\n padding: 46px 0 35px;\r\n\r\n &__link img {\r\n height: 45px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .labels {\r\n padding: 46px 0 100px;\r\n\r\n &__list {\r\n gap: 16px 24px;\r\n }\r\n\r\n &__title {\r\n font-size: 30px;\r\n line-height: 1;\r\n margin-bottom: 30px;\r\n }\r\n\r\n &__link img {\r\n height: 34px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .labels {\r\n &__title {\r\n margin-bottom: 24px;\r\n }\r\n\r\n &__link img {\r\n height: 32px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .labels {\r\n &__title {\r\n font-weight: 800;\r\n font-size: 26px;\r\n }\r\n\r\n &__link img {\r\n height: 28px;\r\n }\r\n\r\n &__list {\r\n gap: 16px 20px;\r\n }\r\n }\r\n}","$slider-height: 660px;\r\n\r\n.recommendations {\r\n padding: 85px 0 0;\r\n margin-bottom: -1px;\r\n\r\n &__inner {\r\n display: flex;\r\n\r\n }\r\n\r\n &__content {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n padding-left: 40px;\r\n position: relative;\r\n z-index: 11;\r\n }\r\n\r\n &__title {\r\n margin-bottom: 24px;\r\n color: var(--accent);\r\n }\r\n\r\n &__text {\r\n color: var(--default);\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 28px;\r\n max-width: 540px;\r\n width: 100%;\r\n }\r\n\r\n &__slider {\r\n position: relative;\r\n height: $slider-height;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n &-inner {\r\n width: 50%;\r\n position: relative;\r\n clip-path: polygon(var(--max-offset) 0, 83% 0, 100% 100%, var(--max-offset) 100%);\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n width: calc(100% + (100vw - (var(--content-width) / 2)));\r\n height: 100%;\r\n background-color: var(--blue-middle);\r\n z-index: -1;\r\n }\r\n }\r\n\r\n &-wrapper {\r\n min-width: 0;\r\n flex-grow: 1;\r\n position: relative;\r\n }\r\n\r\n &-container {\r\n padding-right: 140px;\r\n }\r\n\r\n &-item {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n &-link {\r\n position: relative;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n background-image: url('./../img/svg/zoom.svg');\r\n background-position: center;\r\n background-size: contain;\r\n background-repeat: no-repeat;\r\n right: 20px;\r\n top: 10px;\r\n width: 62px;\r\n height: 66px;\r\n }\r\n }\r\n\r\n &-link img {\r\n max-width: 370px;\r\n }\r\n\r\n &-btn {\r\n box-shadow: none;\r\n background-color: transparent;\r\n border: none;\r\n width: 40px;\r\n height: 42px;\r\n padding: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n &::after {\r\n content: '';\r\n }\r\n\r\n & svg {\r\n transform: scale(0.8);\r\n }\r\n }\r\n\r\n &-btn.swiper-button-disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &-navigation-prev {\r\n left: -10px;\r\n }\r\n\r\n &-navigation-next {\r\n right: 130px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .recommendations {\r\n &__slider {\r\n height: 606px;\r\n\r\n &-inner {\r\n width: 55%;\r\n }\r\n\r\n &-link {\r\n &::before {\r\n width: 50px;\r\n height: 54px;\r\n right: 6px;\r\n }\r\n }\r\n\r\n &-link img {\r\n max-width: 350px;\r\n }\r\n }\r\n\r\n padding: 60px 0 0;\r\n\r\n &__text {\r\n font-size: 17px;\r\n line-height: 20px;\r\n max-width: 376px;\r\n }\r\n\r\n &__content {\r\n padding-left: 130px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .recommendations {\r\n &__slider {\r\n\r\n height: 506px;\r\n\r\n &-inner {\r\n width: 62%;\r\n }\r\n\r\n &-link img {\r\n max-width: 290px;\r\n }\r\n }\r\n\r\n &__content {\r\n padding-left: 10px;\r\n padding-bottom: 76px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .recommendations {\r\n &__slider {\r\n height: 440px;\r\n\r\n &-inner {\r\n width: 58%;\r\n }\r\n\r\n &-link img {\r\n max-width: 240px;\r\n }\r\n }\r\n\r\n &__content {\r\n padding-left: 0;\r\n padding-bottom: 45px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 768px) {\r\n .recommendations {\r\n &__title {\r\n margin-bottom: 14px;\r\n }\r\n\r\n &__slider {\r\n &-link img {\r\n max-width: 220px;\r\n }\r\n\r\n &-link {\r\n &::before {\r\n width: 30px;\r\n height: 32px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media ((max-width: 768px) and (min-width: 701px)) {\r\n .recommendations {\r\n &__slider {\r\n &-inner {\r\n width: 58%;\r\n }\r\n\r\n &-link img {\r\n max-width: 200px;\r\n }\r\n }\r\n\r\n &__content {\r\n margin-left: -10px;\r\n }\r\n\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .recommendations {\r\n padding: 50px 0 0;\r\n\r\n &__inner {\r\n flex-direction: column;\r\n justify-content: center;\r\n }\r\n\r\n &__content {\r\n margin-bottom: 0;\r\n margin-left: 0;\r\n margin-bottom: 30px;\r\n padding-bottom: 0;\r\n }\r\n\r\n &__slider {\r\n height: 344px;\r\n\r\n &-link img {\r\n max-width: 200px;\r\n }\r\n\r\n &-inner {\r\n width: 100%;\r\n order: 2;\r\n clip-path: none;\r\n\r\n &::before {\r\n transform: skewX(0);\r\n width: 100vw;\r\n left: calc(var(--container-offset)*-1);\r\n }\r\n }\r\n\r\n &-wrapper {\r\n margin: 0 calc(var(--container-offset) * -1);\r\n }\r\n\r\n &-container {\r\n padding-right: 0;\r\n }\r\n\r\n &-navigation-prev {\r\n left: 0;\r\n }\r\n\r\n &-navigation-next {\r\n right: 0;\r\n }\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n line-height: 1.2;\r\n }\r\n\r\n &__title {\r\n & span {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n line-height: 32px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 360px) {\r\n .recommendations {\r\n &__title {\r\n font-size: 26px;\r\n letter-spacing: 1px;\r\n }\r\n }\r\n}",".partners {\r\n\tpadding: 90px 0 30px;\r\n\r\n\t&__title {\r\n\t\tcolor: var(--accent);\r\n\t\tmargin-bottom: 60px;\r\n\t}\r\n\r\n\t&__list {\r\n\t\ttransition-timing-function: linear !important;\r\n\t\talign-items: center;\r\n\t\t// column-gap: 80px;\r\n\t\tdisplay: inline-flex;\r\n\t}\r\n\r\n\t&__item {\r\n\t\tflex: 0 0 auto;\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\twidth: auto !important;\r\n\r\n\t\timg {\r\n\t\t\tmax-height: 90px;\r\n\t\t\tmax-width: 200px;\r\n\t\t\twidth: 100%;\r\n\t\t\tfilter: grayscale(100%);\r\n\t\t\tobject-fit: contain;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.marquee {\r\n\tanimation: scroll 30s linear infinite;\r\n}\r\n\r\n@keyframes scroll {\r\n\tfrom {\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\r\n\tto {\r\n\t\ttransform: translateX(calc(-100% - 86px));\r\n\t}\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.partners {\r\n\t\tpadding: 55px 0 0;\r\n\r\n\t}\r\n}\r\n\r\n@media (max-width: 768px) {\r\n\t@keyframes scroll {\r\n\t\tfrom {\r\n\t\t\ttransform: translateX(0);\r\n\t\t}\r\n\r\n\t\tto {\r\n\t\t\ttransform: translateX(calc(-100% - 60px));\r\n\t\t}\r\n\t}\r\n\r\n\t.partners {\r\n\r\n\t\t&__title {\r\n\t\t\tmargin-bottom: 40px;\r\n\t\t}\r\n\r\n\t\t&__item img {\r\n\t\t\tmax-height: 60px;\r\n\t\t\tmax-width: 140px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 700px) {\r\n\t.partners {\r\n\t\tpadding: 50px 0 0;\r\n\r\n\t\t&__title {\r\n\t\t\tmargin-bottom: 30px;\r\n\t\t}\r\n\t}\r\n}",".header-history {\r\n\tposition: fixed;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tz-index: 20;\r\n\tbackground-color: var(--blue-middle);\r\n\r\n\t&__burger,\r\n\t&__mobile-logo {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n}\r\n\r\n.nav-history {\r\n\t&__container {\r\n\t\tposition: relative;\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tjustify-content: space-between;\r\n\t\theight: 74px;\r\n\t}\r\n\r\n\t&__list {\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tcolumn-gap: 15px;\r\n\t}\r\n\r\n\t&__next.active {\r\n\t\tcolor: var(--accent);\r\n\r\n\t\tsvg path {\r\n\t\t\tstroke: var(--accent);\r\n\t\t}\r\n\t}\r\n\r\n\t&__item--back {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t&__link {\r\n\t\tfont-variation-settings: \"wght\" 700, \"wdth\" 25, \"slnt\" -10;\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tgap: 6px;\r\n\t\tfont-size: 16px;\r\n\t\tfont-weight: 200;\r\n\t\tline-height: 30px;\r\n\t\ttext-transform: uppercase;\r\n\t\tborder-bottom: 1px solid transparent;\r\n\t\ttransition: all var(--transition);\r\n\t\tfont-stretch: 25%;\r\n\t\tline-height: 47px;\r\n\t\tletter-spacing: 0;\r\n\r\n\t\t&-icon {\r\n\t\t\tmargin-bottom: 2px;\r\n\r\n\t\t\t& path {\r\n\t\t\t\ttransition: all var(--transition);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:hover {\r\n\t\t\tcolor: var(--accent);\r\n\r\n\t\t\tsvg path {\r\n\t\t\t\tstroke: var(--accent);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&__back {\r\n\t\tmargin-right: auto;\r\n\t}\r\n\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n\t.nav-history {\r\n\t\t&__link {\r\n\t\t\tfont-size: 13px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n\t.nav-history {\r\n\t\t&__list {\r\n\t\t\tcolumn-gap: 10px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 900px) {\r\n\t.header-history {\r\n\t\t&__inner {\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t\tjustify-content: space-between;\r\n\t\t}\r\n\r\n\t\t&__burger {\r\n\t\t\tdisplay: flex;\r\n\t\t}\r\n\r\n\t\t&.active {\r\n\t\t\tbackground-image: none;\r\n\t\t}\r\n\r\n\t\t&__mobile-logo {\r\n\t\t\tdisplay: block;\r\n\t\t\tcursor: auto;\r\n\t\t\tmax-width: 190px;\r\n\t\t}\r\n\r\n\t\t&__burger {\r\n\t\t\talign-self: center;\r\n\t\t\tdisplay: flex;\r\n\t\t\tmargin-left: auto;\r\n\t\t\tcursor: pointer;\r\n\t\t\theight: 36px;\r\n\t\t\tpadding: 4px 0;\r\n\t\t\twidth: 36px;\r\n\t\t\tz-index: 2;\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-direction: column;\r\n\t\t\tjustify-content: space-between;\r\n\t\t}\r\n\r\n\t\t&__mobile-logo {\r\n\t\t\tmargin-left: calc(var(--container-offset) * -1);\r\n\t\t}\r\n\r\n\t\t&__item--back {\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\t}\r\n\r\n\t.nav-history {\r\n\t\tposition: fixed;\r\n\t\ttop: 60px;\r\n\t\tleft: -100vw;\r\n\t\tright: 100vw;\r\n\t\tmin-height: calc(100vh - 60px);\r\n\t\tbottom: 0;\r\n\t\tdisplay: flex;\r\n\t\talign-items: flex-start;\r\n\t\tjustify-content: center;\r\n\t\ttransition: all var(--transition);\r\n\t\tbackground-color: var(--blue-middle);\r\n\t\toverflow-y: auto;\r\n\t\ttext-align: center;\r\n\r\n\t\t&__container {\r\n\t\t\theight: 60px;\r\n\t\t}\r\n\r\n\t\t&__logo {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&__item--back {\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\r\n\t\t&__list {\r\n\t\t\tflex-direction: column;\r\n\t\t\tpadding: 80px 20px 60px;\r\n\t\t\tgap: 20px 0;\r\n\t\t}\r\n\r\n\t\t&__link {\r\n\t\t\tfont-size: 21px;\r\n\t\t}\r\n\r\n\t\t&__next {\r\n\t\t\tfont-size: 13px;\r\n\t\t}\r\n\r\n\t\t&.active {\r\n\t\t\tleft: 0;\r\n\t\t\tright: 0;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 400px) {\r\n\t.nav-history {\r\n\t\t&__next {\r\n\t\t\tfont-size: 10px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@media (max-width: 360px) {\r\n\t.nav-history {\r\n\r\n\t\t&__list {\r\n\t\t\tpadding: 40px 20px 40px;\r\n\t\t\tgap: 10px 0;\r\n\t\t}\r\n\r\n\t\t&__link {\r\n\t\t\tpadding: 10px 0;\r\n\t\t}\r\n\t}\r\n}",".history-top {\r\n position: relative;\r\n overflow: hidden;\r\n margin-top: 74px;\r\n background-color: var(--blue-middle);\r\n\r\n &__img {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n\r\n\r\n img {\r\n position: absolute;\r\n right: 0;\r\n height: 100%;\r\n width: 50%;\r\n object-fit: cover;\r\n object-position: top right;\r\n }\r\n }\r\n\r\n &__inner {\r\n padding: 234px 0 200px 0;\r\n position: relative;\r\n z-index: 1;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n right: 50%;\r\n bottom: 0;\r\n width: 100vw;\r\n height: 100%;\r\n z-index: -1;\r\n transform: skewX(17deg);\r\n transform-origin: top;\r\n background-image: linear-gradient(90deg, #00406C 38.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n backdrop-filter: blur(10px);\r\n }\r\n }\r\n\r\n\r\n &__title {\r\n margin-bottom: 40px;\r\n font-size: 68px;\r\n }\r\n\r\n &__name {\r\n font-variation-settings: \"wdth\" 100, \"wght\" 700;\r\n margin-bottom: 14px;\r\n font-size: 20px;\r\n font-style: normal;\r\n line-height: 1.35;\r\n font-stretch: normal;\r\n }\r\n\r\n &__text {\r\n max-width: 540px;\r\n line-height: 1.2;\r\n }\r\n}\r\n\r\n\r\n\r\n@media (max-width: 1440px) {\r\n .history-top {\r\n &__inner {\r\n &::before {\r\n right: 44%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 1280px) {\r\n .history-top {\r\n &__inner {\r\n padding: 140px 0 248px 0;\r\n\r\n &::before {\r\n right: 46%;\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 70px;\r\n font-size: 48px;\r\n }\r\n\r\n &__name {\r\n font-size: 14px;\r\n margin-bottom: 20px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n }\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .history-top {\r\n &__inner {\r\n padding: 140px 0 115px 0;\r\n\r\n &::before {\r\n right: 43%;\r\n }\r\n }\r\n\r\n &__img {\r\n & img {\r\n object-position: top center;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-top {\r\n margin-top: 60px;\r\n\r\n &__inner {\r\n width: 100%;\r\n position: absolute;\r\n padding: 0 0 40px 0;\r\n bottom: 0;\r\n\r\n &::before {\r\n transform: skewX(0);\r\n transform: skewY(18deg);\r\n left: calc(var(--container-offset)*-1);\r\n right: calc(var(--container-offset)*-1);\r\n top: -40px;\r\n height: 200%;\r\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n }\r\n }\r\n\r\n &__img {\r\n position: static;\r\n\r\n & img {\r\n position: static;\r\n width: 100%;\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 40px;\r\n }\r\n\r\n &__name {\r\n margin-bottom: 8px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .history-top {\r\n padding-bottom: 100px;\r\n\r\n &__title {\r\n font-size: 30px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .history-top {\r\n padding-bottom: 120px;\r\n\r\n &__inner {\r\n &::before {\r\n top: -60px;\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 40px;\r\n font-size: 25px;\r\n }\r\n\r\n }\r\n}",".history-question {\r\n position: relative;\r\n background-color: var(--blue-middle);\r\n\r\n &__img {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n\r\n img {\r\n position: absolute;\r\n left: 0;\r\n height: 100%;\r\n width: 50%;\r\n object-fit: cover;\r\n object-position: top left;\r\n }\r\n }\r\n\r\n &__inner {\r\n min-height: 834px;\r\n display: flex;\r\n align-items: center;\r\n padding: 70px 0 70px 0;\r\n // max-width: 594px;\r\n max-width: 50%;\r\n margin-left: auto;\r\n position: relative;\r\n z-index: 1;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n // left: -67%;\r\n left: -37%;\r\n bottom: 0;\r\n width: 100vw;\r\n height: 100%;\r\n z-index: -1;\r\n transform: skewX(17deg);\r\n transform-origin: top;\r\n background-color: var(--blue-middle);\r\n }\r\n }\r\n\r\n &__list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 46px;\r\n }\r\n\r\n\r\n &__title {\r\n font-size: 40px;\r\n line-height: 1.1;\r\n letter-spacing: 2.3px;\r\n margin-bottom: 18px;\r\n\r\n }\r\n\r\n &__text {\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 1.1;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .history-question {\r\n &__inner {\r\n &::before {\r\n left: -42%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .history-question {\r\n &__inner {\r\n max-width: 560px;\r\n min-height: auto;\r\n padding: 50px 0 50px 0;\r\n\r\n &::before {\r\n left: -30%;\r\n }\r\n }\r\n\r\n &__title {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n }\r\n\r\n &__list {\r\n gap: 30px;\r\n }\r\n\r\n &__text {\r\n font-size: 17px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .history-question {\r\n &__inner {\r\n max-width: 450px;\r\n\r\n &::before {\r\n left: -40%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-question {\r\n &__inner {\r\n max-width: 100%;\r\n padding: 66px 0 100px 0;\r\n\r\n &::before {}\r\n }\r\n\r\n &__img {\r\n position: static;\r\n margin-bottom: 65px;\r\n\r\n img {\r\n position: static;\r\n width: 100%;\r\n }\r\n }\r\n\r\n &__list {\r\n flex-direction: row;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .history-question {\r\n &__list {\r\n flex-direction: column;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .history-question {\r\n &__text {\r\n font-size: 14px;\r\n }\r\n\r\n &__list {\r\n gap: 50px;\r\n }\r\n }\r\n}",".history-quite {\r\n &__inner {\r\n padding: 53px 0 51px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 30px;\r\n\r\n &--start {\r\n align-items: start;\r\n }\r\n }\r\n\r\n &__title {\r\n color: var(--accent);\r\n font-size: 40px;\r\n max-width: 650px;\r\n margin-bottom: 0;\r\n line-height: 1.1;\r\n }\r\n\r\n &__text {\r\n max-width: 620px;\r\n color: var(--default);\r\n font-size: 24px;\r\n line-height: 1.2;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .history-quite {\r\n\r\n &__title {\r\n font-size: 30px;\r\n }\r\n\r\n &__text {\r\n max-width: 522px;\r\n font-size: 17px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .history-quite {\r\n &__inner {\r\n padding: 59px 0 53px\r\n }\r\n\r\n &__title {\r\n display: inline;\r\n }\r\n\r\n &__text {\r\n max-width: 470px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-quite {\r\n\r\n &__title {\r\n width: 50%;\r\n }\r\n\r\n &__text {\r\n max-width: 100%;\r\n width: 50%;\r\n }\r\n }\r\n\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .history-quite {\r\n &__inner {\r\n flex-direction: column;\r\n }\r\n\r\n &__title {\r\n width: 100%;\r\n }\r\n\r\n &__text {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .history-quite {\r\n &__inner {\r\n padding: 50px 0 50px;\r\n gap: 25px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n }\r\n }\r\n}",".history-question-right {\r\n position: relative;\r\n background-color: var(--blue-middle);\r\n\r\n &__img {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n\r\n img {\r\n position: absolute;\r\n right: 0;\r\n height: 100%;\r\n width: 56%;\r\n object-fit: cover;\r\n object-position: bottom right;\r\n }\r\n }\r\n\r\n &__inner {\r\n min-height: 934px;\r\n display: flex;\r\n align-items: center;\r\n padding: 70px 0 70px 0;\r\n max-width: 554px;\r\n position: relative;\r\n z-index: 1;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n right: -13%;\r\n bottom: 0;\r\n width: 100vw;\r\n height: 100%;\r\n z-index: -1;\r\n transform: skewX(17deg);\r\n transform-origin: top;\r\n background-color: var(--blue-middle);\r\n }\r\n }\r\n\r\n &__list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 46px;\r\n }\r\n\r\n &__title {\r\n font-size: 40px;\r\n line-height: 1.1;\r\n letter-spacing: 2.3px;\r\n margin-bottom: 18px;\r\n\r\n span {\r\n display: block;\r\n margin-bottom: 0;\r\n }\r\n }\r\n\r\n &__text {\r\n font-size: 24px;\r\n font-weight: 200;\r\n line-height: 1.1;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .history-question-right {\r\n &__inner {\r\n &::before {\r\n right: 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .history-question-right {\r\n\r\n &__inner {\r\n padding: 50px 0 50px 0;\r\n min-height: 660px;\r\n max-width: 520px;\r\n }\r\n\r\n &__list {\r\n gap: 32px;\r\n }\r\n\r\n &__title {\r\n margin-bottom: 14px;\r\n font-size: 32px;\r\n\r\n span {\r\n font-size: 32px;\r\n }\r\n }\r\n\r\n &__text {\r\n font-size: 17px;\r\n line-height: 1.1;\r\n }\r\n\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .history-question-right {\r\n &__inner {\r\n min-height: 564px;\r\n max-width: 400px;\r\n\r\n &::before {\r\n right: 2%;\r\n }\r\n }\r\n\r\n &__title {\r\n line-height: 1.1;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-question-right {\r\n\r\n &__inner {\r\n min-height: auto;\r\n max-width: 100%;\r\n }\r\n\r\n &__img {\r\n position: static;\r\n\r\n img {\r\n position: static;\r\n width: 100%;\r\n }\r\n }\r\n\r\n &__list {\r\n display: grid;\r\n grid-template-columns: 1fr 1fr;\r\n gap: 54px;\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 700px) {\r\n .history-question-right {\r\n &__list {\r\n grid-template-columns: 1fr;\r\n }\r\n\r\n &__title {\r\n width: 100%;\r\n }\r\n\r\n &__text {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .history-question-right {\r\n\r\n\r\n &__title {\r\n font-size: 30px;\r\n\r\n span {\r\n font-size: 30px;\r\n }\r\n }\r\n\r\n &__list {\r\n gap: 20px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n }\r\n\r\n\r\n }\r\n}",".history-slogan {\r\n &__inner {\r\n padding: 40px 0 50px;\r\n }\r\n\r\n &__title {\r\n color: var(--accent);\r\n font-size: 40px;\r\n line-height: 1.1;\r\n letter-spacing: 1.6px;\r\n margin-bottom: 0;\r\n }\r\n\r\n &__text {\r\n color: var(--default);\r\n font-size: 24px;\r\n line-height: 1.14;\r\n }\r\n}\r\n\r\n@media (max-width: 1280px) {\r\n .history-slogan {\r\n\r\n &__title {\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n letter-spacing: 1.2px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-slogan {\r\n\r\n &__inner {\r\n padding: 40px 0 40px;\r\n }\r\n\r\n &__title {\r\n display: inline;\r\n }\r\n }\r\n}",".history-blitz {\r\n position: relative;\r\n overflow: hidden;\r\n background-color: var(--blue-middle);\r\n\r\n &__img {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n\r\n img {\r\n position: absolute;\r\n left: -0;\r\n height: 100%;\r\n width: 42%;\r\n object-fit: cover;\r\n object-position: top left;\r\n }\r\n }\r\n\r\n\r\n &__inner {\r\n min-height: 834px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n padding: 70px 0 70px 0;\r\n max-width: 850px;\r\n margin-left: auto;\r\n position: relative;\r\n z-index: 1;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n // left: -22%;\r\n left: -10%;\r\n bottom: -1px;\r\n width: 100vw;\r\n height: 100%;\r\n z-index: -1;\r\n transform: skewX(-17deg);\r\n transform-origin: top;\r\n background-image: linear-gradient(76deg, rgba(0, 64, 108, 0.53), #00406C 25.01% 117.87%);\r\n backdrop-filter: blur(5px);\r\n }\r\n }\r\n\r\n &__list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 36px;\r\n }\r\n\r\n &__item {\r\n display: flex;\r\n\r\n &-title {\r\n font-variation-settings: \"wght\" 700, \"opsz\" 16, \"wdth\" 25, \"slnt\" -10;\r\n margin-bottom: 0;\r\n font-size: 22px;\r\n text-align: left;\r\n letter-spacing: 0.9px;\r\n line-height: 1.2;\r\n }\r\n }\r\n\r\n\r\n &__title {\r\n font-size: 45px;\r\n line-height: 1;\r\n letter-spacing: 1.8px;\r\n margin-bottom: 56px;\r\n text-align: center;\r\n letter-spacing: 0.9px;\r\n }\r\n\r\n &__text {\r\n max-width: 450px;\r\n margin-left: auto;\r\n font-size: 24px;\r\n line-height: 1.2;\r\n }\r\n}\r\n\r\n@media (max-width: 1440px) {\r\n .history-blitz {\r\n &__inner {\r\n &::before {\r\n left: -4%;\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n@media (max-width: 1280px) {\r\n .history-blitz {\r\n\r\n &__title {\r\n font-variation-settings: \"wght\" 700, \"opsz\" 25, \"wdth\" 25, \"slnt\" -10;\r\n font-size: 30px;\r\n letter-spacing: 1.2px;\r\n margin-bottom: 66px;\r\n }\r\n\r\n &__inner {\r\n max-width: 705px;\r\n min-height: auto;\r\n }\r\n\r\n &__list {\r\n gap: 34px;\r\n }\r\n\r\n &__item-title {\r\n font-size: 18px;\r\n letter-spacing: 0.9px;\r\n }\r\n\r\n &__text {\r\n max-width: 340px;\r\n font-size: 17px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .history-blitz {\r\n &__img img {\r\n width: 50%;\r\n }\r\n\r\n &__inner {\r\n max-width: 524px;\r\n\r\n &::before {\r\n left: 5%;\r\n }\r\n }\r\n\r\n &__item {\r\n &-title {\r\n max-width: 230px;\r\n }\r\n }\r\n\r\n &__text {\r\n max-width: 264px;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .history-blitz {\r\n\r\n &__inner {\r\n min-height: auto;\r\n max-width: 100%;\r\n padding-top: 80px;\r\n margin-top: -134px;\r\n\r\n &::before {\r\n transform: skewY(18deg);\r\n left: calc(var(--container-offset) * -1);\r\n right: calc(var(--container-offset) * -1);\r\n top: -30px;\r\n background-image: linear-gradient(-17deg, #00406C 40.01%, rgba(0, 64, 108, 0.53) 117.87%);\r\n }\r\n }\r\n\r\n &__title {\r\n margin-bottom: 52px;\r\n }\r\n\r\n &__img {\r\n position: static;\r\n\r\n img {\r\n position: static;\r\n width: 100%;\r\n }\r\n }\r\n\r\n &__item {\r\n display: grid;\r\n grid-template-columns: 264px 1fr;\r\n gap: 36px;\r\n\r\n &-title {\r\n max-width: 100%;\r\n }\r\n }\r\n\r\n &__text {\r\n max-width: 100%;\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 700px) {\r\n .history-blitz {\r\n &__title {\r\n text-align: left;\r\n }\r\n\r\n &__item {\r\n grid-template-columns: 1fr\r\n }\r\n }\r\n}\r\n\r\n@media (max-width: 400px) {\r\n .history-blitz {\r\n &__inner {\r\n padding: 70px 0 50px 0;\r\n margin-top: -65px;\r\n }\r\n\r\n &__title {\r\n text-align: left;\r\n margin-bottom: 44px;\r\n }\r\n\r\n &__text {\r\n font-size: 14px;\r\n }\r\n }\r\n}"]} \ No newline at end of file diff --git a/app/css/vendor.css b/app/css/vendor.css index 614980a..a1890f0 100644 --- a/app/css/vendor.css +++ b/app/css/vendor.css @@ -1,4200 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -/* Document - ========================================================================== */ -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ -html { - line-height: 1.15; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ -} - -/* Sections - ========================================================================== */ -/** - * Remove the margin in all browsers. - */ -body { - margin: 0; -} - -/** - * Render the `main` element consistently in IE. - */ -main { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ -hr { - -webkit-box-sizing: content-box; - box-sizing: content-box; - /* 1 */ - height: 0; - /* 1 */ - overflow: visible; - /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ -pre { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ -/** - * Remove the gray background on active links in IE 10. - */ -a { - background-color: transparent; - color: inherit; - text-decoration: none; -} - -p { - padding: 0; - margin: 0; -} - -ul, -li { - margin: 0; - padding: 0; - list-style: none; -} - -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ -abbr[title] { - border-bottom: none; - /* 1 */ - text-decoration: underline; - /* 2 */ - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - /* 2 */ -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ -code, -kbd, -samp { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/** - * Add the correct font size in all browsers. - */ -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ -/** - * Remove the border on images inside links in IE 10. - */ -img { - border-style: none; -} - -/* Forms - ========================================================================== */ -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - line-height: 1.15; - /* 1 */ - margin: 0; - /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ -button, -input { - /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ -button, -select { - /* 1 */ - text-transform: none; -} - -/** - * Correct the inability to style clickable types in iOS and Safari. - */ -button, -[type=button], -[type=reset], -[type=submit] { - -webkit-appearance: button; -} - -/** - * Remove the inner border and padding in Firefox. - */ -button::-moz-focus-inner, -[type=button]::-moz-focus-inner, -[type=reset]::-moz-focus-inner, -[type=submit]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ -button:-moz-focusring, -[type=button]:-moz-focusring, -[type=reset]:-moz-focusring, -[type=submit]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ -legend { - -webkit-box-sizing: border-box; - box-sizing: border-box; - /* 1 */ - color: inherit; - /* 2 */ - display: table; - /* 1 */ - max-width: 100%; - /* 1 */ - padding: 0; - /* 3 */ - white-space: normal; - /* 1 */ -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ -progress { - vertical-align: baseline; -} - -/** - * Remove the default vertical scrollbar in IE 10+. - */ -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ -[type=checkbox], -[type=radio] { - -webkit-box-sizing: border-box; - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ -[type=number]::-webkit-inner-spin-button, -[type=number]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ -[type=search] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ -[type=search]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* Interactive - ========================================================================== */ -/* - * Add the correct display in Edge, IE 10+, and Firefox. - */ -details { - display: block; -} - -/* - * Add the correct display in all browsers. - */ -summary { - display: list-item; -} - -/* Misc - ========================================================================== */ -/** - * Add the correct display in IE 10+. - */ -template { - display: none; -} - -/** - * Add the correct display in IE 10. - */ -[hidden] { - display: none; -} - -/** - * Swiper 7.4.1 - * Most modern mobile touch slider and framework with hardware accelerated transitions - * https://swiperjs.com - * - * Copyright 2014-2021 Vladimir Kharlampidi - * - * Released under the MIT License - * - * Released on: December 24, 2021 - */ -@font-face { - font-family: swiper-icons; - src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA"); - font-weight: 400; - font-style: normal; -} -:root { - --swiper-theme-color:#007aff; -} - -.swiper { - margin-left: auto; - margin-right: auto; - position: relative; - overflow: hidden; - list-style: none; - padding: 0; - z-index: 1; -} - -.swiper-vertical > .swiper-wrapper { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} - -.swiper-wrapper { - position: relative; - width: 100%; - height: 100%; - z-index: 1; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-transition-property: -webkit-transform; - transition-property: -webkit-transform; - transition-property: transform; - transition-property: transform, -webkit-transform; - -webkit-box-sizing: content-box; - box-sizing: content-box; -} - -.swiper-android .swiper-slide, .swiper-wrapper { - -webkit-transform: translate3d(0px, 0, 0); - transform: translate3d(0px, 0, 0); -} - -.swiper-pointer-events { - -ms-touch-action: pan-y; - touch-action: pan-y; -} - -.swiper-pointer-events.swiper-vertical { - -ms-touch-action: pan-x; - touch-action: pan-x; -} - -.swiper-slide { - -ms-flex-negative: 0; - flex-shrink: 0; - width: 100%; - height: 100%; - position: relative; - -webkit-transition-property: -webkit-transform; - transition-property: -webkit-transform; - transition-property: transform; - transition-property: transform, -webkit-transform; -} - -.swiper-slide-invisible-blank { - visibility: hidden; -} - -.swiper-autoheight, .swiper-autoheight .swiper-slide { - height: auto; -} - -.swiper-autoheight .swiper-wrapper { - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-transition-property: height, -webkit-transform; - transition-property: height, -webkit-transform; - transition-property: transform, height; - transition-property: transform, height, -webkit-transform; -} - -.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper { - -webkit-perspective: 1200px; - perspective: 1200px; -} - -.swiper-3d .swiper-cube-shadow, .swiper-3d .swiper-slide, .swiper-3d .swiper-slide-shadow, .swiper-3d .swiper-slide-shadow-bottom, .swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right, .swiper-3d .swiper-slide-shadow-top, .swiper-3d .swiper-wrapper { - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.swiper-3d .swiper-slide-shadow, .swiper-3d .swiper-slide-shadow-bottom, .swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right, .swiper-3d .swiper-slide-shadow-top { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: 10; -} - -.swiper-3d .swiper-slide-shadow { - background: rgba(0, 0, 0, 0.15); -} - -.swiper-3d .swiper-slide-shadow-left { - background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); - background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); -} - -.swiper-3d .swiper-slide-shadow-right { - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); -} - -.swiper-3d .swiper-slide-shadow-top { - background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); - background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); -} - -.swiper-3d .swiper-slide-shadow-bottom { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); - background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); -} - -.swiper-css-mode > .swiper-wrapper { - overflow: auto; - scrollbar-width: none; - -ms-overflow-style: none; -} - -.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar { - display: none; -} - -.swiper-css-mode > .swiper-wrapper > .swiper-slide { - scroll-snap-align: start start; -} - -.swiper-horizontal.swiper-css-mode > .swiper-wrapper { - -ms-scroll-snap-type: x mandatory; - scroll-snap-type: x mandatory; -} - -.swiper-vertical.swiper-css-mode > .swiper-wrapper { - -ms-scroll-snap-type: y mandatory; - scroll-snap-type: y mandatory; -} - -.swiper-centered > .swiper-wrapper::before { - content: ""; - -ms-flex-negative: 0; - flex-shrink: 0; - -webkit-box-ordinal-group: 10000; - -ms-flex-order: 9999; - order: 9999; -} - -.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child { - -webkit-margin-start: var(--swiper-centered-offset-before); - margin-inline-start: var(--swiper-centered-offset-before); -} - -.swiper-centered.swiper-horizontal > .swiper-wrapper::before { - height: 100%; - min-height: 1px; - width: var(--swiper-centered-offset-after); -} - -.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child { - -webkit-margin-before: var(--swiper-centered-offset-before); - margin-block-start: var(--swiper-centered-offset-before); -} - -.swiper-centered.swiper-vertical > .swiper-wrapper::before { - width: 100%; - min-width: 1px; - height: var(--swiper-centered-offset-after); -} - -.swiper-centered > .swiper-wrapper > .swiper-slide { - scroll-snap-align: center center; -} - -.swiper-virtual.swiper-css-mode .swiper-wrapper::after { - content: ""; - position: absolute; - left: 0; - top: 0; - pointer-events: none; -} - -.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after { - height: 1px; - width: var(--swiper-virtual-size); -} - -.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after { - width: 1px; - height: var(--swiper-virtual-size); -} - -:root { - --swiper-navigation-size:44px; -} - -.swiper-button-next, .swiper-button-prev { - position: absolute; - top: 50%; - width: calc(var(--swiper-navigation-size) / 44 * 27); - height: var(--swiper-navigation-size); - margin-top: calc(0px - var(--swiper-navigation-size) / 2); - z-index: 10; - cursor: pointer; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - color: var(--swiper-navigation-color, var(--swiper-theme-color)); -} - -.swiper-button-next.swiper-button-disabled, .swiper-button-prev.swiper-button-disabled { - opacity: 0.35; - cursor: auto; - pointer-events: none; -} - -.swiper-button-next:after, .swiper-button-prev:after { - font-family: swiper-icons; - font-size: var(--swiper-navigation-size); - text-transform: none !important; - letter-spacing: 0; - text-transform: none; - font-variant: initial; - line-height: 1; -} - -.swiper-button-prev, .swiper-rtl .swiper-button-next { - left: 10px; - right: auto; -} - -.swiper-button-prev:after, .swiper-rtl .swiper-button-next:after { - content: "prev"; -} - -.swiper-button-next, .swiper-rtl .swiper-button-prev { - right: 10px; - left: auto; -} - -.swiper-button-next:after, .swiper-rtl .swiper-button-prev:after { - content: "next"; -} - -.swiper-button-lock { - display: none; -} - -.swiper-pagination { - position: absolute; - text-align: center; - -webkit-transition: 0.3s opacity; - transition: 0.3s opacity; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - z-index: 10; -} - -.swiper-pagination.swiper-pagination-hidden { - opacity: 0; -} - -.swiper-horizontal > .swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal, .swiper-pagination-custom, .swiper-pagination-fraction { - bottom: 10px; - left: 0; - width: 100%; -} - -.swiper-pagination-bullets-dynamic { - overflow: hidden; - font-size: 0; -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { - -webkit-transform: scale(0.33); - -ms-transform: scale(0.33); - transform: scale(0.33); - position: relative; -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev { - -webkit-transform: scale(0.66); - -ms-transform: scale(0.66); - transform: scale(0.66); -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev { - -webkit-transform: scale(0.33); - -ms-transform: scale(0.33); - transform: scale(0.33); -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next { - -webkit-transform: scale(0.66); - -ms-transform: scale(0.66); - transform: scale(0.66); -} - -.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next { - -webkit-transform: scale(0.33); - -ms-transform: scale(0.33); - transform: scale(0.33); -} - -.swiper-pagination-bullet { - width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px)); - height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px)); - display: inline-block; - border-radius: 50%; - background: var(--swiper-pagination-bullet-inactive-color, #000); - opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); -} - -button.swiper-pagination-bullet { - border: none; - margin: 0; - padding: 0; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.swiper-pagination-clickable .swiper-pagination-bullet { - cursor: pointer; -} - -.swiper-pagination-bullet:only-child { - display: none !important; -} - -.swiper-pagination-bullet-active { - opacity: var(--swiper-pagination-bullet-opacity, 1); - background: var(--swiper-pagination-color, var(--swiper-theme-color)); -} - -.swiper-pagination-vertical.swiper-pagination-bullets, .swiper-vertical > .swiper-pagination-bullets { - right: 10px; - top: 50%; - -webkit-transform: translate3d(0px, -50%, 0); - transform: translate3d(0px, -50%, 0); -} - -.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet { - margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0; - display: block; -} - -.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic { - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - width: 8px; -} - -.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { - display: inline-block; - -webkit-transition: 0.2s top, 0.2s -webkit-transform; - transition: 0.2s top, 0.2s -webkit-transform; - transition: 0.2s transform, 0.2s top; - transition: 0.2s transform, 0.2s top, 0.2s -webkit-transform; -} - -.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet { - margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px); -} - -.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic { - left: 50%; - -webkit-transform: translateX(-50%); - -ms-transform: translateX(-50%); - transform: translateX(-50%); - white-space: nowrap; -} - -.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { - -webkit-transition: 0.2s left, 0.2s -webkit-transform; - transition: 0.2s left, 0.2s -webkit-transform; - transition: 0.2s transform, 0.2s left; - transition: 0.2s transform, 0.2s left, 0.2s -webkit-transform; -} - -.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet { - -webkit-transition: 0.2s right, 0.2s -webkit-transform; - transition: 0.2s right, 0.2s -webkit-transform; - transition: 0.2s transform, 0.2s right; - transition: 0.2s transform, 0.2s right, 0.2s -webkit-transform; -} - -.swiper-pagination-progressbar { - background: rgba(0, 0, 0, 0.25); - position: absolute; -} - -.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { - background: var(--swiper-pagination-color, var(--swiper-theme-color)); - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - -webkit-transform: scale(0); - -ms-transform: scale(0); - transform: scale(0); - -webkit-transform-origin: left top; - -ms-transform-origin: left top; - transform-origin: left top; -} - -.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { - -webkit-transform-origin: right top; - -ms-transform-origin: right top; - transform-origin: right top; -} - -.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite { - width: 100%; - height: 4px; - left: 0; - top: 0; -} - -.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-vertical > .swiper-pagination-progressbar { - width: 4px; - height: 100%; - left: 0; - top: 0; -} - -.swiper-pagination-lock { - display: none; -} - -.swiper-scrollbar { - border-radius: 10px; - position: relative; - -ms-touch-action: none; - background: rgba(0, 0, 0, 0.1); -} - -.swiper-horizontal > .swiper-scrollbar { - position: absolute; - left: 1%; - bottom: 3px; - z-index: 50; - height: 5px; - width: 98%; -} - -.swiper-vertical > .swiper-scrollbar { - position: absolute; - right: 3px; - top: 1%; - z-index: 50; - width: 5px; - height: 98%; -} - -.swiper-scrollbar-drag { - height: 100%; - width: 100%; - position: relative; - background: rgba(0, 0, 0, 0.5); - border-radius: 10px; - left: 0; - top: 0; -} - -.swiper-scrollbar-cursor-drag { - cursor: move; -} - -.swiper-scrollbar-lock { - display: none; -} - -.swiper-zoom-container { - width: 100%; - height: 100%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - text-align: center; -} - -.swiper-zoom-container > canvas, .swiper-zoom-container > img, .swiper-zoom-container > svg { - max-width: 100%; - max-height: 100%; - -o-object-fit: contain; - object-fit: contain; -} - -.swiper-slide-zoomed { - cursor: move; -} - -.swiper-lazy-preloader { - width: 42px; - height: 42px; - position: absolute; - left: 50%; - top: 50%; - margin-left: -21px; - margin-top: -21px; - z-index: 10; - -webkit-transform-origin: 50%; - -ms-transform-origin: 50%; - transform-origin: 50%; - -webkit-animation: swiper-preloader-spin 1s infinite linear; - animation: swiper-preloader-spin 1s infinite linear; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color)); - border-radius: 50%; - border-top-color: transparent; -} - -.swiper-lazy-preloader-white { - --swiper-preloader-color:#fff; -} - -.swiper-lazy-preloader-black { - --swiper-preloader-color:#000; -} - -@-webkit-keyframes swiper-preloader-spin { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes swiper-preloader-spin { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.swiper .swiper-notification { - position: absolute; - left: 0; - top: 0; - pointer-events: none; - opacity: 0; - z-index: -1000; -} - -.swiper-free-mode > .swiper-wrapper { - -webkit-transition-timing-function: ease-out; - transition-timing-function: ease-out; - margin: 0 auto; -} - -.swiper-grid > .swiper-wrapper { - -ms-flex-wrap: wrap; - flex-wrap: wrap; -} - -.swiper-grid-column > .swiper-wrapper { - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} - -.swiper-fade.swiper-free-mode .swiper-slide { - -webkit-transition-timing-function: ease-out; - transition-timing-function: ease-out; -} - -.swiper-fade .swiper-slide { - pointer-events: none; - -webkit-transition-property: opacity; - transition-property: opacity; -} - -.swiper-fade .swiper-slide .swiper-slide { - pointer-events: none; -} - -.swiper-fade .swiper-slide-active, .swiper-fade .swiper-slide-active .swiper-slide-active { - pointer-events: auto; -} - -.swiper-cube { - overflow: visible; -} - -.swiper-cube .swiper-slide { - pointer-events: none; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - z-index: 1; - visibility: hidden; - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - width: 100%; - height: 100%; -} - -.swiper-cube .swiper-slide .swiper-slide { - pointer-events: none; -} - -.swiper-cube.swiper-rtl .swiper-slide { - -webkit-transform-origin: 100% 0; - -ms-transform-origin: 100% 0; - transform-origin: 100% 0; -} - -.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-active .swiper-slide-active { - pointer-events: auto; -} - -.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-next, .swiper-cube .swiper-slide-next + .swiper-slide, .swiper-cube .swiper-slide-prev { - pointer-events: auto; - visibility: visible; -} - -.swiper-cube .swiper-slide-shadow-bottom, .swiper-cube .swiper-slide-shadow-left, .swiper-cube .swiper-slide-shadow-right, .swiper-cube .swiper-slide-shadow-top { - z-index: 0; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.swiper-cube .swiper-cube-shadow { - position: absolute; - left: 0; - bottom: 0px; - width: 100%; - height: 100%; - opacity: 0.6; - z-index: 0; -} - -.swiper-cube .swiper-cube-shadow:before { - content: ""; - background: #000; - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - -webkit-filter: blur(50px); - filter: blur(50px); -} - -.swiper-flip { - overflow: visible; -} - -.swiper-flip .swiper-slide { - pointer-events: none; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - z-index: 1; -} - -.swiper-flip .swiper-slide .swiper-slide { - pointer-events: none; -} - -.swiper-flip .swiper-slide-active, .swiper-flip .swiper-slide-active .swiper-slide-active { - pointer-events: auto; -} - -.swiper-flip .swiper-slide-shadow-bottom, .swiper-flip .swiper-slide-shadow-left, .swiper-flip .swiper-slide-shadow-right, .swiper-flip .swiper-slide-shadow-top { - z-index: 0; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.swiper-creative .swiper-slide { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - overflow: hidden; - -webkit-transition-property: opacity, height, -webkit-transform; - transition-property: opacity, height, -webkit-transform; - transition-property: transform, opacity, height; - transition-property: transform, opacity, height, -webkit-transform; -} - -.swiper-cards { - overflow: visible; -} - -.swiper-cards .swiper-slide { - -webkit-transform-origin: center bottom; - -ms-transform-origin: center bottom; - transform-origin: center bottom; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - overflow: hidden; -} - -.vjs-svg-icon { - display: inline-block; - background-repeat: no-repeat; - background-position: center; - fill: currentColor; - height: 1.8em; - width: 1.8em; -} - -.vjs-svg-icon:before { - content: none !important; -} - -.vjs-control:focus .vjs-svg-icon, .vjs-svg-icon:hover { - -webkit-filter: drop-shadow(0 0 0.25em #fff); - filter: drop-shadow(0 0 0.25em #fff); -} - -.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-modal-dialog, .vjs-button > .vjs-icon-placeholder:before, .vjs-modal-dialog .vjs-modal-dialog-content { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .vjs-button > .vjs-icon-placeholder:before { - text-align: center; -} - -@font-face { - font-family: VideoJS; - src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff"); - font-weight: 400; - font-style: normal; -} -.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder, .vjs-icon-play { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .vjs-icon-play:before { - content: "\f101"; -} - -.vjs-icon-play-circle { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-play-circle:before { - content: "\f102"; -} - -.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder, .vjs-icon-pause { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before { - content: "\f103"; -} - -.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder, .vjs-icon-volume-mute { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before, .vjs-icon-volume-mute:before { - content: "\f104"; -} - -.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder, .vjs-icon-volume-low { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before, .vjs-icon-volume-low:before { - content: "\f105"; -} - -.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder, .vjs-icon-volume-mid { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before, .vjs-icon-volume-mid:before { - content: "\f106"; -} - -.video-js .vjs-mute-control .vjs-icon-placeholder, .vjs-icon-volume-high { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-mute-control .vjs-icon-placeholder:before, .vjs-icon-volume-high:before { - content: "\f107"; -} - -.video-js .vjs-fullscreen-control .vjs-icon-placeholder, .vjs-icon-fullscreen-enter { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before, .vjs-icon-fullscreen-enter:before { - content: "\f108"; -} - -.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder, .vjs-icon-fullscreen-exit { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before, .vjs-icon-fullscreen-exit:before { - content: "\f109"; -} - -.vjs-icon-spinner { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-spinner:before { - content: "\f10a"; -} - -.video-js .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-subtitles-button .vjs-icon-placeholder, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder, .vjs-icon-subtitles { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .vjs-icon-subtitles:before { - content: "\f10b"; -} - -.video-js .vjs-captions-button .vjs-icon-placeholder, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder, .vjs-icon-captions { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-captions-button .vjs-icon-placeholder:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .vjs-icon-captions:before { - content: "\f10c"; -} - -.vjs-icon-hd { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-hd:before { - content: "\f10d"; -} - -.video-js .vjs-chapters-button .vjs-icon-placeholder, .vjs-icon-chapters { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-chapters-button .vjs-icon-placeholder:before, .vjs-icon-chapters:before { - content: "\f10e"; -} - -.vjs-icon-downloading { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-downloading:before { - content: "\f10f"; -} - -.vjs-icon-file-download { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-file-download:before { - content: "\f110"; -} - -.vjs-icon-file-download-done { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-file-download-done:before { - content: "\f111"; -} - -.vjs-icon-file-download-off { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-file-download-off:before { - content: "\f112"; -} - -.vjs-icon-share { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-share:before { - content: "\f113"; -} - -.vjs-icon-cog { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-cog:before { - content: "\f114"; -} - -.vjs-icon-square { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-square:before { - content: "\f115"; -} - -.video-js .vjs-play-progress, .video-js .vjs-volume-level, .vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before, .vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before { - content: "\f116"; -} - -.vjs-icon-circle-outline { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-circle-outline:before { - content: "\f117"; -} - -.vjs-icon-circle-inner-circle { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-circle-inner-circle:before { - content: "\f118"; -} - -.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder, .vjs-icon-cancel { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before, .vjs-icon-cancel:before { - content: "\f119"; -} - -.vjs-icon-repeat { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-repeat:before { - content: "\f11a"; -} - -.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder, .vjs-icon-replay { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .vjs-icon-replay:before { - content: "\f11b"; -} - -.video-js .vjs-skip-backward-5 .vjs-icon-placeholder, .vjs-icon-replay-5 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before, .vjs-icon-replay-5:before { - content: "\f11c"; -} - -.video-js .vjs-skip-backward-10 .vjs-icon-placeholder, .vjs-icon-replay-10 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before, .vjs-icon-replay-10:before { - content: "\f11d"; -} - -.video-js .vjs-skip-backward-30 .vjs-icon-placeholder, .vjs-icon-replay-30 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before, .vjs-icon-replay-30:before { - content: "\f11e"; -} - -.video-js .vjs-skip-forward-5 .vjs-icon-placeholder, .vjs-icon-forward-5 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before, .vjs-icon-forward-5:before { - content: "\f11f"; -} - -.video-js .vjs-skip-forward-10 .vjs-icon-placeholder, .vjs-icon-forward-10 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before, .vjs-icon-forward-10:before { - content: "\f120"; -} - -.video-js .vjs-skip-forward-30 .vjs-icon-placeholder, .vjs-icon-forward-30 { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before, .vjs-icon-forward-30:before { - content: "\f121"; -} - -.video-js .vjs-audio-button .vjs-icon-placeholder, .vjs-icon-audio { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-audio-button .vjs-icon-placeholder:before, .vjs-icon-audio:before { - content: "\f122"; -} - -.vjs-icon-next-item { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-next-item:before { - content: "\f123"; -} - -.vjs-icon-previous-item { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-previous-item:before { - content: "\f124"; -} - -.vjs-icon-shuffle { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-shuffle:before { - content: "\f125"; -} - -.vjs-icon-cast { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-cast:before { - content: "\f126"; -} - -.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder, .vjs-icon-picture-in-picture-enter { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before, .vjs-icon-picture-in-picture-enter:before { - content: "\f127"; -} - -.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder, .vjs-icon-picture-in-picture-exit { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before, .vjs-icon-picture-in-picture-exit:before { - content: "\f128"; -} - -.vjs-icon-facebook { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-facebook:before { - content: "\f129"; -} - -.vjs-icon-linkedin { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-linkedin:before { - content: "\f12a"; -} - -.vjs-icon-twitter { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-twitter:before { - content: "\f12b"; -} - -.vjs-icon-tumblr { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-tumblr:before { - content: "\f12c"; -} - -.vjs-icon-pinterest { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.vjs-icon-pinterest:before { - content: "\f12d"; -} - -.video-js .vjs-descriptions-button .vjs-icon-placeholder, .vjs-icon-audio-description { - font-family: VideoJS; - font-weight: 400; - font-style: normal; -} - -.video-js .vjs-descriptions-button .vjs-icon-placeholder:before, .vjs-icon-audio-description:before { - content: "\f12e"; -} - -.video-js { - display: inline-block; - vertical-align: top; - -webkit-box-sizing: border-box; - box-sizing: border-box; - color: #fff; - background-color: #000; - position: relative; - padding: 0; - font-size: 10px; - line-height: 1; - font-weight: 400; - font-style: normal; - font-family: Arial, Helvetica, sans-serif; - word-break: initial; -} - -.video-js:-moz-full-screen { - position: absolute; -} - -.video-js:-webkit-full-screen { - width: 100% !important; - height: 100% !important; -} - -.video-js[tabindex="-1"] { - outline: 0; -} - -.video-js *, .video-js :after, .video-js :before { - -webkit-box-sizing: inherit; - box-sizing: inherit; -} - -.video-js ul { - font-family: inherit; - font-size: inherit; - line-height: inherit; - list-style-position: outside; - margin-left: 0; - margin-right: 0; - margin-top: 0; - margin-bottom: 0; -} - -.video-js.vjs-1-1, .video-js.vjs-16-9, .video-js.vjs-4-3, .video-js.vjs-9-16, .video-js.vjs-fluid { - width: 100%; - max-width: 100%; -} - -.video-js.vjs-1-1:not(.vjs-audio-only-mode), .video-js.vjs-16-9:not(.vjs-audio-only-mode), .video-js.vjs-4-3:not(.vjs-audio-only-mode), .video-js.vjs-9-16:not(.vjs-audio-only-mode), .video-js.vjs-fluid:not(.vjs-audio-only-mode) { - height: 0; -} - -.video-js.vjs-16-9:not(.vjs-audio-only-mode) { - padding-top: 56.25%; -} - -.video-js.vjs-4-3:not(.vjs-audio-only-mode) { - padding-top: 75%; -} - -.video-js.vjs-9-16:not(.vjs-audio-only-mode) { - padding-top: 177.7777777778%; -} - -.video-js.vjs-1-1:not(.vjs-audio-only-mode) { - padding-top: 100%; -} - -.video-js.vjs-fill:not(.vjs-audio-only-mode) { - width: 100%; - height: 100%; -} - -.video-js .vjs-tech { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.video-js.vjs-audio-only-mode .vjs-tech { - display: none; -} - -body.vjs-full-window, body.vjs-pip-window { - padding: 0; - margin: 0; - height: 100%; -} - -.vjs-full-window .video-js.vjs-fullscreen, body.vjs-pip-window .video-js { - position: fixed; - overflow: hidden; - z-index: 1000; - left: 0; - top: 0; - bottom: 0; - right: 0; -} - -.video-js.vjs-fullscreen:not(.vjs-ios-native-fs), body.vjs-pip-window .video-js { - width: 100% !important; - height: 100% !important; - padding-top: 0 !important; - display: block; -} - -.video-js.vjs-fullscreen.vjs-user-inactive { - cursor: none; -} - -.vjs-pip-container .vjs-pip-text { - position: absolute; - bottom: 10%; - font-size: 2em; - background-color: rgba(0, 0, 0, 0.7); - padding: 0.5em; - text-align: center; - width: 100%; -} - -.vjs-layout-small.vjs-pip-container .vjs-pip-text, .vjs-layout-tiny.vjs-pip-container .vjs-pip-text, .vjs-layout-x-small.vjs-pip-container .vjs-pip-text { - bottom: 0; - font-size: 1.4em; -} - -.vjs-hidden { - display: none !important; -} - -.vjs-disabled { - opacity: 0.5; - cursor: default; -} - -.video-js .vjs-offscreen { - height: 1px; - left: -9999px; - position: absolute; - top: 0; - width: 1px; -} - -.vjs-lock-showing { - display: block !important; - opacity: 1 !important; - visibility: visible !important; -} - -.vjs-no-js { - padding: 20px; - color: #fff; - background-color: #000; - font-size: 18px; - font-family: Arial, Helvetica, sans-serif; - text-align: center; - width: 300px; - height: 150px; - margin: 0 auto; -} - -.vjs-no-js a, .vjs-no-js a:visited { - color: #66a8cc; -} - -.video-js .vjs-big-play-button { - font-size: 3em; - line-height: 1.5em; - height: 1.63332em; - width: 3em; - display: block; - position: absolute; - top: 50%; - left: 50%; - padding: 0; - margin-top: -0.81666em; - margin-left: -1.5em; - cursor: pointer; - opacity: 1; - border: 0.06666em solid #fff; - background-color: #2b333f; - background-color: rgba(43, 51, 63, 0.7); - border-radius: 0.3em; - -webkit-transition: all 0.4s; - transition: all 0.4s; -} - -.vjs-big-play-button .vjs-svg-icon { - width: 1em; - height: 1em; - position: absolute; - top: 50%; - left: 50%; - line-height: 1; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} - -.video-js .vjs-big-play-button:focus, .video-js:hover .vjs-big-play-button { - border-color: #fff; - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); - -webkit-transition: all 0s; - transition: all 0s; -} - -.vjs-controls-disabled .vjs-big-play-button, .vjs-error .vjs-big-play-button, .vjs-has-started .vjs-big-play-button, .vjs-using-native-controls .vjs-big-play-button { - display: none; -} - -.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button { - display: block; -} - -.video-js button { - background: 0 0; - border: none; - color: inherit; - display: inline-block; - font-size: inherit; - line-height: inherit; - text-transform: none; - text-decoration: none; - -webkit-transition: none; - transition: none; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.vjs-control .vjs-button { - width: 100%; - height: 100%; -} - -.video-js .vjs-control.vjs-close-button { - cursor: pointer; - height: 3em; - position: absolute; - right: 0; - top: 0.5em; - z-index: 2; -} - -.video-js .vjs-modal-dialog { - background: rgba(0, 0, 0, 0.8); - background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.8)), to(rgba(255, 255, 255, 0))); - background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); - overflow: auto; -} - -.video-js .vjs-modal-dialog > * { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.vjs-modal-dialog .vjs-modal-dialog-content { - font-size: 1.2em; - line-height: 1.5; - padding: 20px 24px; - z-index: 1; -} - -.vjs-menu-button { - cursor: pointer; -} - -.vjs-menu-button.vjs-disabled { - cursor: default; -} - -.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu { - display: none; -} - -.vjs-menu .vjs-menu-content { - display: block; - padding: 0; - margin: 0; - font-family: Arial, Helvetica, sans-serif; - overflow: auto; -} - -.vjs-menu .vjs-menu-content > * { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu { - display: none; -} - -.vjs-menu li { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - list-style: none; - margin: 0; - padding: 0.2em 0; - line-height: 1.4em; - font-size: 1.2em; - text-align: center; - text-transform: lowercase; -} - -.js-focus-visible .vjs-menu li.vjs-menu-item:hover, .vjs-menu li.vjs-menu-item:focus, .vjs-menu li.vjs-menu-item:hover { - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); -} - -.js-focus-visible .vjs-menu li.vjs-selected:hover, .vjs-menu li.vjs-selected, .vjs-menu li.vjs-selected:focus, .vjs-menu li.vjs-selected:hover { - background-color: #fff; - color: #2b333f; -} - -.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon, .vjs-menu li.vjs-selected .vjs-svg-icon, .vjs-menu li.vjs-selected:focus .vjs-svg-icon, .vjs-menu li.vjs-selected:hover .vjs-svg-icon { - fill: #000; -} - -.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible), .video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible) { - background: 0 0; -} - -.vjs-menu li.vjs-menu-title { - text-align: center; - text-transform: uppercase; - font-size: 1em; - line-height: 2em; - padding: 0; - margin: 0 0 0.3em 0; - font-weight: 700; - cursor: default; -} - -.vjs-menu-button-popup .vjs-menu { - display: none; - position: absolute; - bottom: 0; - width: 10em; - left: -3em; - height: 0; - margin-bottom: 1.5em; - border-top-color: rgba(43, 51, 63, 0.7); -} - -.vjs-pip-window .vjs-menu-button-popup .vjs-menu { - left: unset; - right: 1em; -} - -.vjs-menu-button-popup .vjs-menu .vjs-menu-content { - background-color: #2b333f; - background-color: rgba(43, 51, 63, 0.7); - position: absolute; - width: 100%; - bottom: 1.5em; - max-height: 15em; -} - -.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content { - max-height: 5em; -} - -.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content { - max-height: 10em; -} - -.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content { - max-height: 14em; -} - -.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content { - max-height: 25em; -} - -.vjs-menu-button-popup .vjs-menu.vjs-lock-showing, .vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu { - display: block; -} - -.video-js .vjs-menu-button-inline { - -webkit-transition: all 0.4s; - transition: all 0.4s; - overflow: hidden; -} - -.video-js .vjs-menu-button-inline:before { - width: 2.222222222em; -} - -.video-js .vjs-menu-button-inline.vjs-slider-active, .video-js .vjs-menu-button-inline:focus, .video-js .vjs-menu-button-inline:hover { - width: 12em; -} - -.vjs-menu-button-inline .vjs-menu { - opacity: 0; - height: 100%; - width: auto; - position: absolute; - left: 4em; - top: 0; - padding: 0; - margin: 0; - -webkit-transition: all 0.4s; - transition: all 0.4s; -} - -.vjs-menu-button-inline.vjs-slider-active .vjs-menu, .vjs-menu-button-inline:focus .vjs-menu, .vjs-menu-button-inline:hover .vjs-menu { - display: block; - opacity: 1; -} - -.vjs-menu-button-inline .vjs-menu-content { - width: auto; - height: 100%; - margin: 0; - overflow: hidden; -} - -.video-js .vjs-control-bar { - display: none; - width: 100%; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 3em; - background-color: #2b333f; - background-color: rgba(43, 51, 63, 0.7); -} - -.video-js:not(.vjs-controls-disabled, .vjs-using-native-controls, .vjs-error) .vjs-control-bar.vjs-lock-showing { - display: -webkit-box !important; - display: -ms-flexbox !important; - display: flex !important; -} - -.vjs-audio-only-mode .vjs-control-bar, .vjs-has-started .vjs-control-bar { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - visibility: visible; - opacity: 1; - -webkit-transition: visibility 0.1s, opacity 0.1s; - transition: visibility 0.1s, opacity 0.1s; -} - -.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { - visibility: visible; - opacity: 0; - pointer-events: none; - -webkit-transition: visibility 1s, opacity 1s; - transition: visibility 1s, opacity 1s; -} - -.vjs-controls-disabled .vjs-control-bar, .vjs-error .vjs-control-bar, .vjs-using-native-controls .vjs-control-bar { - display: none !important; -} - -.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar, .vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { - opacity: 1; - visibility: visible; - pointer-events: auto; -} - -.video-js .vjs-control { - position: relative; - text-align: center; - margin: 0; - padding: 0; - height: 100%; - width: 4em; - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; -} - -.video-js .vjs-control.vjs-visible-text { - width: auto; - padding-left: 1em; - padding-right: 1em; -} - -.vjs-button > .vjs-icon-placeholder:before { - font-size: 1.8em; - line-height: 1.67; -} - -.vjs-button > .vjs-icon-placeholder { - display: block; -} - -.vjs-button > .vjs-svg-icon { - display: inline-block; -} - -.video-js .vjs-control:focus, .video-js .vjs-control:focus:before, .video-js .vjs-control:hover:before { - text-shadow: 0 0 1em #fff; -} - -.video-js :not(.vjs-visible-text) > .vjs-control-text { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -.video-js .vjs-custom-control-spacer { - display: none; -} - -.video-js .vjs-progress-control { - cursor: pointer; - -webkit-box-flex: 1; - -ms-flex: auto; - flex: auto; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-width: 4em; - -ms-touch-action: none; - touch-action: none; -} - -.video-js .vjs-progress-control.disabled { - cursor: default; -} - -.vjs-live .vjs-progress-control { - display: none; -} - -.vjs-liveui .vjs-progress-control { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.video-js .vjs-progress-holder { - -webkit-box-flex: 1; - -ms-flex: auto; - flex: auto; - -webkit-transition: all 0.2s; - transition: all 0.2s; - height: 0.3em; -} - -.video-js .vjs-progress-control .vjs-progress-holder { - margin: 0 10px; -} - -.video-js .vjs-progress-control:hover .vjs-progress-holder { - font-size: 1.6666666667em; -} - -.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled { - font-size: 1em; -} - -.video-js .vjs-progress-holder .vjs-load-progress, .video-js .vjs-progress-holder .vjs-load-progress div, .video-js .vjs-progress-holder .vjs-play-progress { - position: absolute; - display: block; - height: 100%; - margin: 0; - padding: 0; - width: 0; -} - -.video-js .vjs-play-progress { - background-color: #fff; -} - -.video-js .vjs-play-progress:before { - font-size: 0.9em; - position: absolute; - right: -0.5em; - line-height: 0.35em; - z-index: 1; -} - -.vjs-svg-icons-enabled .vjs-play-progress:before { - content: none !important; -} - -.vjs-play-progress .vjs-svg-icon { - position: absolute; - top: -0.35em; - right: -0.4em; - width: 0.9em; - height: 0.9em; - pointer-events: none; - line-height: 0.15em; - z-index: 1; -} - -.video-js .vjs-load-progress { - background: rgba(115, 133, 159, 0.5); -} - -.video-js .vjs-load-progress div { - background: rgba(115, 133, 159, 0.75); -} - -.video-js .vjs-time-tooltip { - background-color: #fff; - background-color: rgba(255, 255, 255, 0.8); - border-radius: 0.3em; - color: #000; - float: right; - font-family: Arial, Helvetica, sans-serif; - font-size: 1em; - padding: 6px 8px 8px 8px; - pointer-events: none; - position: absolute; - top: -3.4em; - visibility: hidden; - z-index: 1; -} - -.video-js .vjs-progress-holder:focus .vjs-time-tooltip { - display: none; -} - -.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip, .video-js .vjs-progress-control:hover .vjs-time-tooltip { - display: block; - font-size: 0.6em; - visibility: visible; -} - -.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip { - font-size: 1em; -} - -.video-js .vjs-progress-control .vjs-mouse-display { - display: none; - position: absolute; - width: 1px; - height: 100%; - background-color: #000; - z-index: 1; -} - -.video-js .vjs-progress-control:hover .vjs-mouse-display { - display: block; -} - -.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display { - visibility: hidden; - opacity: 0; - -webkit-transition: visibility 1s, opacity 1s; - transition: visibility 1s, opacity 1s; -} - -.vjs-mouse-display .vjs-time-tooltip { - color: #fff; - background-color: #000; - background-color: rgba(0, 0, 0, 0.8); -} - -.video-js .vjs-slider { - position: relative; - cursor: pointer; - padding: 0; - margin: 0 0.45em 0 0.45em; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); -} - -.video-js .vjs-slider.disabled { - cursor: default; -} - -.video-js .vjs-slider:focus { - text-shadow: 0 0 1em #fff; - -webkit-box-shadow: 0 0 1em #fff; - box-shadow: 0 0 1em #fff; -} - -.video-js .vjs-mute-control { - cursor: pointer; - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; -} - -.video-js .vjs-volume-control { - cursor: pointer; - margin-right: 1em; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.video-js .vjs-volume-control.vjs-volume-horizontal { - width: 5em; -} - -.video-js .vjs-volume-panel .vjs-volume-control { - visibility: visible; - opacity: 0; - width: 1px; - height: 1px; - margin-left: -1px; -} - -.video-js .vjs-volume-panel { - -webkit-transition: width 1s; - transition: width 1s; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active, .video-js .vjs-volume-panel .vjs-volume-control:active, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, .video-js .vjs-volume-panel:active .vjs-volume-control, .video-js .vjs-volume-panel:focus .vjs-volume-control { - visibility: visible; - opacity: 1; - position: relative; - -webkit-transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s; - transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal { - width: 5em; - height: 3em; - margin-right: 0; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical { - left: -3.5em; - -webkit-transition: left 0s; - transition: left 0s; -} - -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active { - width: 10em; - -webkit-transition: width 0.1s; - transition: width 0.1s; -} - -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only { - width: 4em; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical { - height: 8em; - width: 3em; - left: -3000em; - -webkit-transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s; - transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal { - -webkit-transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s; - transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s; -} - -.video-js .vjs-volume-panel { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.video-js .vjs-volume-bar { - margin: 1.35em 0.45em; -} - -.vjs-volume-bar.vjs-slider-horizontal { - width: 5em; - height: 0.3em; -} - -.vjs-volume-bar.vjs-slider-vertical { - width: 0.3em; - height: 5em; - margin: 1.35em auto; -} - -.video-js .vjs-volume-level { - position: absolute; - bottom: 0; - left: 0; - background-color: #fff; -} - -.video-js .vjs-volume-level:before { - position: absolute; - font-size: 0.9em; - z-index: 1; -} - -.vjs-slider-vertical .vjs-volume-level { - width: 0.3em; -} - -.vjs-slider-vertical .vjs-volume-level:before { - top: -0.5em; - left: -0.3em; - z-index: 1; -} - -.vjs-svg-icons-enabled .vjs-volume-level:before { - content: none; -} - -.vjs-volume-level .vjs-svg-icon { - position: absolute; - width: 0.9em; - height: 0.9em; - pointer-events: none; - z-index: 1; -} - -.vjs-slider-horizontal .vjs-volume-level { - height: 0.3em; -} - -.vjs-slider-horizontal .vjs-volume-level:before { - line-height: 0.35em; - right: -0.5em; -} - -.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon { - right: -0.3em; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); -} - -.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon { - top: -0.55em; - -webkit-transform: translateX(-50%); - -ms-transform: translateX(-50%); - transform: translateX(-50%); -} - -.video-js .vjs-volume-panel.vjs-volume-panel-vertical { - width: 4em; -} - -.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level { - height: 100%; -} - -.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level { - width: 100%; -} - -.video-js .vjs-volume-vertical { - width: 3em; - height: 8em; - bottom: 8em; - background-color: #2b333f; - background-color: rgba(43, 51, 63, 0.7); -} - -.video-js .vjs-volume-horizontal .vjs-menu { - left: -2em; -} - -.video-js .vjs-volume-tooltip { - background-color: #fff; - background-color: rgba(255, 255, 255, 0.8); - border-radius: 0.3em; - color: #000; - float: right; - font-family: Arial, Helvetica, sans-serif; - font-size: 1em; - padding: 6px 8px 8px 8px; - pointer-events: none; - position: absolute; - top: -3.4em; - visibility: hidden; - z-index: 1; -} - -.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip, .video-js .vjs-volume-control:hover .vjs-volume-tooltip { - display: block; - font-size: 1em; - visibility: visible; -} - -.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip, .video-js .vjs-volume-vertical:hover .vjs-volume-tooltip { - left: 1em; - top: -12px; -} - -.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip { - font-size: 1em; -} - -.video-js .vjs-volume-control .vjs-mouse-display { - display: none; - position: absolute; - width: 100%; - height: 1px; - background-color: #000; - z-index: 1; -} - -.video-js .vjs-volume-horizontal .vjs-mouse-display { - width: 1px; - height: 100%; -} - -.video-js .vjs-volume-control:hover .vjs-mouse-display { - display: block; -} - -.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display { - visibility: hidden; - opacity: 0; - -webkit-transition: visibility 1s, opacity 1s; - transition: visibility 1s, opacity 1s; -} - -.vjs-mouse-display .vjs-volume-tooltip { - color: #fff; - background-color: #000; - background-color: rgba(0, 0, 0, 0.8); -} - -.vjs-poster { - display: inline-block; - vertical-align: middle; - cursor: pointer; - margin: 0; - padding: 0; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - height: 100%; -} - -.vjs-has-started .vjs-poster, .vjs-using-native-controls .vjs-poster { - display: none; -} - -.vjs-audio.vjs-has-started .vjs-poster, .vjs-has-started.vjs-audio-poster-mode .vjs-poster, .vjs-pip-container.vjs-has-started .vjs-poster { - display: block; -} - -.vjs-poster img { - width: 100%; - height: 100%; - -o-object-fit: contain; - object-fit: contain; -} - -.video-js .vjs-live-control { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-flex: 1; - -ms-flex: auto; - flex: auto; - font-size: 1em; - line-height: 3em; -} - -.video-js.vjs-liveui .vjs-live-control, .video-js:not(.vjs-live) .vjs-live-control { - display: none; -} - -.video-js .vjs-seek-to-live-control { - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - cursor: pointer; - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - height: 100%; - padding-left: 0.5em; - padding-right: 0.5em; - font-size: 1em; - line-height: 3em; - width: auto; - min-width: 4em; -} - -.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control, .video-js:not(.vjs-live) .vjs-seek-to-live-control { - display: none; -} - -.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge { - cursor: auto; -} - -.vjs-seek-to-live-control .vjs-icon-placeholder { - margin-right: 0.5em; - color: #888; -} - -.vjs-svg-icons-enabled .vjs-seek-to-live-control { - line-height: 0; -} - -.vjs-seek-to-live-control .vjs-svg-icon { - width: 1em; - height: 1em; - pointer-events: none; - fill: #888; -} - -.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder { - color: red; -} - -.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon { - fill: red; -} - -.video-js .vjs-time-control { - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; - font-size: 1em; - line-height: 3em; - min-width: 2em; - width: auto; - padding-left: 1em; - padding-right: 1em; -} - -.video-js .vjs-current-time, .video-js .vjs-duration, .vjs-live .vjs-time-control, .vjs-live .vjs-time-divider { - display: none; -} - -.vjs-time-divider { - display: none; - line-height: 3em; -} - -.video-js .vjs-play-control { - cursor: pointer; -} - -.video-js .vjs-play-control .vjs-icon-placeholder { - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; -} - -.vjs-text-track-display { - position: absolute; - bottom: 3em; - left: 0; - right: 0; - top: 0; - pointer-events: none; -} - -.vjs-error .vjs-text-track-display { - display: none; -} - -.video-js.vjs-controls-disabled .vjs-text-track-display, .video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display { - bottom: 1em; -} - -.video-js .vjs-text-track { - font-size: 1.4em; - text-align: center; - margin-bottom: 0.1em; -} - -.vjs-subtitles { - color: #fff; -} - -.vjs-captions { - color: #fc6; -} - -.vjs-tt-cue { - display: block; -} - -video::-webkit-media-text-track-display { - -webkit-transform: translateY(-3em); - transform: translateY(-3em); -} - -.video-js.vjs-controls-disabled video::-webkit-media-text-track-display, .video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display { - -webkit-transform: translateY(-1.5em); - transform: translateY(-1.5em); -} - -.video-js .vjs-picture-in-picture-control { - cursor: pointer; - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; -} - -.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control, .vjs-pip-window .vjs-picture-in-picture-control { - display: none; -} - -.video-js .vjs-fullscreen-control { - cursor: pointer; - -webkit-box-flex: 0; - -ms-flex: none; - flex: none; -} - -.video-js.vjs-audio-only-mode .vjs-fullscreen-control, .vjs-pip-window .vjs-fullscreen-control { - display: none; -} - -.vjs-playback-rate .vjs-playback-rate-value, .vjs-playback-rate > .vjs-menu-button { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.vjs-playback-rate .vjs-playback-rate-value { - pointer-events: none; - font-size: 1.5em; - line-height: 2; - text-align: center; -} - -.vjs-playback-rate .vjs-menu { - width: 4em; - left: 0; -} - -.vjs-error .vjs-error-display .vjs-modal-dialog-content { - font-size: 1.4em; - text-align: center; -} - -.vjs-error .vjs-error-display:before { - color: #fff; - content: "X"; - font-family: Arial, Helvetica, sans-serif; - font-size: 4em; - left: 0; - line-height: 1; - margin-top: -0.5em; - position: absolute; - text-shadow: 0.05em 0.05em 0.1em #000; - text-align: center; - top: 50%; - vertical-align: middle; - width: 100%; -} - -.vjs-loading-spinner { - display: none; - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - opacity: 0.85; - text-align: left; - border: 0.6em solid rgba(43, 51, 63, 0.7); - -webkit-box-sizing: border-box; - box-sizing: border-box; - background-clip: padding-box; - width: 5em; - height: 5em; - border-radius: 50%; - visibility: hidden; -} - -.vjs-seeking .vjs-loading-spinner, .vjs-waiting .vjs-loading-spinner { - display: block; - -webkit-animation: vjs-spinner-show 0s linear 0.3s forwards; - animation: vjs-spinner-show 0s linear 0.3s forwards; -} - -.vjs-error .vjs-loading-spinner { - display: none; -} - -.vjs-loading-spinner:after, .vjs-loading-spinner:before { - content: ""; - position: absolute; - margin: -0.6em; - -webkit-box-sizing: inherit; - box-sizing: inherit; - width: inherit; - height: inherit; - border-radius: inherit; - opacity: 1; - border: inherit; - border-color: transparent; - border-top-color: #fff; -} - -.vjs-seeking .vjs-loading-spinner:after, .vjs-seeking .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:before { - -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; - animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; -} - -.vjs-seeking .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:before { - border-top-color: #fff; -} - -.vjs-seeking .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:after { - border-top-color: #fff; - -webkit-animation-delay: 0.44s; - animation-delay: 0.44s; -} - -@-webkit-keyframes vjs-spinner-show { - to { - visibility: visible; - } -} - -@keyframes vjs-spinner-show { - to { - visibility: visible; - } -} -@-webkit-keyframes vjs-spinner-spin { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes vjs-spinner-spin { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-webkit-keyframes vjs-spinner-fade { - 0% { - border-top-color: #73859f; - } - 20% { - border-top-color: #73859f; - } - 35% { - border-top-color: #fff; - } - 60% { - border-top-color: #73859f; - } - 100% { - border-top-color: #73859f; - } -} -@keyframes vjs-spinner-fade { - 0% { - border-top-color: #73859f; - } - 20% { - border-top-color: #73859f; - } - 35% { - border-top-color: #fff; - } - 60% { - border-top-color: #73859f; - } - 100% { - border-top-color: #73859f; - } -} -.video-js.vjs-audio-only-mode .vjs-captions-button { - display: none; -} - -.vjs-chapters-button .vjs-menu ul { - width: 24em; -} - -.video-js.vjs-audio-only-mode .vjs-descriptions-button { - display: none; -} - -.vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-svg-icon { - width: 1.5em; - height: 1.5em; -} - -.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder { - vertical-align: middle; - display: inline-block; - margin-bottom: -0.1em; -} - -.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before { - font-family: VideoJS; - content: "\f10c"; - font-size: 1.5em; - line-height: inherit; -} - -.video-js.vjs-audio-only-mode .vjs-subs-caps-button { - display: none; -} - -.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder { - vertical-align: middle; - display: inline-block; - margin-bottom: -0.1em; -} - -.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before { - font-family: VideoJS; - content: " \f12e"; - font-size: 1.5em; - line-height: inherit; -} - -.video-js.vjs-layout-small .vjs-current-time, .video-js.vjs-layout-small .vjs-duration, .video-js.vjs-layout-small .vjs-playback-rate, .video-js.vjs-layout-small .vjs-remaining-time, .video-js.vjs-layout-small .vjs-time-divider, .video-js.vjs-layout-small .vjs-volume-control, .video-js.vjs-layout-tiny .vjs-current-time, .video-js.vjs-layout-tiny .vjs-duration, .video-js.vjs-layout-tiny .vjs-playback-rate, .video-js.vjs-layout-tiny .vjs-remaining-time, .video-js.vjs-layout-tiny .vjs-time-divider, .video-js.vjs-layout-tiny .vjs-volume-control, .video-js.vjs-layout-x-small .vjs-current-time, .video-js.vjs-layout-x-small .vjs-duration, .video-js.vjs-layout-x-small .vjs-playback-rate, .video-js.vjs-layout-x-small .vjs-remaining-time, .video-js.vjs-layout-x-small .vjs-time-divider, .video-js.vjs-layout-x-small .vjs-volume-control { - display: none; -} - -.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover { - width: auto; - width: initial; -} - -.video-js.vjs-layout-tiny .vjs-progress-control, .video-js.vjs-layout-x-small .vjs-progress-control { - display: none; -} - -.video-js.vjs-layout-x-small .vjs-custom-control-spacer { - -webkit-box-flex: 1; - -ms-flex: auto; - flex: auto; - display: block; -} - -.vjs-modal-dialog.vjs-text-track-settings { - background-color: #2b333f; - background-color: rgba(43, 51, 63, 0.75); - color: #fff; - height: 70%; -} - -.vjs-error .vjs-text-track-settings { - display: none; -} - -.vjs-text-track-settings .vjs-modal-dialog-content { - display: table; -} - -.vjs-text-track-settings .vjs-track-settings-colors, .vjs-text-track-settings .vjs-track-settings-controls, .vjs-text-track-settings .vjs-track-settings-font { - display: table-cell; -} - -.vjs-text-track-settings .vjs-track-settings-controls { - text-align: right; - vertical-align: bottom; -} - -@supports (display: grid) { - .vjs-text-track-settings .vjs-modal-dialog-content { - display: -ms-grid; - display: grid; - -ms-grid-columns: 1fr 1fr; - grid-template-columns: 1fr 1fr; - -ms-grid-rows: 1fr; - grid-template-rows: 1fr; - padding: 20px 24px 0 24px; - } - .vjs-track-settings-controls .vjs-default-button { - margin-bottom: 20px; - } - .vjs-text-track-settings .vjs-track-settings-controls { - grid-column: 1/-1; - } - .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content, .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content, .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content { - -ms-grid-columns: 1fr; - grid-template-columns: 1fr; - } -} -.vjs-text-track-settings select { - font-size: inherit; -} - -.vjs-track-setting > select { - margin-right: 1em; - margin-bottom: 0.5em; -} - -.vjs-text-track-settings fieldset { - margin: 10px; - border: none; -} - -.vjs-text-track-settings fieldset span { - display: inline-block; - padding: 0 0.6em 0.8em; -} - -.vjs-text-track-settings fieldset span > select { - max-width: 7.3em; -} - -.vjs-text-track-settings legend { - color: #fff; - font-weight: 700; - font-size: 1.2em; -} - -.vjs-text-track-settings .vjs-label { - margin: 0 0.5em 0.5em 0; -} - -.vjs-track-settings-controls button:active, .vjs-track-settings-controls button:focus { - outline-style: solid; - outline-width: medium; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(88%, #fff), to(#73859f)); - background-image: linear-gradient(0deg, #fff 88%, #73859f 100%); -} - -.vjs-track-settings-controls button:hover { - color: rgba(43, 51, 63, 0.75); -} - -.vjs-track-settings-controls button { - background-color: #fff; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(88%, #fff), to(#73859f)); - background-image: linear-gradient(-180deg, #fff 88%, #73859f 100%); - color: #2b333f; - cursor: pointer; - border-radius: 2px; -} - -.vjs-track-settings-controls .vjs-default-button { - margin-right: 1em; -} - -.vjs-title-bar { - background: rgba(0, 0, 0, 0.9); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0, 0, 0, 0.9)), color-stop(60%, rgba(0, 0, 0, 0.7)), to(rgba(0, 0, 0, 0))); - background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0) 100%); - font-size: 1.2em; - line-height: 1.5; - -webkit-transition: opacity 0.1s; - transition: opacity 0.1s; - padding: 0.666em 1.333em 4em; - pointer-events: none; - position: absolute; - top: 0; - width: 100%; -} - -.vjs-error .vjs-title-bar { - display: none; -} - -.vjs-title-bar-description, .vjs-title-bar-title { - margin: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.vjs-title-bar-title { - font-weight: 700; - margin-bottom: 0.333em; -} - -.vjs-playing.vjs-user-inactive .vjs-title-bar { - opacity: 0; - -webkit-transition: opacity 1s; - transition: opacity 1s; -} - -.video-js .vjs-skip-forward-5 { - cursor: pointer; -} - -.video-js .vjs-skip-forward-10 { - cursor: pointer; -} - -.video-js .vjs-skip-forward-30 { - cursor: pointer; -} - -.video-js .vjs-skip-backward-5 { - cursor: pointer; -} - -.video-js .vjs-skip-backward-10 { - cursor: pointer; -} - -.video-js .vjs-skip-backward-30 { - cursor: pointer; -} - -@media print { - .video-js > :not(.vjs-tech):not(.vjs-poster) { - visibility: hidden; - } -} -.vjs-resize-manager { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: none; - z-index: -1000; -} - -.js-focus-visible .video-js :focus:not(.focus-visible) { - outline: 0; -} - -.video-js :focus:not(:focus-visible) { - outline: 0; -} - -.carousel { - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.carousel *, .carousel *:before, .carousel *:after { - -webkit-box-sizing: inherit; - box-sizing: inherit; -} - -.carousel.is-draggable { - cursor: move; - cursor: -webkit-grab; - cursor: grab; -} - -.carousel.is-dragging { - cursor: move; - cursor: -webkit-grabbing; - cursor: grabbing; -} - -.carousel__viewport { - position: relative; - overflow: hidden; - max-width: 100%; - max-height: 100%; -} - -.carousel__track { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.carousel__slide { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: var(--carousel-slide-width, 60%); - max-width: 100%; - padding: 1rem; - position: relative; - overflow-x: hidden; - overflow-y: auto; - -ms-scroll-chaining: none; - overscroll-behavior: contain; -} - -.has-dots { - margin-bottom: calc(0.5rem + 22px); -} - -.carousel__dots { - margin: 0 auto; - padding: 0; - position: absolute; - top: calc(100% + 0.5rem); - left: 0; - right: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - list-style: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.carousel__dots .carousel__dot { - margin: 0; - padding: 0; - display: block; - position: relative; - width: 22px; - height: 22px; - cursor: pointer; -} - -.carousel__dots .carousel__dot:after { - content: ""; - width: 8px; - height: 8px; - border-radius: 50%; - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - background-color: currentColor; - opacity: 0.25; - -webkit-transition: opacity 0.15s ease-in-out; - transition: opacity 0.15s ease-in-out; -} - -.carousel__dots .carousel__dot.is-selected:after { - opacity: 1; -} - -.carousel__button { - width: var(--carousel-button-width, 48px); - height: var(--carousel-button-height, 48px); - padding: 0; - border: 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - pointer-events: all; - cursor: pointer; - color: var(--carousel-button-color, currentColor); - background: var(--carousel-button-bg, transparent); - border-radius: var(--carousel-button-border-radius, 50%); - -webkit-box-shadow: var(--carousel-button-shadow, none); - box-shadow: var(--carousel-button-shadow, none); - -webkit-transition: opacity 0.15s ease; - transition: opacity 0.15s ease; -} - -.carousel__button.is-prev, .carousel__button.is-next { - position: absolute; - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); -} - -.carousel__button.is-prev { - left: 10px; -} - -.carousel__button.is-next { - right: 10px; -} - -.carousel__button[disabled] { - cursor: default; - opacity: 0.3; -} - -.carousel__button svg { - width: var(--carousel-button-svg-width, 50%); - height: var(--carousel-button-svg-height, 50%); - fill: none; - stroke: currentColor; - stroke-width: var(--carousel-button-svg-stroke-width, 1.5); - stroke-linejoin: bevel; - stroke-linecap: round; - -webkit-filter: var(--carousel-button-svg-filter, none); - filter: var(--carousel-button-svg-filter, none); - pointer-events: none; -} - -html.with-fancybox { - scroll-behavior: auto; -} - -body.compensate-for-scrollbar { - overflow: hidden !important; - -ms-touch-action: none; - touch-action: none; -} - -.fancybox__container { - position: fixed; - top: 0; - left: 0; - bottom: 0; - right: 0; - direction: ltr; - margin: 0; - padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); - -webkit-box-sizing: border-box; - box-sizing: border-box; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - color: var(--fancybox-color, #fff); - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - overflow: hidden; - z-index: 1050; - outline: none; - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - --carousel-button-width: 48px; - --carousel-button-height: 48px; - --carousel-button-svg-width: 24px; - --carousel-button-svg-height: 24px; - --carousel-button-svg-stroke-width: 2.5; - --carousel-button-svg-filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4)); -} - -.fancybox__container *, .fancybox__container *::before, .fancybox__container *::after { - -webkit-box-sizing: inherit; - box-sizing: inherit; -} - -.fancybox__container :focus { - outline: none; -} - -body:not(.is-using-mouse) .fancybox__container :focus { - -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--fancybox-accent-color, rgba(1, 210, 232, 0.94)); - box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--fancybox-accent-color, rgba(1, 210, 232, 0.94)); -} - -@media all and (min-width: 1024px) { - .fancybox__container { - --carousel-button-width:48px; - --carousel-button-height:48px; - --carousel-button-svg-width:27px; - --carousel-button-svg-height:27px; - } -} -.fancybox__backdrop { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; - background: var(--fancybox-bg, rgba(24, 24, 27, 0.92)); -} - -.fancybox__carousel { - position: relative; - -webkit-box-flex: 1; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - min-height: 0; - height: 100%; - z-index: 10; -} - -.fancybox__carousel.has-dots { - margin-bottom: calc(0.5rem + 22px); -} - -.fancybox__viewport { - position: relative; - width: 100%; - height: 100%; - overflow: visible; - cursor: default; -} - -.fancybox__track { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - height: 100%; -} - -.fancybox__slide { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: 100%; - max-width: 100%; - margin: 0; - padding: 48px 8px 8px 8px; - position: relative; - -ms-scroll-chaining: none; - overscroll-behavior: contain; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - outline: 0; - overflow: auto; - --carousel-button-width: 36px; - --carousel-button-height: 36px; - --carousel-button-svg-width: 22px; - --carousel-button-svg-height: 22px; -} - -.fancybox__slide::before, .fancybox__slide::after { - content: ""; - -webkit-box-flex: 0; - -ms-flex: 0 0 0px; - flex: 0 0 0; - margin: auto; -} - -@media all and (min-width: 1024px) { - .fancybox__slide { - padding: 64px 100px; - } -} -.fancybox__content { - margin: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); - padding: 36px; - color: var(--fancybox-content-color, #374151); - background: var(--fancybox-content-bg, #fff); - position: relative; - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - z-index: 20; -} - -.fancybox__content :focus:not(.carousel__button.is-close) { - outline: thin dotted; - -webkit-box-shadow: none; - box-shadow: none; -} - -.fancybox__caption { - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - max-width: 100%; - margin: 0; - padding: 1rem 0 0 0; - line-height: 1.375; - color: var(--fancybox-color, currentColor); - visibility: visible; - cursor: auto; - -ms-flex-negative: 0; - flex-shrink: 0; - overflow-wrap: anywhere; -} - -.is-loading .fancybox__caption { - visibility: hidden; -} - -.fancybox__container > .carousel__dots { - top: 100%; - color: var(--fancybox-color, #fff); -} - -.fancybox__nav .carousel__button { - z-index: 40; -} - -.fancybox__nav .carousel__button.is-next { - right: 8px; -} - -@media all and (min-width: 1024px) { - .fancybox__nav .carousel__button.is-next { - right: 40px; - } -} -.fancybox__nav .carousel__button.is-prev { - left: 8px; -} - -@media all and (min-width: 1024px) { - .fancybox__nav .carousel__button.is-prev { - left: 40px; - } -} -.carousel__button.is-close { - position: absolute; - top: 8px; - right: 8px; - top: calc(env(safe-area-inset-top, 0px) + 8px); - right: calc(env(safe-area-inset-right, 0px) + 8px); - z-index: 40; -} - -@media all and (min-width: 1024px) { - .carousel__button.is-close { - right: 40px; - } -} -.fancybox__content > .carousel__button.is-close { - position: absolute; - top: -40px; - right: 0; - color: var(--fancybox-color, #fff); -} - -.fancybox__no-click, .fancybox__no-click button { - pointer-events: none; -} - -.fancybox__spinner { - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - width: 50px; - height: 50px; - color: var(--fancybox-color, currentColor); -} - -.fancybox__slide .fancybox__spinner { - cursor: pointer; - z-index: 1053; -} - -.fancybox__spinner svg { - -webkit-animation: fancybox-rotate 2s linear infinite; - animation: fancybox-rotate 2s linear infinite; - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - margin: auto; - width: 100%; - height: 100%; -} - -.fancybox__spinner svg circle { - fill: none; - stroke-width: 2.75; - stroke-miterlimit: 10; - stroke-dasharray: 1, 200; - stroke-dashoffset: 0; - -webkit-animation: fancybox-dash 1.5s ease-in-out infinite; - animation: fancybox-dash 1.5s ease-in-out infinite; - stroke-linecap: round; - stroke: currentColor; -} - -@-webkit-keyframes fancybox-rotate { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes fancybox-rotate { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-webkit-keyframes fancybox-dash { - 0% { - stroke-dasharray: 1, 200; - stroke-dashoffset: 0; - } - 50% { - stroke-dasharray: 89, 200; - stroke-dashoffset: -35px; - } - 100% { - stroke-dasharray: 89, 200; - stroke-dashoffset: -124px; - } -} -@keyframes fancybox-dash { - 0% { - stroke-dasharray: 1, 200; - stroke-dashoffset: 0; - } - 50% { - stroke-dasharray: 89, 200; - stroke-dashoffset: -35px; - } - 100% { - stroke-dasharray: 89, 200; - stroke-dashoffset: -124px; - } -} -.fancybox__backdrop, .fancybox__caption, .fancybox__nav, .carousel__dots, .carousel__button.is-close { - opacity: var(--fancybox-opacity, 1); -} - -.fancybox__container.is-animated[aria-hidden=false] .fancybox__backdrop, .fancybox__container.is-animated[aria-hidden=false] .fancybox__caption, .fancybox__container.is-animated[aria-hidden=false] .fancybox__nav, .fancybox__container.is-animated[aria-hidden=false] .carousel__dots, .fancybox__container.is-animated[aria-hidden=false] .carousel__button.is-close { - -webkit-animation: 0.15s ease backwards fancybox-fadeIn; - animation: 0.15s ease backwards fancybox-fadeIn; -} - -.fancybox__container.is-animated.is-closing .fancybox__backdrop, .fancybox__container.is-animated.is-closing .fancybox__caption, .fancybox__container.is-animated.is-closing .fancybox__nav, .fancybox__container.is-animated.is-closing .carousel__dots, .fancybox__container.is-animated.is-closing .carousel__button.is-close { - -webkit-animation: 0.15s ease both fancybox-fadeOut; - animation: 0.15s ease both fancybox-fadeOut; -} - -.fancybox-fadeIn { - -webkit-animation: 0.15s ease both fancybox-fadeIn; - animation: 0.15s ease both fancybox-fadeIn; -} - -.fancybox-fadeOut { - -webkit-animation: 0.1s ease both fancybox-fadeOut; - animation: 0.1s ease both fancybox-fadeOut; -} - -.fancybox-zoomInUp { - -webkit-animation: 0.2s ease both fancybox-zoomInUp; - animation: 0.2s ease both fancybox-zoomInUp; -} - -.fancybox-zoomOutDown { - -webkit-animation: 0.15s ease both fancybox-zoomOutDown; - animation: 0.15s ease both fancybox-zoomOutDown; -} - -.fancybox-throwOutUp { - -webkit-animation: 0.15s ease both fancybox-throwOutUp; - animation: 0.15s ease both fancybox-throwOutUp; -} - -.fancybox-throwOutDown { - -webkit-animation: 0.15s ease both fancybox-throwOutDown; - animation: 0.15s ease both fancybox-throwOutDown; -} - -@-webkit-keyframes fancybox-fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -@keyframes fancybox-fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@-webkit-keyframes fancybox-fadeOut { - to { - opacity: 0; - } -} -@keyframes fancybox-fadeOut { - to { - opacity: 0; - } -} -@-webkit-keyframes fancybox-zoomInUp { - from { - -webkit-transform: scale(0.97) translate3d(0, 16px, 0); - transform: scale(0.97) translate3d(0, 16px, 0); - opacity: 0; - } - to { - -webkit-transform: scale(1) translate3d(0, 0, 0); - transform: scale(1) translate3d(0, 0, 0); - opacity: 1; - } -} -@keyframes fancybox-zoomInUp { - from { - -webkit-transform: scale(0.97) translate3d(0, 16px, 0); - transform: scale(0.97) translate3d(0, 16px, 0); - opacity: 0; - } - to { - -webkit-transform: scale(1) translate3d(0, 0, 0); - transform: scale(1) translate3d(0, 0, 0); - opacity: 1; - } -} -@-webkit-keyframes fancybox-zoomOutDown { - to { - -webkit-transform: scale(0.97) translate3d(0, 16px, 0); - transform: scale(0.97) translate3d(0, 16px, 0); - opacity: 0; - } -} -@keyframes fancybox-zoomOutDown { - to { - -webkit-transform: scale(0.97) translate3d(0, 16px, 0); - transform: scale(0.97) translate3d(0, 16px, 0); - opacity: 0; - } -} -@-webkit-keyframes fancybox-throwOutUp { - to { - -webkit-transform: translate3d(0, -30%, 0); - transform: translate3d(0, -30%, 0); - opacity: 0; - } -} -@keyframes fancybox-throwOutUp { - to { - -webkit-transform: translate3d(0, -30%, 0); - transform: translate3d(0, -30%, 0); - opacity: 0; - } -} -@-webkit-keyframes fancybox-throwOutDown { - to { - -webkit-transform: translate3d(0, 30%, 0); - transform: translate3d(0, 30%, 0); - opacity: 0; - } -} -@keyframes fancybox-throwOutDown { - to { - -webkit-transform: translate3d(0, 30%, 0); - transform: translate3d(0, 30%, 0); - opacity: 0; - } -} -.fancybox__carousel .carousel__slide { - scrollbar-width: thin; - scrollbar-color: #ccc rgba(255, 255, 255, 0.1); -} - -.fancybox__carousel .carousel__slide::-webkit-scrollbar { - width: 8px; - height: 8px; -} - -.fancybox__carousel .carousel__slide::-webkit-scrollbar-track { - background-color: rgba(255, 255, 255, 0.1); -} - -.fancybox__carousel .carousel__slide::-webkit-scrollbar-thumb { - background-color: #ccc; - border-radius: 2px; - -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2); -} - -.fancybox__carousel.is-draggable .fancybox__slide, .fancybox__carousel.is-draggable .fancybox__slide .fancybox__content { - cursor: move; - cursor: -webkit-grab; - cursor: grab; -} - -.fancybox__carousel.is-dragging .fancybox__slide, .fancybox__carousel.is-dragging .fancybox__slide .fancybox__content { - cursor: move; - cursor: -webkit-grabbing; - cursor: grabbing; -} - -.fancybox__carousel .fancybox__slide .fancybox__content { - cursor: auto; -} - -.fancybox__carousel .fancybox__slide.can-zoom_in .fancybox__content { - cursor: -webkit-zoom-in; - cursor: zoom-in; -} - -.fancybox__carousel .fancybox__slide.can-zoom_out .fancybox__content { - cursor: -webkit-zoom-out; - cursor: zoom-out; -} - -.fancybox__carousel .fancybox__slide.is-draggable .fancybox__content { - cursor: move; - cursor: -webkit-grab; - cursor: grab; -} - -.fancybox__carousel .fancybox__slide.is-dragging .fancybox__content { - cursor: move; - cursor: -webkit-grabbing; - cursor: grabbing; -} - -.fancybox__image { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-transition: none; - transition: none; -} - -.has-image .fancybox__content { - padding: 0; - background: rgba(0, 0, 0, 0); - min-height: 1px; -} - -.is-closing .has-image .fancybox__content { - overflow: visible; -} - -.has-image[data-image-fit=contain] { - overflow: visible; - -ms-touch-action: none; - touch-action: none; -} - -.has-image[data-image-fit=contain] .fancybox__content { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -ms-flex-wrap: wrap; - flex-wrap: wrap; -} - -.has-image[data-image-fit=contain] .fancybox__image { - max-width: 100%; - max-height: 100%; - -o-object-fit: contain; - object-fit: contain; -} - -.has-image[data-image-fit=contain-w] { - overflow-x: hidden; - overflow-y: auto; -} - -.has-image[data-image-fit=contain-w] .fancybox__content { - min-height: auto; -} - -.has-image[data-image-fit=contain-w] .fancybox__image { - max-width: 100%; - height: auto; -} - -.has-image[data-image-fit=cover] { - overflow: visible; - -ms-touch-action: none; - touch-action: none; -} - -.has-image[data-image-fit=cover] .fancybox__content { - width: 100%; - height: 100%; -} - -.has-image[data-image-fit=cover] .fancybox__image { - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; -} - -.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content, .fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content, .fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content { - max-width: 100%; - -ms-flex-negative: 1; - flex-shrink: 1; - min-height: 1px; - overflow: visible; -} - -.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content, .fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content { - width: 100%; - height: 80%; -} - -.fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content { - width: 960px; - height: 540px; - max-width: 100%; - max-height: 100%; -} - -.fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content, .fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content { - padding: 0; - background: rgba(24, 24, 27, 0.9); - color: #fff; -} - -.fancybox__carousel .fancybox__slide.has-map .fancybox__content { - background: #e5e3df; -} - -.fancybox__html5video, .fancybox__iframe { - border: 0; - display: block; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0); -} - -.fancybox-placeholder { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.fancybox__thumbs { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - position: relative; - padding: 0px 3px; - opacity: var(--fancybox-opacity, 1); -} - -.fancybox__container.is-animated[aria-hidden=false] .fancybox__thumbs { - -webkit-animation: 0.15s ease-in backwards fancybox-fadeIn; - animation: 0.15s ease-in backwards fancybox-fadeIn; -} - -.fancybox__container.is-animated.is-closing .fancybox__thumbs { - opacity: 0; -} - -.fancybox__thumbs .carousel__slide { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: var(--fancybox-thumbs-width, 96px); - margin: 0; - padding: 8px 3px; - -webkit-box-sizing: content-box; - box-sizing: content-box; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - overflow: visible; - cursor: pointer; -} - -.fancybox__thumbs .carousel__slide .fancybox__thumb::after { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - border-width: 5px; - border-style: solid; - border-color: var(--fancybox-accent-color, rgba(34, 213, 233, 0.96)); - opacity: 0; - -webkit-transition: opacity 0.15s ease; - transition: opacity 0.15s ease; - border-radius: var(--fancybox-thumbs-border-radius, 4px); -} - -.fancybox__thumbs .carousel__slide.is-nav-selected .fancybox__thumb::after { - opacity: 0.92; -} - -.fancybox__thumbs .carousel__slide > * { - pointer-events: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.fancybox__thumb { - position: relative; - width: 100%; - padding-top: calc(100% / (var(--fancybox-thumbs-ratio, 1.5))); - background-size: cover; - background-position: center center; - background-color: rgba(255, 255, 255, 0.1); - background-repeat: no-repeat; - border-radius: var(--fancybox-thumbs-border-radius, 4px); -} - -.fancybox__toolbar { - position: absolute; - top: 0; - right: 0; - left: 0; - z-index: 20; - background: -webkit-gradient(linear, left bottom, left top, from(hsla(0deg, 0%, 0%, 0)), color-stop(8.1%, hsla(0deg, 0%, 0%, 0.006)), color-stop(15.5%, hsla(0deg, 0%, 0%, 0.021)), color-stop(22.5%, hsla(0deg, 0%, 0%, 0.046)), color-stop(29%, hsla(0deg, 0%, 0%, 0.077)), color-stop(35.3%, hsla(0deg, 0%, 0%, 0.114)), color-stop(41.2%, hsla(0deg, 0%, 0%, 0.155)), color-stop(47.1%, hsla(0deg, 0%, 0%, 0.198)), color-stop(52.9%, hsla(0deg, 0%, 0%, 0.242)), color-stop(58.8%, hsla(0deg, 0%, 0%, 0.285)), color-stop(64.7%, hsla(0deg, 0%, 0%, 0.326)), color-stop(71%, hsla(0deg, 0%, 0%, 0.363)), color-stop(77.5%, hsla(0deg, 0%, 0%, 0.394)), color-stop(84.5%, hsla(0deg, 0%, 0%, 0.419)), color-stop(91.9%, hsla(0deg, 0%, 0%, 0.434)), to(hsla(0deg, 0%, 0%, 0.44))); - background: linear-gradient(to top, hsla(0deg, 0%, 0%, 0) 0%, hsla(0deg, 0%, 0%, 0.006) 8.1%, hsla(0deg, 0%, 0%, 0.021) 15.5%, hsla(0deg, 0%, 0%, 0.046) 22.5%, hsla(0deg, 0%, 0%, 0.077) 29%, hsla(0deg, 0%, 0%, 0.114) 35.3%, hsla(0deg, 0%, 0%, 0.155) 41.2%, hsla(0deg, 0%, 0%, 0.198) 47.1%, hsla(0deg, 0%, 0%, 0.242) 52.9%, hsla(0deg, 0%, 0%, 0.285) 58.8%, hsla(0deg, 0%, 0%, 0.326) 64.7%, hsla(0deg, 0%, 0%, 0.363) 71%, hsla(0deg, 0%, 0%, 0.394) 77.5%, hsla(0deg, 0%, 0%, 0.419) 84.5%, hsla(0deg, 0%, 0%, 0.434) 91.9%, hsla(0deg, 0%, 0%, 0.44) 100%); - padding: 0; - -ms-touch-action: none; - touch-action: none; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - --carousel-button-svg-width: 20px; - --carousel-button-svg-height: 20px; - opacity: var(--fancybox-opacity, 1); - text-shadow: var(--fancybox-toolbar-text-shadow, 1px 1px 1px rgba(0, 0, 0, 0.4)); -} - -@media all and (min-width: 1024px) { - .fancybox__toolbar { - padding: 8px; - } -} -.fancybox__container.is-animated[aria-hidden=false] .fancybox__toolbar { - -webkit-animation: 0.15s ease-in backwards fancybox-fadeIn; - animation: 0.15s ease-in backwards fancybox-fadeIn; -} - -.fancybox__container.is-animated.is-closing .fancybox__toolbar { - opacity: 0; -} - -.fancybox__toolbar__items { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.fancybox__toolbar__items--left { - margin-right: auto; -} - -.fancybox__toolbar__items--center { - position: absolute; - left: 50%; - -webkit-transform: translateX(-50%); - -ms-transform: translateX(-50%); - transform: translateX(-50%); -} - -.fancybox__toolbar__items--right { - margin-left: auto; -} - -@media (max-width: 640px) { - .fancybox__toolbar__items--center:not(:last-child) { - display: none; - } -} -.fancybox__counter { - min-width: 72px; - padding: 0 10px; - line-height: var(--carousel-button-height, 48px); - text-align: center; - font-size: 17px; - font-variant-numeric: tabular-nums; - -webkit-font-smoothing: subpixel-antialiased; -} - -.fancybox__progress { - background: var(--fancybox-accent-color, rgba(34, 213, 233, 0.96)); - height: 3px; - left: 0; - position: absolute; - right: 0; - top: 0; - -webkit-transform: scaleX(0); - -ms-transform: scaleX(0); - transform: scaleX(0); - -webkit-transform-origin: 0; - -ms-transform-origin: 0; - transform-origin: 0; - -webkit-transition-property: -webkit-transform; - transition-property: -webkit-transform; - transition-property: transform; - transition-property: transform, -webkit-transform; - -webkit-transition-timing-function: linear; - transition-timing-function: linear; - z-index: 30; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.fancybox__container:-webkit-full-screen::backdrop { - opacity: 0; -} - -.fancybox__container:-ms-fullscreen::backdrop { - opacity: 0; -} - -.fancybox__container:fullscreen::-webkit-backdrop { - opacity: 0; -} - -.fancybox__container:fullscreen::backdrop { - opacity: 0; -} - -.fancybox__button--fullscreen g:nth-child(2) { - display: none; -} - -.fancybox__container:-webkit-full-screen .fancybox__button--fullscreen g:nth-child(1) { - display: none; -} - -.fancybox__container:-ms-fullscreen .fancybox__button--fullscreen g:nth-child(1) { - display: none; -} - -.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(1) { - display: none; -} - -.fancybox__container:-webkit-full-screen .fancybox__button--fullscreen g:nth-child(2) { - display: block; -} - -.fancybox__container:-ms-fullscreen .fancybox__button--fullscreen g:nth-child(2) { - display: block; -} - -.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(2) { - display: block; -} - -.fancybox__button--slideshow g:nth-child(2) { - display: none; -} - -.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(1) { - display: none; -} - -.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(2) { - display: block; -} -/*# sourceMappingURL=vendor.css.map */ \ No newline at end of file +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;color:inherit;text-decoration:none}p{padding:0;margin:0}li,ul{margin:0;padding:0;list-style:none}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}@font-face{font-family:swiper-icons;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff;--swiper-navigation-size:44px}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-pointer-events{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-pointer-events.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:transform,height,-webkit-transform}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:"";-ms-flex-negative:0;flex-shrink:0;-webkit-box-ordinal-group:10000;-ms-flex-order:9999;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:"";position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - var(--swiper-navigation-size)/ 2);z-index:10;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:opacity .3s;transition:opacity .3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity,.2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity,1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:top .2s,-webkit-transform .2s;transition:transform .2s,top .2s,-webkit-transform .2s}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:left .2s,-webkit-transform .2s;transition:transform .2s,left .2s,-webkit-transform .2s}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:right .2s,-webkit-transform .2s;transition:transform .2s,right .2s,-webkit-transform .2s}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:1s linear infinite swiper-preloader-spin;animation:1s linear infinite swiper-preloader-spin;-webkit-box-sizing:border-box;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-next+.swiper-slide,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:"";background:#000;position:absolute;left:0;top:0;bottom:0;right:0;-webkit-filter:blur(50px);filter:blur(50px)}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;-webkit-transition-property:opacity,height,-webkit-transform;transition-property:transform,opacity,height,-webkit-transform}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}.vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:center;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{-webkit-filter:drop-shadow(0 0 .25em #fff);filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\f109"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\f10a"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\f10b"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\f10c"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\f10e"}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:"\f10f"}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:"\f110"}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:"\f111"}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:"\f112"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\f113"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\f114"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\f115"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\f116"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\f117"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\f118"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\f119"}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:"\f11a"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\f11b"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:"\f11c"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:"\f11d"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:"\f11e"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:"\f11f"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:"\f120"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:"\f121"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\f122"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\f123"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\f124"}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:"\f125"}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:"\f126"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\f127"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\f128"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\f129"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\f12a"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\f12b"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\f12c"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\f12d"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\f12e"}.video-js{display:inline-block;vertical-align:top;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{-webkit-box-sizing:inherit;box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:rgba(0,0,0,.7);padding:.5em;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:rgba(43,51,63,.7);border-radius:.3em;-webkit-transition:.4s;transition:.4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:rgba(115,133,159,.5);-webkit-transition:none;transition:none}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;-webkit-transition:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.8)),to(rgba(255,255,255,0)));background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{-webkit-box-sizing:border-box;box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{-webkit-box-sizing:border-box;box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{-webkit-transition:.4s;transition:.4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;-webkit-transition:.4s;transition:.4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:rgba(43,51,63,.7)}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:-webkit-box;display:-ms-flexbox;display:flex;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;-webkit-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;-webkit-box-flex:0;-ms-flex:none;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;-webkit-box-flex:1;-ms-flex:auto;flex:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:4em;-ms-touch-action:none;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.video-js .vjs-progress-holder{-webkit-box-flex:1;-ms-flex:auto;flex:auto;-webkit-transition:.2s;transition:.2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;-webkit-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;-webkit-box-flex:0;-ms-flex:none;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:-webkit-box;display:-ms-flexbox;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{-webkit-transition:width 1s;transition:width 1s;display:-webkit-box;display:-ms-flexbox;display:flex}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;-webkit-transition:visibility .1s,opacity .1s,height .1s,width .1s,left,top;transition:visibility .1s,opacity .1s,height .1s,width .1s,left,top}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;-webkit-transition:left;transition:left}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;-webkit-transition:width .1s;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;-webkit-transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{-webkit-transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:rgba(0,0,0,.8)}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-flex:1;-ms-flex:auto;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-box-flex:0;-ms-flex:none;flex:none;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{-webkit-box-flex:0;-ms-flex:none;flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{-webkit-box-flex:0;-ms-flex:none;flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;-webkit-box-flex:0;-ms-flex:none;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;-webkit-box-flex:0;-ms-flex:none;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);-webkit-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:0s linear .3s forwards vjs-spinner-show;animation:0s linear .3s forwards vjs-spinner-show}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-.6em;-webkit-box-sizing:inherit;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:#fff transparent transparent}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:1.1s cubic-bezier(.6,.2,0,.8) infinite vjs-spinner-spin,1.1s linear infinite vjs-spinner-fade;animation:1.1s cubic-bezier(.6,.2,0,.8) infinite vjs-spinner-spin,1.1s linear infinite vjs-spinner-fade}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-fade{0%,100%,20%,60%{border-top-color:#73859f}35%{border-top-color:#fff}}@keyframes vjs-spinner-fade{0%,100%,20%,60%{border-top-color:#73859f}35%{border-top-color:#fff}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\f10c";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \f12e";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{-webkit-box-flex:1;-ms-flex:auto;flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;-ms-grid-rows:1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{-ms-grid-columns:1fr;grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(88%,#fff),to(#73859f));background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(88%,#fff),to(#73859f));background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(0,0,0,.9)),color-stop(60%,rgba(0,0,0,.7)),to(rgba(0,0,0,0)));background:linear-gradient(180deg,rgba(0,0,0,.9) 0,rgba(0,0,0,.7) 60%,rgba(0,0,0,0) 100%);font-size:1.2em;line-height:1.5;-webkit-transition:opacity .1s;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;-webkit-transition:opacity 1s;transition:opacity 1s}.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-forward-5{cursor:pointer}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible),.video-js :focus:not(:focus-visible){outline:0}.carousel{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.carousel *,.carousel :after,.carousel :before{-webkit-box-sizing:inherit;box-sizing:inherit}.carousel.is-draggable{cursor:move;cursor:-webkit-grab;cursor:grab}.carousel.is-dragging{cursor:move;cursor:-webkit-grabbing;cursor:grabbing}.carousel__viewport{position:relative;overflow:hidden;max-width:100%;max-height:100%}.carousel__track{display:-webkit-box;display:-ms-flexbox;display:flex}.carousel__slide{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:var(--carousel-slide-width,60%);max-width:100%;padding:1rem;position:relative;overflow-x:hidden;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}.has-dots{margin-bottom:calc(.5rem + 22px)}.carousel__dots{margin:0 auto;padding:0;position:absolute;top:calc(100% + .5rem);left:0;right:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;list-style:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.carousel__dots .carousel__dot{margin:0;padding:0;display:block;position:relative;width:22px;height:22px;cursor:pointer}.carousel__dots .carousel__dot:after{content:"";width:8px;height:8px;border-radius:50%;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:currentColor;opacity:.25;-webkit-transition:opacity .15s ease-in-out;transition:opacity .15s ease-in-out}.carousel__dots .carousel__dot.is-selected:after{opacity:1}.carousel__button{width:var(--carousel-button-width,48px);height:var(--carousel-button-height,48px);padding:0;border:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:all;cursor:pointer;color:var(--carousel-button-color,currentColor);background:var(--carousel-button-bg,transparent);border-radius:var(--carousel-button-border-radius,50%);-webkit-box-shadow:var(--carousel-button-shadow,none);box-shadow:var(--carousel-button-shadow,none);-webkit-transition:opacity .15s;transition:opacity .15s}.carousel__button.is-next,.carousel__button.is-prev{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.carousel__button.is-prev{left:10px}.carousel__button.is-next{right:10px}.carousel__button[disabled]{cursor:default;opacity:.3}.carousel__button svg{width:var(--carousel-button-svg-width,50%);height:var(--carousel-button-svg-height,50%);fill:none;stroke:currentColor;stroke-width:var(--carousel-button-svg-stroke-width,1.5);stroke-linejoin:bevel;stroke-linecap:round;-webkit-filter:var(--carousel-button-svg-filter, none);filter:var(--carousel-button-svg-filter, none);pointer-events:none}html.with-fancybox{scroll-behavior:auto}body.compensate-for-scrollbar{overflow:hidden!important;-ms-touch-action:none;touch-action:none}.fancybox__container{position:fixed;top:0;left:0;bottom:0;right:0;direction:ltr;margin:0;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;color:var(--fancybox-color,#fff);-webkit-tap-highlight-color:transparent;overflow:hidden;z-index:1050;outline:0;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;--carousel-button-width:48px;--carousel-button-height:48px;--carousel-button-svg-width:24px;--carousel-button-svg-height:24px;--carousel-button-svg-stroke-width:2.5;--carousel-button-svg-filter:drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4))}.fancybox__container *,.fancybox__container ::after,.fancybox__container ::before{-webkit-box-sizing:inherit;box-sizing:inherit}.fancybox__container :focus{outline:0}body:not(.is-using-mouse) .fancybox__container :focus{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px var(--fancybox-accent-color,rgba(1,210,232,.94));box-shadow:0 0 0 1px #fff,0 0 0 2px var(--fancybox-accent-color,rgba(1,210,232,.94))}.fancybox__backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:var(--fancybox-bg,rgba(24,24,27,.92))}.fancybox__carousel{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;min-height:0;height:100%;z-index:10}.fancybox__carousel.has-dots{margin-bottom:calc(.5rem + 22px)}.fancybox__viewport{position:relative;width:100%;height:100%;overflow:visible;cursor:default}.fancybox__track{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%}.fancybox__slide{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:100%;max-width:100%;margin:0;padding:48px 8px 8px;position:relative;-ms-scroll-chaining:none;overscroll-behavior:contain;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline:0;overflow:auto;--carousel-button-width:36px;--carousel-button-height:36px;--carousel-button-svg-width:22px;--carousel-button-svg-height:22px}.fancybox__slide::after,.fancybox__slide::before{content:"";-webkit-box-flex:0;-ms-flex:0 0 0px;flex:0 0 0;margin:auto}@media all and (min-width:1024px){.fancybox__container{--carousel-button-width:48px;--carousel-button-height:48px;--carousel-button-svg-width:27px;--carousel-button-svg-height:27px}.fancybox__slide{padding:64px 100px}}.fancybox__content{margin:0 env(safe-area-inset-right,0) 0 env(safe-area-inset-left,0);padding:36px;color:var(--fancybox-content-color,#374151);background:var(--fancybox-content-bg,#fff);position:relative;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:20}.fancybox__content :focus:not(.carousel__button.is-close){outline:dotted thin;-webkit-box-shadow:none;box-shadow:none}.fancybox__caption{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;max-width:100%;margin:0;padding:1rem 0 0;line-height:1.375;color:var(--fancybox-color,currentColor);visibility:visible;cursor:auto;-ms-flex-negative:0;flex-shrink:0;overflow-wrap:anywhere}.is-loading .fancybox__caption{visibility:hidden}.fancybox__container>.carousel__dots{top:100%;color:var(--fancybox-color,#fff)}.fancybox__nav .carousel__button{z-index:40}.fancybox__nav .carousel__button.is-next{right:8px}.fancybox__nav .carousel__button.is-prev{left:8px}.carousel__button.is-close{position:absolute;top:8px;right:8px;top:calc(env(safe-area-inset-top,0px) + 8px);right:calc(env(safe-area-inset-right,0px) + 8px);z-index:40}@media all and (min-width:1024px){.fancybox__nav .carousel__button.is-next{right:40px}.fancybox__nav .carousel__button.is-prev{left:40px}.carousel__button.is-close{right:40px}}.fancybox__content>.carousel__button.is-close{position:absolute;top:-40px;right:0;color:var(--fancybox-color,#fff)}.fancybox__no-click,.fancybox__no-click button{pointer-events:none}.fancybox__spinner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:50px;height:50px;color:var(--fancybox-color,currentColor)}.fancybox__slide .fancybox__spinner{cursor:pointer;z-index:1053}.fancybox__spinner svg{-webkit-animation:2s linear infinite fancybox-rotate;animation:2s linear infinite fancybox-rotate;-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;width:100%;height:100%}.fancybox__spinner svg circle{fill:none;stroke-width:2.75;stroke-miterlimit:10;stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:1.5s ease-in-out infinite fancybox-dash;animation:1.5s ease-in-out infinite fancybox-dash;stroke-linecap:round;stroke:currentColor}@-webkit-keyframes fancybox-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fancybox-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes fancybox-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes fancybox-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.carousel__button.is-close,.carousel__dots,.fancybox__backdrop,.fancybox__caption,.fancybox__nav{opacity:var(--fancybox-opacity,1)}.fancybox__container.is-animated[aria-hidden=false] .carousel__button.is-close,.fancybox__container.is-animated[aria-hidden=false] .carousel__dots,.fancybox__container.is-animated[aria-hidden=false] .fancybox__backdrop,.fancybox__container.is-animated[aria-hidden=false] .fancybox__caption,.fancybox__container.is-animated[aria-hidden=false] .fancybox__nav{-webkit-animation:.15s backwards fancybox-fadeIn;animation:.15s backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .carousel__button.is-close,.fancybox__container.is-animated.is-closing .carousel__dots,.fancybox__container.is-animated.is-closing .fancybox__backdrop,.fancybox__container.is-animated.is-closing .fancybox__caption,.fancybox__container.is-animated.is-closing .fancybox__nav{-webkit-animation:.15s both fancybox-fadeOut;animation:.15s both fancybox-fadeOut}.fancybox-fadeIn{-webkit-animation:.15s both fancybox-fadeIn;animation:.15s both fancybox-fadeIn}.fancybox-fadeOut{-webkit-animation:.1s both fancybox-fadeOut;animation:.1s both fancybox-fadeOut}.fancybox-zoomInUp{-webkit-animation:.2s both fancybox-zoomInUp;animation:.2s both fancybox-zoomInUp}.fancybox-zoomOutDown{-webkit-animation:.15s both fancybox-zoomOutDown;animation:.15s both fancybox-zoomOutDown}.fancybox-throwOutUp{-webkit-animation:.15s both fancybox-throwOutUp;animation:.15s both fancybox-throwOutUp}.fancybox-throwOutDown{-webkit-animation:.15s both fancybox-throwOutDown;animation:.15s both fancybox-throwOutDown}@-webkit-keyframes fancybox-fadeIn{from{opacity:0}to{opacity:1}}@keyframes fancybox-fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fancybox-fadeOut{to{opacity:0}}@keyframes fancybox-fadeOut{to{opacity:0}}@-webkit-keyframes fancybox-zoomInUp{from{-webkit-transform:scale(.97) translate3d(0,16px,0);transform:scale(.97) translate3d(0,16px,0);opacity:0}to{-webkit-transform:scale(1) translate3d(0,0,0);transform:scale(1) translate3d(0,0,0);opacity:1}}@keyframes fancybox-zoomInUp{from{-webkit-transform:scale(.97) translate3d(0,16px,0);transform:scale(.97) translate3d(0,16px,0);opacity:0}to{-webkit-transform:scale(1) translate3d(0,0,0);transform:scale(1) translate3d(0,0,0);opacity:1}}@-webkit-keyframes fancybox-zoomOutDown{to{-webkit-transform:scale(.97) translate3d(0,16px,0);transform:scale(.97) translate3d(0,16px,0);opacity:0}}@keyframes fancybox-zoomOutDown{to{-webkit-transform:scale(.97) translate3d(0,16px,0);transform:scale(.97) translate3d(0,16px,0);opacity:0}}@-webkit-keyframes fancybox-throwOutUp{to{-webkit-transform:translate3d(0,-30%,0);transform:translate3d(0,-30%,0);opacity:0}}@keyframes fancybox-throwOutUp{to{-webkit-transform:translate3d(0,-30%,0);transform:translate3d(0,-30%,0);opacity:0}}@-webkit-keyframes fancybox-throwOutDown{to{-webkit-transform:translate3d(0,30%,0);transform:translate3d(0,30%,0);opacity:0}}@keyframes fancybox-throwOutDown{to{-webkit-transform:translate3d(0,30%,0);transform:translate3d(0,30%,0);opacity:0}}.fancybox__carousel .carousel__slide{scrollbar-width:thin;scrollbar-color:#ccc rgba(255,255,255,.1)}.fancybox__carousel .carousel__slide::-webkit-scrollbar{width:8px;height:8px}.fancybox__carousel .carousel__slide::-webkit-scrollbar-track{background-color:rgba(255,255,255,.1)}.fancybox__carousel .carousel__slide::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:2px;-webkit-box-shadow:inset 0 0 4px rgba(0,0,0,.2);box-shadow:inset 0 0 4px rgba(0,0,0,.2)}.fancybox__carousel.is-draggable .fancybox__slide,.fancybox__carousel.is-draggable .fancybox__slide .fancybox__content{cursor:move;cursor:-webkit-grab;cursor:grab}.fancybox__carousel.is-dragging .fancybox__slide,.fancybox__carousel.is-dragging .fancybox__slide .fancybox__content{cursor:move;cursor:-webkit-grabbing;cursor:grabbing}.fancybox__carousel .fancybox__slide .fancybox__content{cursor:auto}.fancybox__carousel .fancybox__slide.can-zoom_in .fancybox__content{cursor:-webkit-zoom-in;cursor:zoom-in}.fancybox__carousel .fancybox__slide.can-zoom_out .fancybox__content{cursor:-webkit-zoom-out;cursor:zoom-out}.fancybox__carousel .fancybox__slide.is-draggable .fancybox__content{cursor:move;cursor:-webkit-grab;cursor:grab}.fancybox__carousel .fancybox__slide.is-dragging .fancybox__content{cursor:move;cursor:-webkit-grabbing;cursor:grabbing}.fancybox__image{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:none;transition:none}.has-image .fancybox__content{padding:0;background:rgba(0,0,0,0);min-height:1px}.is-closing .has-image .fancybox__content{overflow:visible}.has-image[data-image-fit=contain]{overflow:visible;-ms-touch-action:none;touch-action:none}.has-image[data-image-fit=contain] .fancybox__content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.has-image[data-image-fit=contain] .fancybox__image{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.has-image[data-image-fit=contain-w]{overflow-x:hidden;overflow-y:auto}.has-image[data-image-fit=contain-w] .fancybox__content{min-height:auto}.has-image[data-image-fit=contain-w] .fancybox__image{max-width:100%;height:auto}.has-image[data-image-fit=cover]{overflow:visible;-ms-touch-action:none;touch-action:none}.has-image[data-image-fit=cover] .fancybox__content{width:100%;height:100%}.has-image[data-image-fit=cover] .fancybox__image{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content,.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content,.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content,.fancybox__carousel .fancybox__slide.has-video .fancybox__content{max-width:100%;-ms-flex-negative:1;flex-shrink:1;min-height:1px;overflow:visible}.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content,.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content{width:100%;height:80%}.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content,.fancybox__carousel .fancybox__slide.has-video .fancybox__content{width:960px;height:540px;max-width:100%;max-height:100%}.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content,.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content,.fancybox__carousel .fancybox__slide.has-video .fancybox__content{padding:0;background:rgba(24,24,27,.9);color:#fff}.fancybox__carousel .fancybox__slide.has-map .fancybox__content{background:#e5e3df}.fancybox__html5video,.fancybox__iframe{border:0;display:block;height:100%;width:100%;background:rgba(0,0,0,0)}.fancybox-placeholder{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fancybox__thumbs{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;position:relative;padding:0 3px;opacity:var(--fancybox-opacity,1)}.fancybox__container.is-animated[aria-hidden=false] .fancybox__thumbs{-webkit-animation:.15s ease-in backwards fancybox-fadeIn;animation:.15s ease-in backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .fancybox__thumbs{opacity:0}.fancybox__thumbs .carousel__slide{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:var(--fancybox-thumbs-width,96px);margin:0;padding:8px 3px;-webkit-box-sizing:content-box;box-sizing:content-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:visible;cursor:pointer}.fancybox__thumbs .carousel__slide .fancybox__thumb::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-width:5px;border-style:solid;border-color:var(--fancybox-accent-color,rgba(34,213,233,.96));opacity:0;-webkit-transition:opacity .15s;transition:opacity .15s;border-radius:var(--fancybox-thumbs-border-radius,4px)}.fancybox__thumbs .carousel__slide.is-nav-selected .fancybox__thumb::after{opacity:.92}.fancybox__thumbs .carousel__slide>*{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox__thumb{position:relative;width:100%;padding-top:calc(100% / (var(--fancybox-thumbs-ratio,1.5)));background-size:cover;background-position:center center;background-color:rgba(255,255,255,.1);background-repeat:no-repeat;border-radius:var(--fancybox-thumbs-border-radius,4px)}.fancybox__toolbar{position:absolute;top:0;right:0;left:0;z-index:20;background:-webkit-gradient(linear,left bottom,left top,from(hsla(0deg,0%,0%,0)),color-stop(8.1%,hsla(0deg,0%,0%,.006)),color-stop(15.5%,hsla(0deg,0%,0%,.021)),color-stop(22.5%,hsla(0deg,0%,0%,.046)),color-stop(29%,hsla(0deg,0%,0%,.077)),color-stop(35.3%,hsla(0deg,0%,0%,.114)),color-stop(41.2%,hsla(0deg,0%,0%,.155)),color-stop(47.1%,hsla(0deg,0%,0%,.198)),color-stop(52.9%,hsla(0deg,0%,0%,.242)),color-stop(58.8%,hsla(0deg,0%,0%,.285)),color-stop(64.7%,hsla(0deg,0%,0%,.326)),color-stop(71%,hsla(0deg,0%,0%,.363)),color-stop(77.5%,hsla(0deg,0%,0%,.394)),color-stop(84.5%,hsla(0deg,0%,0%,.419)),color-stop(91.9%,hsla(0deg,0%,0%,.434)),to(hsla(0deg,0%,0%,.44)));background:linear-gradient(to top,hsla(0deg,0%,0%,0) 0,hsla(0deg,0%,0%,.006) 8.1%,hsla(0deg,0%,0%,.021) 15.5%,hsla(0deg,0%,0%,.046) 22.5%,hsla(0deg,0%,0%,.077) 29%,hsla(0deg,0%,0%,.114) 35.3%,hsla(0deg,0%,0%,.155) 41.2%,hsla(0deg,0%,0%,.198) 47.1%,hsla(0deg,0%,0%,.242) 52.9%,hsla(0deg,0%,0%,.285) 58.8%,hsla(0deg,0%,0%,.326) 64.7%,hsla(0deg,0%,0%,.363) 71%,hsla(0deg,0%,0%,.394) 77.5%,hsla(0deg,0%,0%,.419) 84.5%,hsla(0deg,0%,0%,.434) 91.9%,hsla(0deg,0%,0%,.44) 100%);padding:0;-ms-touch-action:none;touch-action:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;--carousel-button-svg-width:20px;--carousel-button-svg-height:20px;opacity:var(--fancybox-opacity,1);text-shadow:var(--fancybox-toolbar-text-shadow,1px 1px 1px rgba(0,0,0,.4))}@media all and (min-width:1024px){.fancybox__toolbar{padding:8px}}.fancybox__container.is-animated[aria-hidden=false] .fancybox__toolbar{-webkit-animation:.15s ease-in backwards fancybox-fadeIn;animation:.15s ease-in backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .fancybox__toolbar{opacity:0}.fancybox__toolbar__items{display:-webkit-box;display:-ms-flexbox;display:flex}.fancybox__toolbar__items--left{margin-right:auto}.fancybox__toolbar__items--center{position:absolute;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.fancybox__toolbar__items--right{margin-left:auto}@media (max-width:640px){.fancybox__toolbar__items--center:not(:last-child){display:none}}.fancybox__counter{min-width:72px;padding:0 10px;line-height:var(--carousel-button-height,48px);text-align:center;font-size:17px;font-variant-numeric:tabular-nums;-webkit-font-smoothing:subpixel-antialiased}.fancybox__progress{background:var(--fancybox-accent-color,rgba(34,213,233,.96));height:3px;left:0;position:absolute;right:0;top:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0;-webkit-transition-property:-webkit-transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:linear;transition-timing-function:linear;z-index:30;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox__container:-webkit-full-screen::backdrop{opacity:0}.fancybox__container:-ms-fullscreen::backdrop{opacity:0}.fancybox__container:fullscreen::-webkit-backdrop{opacity:0}.fancybox__container:fullscreen::backdrop{opacity:0}.fancybox__button--fullscreen g:nth-child(2){display:none}.fancybox__container:-webkit-full-screen .fancybox__button--fullscreen g:nth-child(1){display:none}.fancybox__container:-ms-fullscreen .fancybox__button--fullscreen g:nth-child(1){display:none}.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(1){display:none}.fancybox__container:-webkit-full-screen .fancybox__button--fullscreen g:nth-child(2){display:block}.fancybox__container:-ms-fullscreen .fancybox__button--fullscreen g:nth-child(2){display:block}.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(2){display:block}.fancybox__button--slideshow g:nth-child(2),.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(1){display:none}.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(2){display:block} \ No newline at end of file diff --git a/app/css/vendor.css.map b/app/css/vendor.css.map deleted file mode 100644 index 75581c1..0000000 --- a/app/css/vendor.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/normalize.css","vendor.css","../../node_modules/swiper/swiper-bundle.min.css","../../node_modules/video.js/dist/video-js.min.css","../../node_modules/@fancyapps/ui/dist/fancybox.css"],"names":[],"mappings":"AAAA,2EAAA;AAEA;+EAAA;AAGA;;;EAAA;AAKA;EACC,iBAAA;EACA,MAAA;EACA,8BAAA;EACA,MAAA;ACFD;;ADKA;+EAAA;AAGA;;EAAA;AAIA;EACC,SAAA;ACJD;;ADOA;;EAAA;AAIA;EACC,cAAA;ACLD;;ADQA;;;EAAA;AAKA;EACC,cAAA;EACA,gBAAA;ACND;;ADSA;+EAAA;AAGA;;;EAAA;AAKA;EACC,+BAAA;EAAA,uBAAA;EACA,MAAA;EACA,SAAA;EACA,MAAA;EACA,iBAAA;EACA,MAAA;ACRD;;ADWA;;;EAAA;AAKA;EACC,iCAAA;EACA,MAAA;EACA,cAAA;EACA,MAAA;ACTD;;ADYA;+EAAA;AAGA;;EAAA;AAIA;EACC,6BAAA;EACA,cAAA;EACA,qBAAA;ACXD;;ADcA;EACC,UAAA;EACA,SAAA;ACXD;;ADcA;;EAEC,SAAA;EACA,UAAA;EACA,gBAAA;ACXD;;ADcA;;;EAAA;AAKA;EACC,mBAAA;EACA,MAAA;EACA,0BAAA;EACA,MAAA;EACA,yCAAA;EAAA,iCAAA;EACA,MAAA;ACZD;;ADeA;;EAAA;AAIA;;EAEC,mBAAA;ACbD;;ADgBA;;;EAAA;AAKA;;;EAGC,iCAAA;EACA,MAAA;EACA,cAAA;EACA,MAAA;ACdD;;ADiBA;;EAAA;AAIA;EACC,cAAA;ACfD;;ADkBA;;;EAAA;AAKA;;EAEC,cAAA;EACA,cAAA;EACA,kBAAA;EACA,wBAAA;AChBD;;ADmBA;EACC,eAAA;AChBD;;ADmBA;EACC,WAAA;AChBD;;ADmBA;+EAAA;AAGA;;EAAA;AAIA;EACC,kBAAA;AClBD;;ADqBA;+EAAA;AAGA;;;EAAA;AAKA;;;;;EAKC,oBAAA;EACA,MAAA;EACA,eAAA;EACA,MAAA;EACA,iBAAA;EACA,MAAA;EACA,SAAA;EACA,MAAA;ACpBD;;ADuBA;;;EAAA;AAKA;;EAEC,MAAA;EACA,iBAAA;ACrBD;;ADwBA;;;EAAA;AAKA;;EAEC,MAAA;EACA,oBAAA;ACtBD;;ADyBA;;EAAA;AAIA;;;;EAIC,0BAAA;ACvBD;;AD0BA;;EAAA;AAIA;;;;EAIC,kBAAA;EACA,UAAA;ACxBD;;AD2BA;;EAAA;AAIA;;;;EAIC,8BAAA;ACzBD;;AD4BA;;EAAA;AAIA;EACC,8BAAA;AC1BD;;AD6BA;;;;;EAAA;AAOA;EACC,8BAAA;EAAA,sBAAA;EACA,MAAA;EACA,cAAA;EACA,MAAA;EACA,cAAA;EACA,MAAA;EACA,eAAA;EACA,MAAA;EACA,UAAA;EACA,MAAA;EACA,mBAAA;EACA,MAAA;AC3BD;;AD8BA;;EAAA;AAIA;EACC,wBAAA;AC5BD;;AD+BA;;EAAA;AAIA;EACC,cAAA;AC7BD;;ADgCA;;;EAAA;AAKA;;EAEC,8BAAA;EAAA,sBAAA;EACA,MAAA;EACA,UAAA;EACA,MAAA;AC9BD;;ADiCA;;EAAA;AAIA;;EAEC,YAAA;AC/BD;;ADkCA;;;EAAA;AAKA;EACC,6BAAA;EACA,MAAA;EACA,oBAAA;EACA,MAAA;AChCD;;ADmCA;;EAAA;AAIA;EACC,wBAAA;ACjCD;;ADoCA;;;EAAA;AAKA;EACC,0BAAA;EACA,MAAA;EACA,aAAA;EACA,MAAA;AClCD;;ADqCA;+EAAA;AAGA;;EAAA;AAIA;EACC,cAAA;ACpCD;;ADuCA;;EAAA;AAIA;EACC,kBAAA;ACrCD;;ADwCA;+EAAA;AAGA;;EAAA;AAIA;EACC,aAAA;ACvCD;;AD0CA;;EAAA;AAIA;EACC,aAAA;ACxCD;;AC/VA;;;;;;;;;;EAAA;AAYA;EAAW,yBAAA;EAAyB,6rEAAA;EAA6rE,gBAAA;EAAgB,kBAAA;ADqWjvE;ACrWmwE;EAAM,4BAAA;ADwWzwE;;ACxWsyE;EAAQ,iBAAA;EAAiB,kBAAA;EAAkB,kBAAA;EAAkB,gBAAA;EAAgB,gBAAA;EAAgB,UAAA;EAAU,UAAA;ADkX74E;;AClXu5E;EAAiC,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;ADsXx7E;;ACtX88E;EAAgB,kBAAA;EAAkB,WAAA;EAAW,YAAA;EAAY,UAAA;EAAU,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,8CAAA;EAAA,sCAAA;EAAA,8BAAA;EAAA,iDAAA;EAA8B,+BAAA;EAAA,uBAAA;ADgY5jF;;AChYmlF;EAA8C,yCAAA;EAAA,iCAAA;ADoYjoF;;ACpYgqF;EAAuB,uBAAA;EAAA,mBAAA;ADwYvrF;;ACxY0sF;EAAuC,uBAAA;EAAA,mBAAA;AD4YjvF;;AC5YowF;EAAc,oBAAA;EAAA,cAAA;EAAc,WAAA;EAAW,YAAA;EAAY,kBAAA;EAAkB,8CAAA;EAAA,sCAAA;EAAA,8BAAA;EAAA,iDAAA;ADoZz0F;;ACpZu2F;EAA8B,kBAAA;ADwZr4F;;ACxZu5F;EAAoD,YAAA;AD4Z38F;;AC5Zu9F;EAAmC,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,sDAAA;EAAA,8CAAA;EAAA,sCAAA;EAAA,yDAAA;ADiajhG;;ACjasjG;EAAsD,2BAAA;EAAA,mBAAA;ADqa5mG;;ACra+nG;EAAyQ,oCAAA;EAAA,4BAAA;ADyax4G;;ACzao6G;EAAsL,kBAAA;EAAkB,OAAA;EAAO,MAAA;EAAM,WAAA;EAAW,YAAA;EAAY,oBAAA;EAAoB,WAAA;ADmbpqH;;ACnb+qH;EAAgC,+BAAA;ADub/sH;;ACvb0uH;EAAqC,+GAAA;EAAA,gFAAA;AD2b/wH;;AC3bs1H;EAAsC,+GAAA;EAAA,iFAAA;AD+b53H;;AC/bo8H;EAAoC,iHAAA;EAAA,+EAAA;ADmcx+H;;ACnc8iI;EAAuC,iHAAA;EAAA,kFAAA;ADucrlI;;ACvc8pI;EAAiC,cAAA;EAAc,qBAAA;EAAqB,wBAAA;AD6cluI;;AC7c0vI;EAAoD,aAAA;ADid9yI;;ACjd2zI;EAA+C,8BAAA;ADqd12I;;ACrdw4I;EAAmD,iCAAA;EAAA,6BAAA;ADyd37I;;ACzdw9I;EAAiD,iCAAA;EAAA,6BAAA;AD6dzgJ;;AC7dsiJ;EAAyC,WAAA;EAAW,oBAAA;EAAA,cAAA;EAAc,gCAAA;EAAA,oBAAA;EAAA,WAAA;ADmexmJ;;ACnemnJ;EAA6E,0DAAA;EAAA,yDAAA;ADuehsJ;;ACveyvJ;EAA2D,YAAA;EAAY,eAAA;EAAe,0CAAA;AD6e/0J;;AC7ey3J;EAA2E,2DAAA;EAAA,wDAAA;ADifp8J;;ACjf4/J;EAAyD,WAAA;EAAW,cAAA;EAAc,2CAAA;ADuf9kK;;ACvfynK;EAA+C,gCAAA;AD2fxqK;;AC3fwsK;EAAuD,WAAA;EAAW,kBAAA;EAAkB,OAAA;EAAO,MAAA;EAAM,oBAAA;ADmgBzyK;;ACngB6zK;EAAyE,WAAA;EAAW,iCAAA;ADwgBj5K;;ACxgBk7K;EAAuE,UAAA;EAAU,kCAAA;AD6gBngL;;AC7gBqiL;EAAM,6BAAA;ADihB3iL;;ACjhBykL;EAAwC,kBAAA;EAAkB,QAAA;EAAQ,oDAAA;EAAmD,qCAAA;EAAqC,yDAAA;EAA0D,WAAA;EAAW,eAAA;EAAe,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,gEAAA;AD+hB92L;;AC/hB66L;EAAsF,aAAA;EAAY,YAAA;EAAY,oBAAA;ADqiB3hM;;ACriB+iM;EAAoD,yBAAA;EAAyB,wCAAA;EAAwC,+BAAA;EAA8B,iBAAA;EAAiB,oBAAA;EAAoB,qBAAA;EAAqB,cAAA;AD+iB5vM;;AC/iB0wM;EAAoD,UAAA;EAAU,WAAA;ADojBx0M;;ACpjBm1M;EAAgE,eAAA;ADwjBn5M;;ACxjBk6M;EAAoD,WAAA;EAAW,UAAA;AD6jBj+M;;AC7jB2+M;EAAgE,eAAA;ADikB3iN;;ACjkB0jN;EAAoB,aAAA;ADqkB9kN;;ACrkB2lN;EAAmB,kBAAA;EAAkB,kBAAA;EAAkB,gCAAA;EAAA,wBAAA;EAAuB,uCAAA;EAAA,+BAAA;EAA6B,WAAA;AD6kBtsN;;AC7kBitN;EAA4C,UAAA;ADilB7vN;;ACjlBuwN;EAA4J,YAAA;EAAY,OAAA;EAAO,WAAA;ADulBt7N;;ACvlBi8N;EAAmC,gBAAA;EAAgB,YAAA;AD4lBp/N;;AC5lBggO;EAA6D,8BAAA;EAAA,0BAAA;EAAA,sBAAA;EAAqB,kBAAA;ADimBllO;;ACjmBomO;EAAoE,2BAAA;EAAA,uBAAA;EAAA,mBAAA;ADqmBxqO;;ACrmB2rO;EAAyE,2BAAA;EAAA,uBAAA;EAAA,mBAAA;ADymBpwO;;ACzmBuxO;EAAyE,8BAAA;EAAA,0BAAA;EAAA,sBAAA;AD6mBh2O;;AC7mBq3O;EAA8E,8BAAA;EAAA,0BAAA;EAAA,sBAAA;ADinBn8O;;ACjnBw9O;EAAyE,8BAAA;EAAA,0BAAA;EAAA,sBAAA;ADqnBjiP;;ACrnBsjP;EAA8E,8BAAA;EAAA,0BAAA;EAAA,sBAAA;ADynBpoP;;ACznBypP;EAA0B,uFAAA;EAAqF,yFAAA;EAAuF,qBAAA;EAAqB,kBAAA;EAAkB,gEAAA;EAA+D,8DAAA;ADkoBr8P;;ACloBkgQ;EAAgC,YAAA;EAAY,SAAA;EAAS,UAAA;EAAU,wBAAA;EAAA,gBAAA;EAAgB,wBAAA;EAAwB,qBAAA;EAAA,gBAAA;AD2oBzmQ;;AC3oBynQ;EAAuD,eAAA;AD+oBhrQ;;AC/oB+rQ;EAAqC,wBAAA;ADmpBpuQ;;ACnpB2vQ;EAAiC,mDAAA;EAAmD,qEAAA;ADwpB/0Q;;ACxpBm5Q;EAAkG,WAAA;EAAW,QAAA;EAAQ,4CAAA;EAAA,oCAAA;AD8pBxgR;;AC9pB0iR;EAAsJ,2DAAA;EAA0D,cAAA;ADmqB1vR;;ACnqBwwR;EAAsK,QAAA;EAAQ,mCAAA;EAAA,+BAAA;EAAA,2BAAA;EAA2B,UAAA;ADyqBj9R;;ACzqB29R;EAA0N,qBAAA;EAAqB,oDAAA;EAAA,4CAAA;EAAA,oCAAA;EAAA,4DAAA;AD8qB1sS;;AC9qB2uS;EAA0J,6DAAA;ADkrBr4S;;AClrBi8S;EAA0K,SAAA;EAAS,mCAAA;EAAA,+BAAA;EAAA,2BAAA;EAA2B,mBAAA;ADwrB/oT;;ACxrBkqT;EAA8N,qDAAA;EAAA,6CAAA;EAAA,qCAAA;EAAA,6DAAA;AD4rBh4T;;AC5rBk6T;EAA2F,sDAAA;EAAA,8CAAA;EAAA,sCAAA;EAAA,8DAAA;ADgsB7/T;;AChsBgiU;EAA+B,+BAAA;EAA2B,kBAAA;ADqsB1lU;;ACrsB4mU;EAAmE,qEAAA;EAAoE,kBAAA;EAAkB,OAAA;EAAO,MAAA;EAAM,WAAA;EAAW,YAAA;EAAY,2BAAA;EAAA,uBAAA;EAAA,mBAAA;EAAmB,kCAAA;EAAA,8BAAA;EAAA,0BAAA;ADgtB5zU;;AChtBs1U;EAA+E,mCAAA;EAAA,+BAAA;EAAA,2BAAA;ADotBr6U;;ACptBg8U;EAAsS,WAAA;EAAW,WAAA;EAAW,OAAA;EAAO,MAAA;AD2tBnwV;;AC3tBywV;EAAsS,UAAA;EAAU,YAAA;EAAY,OAAA;EAAO,MAAA;ADkuB5kW;;ACluBklW;EAAwB,aAAA;ADsuB1mW;;ACtuBunW;EAAkB,mBAAA;EAAmB,kBAAA;EAAkB,sBAAA;EAAsB,8BAAA;AD6uBpsW;;AC7uB8tW;EAAqC,kBAAA;EAAkB,QAAA;EAAQ,WAAA;EAAW,WAAA;EAAW,WAAA;EAAW,UAAA;ADsvB9zW;;ACtvBw0W;EAAmC,kBAAA;EAAkB,UAAA;EAAU,OAAA;EAAO,WAAA;EAAW,UAAA;EAAU,WAAA;AD+vBn6W;;AC/vB86W;EAAuB,YAAA;EAAY,WAAA;EAAW,kBAAA;EAAkB,8BAAA;EAA0B,mBAAA;EAAmB,OAAA;EAAO,MAAA;ADywBliX;;ACzwBwiX;EAA8B,YAAA;AD6wBtkX;;AC7wBklX;EAAuB,aAAA;ADixBzmX;;ACjxBsnX;EAAuB,WAAA;EAAW,YAAA;EAAY,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,kBAAA;AD0xB3tX;;AC1xB6uX;EAAoF,eAAA;EAAe,gBAAA;EAAgB,sBAAA;EAAA,mBAAA;ADgyBh2X;;AChyBm3X;EAAqB,YAAA;ADoyBx4X;;ACpyBo5X;EAAuB,WAAA;EAAW,YAAA;EAAY,kBAAA;EAAkB,SAAA;EAAS,QAAA;EAAQ,kBAAA;EAAkB,iBAAA;EAAiB,WAAA;EAAW,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EAAqB,2DAAA;EAAA,mDAAA;EAAmD,8BAAA;EAAA,sBAAA;EAAsB,0EAAA;EAAyE,kBAAA;EAAkB,6BAAA;ADqzB5sY;;ACrzByuY;EAA6B,6BAAA;ADyzBtwY;;ACzzBoyY;EAA6B,6BAAA;AD6zBj0Y;;AC7zB+1Y;EAAiC;IAAK,iCAAA;IAAA,yBAAA;EDk0Bn4Y;AACF;;ACn0B+1Y;EAAiC;IAAK,iCAAA;IAAA,yBAAA;EDk0Bn4Y;AACF;ACn0B+5Y;EAA6B,kBAAA;EAAkB,OAAA;EAAO,MAAA;EAAM,oBAAA;EAAoB,UAAA;EAAU,cAAA;AD20Bz/Y;;AC30BugZ;EAAkC,4CAAA;EAAA,oCAAA;EAAoC,cAAA;ADg1B7kZ;;ACh1B2lZ;EAA6B,mBAAA;EAAA,eAAA;ADo1BxnZ;;ACp1BuoZ;EAAoC,mBAAA;EAAA,eAAA;EAAe,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;ADy1B1rZ;;ACz1BgtZ;EAA4C,4CAAA;EAAA,oCAAA;AD61B5vZ;;AC71BgyZ;EAA2B,oBAAA;EAAoB,oCAAA;EAAA,4BAAA;ADk2B/0Z;;ACl2B22Z;EAAyC,oBAAA;ADs2Bp5Z;;ACt2Bw6Z;EAAyF,oBAAA;AD02Bjga;;AC12Bqha;EAAa,iBAAA;AD82Blia;;AC92Bmja;EAA2B,oBAAA;EAAoB,mCAAA;EAAmC,2BAAA;EAA2B,UAAA;EAAU,kBAAA;EAAkB,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EAAqB,WAAA;EAAW,YAAA;ADy3B5ta;;ACz3Bwua;EAAyC,oBAAA;AD63Bjxa;;AC73Bqya;EAAsC,gCAAA;EAAA,4BAAA;EAAA,wBAAA;ADi4B30a;;ACj4Bm2a;EAAyF,oBAAA;ADq4B57a;;ACr4Bg9a;EAAgJ,oBAAA;EAAoB,mBAAA;AD04Bpnb;;AC14Buob;EAA8J,UAAA;EAAU,mCAAA;EAAmC,2BAAA;ADg5Bl1b;;ACh5B62b;EAAiC,kBAAA;EAAkB,OAAA;EAAO,WAAA;EAAW,WAAA;EAAW,YAAA;EAAY,YAAA;EAAW,UAAA;AD05Bp9b;;AC15B89b;EAAwC,WAAA;EAAW,gBAAA;EAAgB,kBAAA;EAAkB,OAAA;EAAO,MAAA;EAAM,SAAA;EAAS,QAAA;EAAQ,0BAAA;EAAA,kBAAA;ADq6Bjlc;;ACr6Bmmc;EAAa,iBAAA;ADy6Bhnc;;ACz6Bioc;EAA2B,oBAAA;EAAoB,mCAAA;EAAmC,2BAAA;EAA2B,UAAA;ADg7B9uc;;ACh7Bwvc;EAAyC,oBAAA;ADo7Bjyc;;ACp7Bqzc;EAAyF,oBAAA;ADw7B94c;;ACx7Bk6c;EAA8J,UAAA;EAAU,mCAAA;EAAmC,2BAAA;AD87B7md;;AC97Bwod;EAA+B,mCAAA;EAAmC,2BAAA;EAA2B,gBAAA;EAAgB,+DAAA;EAAA,uDAAA;EAAA,+CAAA;EAAA,kEAAA;ADq8Brvd;;ACr8Bkyd;EAAc,iBAAA;ADy8Bhzd;;ACz8Bi0d;EAA4B,uCAAA;EAAA,mCAAA;EAAA,+BAAA;EAA+B,mCAAA;EAAmC,2BAAA;EAA2B,gBAAA;ADg9B17d;;AE59BA;EAAc,qBAAA;EAAqB,4BAAA;EAA4B,2BAAA;EAA2B,kBAAA;EAAkB,aAAA;EAAa,YAAA;AFq+BzH;;AEr+BqI;EAAqB,wBAAA;AFy+B1J;;AEz+BiL;EAAqD,4CAAA;EAAA,oCAAA;AF6+BtO;;AE7+ByQ;EAA6K,kBAAA;EAAkB,MAAA;EAAM,OAAA;EAAO,WAAA;EAAW,YAAA;AFq/Bhe;;AEr/B4e;EAAqG,kBAAA;AFy/BjlB;;AEz/BmmB;EAAW,oBAAA;EAAoB,qnOAAA;EAAqnO,gBAAA;EAAgB,kBAAA;AFggCvwP;AEhgCyxP;EAA6H,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFqgC17P;;AErgC48P;EAA2I,gBAAA;AFygCvlQ;;AEzgCumQ;EAAsB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+gCjqQ;;AE/gCmrQ;EAA6B,gBAAA;AFmhChtQ;;AEnhCguQ;EAA8E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFyhCl1Q;;AEzhCo2Q;EAA4F,gBAAA;AF6hCh8Q;;AE7hCg9Q;EAAkF,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFmiCtkR;;AEniCwlR;EAAgG,gBAAA;AFuiCxrR;;AEviCwsR;EAAiF,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF6iC7zR;;AE7iC+0R;EAA+F,gBAAA;AFijC96R;;AEjjC87R;EAAiF,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFujCnjS;;AEvjCqkS;EAA+F,gBAAA;AF2jCpqS;;AE3jCorS;EAAwE,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFikChyS;;AEjkCkzS;EAAsF,gBAAA;AFqkCx4S;;AErkCw5S;EAAmF,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF2kC/gT;;AE3kCiiT;EAAiG,gBAAA;AF+kCloT;;AE/kCkpT;EAAiG,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFqlCvxT;;AErlCyyT;EAA+G,gBAAA;AFylCx5T;;AEzlCw6T;EAAkB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+lC99T;;AE/lCg/T;EAAyB,gBAAA;AFmmCzgU;;AEnmCyhU;EAA4a,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFymCz+U;;AEzmC2/U;EAA6d,gBAAA;AF6mCx9V;;AE7mCw+V;EAAyM,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFmnCrtW;;AEnnCuuW;EAAqO,gBAAA;AFunC58W;;AEvnC49W;EAAa,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF6nC7gX;;AE7nC+hX;EAAoB,gBAAA;AFioCnjX;;AEjoCmkX;EAAwE,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFuoC/qX;;AEvoCisX;EAAsF,gBAAA;AF2oCvxX;;AE3oCuyX;EAAsB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFipCj2X;;AEjpCm3X;EAA6B,gBAAA;AFqpCh5X;;AErpCg6X;EAAwB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF2pC59X;;AE3pC8+X;EAA+B,gBAAA;AF+pC7gY;;AE/pC6hY;EAA6B,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFqqC9lY;;AErqCgnY;EAAoC,gBAAA;AFyqCppY;;AEzqCoqY;EAA4B,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+qCpuY;;AE/qCsvY;EAAmC,gBAAA;AFmrCzxY;;AEnrCyyY;EAAgB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFyrC71Y;;AEzrC+2Y;EAAuB,gBAAA;AF6rCt4Y;;AE7rCs5Y;EAAc,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFmsCx8Y;;AEnsC09Y;EAAqB,gBAAA;AFusC/+Y;;AEvsC+/Y;EAAiB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF6sCpjZ;;AE7sCskZ;EAAwB,gBAAA;AFitC9lZ;;AEjtC8mZ;EAA0H,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFutC5wZ;;AEvtC8xZ;EAAsJ,gBAAA;AF2tCp7Z;;AE3tCo8Z;EAAyB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFiuCjga;;AEjuCmha;EAAgC,gBAAA;AFquCnja;;AEruCmka;EAA8B,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF2uCroa;;AE3uCupa;EAAqC,gBAAA;AF+uC5ra;;AE/uC4sa;EAA+E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFqvC/za;;AErvCi1a;EAA6F,gBAAA;AFyvC96a;;AEzvC87a;EAAiB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+vCn/a;;AE/vCqgb;EAAwB,gBAAA;AFmwC7hb;;AEnwC6ib;EAA6E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFywC9pb;;AEzwCgrb;EAA2F,gBAAA;AF6wC3wb;;AE7wC2xb;EAAwE,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFmxCv4b;;AEnxCy5b;EAAsF,gBAAA;AFuxC/+b;;AEvxC+/b;EAA0E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF6xC7mc;;AE7xC+nc;EAAwF,gBAAA;AFiyCvtc;;AEjyCuuc;EAA0E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFuyCr1c;;AEvyCu2c;EAAwF,gBAAA;AF2yC/7c;;AE3yC+8c;EAAwE,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFizC3jd;;AEjzC6kd;EAAsF,gBAAA;AFqzCnqd;;AErzCmrd;EAA0E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF2zCjyd;;AE3zCmzd;EAAwF,gBAAA;AF+zC34d;;AE/zC25d;EAA0E,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFq0Czge;;AEr0C2he;EAAwF,gBAAA;AFy0Cnne;;AEz0Cmoe;EAAkE,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+0Czue;;AE/0C2ve;EAAgF,gBAAA;AFm1C30e;;AEn1C21e;EAAoB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFy1Cn5e;;AEz1Cq6e;EAA2B,gBAAA;AF61Ch8e;;AE71Cg9e;EAAwB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFm2C5gf;;AEn2C8hf;EAA+B,gBAAA;AFu2C7jf;;AEv2C6kf;EAAkB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF62Cnof;;AE72Cqpf;EAAyB,gBAAA;AFi3C9qf;;AEj3C8rf;EAAe,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFu3Cjvf;;AEv3Cmwf;EAAsB,gBAAA;AF23Czxf;;AE33Cyyf;EAAmG,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFi4Ch7f;;AEj4Ck8f;EAAiH,gBAAA;AFq4CnjgB;;AEr4CmkgB;EAAyH,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF24ChugB;;AE34CkvgB;EAAuI,gBAAA;AF+4Cz3gB;;AE/4Cy4gB;EAAmB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFq5Ch8gB;;AEr5Ck9gB;EAA0B,gBAAA;AFy5C5+gB;;AEz5C4/gB;EAAmB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF+5CnjhB;;AE/5CqkhB;EAA0B,gBAAA;AFm6C/lhB;;AEn6C+mhB;EAAkB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFy6CrqhB;;AEz6CurhB;EAAyB,gBAAA;AF66ChthB;;AE76CguhB;EAAiB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFm7CrxhB;;AEn7CuyhB;EAAwB,gBAAA;AFu7C/zhB;;AEv7C+0hB;EAAoB,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AF67Cv4hB;;AE77Cy5hB;EAA2B,gBAAA;AFi8Cp7hB;;AEj8Co8hB;EAAqF,oBAAA;EAAoB,gBAAA;EAAgB,kBAAA;AFu8C7jiB;;AEv8C+kiB;EAAmG,gBAAA;AF28ClriB;;AE38CksiB;EAAU,qBAAA;EAAqB,mBAAA;EAAmB,8BAAA;EAAA,sBAAA;EAAsB,WAAA;EAAW,sBAAA;EAAsB,kBAAA;EAAkB,UAAA;EAAU,eAAA;EAAe,cAAA;EAAc,gBAAA;EAAgB,kBAAA;EAAkB,yCAAA;EAAuC,mBAAA;AF29C76iB;;AE39Cg8iB;EAA2B,kBAAA;AF+9C39iB;;AE/9C6+iB;EAA8B,sBAAA;EAAqB,uBAAA;AFo+ChijB;;AEp+CsjjB;EAAyB,UAAA;AFw+C/kjB;;AEx+CyljB;EAA+C,2BAAA;EAAA,mBAAA;AF4+CxojB;;AE5+C2pjB;EAAa,oBAAA;EAAoB,kBAAA;EAAkB,oBAAA;EAAoB,4BAAA;EAA4B,cAAA;EAAc,eAAA;EAAe,aAAA;EAAa,gBAAA;AFu/CxyjB;;AEv/CwzjB;EAA8F,WAAA;EAAW,eAAA;AF4/Cj6jB;;AE5/Cg7jB;EAAgO,SAAA;AFggDhpkB;;AEhgDypkB;EAA6C,mBAAA;AFogDtskB;;AEpgDytkB;EAA4C,gBAAA;AFwgDrwkB;;AExgDqxkB;EAA6C,4BAAA;AF4gDl0kB;;AE5gD81kB;EAA4C,iBAAA;AFghD14kB;;AEhhD25kB;EAA6C,WAAA;EAAW,YAAA;AFqhDn9kB;;AErhD+9kB;EAAoB,kBAAA;EAAkB,MAAA;EAAM,OAAA;EAAO,WAAA;EAAW,YAAA;AF6hD7hlB;;AE7hDyilB;EAAwC,aAAA;AFiiDjllB;;AEjiD8llB;EAAyC,UAAA;EAAU,SAAA;EAAS,YAAA;AFuiD1plB;;AEviDsqlB;EAAwE,eAAA;EAAe,gBAAA;EAAgB,aAAA;EAAa,OAAA;EAAO,MAAA;EAAM,SAAA;EAAS,QAAA;AFijDhzlB;;AEjjDwzlB;EAA+E,sBAAA;EAAqB,uBAAA;EAAsB,yBAAA;EAAwB,cAAA;AFwjD18lB;;AExjDw9lB;EAA2C,YAAA;AF4jDngmB;;AE5jD+gmB;EAAiC,kBAAA;EAAkB,WAAA;EAAW,cAAA;EAAc,oCAAA;EAAgC,cAAA;EAAa,kBAAA;EAAkB,WAAA;AFskD1pmB;;AEtkDqqmB;EAAuJ,SAAA;EAAS,gBAAA;AF2kDr0mB;;AE3kDq1mB;EAAY,wBAAA;AF+kDj2mB;;AE/kDw3mB;EAAc,YAAA;EAAW,eAAA;AFolDj5mB;;AEplDg6mB;EAAyB,WAAA;EAAW,aAAA;EAAa,kBAAA;EAAkB,MAAA;EAAM,UAAA;AF4lDz+mB;;AE5lDm/mB;EAAkB,yBAAA;EAAwB,qBAAA;EAAoB,8BAAA;AFkmDjjnB;;AElmD8knB;EAAW,aAAA;EAAa,WAAA;EAAW,sBAAA;EAAsB,eAAA;EAAe,yCAAA;EAAuC,kBAAA;EAAkB,YAAA;EAAY,aAAA;EAAa,cAAA;AF8mDxunB;;AE9mDsvnB;EAAkC,cAAA;AFknDxxnB;;AElnDsynB;EAA+B,cAAA;EAAc,kBAAA;EAAkB,iBAAA;EAAiB,UAAA;EAAU,cAAA;EAAc,kBAAA;EAAkB,QAAA;EAAQ,SAAA;EAAS,UAAA;EAAU,sBAAA;EAAqB,mBAAA;EAAmB,eAAA;EAAe,UAAA;EAAU,4BAAA;EAA2B,yBAAA;EAAyB,uCAAA;EAAmC,oBAAA;EAAmB,4BAAA;EAAA,oBAAA;AFuoDtmoB;;AEvoDynoB;EAAmC,UAAA;EAAU,WAAA;EAAW,kBAAA;EAAkB,QAAA;EAAQ,SAAA;EAAS,cAAA;EAAc,wCAAA;EAAA,oCAAA;EAAA,gCAAA;AFipDluoB;;AEjpDiwoB;EAA0E,kBAAA;EAAkB,yBAAA;EAAyB,0CAAA;EAAsC,0BAAA;EAAA,kBAAA;AFwpD55oB;;AExpD86oB;EAAkK,aAAA;AF4pDhlpB;;AE5pD6lpB;EAAmF,cAAA;AFgqDhrpB;;AEhqD8rpB;EAAiB,eAAA;EAAe,YAAA;EAAY,cAAA;EAAc,qBAAA;EAAqB,kBAAA;EAAkB,oBAAA;EAAoB,oBAAA;EAAoB,qBAAA;EAAqB,wBAAA;EAAA,gBAAA;EAAgB,wBAAA;EAAwB,qBAAA;EAAqB,gBAAA;AF+qDz5pB;;AE/qDy6pB;EAAyB,WAAA;EAAW,YAAA;AForD78pB;;AEprDy9pB;EAAwC,eAAA;EAAe,WAAA;EAAW,kBAAA;EAAkB,QAAA;EAAQ,UAAA;EAAS,UAAA;AF6rD9jqB;;AE7rDwkqB;EAA4B,8BAAA;EAA0B,iHAAA;EAAA,+EAAA;EAAsE,cAAA;AFmsDpsqB;;AEnsDktqB;EAA8B,8BAAA;EAAA,sBAAA;AFusDhvqB;;AEvsDswqB;EAA4C,gBAAA;EAAgB,gBAAA;EAAgB,kBAAA;EAAkB,UAAA;AF8sDp2qB;;AE9sD82qB;EAAiB,eAAA;AFktD/3qB;;AEltD84qB;EAA8B,eAAA;AFstD56qB;;AEttD27qB;EAAgE,aAAA;AF0tD3/qB;;AE1tDwgrB;EAA4B,cAAA;EAAc,UAAA;EAAU,SAAA;EAAS,yCAAA;EAAuC,cAAA;AFkuD5mrB;;AEluD0nrB;EAA8B,8BAAA;EAAA,sBAAA;AFsuDxprB;;AEtuD8qrB;EAA4D,aAAA;AF0uD1urB;;AE1uDuvrB;EAAa,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,gBAAA;EAAgB,SAAA;EAAS,gBAAA;EAAe,kBAAA;EAAkB,gBAAA;EAAgB,kBAAA;EAAkB,yBAAA;AFsvDp4rB;;AEtvD65rB;EAAqH,yBAAA;EAAyB,0CAAA;AF2vD3isB;;AE3vDilsB;EAA4I,sBAAA;EAAsB,cAAA;AFgwDnvsB;;AEhwDiwsB;EAAoM,UAAA;AFowDr8sB;;AEpwD+8sB;EAA4I,eAAA;AFwwD3ltB;;AExwD0mtB;EAA4B,kBAAA;EAAkB,yBAAA;EAAyB,cAAA;EAAc,gBAAA;EAAgB,UAAA;EAAU,mBAAA;EAAkB,gBAAA;EAAgB,eAAA;AFmxD3vtB;;AEnxD0wtB;EAAiC,aAAA;EAAa,kBAAA;EAAkB,SAAA;EAAS,WAAA;EAAW,UAAA;EAAU,SAAA;EAAS,oBAAA;EAAoB,uCAAA;AF8xDr4tB;;AE9xDw6tB;EAAiD,WAAA;EAAW,UAAA;AFmyDp+tB;;AEnyD8+tB;EAAmD,yBAAA;EAAyB,uCAAA;EAAmC,kBAAA;EAAkB,WAAA;EAAW,aAAA;EAAa,gBAAA;AF4yDvouB;;AE5yDupuB;EAA2I,eAAA;AFgzDlyuB;;AEhzDizuB;EAAqE,gBAAA;AFozDt3uB;;AEpzDs4uB;EAAsE,gBAAA;AFwzD58uB;;AExzD49uB;EAAgN,gBAAA;AF4zD5qvB;;AE5zD4rvB;EAA+G,cAAA;AFg0D3yvB;;AEh0DyzvB;EAAkC,4BAAA;EAAA,oBAAA;EAAmB,gBAAA;AFq0D92vB;;AEr0D83vB;EAAyC,oBAAA;AFy0Dv6vB;;AEz0D27vB;EAAoI,WAAA;AF60D/jwB;;AE70D0kwB;EAAkC,UAAA;EAAU,YAAA;EAAY,WAAA;EAAW,kBAAA;EAAkB,SAAA;EAAS,MAAA;EAAM,UAAA;EAAU,SAAA;EAAS,4BAAA;EAAA,oBAAA;AFy1DjswB;;AEz1DotwB;EAAoI,cAAA;EAAc,UAAA;AF81Dt2wB;;AE91Dg3wB;EAA0C,WAAA;EAAW,YAAA;EAAY,SAAA;EAAS,gBAAA;AFq2D17wB;;AEr2D08wB;EAA2B,aAAA;EAAa,WAAA;EAAW,kBAAA;EAAkB,SAAA;EAAS,OAAA;EAAO,QAAA;EAAQ,WAAA;EAAW,yBAAA;EAAyB,uCAAA;AFi3D3kxB;;AEj3D8mxB;EAA8G,+BAAA;EAAA,+BAAA;EAAA,wBAAA;AFq3D5txB;;AEr3DmvxB;EAAwE,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,mBAAA;EAAmB,UAAA;EAAU,iDAAA;EAAA,yCAAA;AF43Dr2xB;;AE53D24xB;EAAgE,mBAAA;EAAmB,UAAA;EAAU,oBAAA;EAAoB,6CAAA;EAAA,qCAAA;AFm4D5/xB;;AEn4DgiyB;EAAgH,wBAAA;AFu4DhpyB;;AEv4DuqyB;EAA8J,UAAA;EAAU,mBAAA;EAAmB,oBAAA;AF64Dl2yB;;AE74Ds3yB;EAAuB,kBAAA;EAAkB,kBAAA;EAAkB,SAAA;EAAS,UAAA;EAAU,YAAA;EAAY,UAAA;EAAU,mBAAA;EAAA,cAAA;EAAA,UAAA;AFu5D19yB;;AEv5Do+yB;EAAwC,WAAA;EAAW,iBAAA;EAAiB,kBAAA;AF65DxizB;;AE75D0jzB;EAAyC,gBAAA;EAAgB,iBAAA;AFk6DnnzB;;AEl6DoozB;EAAkC,cAAA;AFs6DtqzB;;AEt6DorzB;EAA0B,qBAAA;AF06D9szB;;AE16DmuzB;EAAqG,yBAAA;AF86Dx0zB;;AE96Di2zB;EAAoD,SAAA;EAAS,mBAAA;EAAmB,WAAA;EAAW,gBAAA;EAAgB,UAAA;EAAU,kBAAA;EAAkB,UAAA;AFw7Dx+zB;;AEx7Dk/zB;EAAqC,aAAA;AF47Dvh0B;;AE57Doi0B;EAAgC,eAAA;EAAe,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,cAAA;EAAc,sBAAA;EAAA,kBAAA;AFq8D3o0B;;AEr8D6p0B;EAAyC,eAAA;AFy8Dts0B;;AEz8Dqt0B;EAAgC,aAAA;AF68Drv0B;;AE78Dkw0B;EAAkC,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,yBAAA;EAAA,sBAAA;EAAA,mBAAA;AFk9Djz0B;;AEl9Do00B;EAA+B,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,4BAAA;EAAA,oBAAA;EAAmB,aAAA;AFw9Dh40B;;AEx9D440B;EAAqD,cAAA;AF49Dj80B;;AE59D+80B;EAA2D,yBAAA;AFg+D1g1B;;AEh+Dmi1B;EAAoE,cAAA;AFo+Dvm1B;;AEp+Dqn1B;EAA0J,kBAAA;EAAkB,cAAA;EAAc,YAAA;EAAY,SAAA;EAAS,UAAA;EAAU,QAAA;AF6+D901B;;AE7+Ds11B;EAA6B,sBAAA;AFi/Dn31B;;AEj/Dy41B;EAAoC,gBAAA;EAAe,kBAAA;EAAkB,aAAA;EAAY,mBAAA;EAAkB,UAAA;AFy/D5+1B;;AEz/Ds/1B;EAAiD,wBAAA;AF6/Dvi2B;;AE7/D8j2B;EAAiC,kBAAA;EAAkB,YAAA;EAAW,aAAA;EAAY,YAAA;EAAW,aAAA;EAAY,oBAAA;EAAoB,mBAAA;EAAkB,UAAA;AFwgErs2B;;AExgE+s2B;EAA6B,oCAAA;AF4gE5u2B;;AE5gE4w2B;EAAiC,qCAAA;AFghE7y2B;;AEhhE802B;EAA4B,sBAAA;EAAsB,0CAAA;EAAsC,oBAAA;EAAmB,WAAA;EAAW,YAAA;EAAY,yCAAA;EAAuC,cAAA;EAAc,wBAAA;EAAwB,oBAAA;EAAoB,kBAAA;EAAkB,WAAA;EAAW,kBAAA;EAAkB,UAAA;AFgiEhm3B;;AEhiE0m3B;EAAuD,aAAA;AFoiEjq3B;;AEpiE8q3B;EAA2I,cAAA;EAAc,gBAAA;EAAe,mBAAA;AF0iEt13B;;AE1iEy23B;EAAiE,cAAA;AF8iE163B;;AE9iEw73B;EAAmD,aAAA;EAAa,kBAAA;EAAkB,UAAA;EAAU,YAAA;EAAY,sBAAA;EAAsB,UAAA;AFujEtj4B;;AEvjEgk4B;EAAyD,cAAA;AF2jEzn4B;;AE3jEuo4B;EAAqE,kBAAA;EAAkB,UAAA;EAAU,6CAAA;EAAA,qCAAA;AFikExu4B;;AEjkE4w4B;EAAqC,WAAA;EAAW,sBAAA;EAAsB,oCAAA;AFukEl14B;;AEvkEk34B;EAAsB,kBAAA;EAAkB,eAAA;EAAe,UAAA;EAAU,yBAAA;EAAuB,2BAAA;EAA2B,yBAAA;EAAyB,sBAAA;EAAsB,qBAAA;EAAA,iBAAA;EAAiB,yBAAA;EAAyB,0CAAA;AFolE9j5B;;AEplEom5B;EAA+B,eAAA;AFwlEno5B;;AExlEkp5B;EAA4B,yBAAA;EAAyB,gCAAA;EAAA,wBAAA;AF6lEvs5B;;AE7lE+t5B;EAA4B,eAAA;EAAe,mBAAA;EAAA,cAAA;EAAA,UAAA;AFkmE1w5B;;AElmEox5B;EAA8B,eAAA;EAAe,iBAAA;EAAiB,oBAAA;EAAA,oBAAA;EAAA,aAAA;AFwmEl15B;;AExmE+15B;EAAoD,UAAA;AF4mEn55B;;AE5mE655B;EAAgD,mBAAA;EAAmB,UAAA;EAAU,UAAA;EAAU,WAAA;EAAW,iBAAA;AFonE//5B;;AEpnEgh6B;EAA4B,4BAAA;EAAA,oBAAA;AFwnE5i6B;;AExnEgk6B;EAA4W,mBAAA;EAAmB,UAAA;EAAU,kBAAA;EAAkB,2FAAA;EAAA,mFAAA;AF+nE396B;;AE/nEqi7B;EAAgf,UAAA;EAAU,WAAA;EAAW,eAAA;AFqoE1i8B;;AEroEyj8B;EAAoe,YAAA;EAAY,2BAAA;EAAA,mBAAA;AF0oEzi9B;;AE1oE4j9B;EAA2M,WAAA;EAAW,8BAAA;EAAA,sBAAA;AF+oElx9B;;AE/oEuy9B;EAA6E,UAAA;AFmpEp39B;;AEnpE839B;EAAoE,WAAA;EAAW,UAAA;EAAU,aAAA;EAAa,+FAAA;EAAA,uFAAA;AF0pEp+9B;;AE1pEsj+B;EAAsE,4FAAA;EAAA,oFAAA;AF8pE5n+B;;AE9pE2s+B;EAA4B,oBAAA;EAAA,oBAAA;EAAA,aAAA;AFkqEvu+B;;AElqEov+B;EAA0B,qBAAA;AFsqE9w+B;;AEtqEky+B;EAAsC,UAAA;EAAU,aAAA;AF2qEl1+B;;AE3qE81+B;EAAoC,YAAA;EAAW,WAAA;EAAW,mBAAA;AFirEx5+B;;AEjrE26+B;EAA4B,kBAAA;EAAkB,SAAA;EAAS,OAAA;EAAO,sBAAA;AFwrEz++B;;AExrE+/+B;EAAmC,kBAAA;EAAkB,gBAAA;EAAe,UAAA;AF8rEnk/B;;AE9rE6k/B;EAAuC,YAAA;AFksEpn/B;;AElsE+n/B;EAA8C,WAAA;EAAU,YAAA;EAAW,UAAA;AFwsEls/B;;AExsE4s/B;EAAgD,aAAA;AF4sE5v/B;;AE5sEyw/B;EAAgC,kBAAA;EAAkB,YAAA;EAAW,aAAA;EAAY,oBAAA;EAAoB,UAAA;AFotEt2/B;;AEptEg3/B;EAAyC,aAAA;AFwtEz5/B;;AExtEq6/B;EAAgD,mBAAA;EAAkB,aAAA;AF6tEv+/B;;AE7tEm//B;EAAuD,aAAA;EAAY,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AFkuEtjgC;;AEluEilgC;EAAqD,YAAA;EAAW,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AFuuEjpgC;;AEvuE4qgC;EAAsD,UAAA;AF2uElugC;;AE3uE4ugC;EAAsD,YAAA;AF+uElygC;;AE/uE8ygC;EAAwD,WAAA;AFmvEt2gC;;AEnvEi3gC;EAA+B,UAAA;EAAU,WAAA;EAAW,WAAA;EAAW,yBAAA;EAAyB,uCAAA;AF2vEz8gC;;AE3vE4+gC;EAA2C,UAAA;AF+vEvhhC;;AE/vEiihC;EAA8B,sBAAA;EAAsB,0CAAA;EAAsC,oBAAA;EAAmB,WAAA;EAAW,YAAA;EAAY,yCAAA;EAAuC,cAAA;EAAc,wBAAA;EAAwB,oBAAA;EAAoB,kBAAA;EAAkB,WAAA;EAAW,kBAAA;EAAkB,UAAA;AF+wErzhC;;AE/wE+zhC;EAA2I,cAAA;EAAc,cAAA;EAAc,mBAAA;AFqxEt+hC;;AErxEy/hC;EAA6I,SAAA;EAAS,UAAA;AF0xE/oiC;;AE1xEypiC;EAAiE,cAAA;AF8xE1tiC;;AE9xEwuiC;EAAiD,aAAA;EAAa,kBAAA;EAAkB,WAAA;EAAW,WAAA;EAAW,sBAAA;EAAsB,UAAA;AFuyEp2iC;;AEvyE82iC;EAAoD,UAAA;EAAU,YAAA;AF4yE56iC;;AE5yEw7iC;EAAuD,cAAA;AFgzE/+iC;;AEhzE6/iC;EAAmE,kBAAA;EAAkB,UAAA;EAAU,6CAAA;EAAA,qCAAA;AFszE5ljC;;AEtzEgojC;EAAuC,WAAA;EAAW,sBAAA;EAAsB,oCAAA;AF4zExsjC;;AE5zEwujC;EAAY,qBAAA;EAAqB,sBAAA;EAAsB,eAAA;EAAe,SAAA;EAAS,UAAA;EAAU,kBAAA;EAAkB,MAAA;EAAM,QAAA;EAAQ,SAAA;EAAS,OAAA;EAAO,YAAA;AF00Ej3jC;;AE10E63jC;EAAoE,aAAA;AF80Ej8jC;;AE90E88jC;EAAyI,cAAA;AFk1EvlkC;;AEl1EqmkC;EAAgB,WAAA;EAAW,YAAA;EAAY,sBAAA;EAAsB,mBAAA;AFy1ElqkC;;AEz1EqrkC;EAA4B,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,cAAA;EAAc,gBAAA;AFi2E7wkC;;AEj2E6xkC;EAAkF,aAAA;AFq2E/2kC;;AEr2E43kC;EAAoC,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,eAAA;EAAe,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,2BAAA;EAAA,2BAAA;EAAA,oBAAA;EAAoB,YAAA;EAAY,mBAAA;EAAkB,oBAAA;EAAmB,cAAA;EAAc,gBAAA;EAAgB,WAAA;EAAW,cAAA;AFm3E1jlC;;AEn3EwklC;EAAiH,aAAA;AFu3EzrlC;;AEv3EsslC;EAAuD,YAAA;AF23E7vlC;;AE33EywlC;EAAgD,mBAAA;EAAkB,WAAA;AFg4E30lC;;AEh4Es1lC;EAAiD,cAAA;AFo4Ev4lC;;AEp4Eq5lC;EAAwC,UAAA;EAAU,WAAA;EAAW,oBAAA;EAAoB,UAAA;AF24Et+lC;;AE34Eg/lC;EAA6E,UAAA;AF+4E7jmC;;AE/4EukmC;EAAqE,SAAA;AFm5E5omC;;AEn5EqpmC;EAA4B,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,cAAA;EAAc,gBAAA;EAAgB,cAAA;EAAc,WAAA;EAAW,iBAAA;EAAiB,kBAAA;AF65EnwmC;;AE75EqxmC;EAA4G,aAAA;AFi6Ej4mC;;AEj6E84mC;EAAkB,aAAA;EAAa,gBAAA;AFs6E76mC;;AEt6E67mC;EAA4B,eAAA;AF06Ez9mC;;AE16Ew+mC;EAAkD,mBAAA;EAAA,cAAA;EAAA,UAAA;AF86E1hnC;;AE96EoinC;EAAwB,kBAAA;EAAkB,WAAA;EAAW,OAAA;EAAO,QAAA;EAAQ,MAAA;EAAM,oBAAA;AFu7E9mnC;;AEv7EkonC;EAAmC,aAAA;AF27ErqnC;;AE37EkrnC;EAAwH,WAAA;AF+7E1ynC;;AE/7EqznC;EAA0B,gBAAA;EAAgB,kBAAA;EAAkB,oBAAA;AFq8Ej3nC;;AEr8Eo4nC;EAAe,WAAA;AFy8En5nC;;AEz8E85nC;EAAc,WAAA;AF68E56nC;;AE78Eu7nC;EAAY,cAAA;AFi9En8nC;;AEj9Ei9nC;EAAwC,mCAAA;EAAA,2BAAA;AFq9Ez/nC;;AEr9EohoC;EAAwJ,qCAAA;EAAA,6BAAA;AFy9E5qoC;;AEz9EysoC;EAA0C,eAAA;EAAe,mBAAA;EAAA,cAAA;EAAA,UAAA;AF89ElwoC;;AE99E4woC;EAA8G,aAAA;AFk+E13oC;;AEl+Eu4oC;EAAkC,eAAA;EAAe,mBAAA;EAAA,cAAA;EAAA,UAAA;AFu+Ex7oC;;AEv+Ek8oC;EAA8F,aAAA;AF2+EhipC;;AE3+E6ipC;EAAgF,kBAAA;EAAkB,MAAA;EAAM,OAAA;EAAO,WAAA;EAAW,YAAA;AFm/EvqpC;;AEn/EmrpC;EAA4C,oBAAA;EAAoB,gBAAA;EAAgB,cAAA;EAAc,kBAAA;AF0/EjxpC;;AE1/EmypC;EAA6B,UAAA;EAAU,OAAA;AF+/E10pC;;AE//Ei1pC;EAAwD,gBAAA;EAAgB,kBAAA;AFogFz5pC;;AEpgF26pC;EAAqC,WAAA;EAAW,YAAA;EAAY,yCAAA;EAAuC,cAAA;EAAc,OAAA;EAAO,cAAA;EAAc,kBAAA;EAAiB,kBAAA;EAAkB,qCAAA;EAAkC,kBAAA;EAAkB,QAAA;EAAQ,sBAAA;EAAsB,WAAA;AFohFtqqC;;AEphFirqC;EAAqB,aAAA;EAAa,kBAAA;EAAkB,QAAA;EAAQ,SAAA;EAAS,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EAA+B,aAAA;EAAY,gBAAA;EAAgB,yCAAA;EAAoC,8BAAA;EAAA,sBAAA;EAAsB,4BAAA;EAA4B,UAAA;EAAU,WAAA;EAAW,kBAAA;EAAkB,kBAAA;AFqiF96qC;;AEriFg8qC;EAAoE,cAAA;EAAc,2DAAA;EAAA,mDAAA;AF0iFlhrC;;AE1iFokrC;EAAgC,aAAA;AF8iFpmrC;;AE9iFinrC;EAAuD,WAAA;EAAW,kBAAA;EAAkB,cAAA;EAAa,2BAAA;EAAA,mBAAA;EAAmB,cAAA;EAAc,eAAA;EAAe,sBAAA;EAAsB,UAAA;EAAU,eAAA;EAAe,yBAAA;EAAyB,sBAAA;AF4jF10rC;;AE5jFg2rC;EAAkK,uHAAA;EAAA,+GAAA;AFgkFlgsC;;AEhkF0msC;EAAkF,sBAAA;AFokF5rsC;;AEpkFktsC;EAAgF,sBAAA;EAAsB,8BAAA;EAAA,sBAAA;AFykFxzsC;;AEzkF60sC;EAA4B;IAAG,mBAAA;EF8kF12sC;AACF;;AE/kF60sC;EAA4B;IAAG,mBAAA;EF8kF12sC;AACF;AE/kFg4sC;EAA4B;IAAK,iCAAA;IAAA,yBAAA;EFmlF/5sC;AACF;AEplFg4sC;EAA4B;IAAK,iCAAA;IAAA,yBAAA;EFmlF/5sC;AACF;AEplF27sC;EAA4B;IAAG,yBAAA;EFwlFx9sC;EExlFi/sC;IAAI,yBAAA;EF2lFr/sC;EE3lF8gtC;IAAI,sBAAA;EF8lFlhtC;EE9lFwitC;IAAI,yBAAA;EFimF5itC;EEjmFqktC;IAAK,yBAAA;EFomF1ktC;AACF;AErmF27sC;EAA4B;IAAG,yBAAA;EFwlFx9sC;EExlFi/sC;IAAI,yBAAA;EF2lFr/sC;EE3lF8gtC;IAAI,sBAAA;EF8lFlhtC;EE9lFwitC;IAAI,yBAAA;EFimF5itC;EEjmFqktC;IAAK,yBAAA;EFomF1ktC;AACF;AErmFsmtC;EAAmD,aAAA;AFwmFzptC;;AExmFsqtC;EAAkC,WAAA;AF4mFxstC;;AE5mFmttC;EAAuD,aAAA;AFgnF1wtC;;AEhnFuxtC;EAAsE,YAAA;EAAY,aAAA;AFqnFz2tC;;AErnFs3tC;EAA4G,sBAAA;EAAsB,qBAAA;EAAqB,qBAAA;AF2nF7guC;;AE3nFiiuC;EAAmH,oBAAA;EAAoB,gBAAA;EAAgB,gBAAA;EAAgB,oBAAA;AFkoFxsuC;;AEloF4tuC;EAAoD,aAAA;AFsoFhxuC;;AEtoF6xuC;EAAoN,sBAAA;EAAsB,qBAAA;EAAqB,qBAAA;AF4oF5hvC;;AE5oFgjvC;EAAkO,oBAAA;EAAoB,iBAAA;EAAiB,gBAAA;EAAgB,oBAAA;AFmpFv0vC;;AEnpF21vC;EAAmzB,aAAA;AFupF9oxC;;AEvpF2pxC;EAA2+B,WAAA;EAAW,cAAA;AF4pFjpzC;;AE5pF+pzC;EAAmG,aAAA;AFgqFlwzC;;AEhqF+wzC;EAAwD,mBAAA;EAAA,cAAA;EAAA,UAAA;EAAU,cAAA;AFqqFj1zC;;AErqF+1zC;EAA0C,yBAAA;EAAyB,wCAAA;EAAoC,WAAA;EAAW,WAAA;AF4qFj9zC;;AE5qF49zC;EAAoC,aAAA;AFgrFhg0C;;AEhrF6g0C;EAAmD,cAAA;AForFhk0C;;AEprF8k0C;EAA4J,mBAAA;AFwrF1u0C;;AExrF6v0C;EAAsD,iBAAA;EAAiB,sBAAA;AF6rFp00C;;AE7rF010C;EAAyB;IAAmD,iBAAA;IAAA,aAAA;IAAa,yBAAA;IAAA,8BAAA;IAA8B,kBAAA;IAAA,uBAAA;IAAuB,yBAAA;EFqsFt+0C;EErsF+/0C;IAAiD,mBAAA;EFwsFhj1C;EExsFmk1C;IAAsD,iBAAA;EF2sFzn1C;EE3sF0o1C;IAAgN,qBAAA;IAAA,0BAAA;EF8sF111C;AACF;AE/sFu31C;EAAgC,kBAAA;AFktFv51C;;AEltFy61C;EAA0B,iBAAA;EAAiB,oBAAA;AFutFp91C;;AEvtFu+1C;EAAkC,YAAA;EAAY,YAAA;AF4tFrh2C;;AE5tFii2C;EAAuC,qBAAA;EAAqB,sBAAA;AFiuF7l2C;;AEjuFin2C;EAA8C,gBAAA;AFquF/p2C;;AEruF+q2C;EAAgC,WAAA;EAAW,gBAAA;EAAgB,gBAAA;AF2uF1u2C;;AE3uF0v2C;EAAoC,uBAAA;AF+uF9x2C;;AE/uFmz2C;EAAqF,oBAAA;EAAoB,qBAAA;EAAqB,qGAAA;EAAA,+DAAA;AFqvFj72C;;AErvF8+2C;EAA0C,6BAAA;AFyvFxh3C;;AEzvFij3C;EAAoC,sBAAA;EAAsB,qGAAA;EAAA,kEAAA;EAAgE,cAAA;EAAc,eAAA;EAAe,kBAAA;AFiwFxs3C;;AEjwF0t3C;EAAiD,iBAAA;AFqwF3w3C;;AErwF4x3C;EAAe,8BAAA;EAA0B,yJAAA;EAAA,wGAAA;EAA0F,gBAAA;EAAgB,gBAAA;EAAgB,gCAAA;EAAA,wBAAA;EAAuB,4BAAA;EAA2B,oBAAA;EAAoB,kBAAA;EAAkB,MAAA;EAAM,WAAA;AFkxF7h4C;;AElxFwi4C;EAA0B,aAAA;AFsxFlk4C;;AEtxF+k4C;EAAgD,SAAA;EAAS,gBAAA;EAAgB,uBAAA;EAAuB,mBAAA;AF6xF/q4C;;AE7xFks4C;EAAqB,gBAAA;EAAgB,sBAAA;AFkyFvu4C;;AElyF4v4C;EAA8C,UAAA;EAAU,8BAAA;EAAA,sBAAA;AFuyFpz4C;;AEvyF004C;EAA8B,eAAA;AF2yFx24C;;AE3yFu34C;EAA+B,eAAA;AF+yFt54C;;AE/yFq64C;EAA+B,eAAA;AFmzFp84C;;AEnzFm94C;EAA+B,eAAA;AFuzFl/4C;;AEvzFig5C;EAAgC,eAAA;AF2zFji5C;;AE3zFgj5C;EAAgC,eAAA;AF+zFhl5C;;AE/zF+l5C;EAAa;IAA2C,kBAAA;EFo0Frp5C;AACF;AEr0F0q5C;EAAoB,kBAAA;EAAkB,MAAA;EAAM,OAAA;EAAO,WAAA;EAAW,YAAA;EAAY,YAAA;EAAY,cAAA;AF80Fhw5C;;AE90F8w5C;EAAuD,UAAA;AFk1Fr05C;;AEl1F+05C;EAAqC,UAAA;AFs1Fp35C;;AGt1FA;EAAU,kBAAA;EAAkB,8BAAA;EAAA,sBAAA;AH21F5B;;AG31FkD;EAAiD,2BAAA;EAAA,mBAAA;AH+1FnG;;AG/1FsH;EAAuB,YAAA;EAAY,oBAAA;EAAA,YAAA;AHo2FzJ;;AGp2FqK;EAAsB,YAAA;EAAY,wBAAA;EAAA,gBAAA;AHy2FvM;;AGz2FuN;EAAoB,kBAAA;EAAkB,gBAAA;EAAgB,eAAA;EAAe,gBAAA;AHg3F5R;;AGh3F4S;EAAiB,oBAAA;EAAA,oBAAA;EAAA,aAAA;AHo3F7T;;AGp3F0U;EAAiB,mBAAA;EAAA,kBAAA;EAAA,cAAA;EAAc,uCAAA;EAAuC,eAAA;EAAe,aAAA;EAAa,kBAAA;EAAkB,kBAAA;EAAkB,gBAAA;EAAgB,yBAAA;EAAA,4BAAA;AH+3Fhe;;AG/3F4f;EAAU,kCAAA;AHm4FtgB;;AGn4FwiB;EAAgB,cAAA;EAAc,UAAA;EAAU,kBAAA;EAAkB,wBAAA;EAAwB,OAAA;EAAO,QAAA;EAAQ,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,gBAAA;EAAgB,yBAAA;EAAA,sBAAA;EAAA,qBAAA;EAAA,iBAAA;AHg5F7rB;;AGh5F8sB;EAA+B,SAAA;EAAS,UAAA;EAAU,cAAA;EAAc,kBAAA;EAAkB,WAAA;EAAW,YAAA;EAAY,eAAA;AH05FvzB;;AG15Fs0B;EAAqC,WAAA;EAAW,UAAA;EAAU,WAAA;EAAW,kBAAA;EAAkB,kBAAA;EAAkB,QAAA;EAAQ,SAAA;EAAS,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EAAgC,8BAAA;EAA8B,aAAA;EAAY,6CAAA;EAAA,qCAAA;AHw6F1gC;;AGx6F8iC;EAAiD,UAAA;AH46F/lC;;AG56FymC;EAAkB,yCAAA;EAAyC,2CAAA;EAA2C,UAAA;EAAU,SAAA;EAAS,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,mBAAA;EAAmB,eAAA;EAAe,iDAAA;EAAiD,kDAAA;EAAkD,wDAAA;EAAwD,uDAAA;EAAA,+CAAA;EAA+C,sCAAA;EAAA,8BAAA;AH67FrgD;;AG77FkiD;EAAoD,kBAAA;EAAkB,QAAA;EAAQ,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AHm8FhnD;;AGn8F2oD;EAA0B,UAAA;AHu8FrqD;;AGv8F+qD;EAA0B,WAAA;AH28FzsD;;AG38FotD;EAA4B,eAAA;EAAe,YAAA;AHg9F/vD;;AGh9F0wD;EAAsB,4CAAA;EAA4C,8CAAA;EAA8C,UAAA;EAAU,oBAAA;EAAoB,0DAAA;EAA0D,sBAAA;EAAsB,qBAAA;EAAqB,uDAAA;EAAA,+CAAA;EAA+C,oBAAA;AH49F5iE;;AG59FgkE;EAAmB,qBAAA;AHg+FnlE;;AGh+FwmE;EAA8B,2BAAA;EAA2B,sBAAA;EAAA,kBAAA;AHq+FjqE;;AGr+FmrE;EAAqB,eAAA;EAAe,MAAA;EAAM,OAAA;EAAO,SAAA;EAAS,QAAA;EAAQ,cAAA;EAAc,SAAA;EAAS,sIAAA;EAAsI,8BAAA;EAAA,sBAAA;EAAsB,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EAAsB,kCAAA;EAAkC,6CAAA;EAA0C,gBAAA;EAAgB,aAAA;EAAa,aAAA;EAAa,kCAAA;EAAA,8BAAA;EAAA,0BAAA;EAA0B,6BAAA;EAA8B,8BAAA;EAA+B,iCAAA;EAAkC,kCAAA;EAAmC,uCAAA;EAAwC,yEAAA;AH+/FrwF;;AG//F+0F;EAAoF,2BAAA;EAAA,mBAAA;AHmgGn6F;;AGngGs7F;EAA4B,aAAA;AHugGl9F;;AGvgG+9F;EAAsD,mGAAA;EAAA,2FAAA;AH2gGrhG;;AG3gG+mG;EAAmC;IAAqB,4BAAA;IAA6B,6BAAA;IAA8B,gCAAA;IAAiC,iCAAA;EHmhGjwG;AACF;AGphGsyG;EAAoB,kBAAA;EAAkB,MAAA;EAAM,QAAA;EAAQ,SAAA;EAAS,OAAA;EAAO,WAAA;EAAW,sDAAA;AH6hGr3G;;AG7hG26G;EAAoB,kBAAA;EAAkB,mBAAA;EAAA,kBAAA;EAAA,cAAA;EAAc,aAAA;EAAa,YAAA;EAAY,WAAA;AHqiGx/G;;AGriGmgH;EAA6B,kCAAA;AHyiGhiH;;AGziGkkH;EAAoB,kBAAA;EAAkB,WAAA;EAAW,YAAA;EAAY,iBAAA;EAAiB,eAAA;AHijGhpH;;AGjjG+pH;EAAiB,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,YAAA;AHsjG7rH;;AGtjGysH;EAAiB,mBAAA;EAAA,kBAAA;EAAA,cAAA;EAAc,WAAA;EAAW,eAAA;EAAe,SAAA;EAAS,yBAAA;EAAyB,kBAAA;EAAkB,yBAAA;EAAA,4BAAA;EAA4B,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EAAsB,UAAA;EAAU,cAAA;EAAc,6BAAA;EAA8B,8BAAA;EAA+B,iCAAA;EAAkC,kCAAA;AHwkG5+H;;AGxkG+gI;EAAiD,WAAA;EAAW,mBAAA;EAAA,iBAAA;EAAA,WAAA;EAAW,YAAA;AH8kGtlI;;AG9kGkmI;EAAmC;IAAiB,mBAAA;EHmlGppI;AACF;AGplG0qI;EAAmB,0EAAA;EAA0E,aAAA;EAAa,6CAAA;EAA6C,4CAAA;EAA4C,kBAAA;EAAkB,2BAAA;EAAA,0BAAA;EAAA,kBAAA;EAAkB,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,4BAAA;EAAA,6BAAA;EAAA,0BAAA;EAAA,sBAAA;EAAsB,WAAA;AH+lGp7I;;AG/lG+7I;EAA0D,oBAAA;EAAoB,wBAAA;EAAA,gBAAA;AHomG7gJ;;AGpmG6hJ;EAAmB,2BAAA;EAAA,0BAAA;EAAA,kBAAA;EAAkB,eAAA;EAAe,SAAA;EAAS,mBAAA;EAAmB,kBAAA;EAAkB,0CAAA;EAA0C,mBAAA;EAAmB,YAAA;EAAY,oBAAA;EAAA,cAAA;EAAc,uBAAA;AHinGttJ;;AGjnG6uJ;EAA+B,kBAAA;AHqnG5wJ;;AGrnG8xJ;EAAqC,SAAA;EAAS,kCAAA;AH0nG50J;;AG1nG82J;EAAiC,WAAA;AH8nG/4J;;AG9nG05J;EAAyC,UAAA;AHkoGn8J;;AGloG68J;EAAmC;IAAyC,WAAA;EHuoGvhK;AACF;AGxoGqiK;EAAyC,SAAA;AH2oG9kK;;AG3oGulK;EAAmC;IAAyC,UAAA;EHgpGjqK;AACF;AGjpG8qK;EAA2B,kBAAA;EAAkB,QAAA;EAAQ,UAAA;EAAU,8CAAA;EAA8C,kDAAA;EAAkD,WAAA;AHypG70K;;AGzpGw1K;EAAmC;IAA2B,WAAA;EH8pGp5K;AACF;AG/pGk6K;EAA8C,kBAAA;EAAkB,UAAA;EAAU,QAAA;EAAQ,kCAAA;AHqqGp/K;;AGrqGshL;EAA+C,oBAAA;AHyqGrkL;;AGzqGylL;EAAmB,kBAAA;EAAkB,QAAA;EAAQ,SAAA;EAAS,wCAAA;EAAA,oCAAA;EAAA,gCAAA;EAAgC,WAAA;EAAW,YAAA;EAAY,0CAAA;AHmrGtsL;;AGnrGgvL;EAAoC,eAAA;EAAe,aAAA;AHwrGnyL;;AGxrGgzL;EAAuB,qDAAA;EAAA,6CAAA;EAA6C,uCAAA;EAAA,mCAAA;EAAA,+BAAA;EAA+B,kBAAA;EAAkB,MAAA;EAAM,QAAA;EAAQ,SAAA;EAAS,OAAA;EAAO,YAAA;EAAY,WAAA;EAAW,YAAA;AHqsG19L;;AGrsGs+L;EAA8B,UAAA;EAAU,kBAAA;EAAkB,qBAAA;EAAqB,wBAAA;EAAuB,oBAAA;EAAoB,0DAAA;EAAA,kDAAA;EAAkD,qBAAA;EAAqB,oBAAA;AHgtGvqM;;AGhtG2rM;EAA2B;IAAK,iCAAA;IAAA,yBAAA;EHqtGztM;AACF;;AGttG2rM;EAA2B;IAAK,iCAAA;IAAA,yBAAA;EHqtGztM;AACF;AGttGqvM;EAAyB;IAAG,wBAAA;IAAuB,oBAAA;EH2tGtyM;EG3tG0zM;IAAI,yBAAA;IAAwB,wBAAA;EH+tGt1M;EG/tG82M;IAAK,yBAAA;IAAwB,yBAAA;EHmuG34M;AACF;AGpuGqvM;EAAyB;IAAG,wBAAA;IAAuB,oBAAA;EH2tGtyM;EG3tG0zM;IAAI,yBAAA;IAAwB,wBAAA;EH+tGt1M;EG/tG82M;IAAK,yBAAA;IAAwB,yBAAA;EHmuG34M;AACF;AGpuGu6M;EAAiG,mCAAA;AHuuGxgN;;AGvuG2iN;EAAqW,uDAAA;EAAA,+CAAA;AH2uGh5N;;AG3uG87N;EAA6T,mDAAA;EAAA,2CAAA;AH+uG3vO;;AG/uGqyO;EAAiB,kDAAA;EAAA,0CAAA;AHmvGtzO;;AGnvG+1O;EAAkB,kDAAA;EAAA,0CAAA;AHuvGj3O;;AGvvG05O;EAAmB,mDAAA;EAAA,2CAAA;AH2vG76O;;AG3vGu9O;EAAsB,uDAAA;EAAA,+CAAA;AH+vG7+O;;AG/vG2hP;EAAqB,sDAAA;EAAA,8CAAA;AHmwGhjP;;AGnwG6lP;EAAuB,wDAAA;EAAA,gDAAA;AHuwGpnP;;AGvwGmqP;EAA2B;IAAK,UAAA;EH4wGjsP;EG5wG2sP;IAAG,UAAA;EH+wG9sP;AACF;;AGhxGmqP;EAA2B;IAAK,UAAA;EH4wGjsP;EG5wG2sP;IAAG,UAAA;EH+wG9sP;AACF;AGhxG2tP;EAA4B;IAAG,UAAA;EHoxGxvP;AACF;AGrxG2tP;EAA4B;IAAG,UAAA;EHoxGxvP;AACF;AGrxGqwP;EAA6B;IAAK,sDAAA;IAAA,8CAAA;IAA8C,UAAA;EH0xGn1P;EG1xG61P;IAAG,gDAAA;IAAA,wCAAA;IAAwC,UAAA;EH8xGx4P;AACF;AG/xGqwP;EAA6B;IAAK,sDAAA;IAAA,8CAAA;IAA8C,UAAA;EH0xGn1P;EG1xG61P;IAAG,gDAAA;IAAA,wCAAA;IAAwC,UAAA;EH8xGx4P;AACF;AG/xGq5P;EAAgC;IAAG,sDAAA;IAAA,8CAAA;IAA8C,UAAA;EHoyGp+P;AACF;AGryGq5P;EAAgC;IAAG,sDAAA;IAAA,8CAAA;IAA8C,UAAA;EHoyGp+P;AACF;AGryGi/P;EAA+B;IAAG,0CAAA;IAAA,kCAAA;IAAkC,UAAA;EH0yGnjQ;AACF;AG3yGi/P;EAA+B;IAAG,0CAAA;IAAA,kCAAA;IAAkC,UAAA;EH0yGnjQ;AACF;AG3yGgkQ;EAAiC;IAAG,yCAAA;IAAA,iCAAA;IAAiC,UAAA;EHgzGnoQ;AACF;AGjzGgkQ;EAAiC;IAAG,yCAAA;IAAA,iCAAA;IAAiC,UAAA;EHgzGnoQ;AACF;AGjzGgpQ;EAAqC,qBAAA;EAAqB,8CAAA;AHqzG1sQ;;AGrzGovQ;EAAwD,UAAA;EAAU,WAAA;AH0zGtzQ;;AG1zGi0Q;EAA8D,0CAAA;AH8zG/3Q;;AG9zGq6Q;EAA8D,sBAAA;EAAsB,kBAAA;EAAkB,oDAAA;EAAA,4CAAA;AHo0G3gR;;AGp0GmjR;EAAuH,YAAA;EAAY,oBAAA;EAAA,YAAA;AHy0GtrR;;AGz0GksR;EAAqH,YAAA;EAAY,wBAAA;EAAA,gBAAA;AH80Gn0R;;AG90Gm1R;EAAwD,YAAA;AHk1G34R;;AGl1Gu5R;EAAoE,uBAAA;EAAA,eAAA;AHs1G39R;;AGt1G0+R;EAAqE,wBAAA;EAAA,gBAAA;AH01G/iS;;AG11G+jS;EAAqE,YAAA;EAAY,oBAAA;EAAA,YAAA;AH+1GhpS;;AG/1G4pS;EAAoE,YAAA;EAAY,wBAAA;EAAA,gBAAA;AHo2G5uS;;AGp2G4vS;EAAiB,6BAAA;EAAA,yBAAA;EAAA,qBAAA;EAAqB,yBAAA;EAAA,sBAAA;EAAA,qBAAA;EAAA,iBAAA;EAAiB,wBAAA;EAAA,gBAAA;AH02GnzS;;AG12Gm0S;EAA8B,UAAA;EAAU,4BAAA;EAAyB,eAAA;AHg3Gp4S;;AGh3Gm5S;EAA0C,iBAAA;AHo3G77S;;AGp3G88S;EAAmC,iBAAA;EAAiB,sBAAA;EAAA,kBAAA;AHy3GlgT;;AGz3GohT;EAAsD,8BAAA;EAAA,6BAAA;EAAA,uBAAA;EAAA,mBAAA;EAAmB,mBAAA;EAAA,eAAA;AH83G7lT;;AG93G4mT;EAAoD,eAAA;EAAe,gBAAA;EAAgB,sBAAA;EAAA,mBAAA;AHo4G/rT;;AGp4GktT;EAAqC,kBAAA;EAAkB,gBAAA;AHy4GzwT;;AGz4GyxT;EAAwD,gBAAA;AH64Gj1T;;AG74Gi2T;EAAsD,eAAA;EAAe,YAAA;AHk5Gt6T;;AGl5Gk7T;EAAiC,iBAAA;EAAiB,sBAAA;EAAA,kBAAA;AHu5Gp+T;;AGv5Gs/T;EAAoD,WAAA;EAAW,YAAA;AH45GrjU;;AG55GikU;EAAkD,WAAA;EAAW,YAAA;EAAY,oBAAA;EAAA,iBAAA;AHk6G1oU;;AGl6G2pU;EAA4U,eAAA;EAAe,oBAAA;EAAA,cAAA;EAAc,eAAA;EAAe,iBAAA;AHy6GnhV;;AGz6GoiV;EAAmM,WAAA;EAAW,WAAA;AH86GlvV;;AG96G6vV;EAAyI,YAAA;EAAY,aAAA;EAAa,eAAA;EAAe,gBAAA;AHq7G96V;;AGr7G87V;EAAyQ,UAAA;EAAU,iCAAA;EAA6B,WAAA;AH27G9uW;;AG37GyvW;EAAgE,mBAAA;AH+7GzzW;;AG/7G40W;EAAwC,SAAA;EAAS,cAAA;EAAc,YAAA;EAAY,WAAA;EAAW,4BAAA;AHu8Gl6W;;AGv8G27W;EAAsB,kBAAA;EAAkB,UAAA;EAAU,WAAA;EAAW,UAAA;EAAU,YAAA;EAAY,gBAAA;EAAgB,sBAAA;EAAsB,mBAAA;EAAmB,eAAA;AHm9GvkX;;AGn9GslX;EAAkB,mBAAA;EAAA,kBAAA;EAAA,cAAA;EAAc,kBAAA;EAAkB,gBAAA;EAAgB,mCAAA;AH09GxpX;;AG19G2rX;EAAsE,0DAAA;EAAA,kDAAA;AH89GjwX;;AG99GkzX;EAA8D,UAAA;AHk+Gh3X;;AGl+G03X;EAAmC,mBAAA;EAAA,kBAAA;EAAA,cAAA;EAAc,yCAAA;EAAyC,SAAA;EAAS,gBAAA;EAAgB,+BAAA;EAAA,uBAAA;EAAuB,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,yBAAA;EAAA,sBAAA;EAAA,mBAAA;EAAmB,wBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAuB,iBAAA;EAAiB,eAAA;AH++G5kY;;AG/+G2lY;EAA2D,WAAA;EAAW,kBAAA;EAAkB,MAAA;EAAM,OAAA;EAAO,QAAA;EAAQ,SAAA;EAAS,iBAAA;EAAiB,mBAAA;EAAmB,oEAAA;EAAoE,UAAA;EAAU,sCAAA;EAAA,8BAAA;EAA6B,wDAAA;AH8/Gh2Y;;AG9/Gw5Y;EAA2E,aAAA;AHkgHn+Y;;AGlgH++Y;EAAqC,oBAAA;EAAoB,yBAAA;EAAA,sBAAA;EAAA,qBAAA;EAAA,iBAAA;AHugHxiZ;;AGvgHyjZ;EAAiB,kBAAA;EAAkB,WAAA;EAAW,6DAAA;EAA2D,sBAAA;EAAsB,kCAAA;EAAkC,0CAAA;EAAsC,4BAAA;EAA4B,wDAAA;AHkhH5xZ;;AGlhHo1Z;EAAmB,kBAAA;EAAkB,MAAA;EAAM,QAAA;EAAQ,OAAA;EAAO,WAAA;EAAW,qvBAAA;EAAA,qiBAAA;EAAqiB,UAAA;EAAU,sBAAA;EAAA,kBAAA;EAAkB,oBAAA;EAAA,oBAAA;EAAA,aAAA;EAAa,yBAAA;EAAA,sBAAA;EAAA,8BAAA;EAA8B,iCAAA;EAAkC,kCAAA;EAAmC,mCAAA;EAAmC,gFAAA;AHmiH7mb;;AGniH6rb;EAAmC;IAAmB,YAAA;EHwiHjvb;AACF;AGziHgwb;EAAuE,0DAAA;EAAA,kDAAA;AH4iHv0b;;AG5iHw3b;EAA+D,UAAA;AHgjHv7b;;AGhjHi8b;EAA0B,oBAAA;EAAA,oBAAA;EAAA,aAAA;AHojH39b;;AGpjHw+b;EAAgC,kBAAA;AHwjHxgc;;AGxjH0hc;EAAkC,kBAAA;EAAkB,SAAA;EAAS,mCAAA;EAAA,+BAAA;EAAA,2BAAA;AH8jHvlc;;AG9jHknc;EAAiC,iBAAA;AHkkHnpc;;AGlkHoqc;EAAyB;IAAmD,aAAA;EHukH9uc;AACF;AGxkH8vc;EAAmB,eAAA;EAAe,eAAA;EAAe,gDAAA;EAAgD,kBAAA;EAAkB,eAAA;EAAe,kCAAA;EAAkC,4CAAA;AHilHl6c;;AGjlH88c;EAAoB,kEAAA;EAAkE,WAAA;EAAW,OAAA;EAAO,kBAAA;EAAkB,QAAA;EAAQ,MAAA;EAAM,4BAAA;EAAA,wBAAA;EAAA,oBAAA;EAAoB,2BAAA;EAAA,uBAAA;EAAA,mBAAA;EAAmB,8CAAA;EAAA,sCAAA;EAAA,8BAAA;EAAA,iDAAA;EAA8B,0CAAA;EAAA,kCAAA;EAAkC,WAAA;EAAW,yBAAA;EAAA,sBAAA;EAAA,qBAAA;EAAA,iBAAA;AHgmHxsd;;AGhmHytd;EAA0C,UAAA;AHomHnwd;;AGpmHytd;EAA0C,UAAA;AHomHnwd;;AGpmHytd;EAA0C,UAAA;AHomHnwd;;AGpmHytd;EAA0C,UAAA;AHomHnwd;;AGpmH6wd;EAA6C,aAAA;AHwmH1zd;;AGxmHu0d;EAA6E,aAAA;AH4mHp5d;;AG5mHu0d;EAA6E,aAAA;AH4mHp5d;;AG5mHu0d;EAA6E,aAAA;AH4mHp5d;;AG5mHi6d;EAA6E,cAAA;AHgnH9+d;;AGhnHi6d;EAA6E,cAAA;AHgnH9+d;;AGhnHi6d;EAA6E,cAAA;AHgnH9+d;;AGhnH4/d;EAA4C,aAAA;AHonHxie;;AGpnHqje;EAA+E,aAAA;AHwnHpoe;;AGxnHipe;EAA+E,cAAA;AH4nHhue","file":"vendor.css","sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\r\n\r\n/* Document\r\n ========================================================================== */\r\n\r\n/**\r\n * 1. Correct the line height in all browsers.\r\n * 2. Prevent adjustments of font size after orientation changes in iOS.\r\n */\r\n\r\nhtml {\r\n\tline-height: 1.15;\r\n\t/* 1 */\r\n\t-webkit-text-size-adjust: 100%;\r\n\t/* 2 */\r\n}\r\n\r\n/* Sections\r\n ========================================================================== */\r\n\r\n/**\r\n * Remove the margin in all browsers.\r\n */\r\n\r\nbody {\r\n\tmargin: 0;\r\n}\r\n\r\n/**\r\n * Render the `main` element consistently in IE.\r\n */\r\n\r\nmain {\r\n\tdisplay: block;\r\n}\r\n\r\n/**\r\n * Correct the font size and margin on `h1` elements within `section` and\r\n * `article` contexts in Chrome, Firefox, and Safari.\r\n */\r\n\r\nh1 {\r\n\tfont-size: 2em;\r\n\tmargin: 0.67em 0;\r\n}\r\n\r\n/* Grouping content\r\n ========================================================================== */\r\n\r\n/**\r\n * 1. Add the correct box sizing in Firefox.\r\n * 2. Show the overflow in Edge and IE.\r\n */\r\n\r\nhr {\r\n\tbox-sizing: content-box;\r\n\t/* 1 */\r\n\theight: 0;\r\n\t/* 1 */\r\n\toverflow: visible;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * 1. Correct the inheritance and scaling of font size in all browsers.\r\n * 2. Correct the odd `em` font sizing in all browsers.\r\n */\r\n\r\npre {\r\n\tfont-family: monospace, monospace;\r\n\t/* 1 */\r\n\tfont-size: 1em;\r\n\t/* 2 */\r\n}\r\n\r\n/* Text-level semantics\r\n ========================================================================== */\r\n\r\n/**\r\n * Remove the gray background on active links in IE 10.\r\n */\r\n\r\na {\r\n\tbackground-color: transparent;\r\n\tcolor: inherit;\r\n\ttext-decoration: none;\r\n}\r\n\r\np {\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n}\r\n\r\nul,\r\nli {\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tlist-style: none;\r\n}\r\n\r\n/**\r\n * 1. Remove the bottom border in Chrome 57-\r\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\r\n */\r\n\r\nabbr[title] {\r\n\tborder-bottom: none;\r\n\t/* 1 */\r\n\ttext-decoration: underline;\r\n\t/* 2 */\r\n\ttext-decoration: underline dotted;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * Add the correct font weight in Chrome, Edge, and Safari.\r\n */\r\n\r\nb,\r\nstrong {\r\n\tfont-weight: bolder;\r\n}\r\n\r\n/**\r\n * 1. Correct the inheritance and scaling of font size in all browsers.\r\n * 2. Correct the odd `em` font sizing in all browsers.\r\n */\r\n\r\ncode,\r\nkbd,\r\nsamp {\r\n\tfont-family: monospace, monospace;\r\n\t/* 1 */\r\n\tfont-size: 1em;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * Add the correct font size in all browsers.\r\n */\r\n\r\nsmall {\r\n\tfont-size: 80%;\r\n}\r\n\r\n/**\r\n * Prevent `sub` and `sup` elements from affecting the line height in\r\n * all browsers.\r\n */\r\n\r\nsub,\r\nsup {\r\n\tfont-size: 75%;\r\n\tline-height: 0;\r\n\tposition: relative;\r\n\tvertical-align: baseline;\r\n}\r\n\r\nsub {\r\n\tbottom: -0.25em;\r\n}\r\n\r\nsup {\r\n\ttop: -0.5em;\r\n}\r\n\r\n/* Embedded content\r\n ========================================================================== */\r\n\r\n/**\r\n * Remove the border on images inside links in IE 10.\r\n */\r\n\r\nimg {\r\n\tborder-style: none;\r\n}\r\n\r\n/* Forms\r\n ========================================================================== */\r\n\r\n/**\r\n * 1. Change the font styles in all browsers.\r\n * 2. Remove the margin in Firefox and Safari.\r\n */\r\n\r\nbutton,\r\ninput,\r\noptgroup,\r\nselect,\r\ntextarea {\r\n\tfont-family: inherit;\r\n\t/* 1 */\r\n\tfont-size: 100%;\r\n\t/* 1 */\r\n\tline-height: 1.15;\r\n\t/* 1 */\r\n\tmargin: 0;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * Show the overflow in IE.\r\n * 1. Show the overflow in Edge.\r\n */\r\n\r\nbutton,\r\ninput {\r\n\t/* 1 */\r\n\toverflow: visible;\r\n}\r\n\r\n/**\r\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\r\n * 1. Remove the inheritance of text transform in Firefox.\r\n */\r\n\r\nbutton,\r\nselect {\r\n\t/* 1 */\r\n\ttext-transform: none;\r\n}\r\n\r\n/**\r\n * Correct the inability to style clickable types in iOS and Safari.\r\n */\r\n\r\nbutton,\r\n[type=\"button\"],\r\n[type=\"reset\"],\r\n[type=\"submit\"] {\r\n\t-webkit-appearance: button;\r\n}\r\n\r\n/**\r\n * Remove the inner border and padding in Firefox.\r\n */\r\n\r\nbutton::-moz-focus-inner,\r\n[type=\"button\"]::-moz-focus-inner,\r\n[type=\"reset\"]::-moz-focus-inner,\r\n[type=\"submit\"]::-moz-focus-inner {\r\n\tborder-style: none;\r\n\tpadding: 0;\r\n}\r\n\r\n/**\r\n * Restore the focus styles unset by the previous rule.\r\n */\r\n\r\nbutton:-moz-focusring,\r\n[type=\"button\"]:-moz-focusring,\r\n[type=\"reset\"]:-moz-focusring,\r\n[type=\"submit\"]:-moz-focusring {\r\n\toutline: 1px dotted ButtonText;\r\n}\r\n\r\n/**\r\n * Correct the padding in Firefox.\r\n */\r\n\r\nfieldset {\r\n\tpadding: 0.35em 0.75em 0.625em;\r\n}\r\n\r\n/**\r\n * 1. Correct the text wrapping in Edge and IE.\r\n * 2. Correct the color inheritance from `fieldset` elements in IE.\r\n * 3. Remove the padding so developers are not caught out when they zero out\r\n * `fieldset` elements in all browsers.\r\n */\r\n\r\nlegend {\r\n\tbox-sizing: border-box;\r\n\t/* 1 */\r\n\tcolor: inherit;\r\n\t/* 2 */\r\n\tdisplay: table;\r\n\t/* 1 */\r\n\tmax-width: 100%;\r\n\t/* 1 */\r\n\tpadding: 0;\r\n\t/* 3 */\r\n\twhite-space: normal;\r\n\t/* 1 */\r\n}\r\n\r\n/**\r\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\r\n */\r\n\r\nprogress {\r\n\tvertical-align: baseline;\r\n}\r\n\r\n/**\r\n * Remove the default vertical scrollbar in IE 10+.\r\n */\r\n\r\ntextarea {\r\n\toverflow: auto;\r\n}\r\n\r\n/**\r\n * 1. Add the correct box sizing in IE 10.\r\n * 2. Remove the padding in IE 10.\r\n */\r\n\r\n[type=\"checkbox\"],\r\n[type=\"radio\"] {\r\n\tbox-sizing: border-box;\r\n\t/* 1 */\r\n\tpadding: 0;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * Correct the cursor style of increment and decrement buttons in Chrome.\r\n */\r\n\r\n[type=\"number\"]::-webkit-inner-spin-button,\r\n[type=\"number\"]::-webkit-outer-spin-button {\r\n\theight: auto;\r\n}\r\n\r\n/**\r\n * 1. Correct the odd appearance in Chrome and Safari.\r\n * 2. Correct the outline style in Safari.\r\n */\r\n\r\n[type=\"search\"] {\r\n\t-webkit-appearance: textfield;\r\n\t/* 1 */\r\n\toutline-offset: -2px;\r\n\t/* 2 */\r\n}\r\n\r\n/**\r\n * Remove the inner padding in Chrome and Safari on macOS.\r\n */\r\n\r\n[type=\"search\"]::-webkit-search-decoration {\r\n\t-webkit-appearance: none;\r\n}\r\n\r\n/**\r\n * 1. Correct the inability to style clickable types in iOS and Safari.\r\n * 2. Change font properties to `inherit` in Safari.\r\n */\r\n\r\n::-webkit-file-upload-button {\r\n\t-webkit-appearance: button;\r\n\t/* 1 */\r\n\tfont: inherit;\r\n\t/* 2 */\r\n}\r\n\r\n/* Interactive\r\n ========================================================================== */\r\n\r\n/*\r\n * Add the correct display in Edge, IE 10+, and Firefox.\r\n */\r\n\r\ndetails {\r\n\tdisplay: block;\r\n}\r\n\r\n/*\r\n * Add the correct display in all browsers.\r\n */\r\n\r\nsummary {\r\n\tdisplay: list-item;\r\n}\r\n\r\n/* Misc\r\n ========================================================================== */\r\n\r\n/**\r\n * Add the correct display in IE 10+.\r\n */\r\n\r\ntemplate {\r\n\tdisplay: none;\r\n}\r\n\r\n/**\r\n * Add the correct display in IE 10.\r\n */\r\n\r\n[hidden] {\r\n\tdisplay: none;\r\n}","/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n/* Document\n ========================================================================== */\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\nhtml {\n line-height: 1.15;\n /* 1 */\n -webkit-text-size-adjust: 100%;\n /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n/**\n * Remove the margin in all browsers.\n */\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\nhr {\n box-sizing: content-box;\n /* 1 */\n height: 0;\n /* 1 */\n overflow: visible;\n /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\npre {\n font-family: monospace, monospace;\n /* 1 */\n font-size: 1em;\n /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n/**\n * Remove the gray background on active links in IE 10.\n */\na {\n background-color: transparent;\n color: inherit;\n text-decoration: none;\n}\n\np {\n padding: 0;\n margin: 0;\n}\n\nul,\nli {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\nabbr[title] {\n border-bottom: none;\n /* 1 */\n text-decoration: underline;\n /* 2 */\n text-decoration: underline dotted;\n /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n /* 1 */\n font-size: 1em;\n /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n/**\n * Remove the border on images inside links in IE 10.\n */\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit;\n /* 1 */\n font-size: 100%;\n /* 1 */\n line-height: 1.15;\n /* 1 */\n margin: 0;\n /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\nbutton,\n[type=button],\n[type=reset],\n[type=submit] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\nbutton::-moz-focus-inner,\n[type=button]::-moz-focus-inner,\n[type=reset]::-moz-focus-inner,\n[type=submit]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\nbutton:-moz-focusring,\n[type=button]:-moz-focusring,\n[type=reset]:-moz-focusring,\n[type=submit]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\nlegend {\n box-sizing: border-box;\n /* 1 */\n color: inherit;\n /* 2 */\n display: table;\n /* 1 */\n max-width: 100%;\n /* 1 */\n padding: 0;\n /* 3 */\n white-space: normal;\n /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n[type=checkbox],\n[type=radio] {\n box-sizing: border-box;\n /* 1 */\n padding: 0;\n /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n[type=number]::-webkit-inner-spin-button,\n[type=number]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n[type=search] {\n -webkit-appearance: textfield;\n /* 1 */\n outline-offset: -2px;\n /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n[type=search]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n /* 1 */\n font: inherit;\n /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n/**\n * Add the correct display in IE 10+.\n */\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n[hidden] {\n display: none;\n}\n\n/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n@font-face {\n font-family: swiper-icons;\n src: url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA\");\n font-weight: 400;\n font-style: normal;\n}\n:root {\n --swiper-theme-color:#007aff;\n}\n\n.swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n z-index: 1;\n}\n\n.swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n\n.swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n box-sizing: content-box;\n}\n\n.swiper-android .swiper-slide, .swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n\n.swiper-pointer-events {\n touch-action: pan-y;\n}\n\n.swiper-pointer-events.swiper-vertical {\n touch-action: pan-x;\n}\n\n.swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n}\n\n.swiper-slide-invisible-blank {\n visibility: hidden;\n}\n\n.swiper-autoheight, .swiper-autoheight .swiper-slide {\n height: auto;\n}\n\n.swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n\n.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n\n.swiper-3d .swiper-cube-shadow, .swiper-3d .swiper-slide, .swiper-3d .swiper-slide-shadow, .swiper-3d .swiper-slide-shadow-bottom, .swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right, .swiper-3d .swiper-slide-shadow-top, .swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n\n.swiper-3d .swiper-slide-shadow, .swiper-3d .swiper-slide-shadow-bottom, .swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right, .swiper-3d .swiper-slide-shadow-top {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n}\n\n.swiper-3d .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n}\n\n.swiper-3d .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n\n.swiper-3d .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n\n.swiper-3d .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n\n.swiper-3d .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n\n.swiper-css-mode > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {\n display: none;\n}\n\n.swiper-css-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n}\n\n.swiper-horizontal.swiper-css-mode > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n}\n\n.swiper-vertical.swiper-css-mode > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n}\n\n.swiper-centered > .swiper-wrapper::before {\n content: \"\";\n flex-shrink: 0;\n order: 9999;\n}\n\n.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-centered-offset-before);\n}\n\n.swiper-centered.swiper-horizontal > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n}\n\n.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-centered-offset-before);\n}\n\n.swiper-centered.swiper-vertical > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n}\n\n.swiper-centered > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n}\n\n.swiper-virtual.swiper-css-mode .swiper-wrapper::after {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n}\n\n.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {\n height: 1px;\n width: var(--swiper-virtual-size);\n}\n\n.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {\n width: 1px;\n height: var(--swiper-virtual-size);\n}\n\n:root {\n --swiper-navigation-size:44px;\n}\n\n.swiper-button-next, .swiper-button-prev {\n position: absolute;\n top: 50%;\n width: calc(var(--swiper-navigation-size) / 44 * 27);\n height: var(--swiper-navigation-size);\n margin-top: calc(0px - var(--swiper-navigation-size) / 2);\n z-index: 10;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n}\n\n.swiper-button-next.swiper-button-disabled, .swiper-button-prev.swiper-button-disabled {\n opacity: 0.35;\n cursor: auto;\n pointer-events: none;\n}\n\n.swiper-button-next:after, .swiper-button-prev:after {\n font-family: swiper-icons;\n font-size: var(--swiper-navigation-size);\n text-transform: none !important;\n letter-spacing: 0;\n text-transform: none;\n font-variant: initial;\n line-height: 1;\n}\n\n.swiper-button-prev, .swiper-rtl .swiper-button-next {\n left: 10px;\n right: auto;\n}\n\n.swiper-button-prev:after, .swiper-rtl .swiper-button-next:after {\n content: \"prev\";\n}\n\n.swiper-button-next, .swiper-rtl .swiper-button-prev {\n right: 10px;\n left: auto;\n}\n\n.swiper-button-next:after, .swiper-rtl .swiper-button-prev:after {\n content: \"next\";\n}\n\n.swiper-button-lock {\n display: none;\n}\n\n.swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 0.3s opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n}\n\n.swiper-pagination.swiper-pagination-hidden {\n opacity: 0;\n}\n\n.swiper-horizontal > .swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal, .swiper-pagination-custom, .swiper-pagination-fraction {\n bottom: 10px;\n left: 0;\n width: 100%;\n}\n\n.swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {\n transform: scale(1);\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {\n transform: scale(1);\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n}\n\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n}\n\n.swiper-pagination-bullet {\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: 50%;\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n}\n\nbutton.swiper-pagination-bullet {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.swiper-pagination-clickable .swiper-pagination-bullet {\n cursor: pointer;\n}\n\n.swiper-pagination-bullet:only-child {\n display: none !important;\n}\n\n.swiper-pagination-bullet-active {\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n\n.swiper-pagination-vertical.swiper-pagination-bullets, .swiper-vertical > .swiper-pagination-bullets {\n right: 10px;\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n}\n\n.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n}\n\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n}\n\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n display: inline-block;\n transition: 0.2s transform, 0.2s top;\n}\n\n.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n}\n\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n}\n\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 0.2s transform, 0.2s left;\n}\n\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 0.2s transform, 0.2s right;\n}\n\n.swiper-pagination-progressbar {\n background: rgba(0, 0, 0, 0.25);\n position: absolute;\n}\n\n.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n}\n\n.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n}\n\n.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: 4px;\n left: 0;\n top: 0;\n}\n\n.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-vertical > .swiper-pagination-progressbar {\n width: 4px;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n.swiper-pagination-lock {\n display: none;\n}\n\n.swiper-scrollbar {\n border-radius: 10px;\n position: relative;\n -ms-touch-action: none;\n background: rgba(0, 0, 0, 0.1);\n}\n\n.swiper-horizontal > .swiper-scrollbar {\n position: absolute;\n left: 1%;\n bottom: 3px;\n z-index: 50;\n height: 5px;\n width: 98%;\n}\n\n.swiper-vertical > .swiper-scrollbar {\n position: absolute;\n right: 3px;\n top: 1%;\n z-index: 50;\n width: 5px;\n height: 98%;\n}\n\n.swiper-scrollbar-drag {\n height: 100%;\n width: 100%;\n position: relative;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 10px;\n left: 0;\n top: 0;\n}\n\n.swiper-scrollbar-cursor-drag {\n cursor: move;\n}\n\n.swiper-scrollbar-lock {\n display: none;\n}\n\n.swiper-zoom-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n\n.swiper-zoom-container > canvas, .swiper-zoom-container > img, .swiper-zoom-container > svg {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n}\n\n.swiper-slide-zoomed {\n cursor: move;\n}\n\n.swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n animation: swiper-preloader-spin 1s infinite linear;\n box-sizing: border-box;\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n\n.swiper-lazy-preloader-white {\n --swiper-preloader-color:#fff;\n}\n\n.swiper-lazy-preloader-black {\n --swiper-preloader-color:#000;\n}\n\n@keyframes swiper-preloader-spin {\n 100% {\n transform: rotate(360deg);\n }\n}\n.swiper .swiper-notification {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n opacity: 0;\n z-index: -1000;\n}\n\n.swiper-free-mode > .swiper-wrapper {\n transition-timing-function: ease-out;\n margin: 0 auto;\n}\n\n.swiper-grid > .swiper-wrapper {\n flex-wrap: wrap;\n}\n\n.swiper-grid-column > .swiper-wrapper {\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.swiper-fade.swiper-free-mode .swiper-slide {\n transition-timing-function: ease-out;\n}\n\n.swiper-fade .swiper-slide {\n pointer-events: none;\n transition-property: opacity;\n}\n\n.swiper-fade .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n\n.swiper-fade .swiper-slide-active, .swiper-fade .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n\n.swiper-cube {\n overflow: visible;\n}\n\n.swiper-cube .swiper-slide {\n pointer-events: none;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n z-index: 1;\n visibility: hidden;\n transform-origin: 0 0;\n width: 100%;\n height: 100%;\n}\n\n.swiper-cube .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n\n.swiper-cube.swiper-rtl .swiper-slide {\n transform-origin: 100% 0;\n}\n\n.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n\n.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-next, .swiper-cube .swiper-slide-next + .swiper-slide, .swiper-cube .swiper-slide-prev {\n pointer-events: auto;\n visibility: visible;\n}\n\n.swiper-cube .swiper-slide-shadow-bottom, .swiper-cube .swiper-slide-shadow-left, .swiper-cube .swiper-slide-shadow-right, .swiper-cube .swiper-slide-shadow-top {\n z-index: 0;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n}\n\n.swiper-cube .swiper-cube-shadow {\n position: absolute;\n left: 0;\n bottom: 0px;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n z-index: 0;\n}\n\n.swiper-cube .swiper-cube-shadow:before {\n content: \"\";\n background: #000;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n filter: blur(50px);\n}\n\n.swiper-flip {\n overflow: visible;\n}\n\n.swiper-flip .swiper-slide {\n pointer-events: none;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n z-index: 1;\n}\n\n.swiper-flip .swiper-slide .swiper-slide {\n pointer-events: none;\n}\n\n.swiper-flip .swiper-slide-active, .swiper-flip .swiper-slide-active .swiper-slide-active {\n pointer-events: auto;\n}\n\n.swiper-flip .swiper-slide-shadow-bottom, .swiper-flip .swiper-slide-shadow-left, .swiper-flip .swiper-slide-shadow-right, .swiper-flip .swiper-slide-shadow-top {\n z-index: 0;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n}\n\n.swiper-creative .swiper-slide {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n overflow: hidden;\n transition-property: transform, opacity, height;\n}\n\n.swiper-cards {\n overflow: visible;\n}\n\n.swiper-cards .swiper-slide {\n transform-origin: center bottom;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n overflow: hidden;\n}\n\n.vjs-svg-icon {\n display: inline-block;\n background-repeat: no-repeat;\n background-position: center;\n fill: currentColor;\n height: 1.8em;\n width: 1.8em;\n}\n\n.vjs-svg-icon:before {\n content: none !important;\n}\n\n.vjs-control:focus .vjs-svg-icon, .vjs-svg-icon:hover {\n filter: drop-shadow(0 0 0.25em #fff);\n}\n\n.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-modal-dialog, .vjs-button > .vjs-icon-placeholder:before, .vjs-modal-dialog .vjs-modal-dialog-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .vjs-button > .vjs-icon-placeholder:before {\n text-align: center;\n}\n\n@font-face {\n font-family: VideoJS;\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format(\"woff\");\n font-weight: 400;\n font-style: normal;\n}\n.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder, .vjs-icon-play {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-big-play-button .vjs-icon-placeholder:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .vjs-icon-play:before {\n content: \"\\f101\";\n}\n\n.vjs-icon-play-circle {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-play-circle:before {\n content: \"\\f102\";\n}\n\n.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder, .vjs-icon-pause {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {\n content: \"\\f103\";\n}\n\n.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder, .vjs-icon-volume-mute {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before, .vjs-icon-volume-mute:before {\n content: \"\\f104\";\n}\n\n.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder, .vjs-icon-volume-low {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before, .vjs-icon-volume-low:before {\n content: \"\\f105\";\n}\n\n.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder, .vjs-icon-volume-mid {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before, .vjs-icon-volume-mid:before {\n content: \"\\f106\";\n}\n\n.video-js .vjs-mute-control .vjs-icon-placeholder, .vjs-icon-volume-high {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-mute-control .vjs-icon-placeholder:before, .vjs-icon-volume-high:before {\n content: \"\\f107\";\n}\n\n.video-js .vjs-fullscreen-control .vjs-icon-placeholder, .vjs-icon-fullscreen-enter {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before, .vjs-icon-fullscreen-enter:before {\n content: \"\\f108\";\n}\n\n.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder, .vjs-icon-fullscreen-exit {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before, .vjs-icon-fullscreen-exit:before {\n content: \"\\f109\";\n}\n\n.vjs-icon-spinner {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-spinner:before {\n content: \"\\f10a\";\n}\n\n.video-js .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-subtitles-button .vjs-icon-placeholder, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder, .vjs-icon-subtitles {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .vjs-icon-subtitles:before {\n content: \"\\f10b\";\n}\n\n.video-js .vjs-captions-button .vjs-icon-placeholder, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder, .vjs-icon-captions {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-captions-button .vjs-icon-placeholder:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .vjs-icon-captions:before {\n content: \"\\f10c\";\n}\n\n.vjs-icon-hd {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-hd:before {\n content: \"\\f10d\";\n}\n\n.video-js .vjs-chapters-button .vjs-icon-placeholder, .vjs-icon-chapters {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-chapters-button .vjs-icon-placeholder:before, .vjs-icon-chapters:before {\n content: \"\\f10e\";\n}\n\n.vjs-icon-downloading {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-downloading:before {\n content: \"\\f10f\";\n}\n\n.vjs-icon-file-download {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-file-download:before {\n content: \"\\f110\";\n}\n\n.vjs-icon-file-download-done {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-file-download-done:before {\n content: \"\\f111\";\n}\n\n.vjs-icon-file-download-off {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-file-download-off:before {\n content: \"\\f112\";\n}\n\n.vjs-icon-share {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-share:before {\n content: \"\\f113\";\n}\n\n.vjs-icon-cog {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-cog:before {\n content: \"\\f114\";\n}\n\n.vjs-icon-square {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-square:before {\n content: \"\\f115\";\n}\n\n.video-js .vjs-play-progress, .video-js .vjs-volume-level, .vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before, .vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before {\n content: \"\\f116\";\n}\n\n.vjs-icon-circle-outline {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-circle-outline:before {\n content: \"\\f117\";\n}\n\n.vjs-icon-circle-inner-circle {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-circle-inner-circle:before {\n content: \"\\f118\";\n}\n\n.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder, .vjs-icon-cancel {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before, .vjs-icon-cancel:before {\n content: \"\\f119\";\n}\n\n.vjs-icon-repeat {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-repeat:before {\n content: \"\\f11a\";\n}\n\n.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder, .vjs-icon-replay {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .vjs-icon-replay:before {\n content: \"\\f11b\";\n}\n\n.video-js .vjs-skip-backward-5 .vjs-icon-placeholder, .vjs-icon-replay-5 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before, .vjs-icon-replay-5:before {\n content: \"\\f11c\";\n}\n\n.video-js .vjs-skip-backward-10 .vjs-icon-placeholder, .vjs-icon-replay-10 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before, .vjs-icon-replay-10:before {\n content: \"\\f11d\";\n}\n\n.video-js .vjs-skip-backward-30 .vjs-icon-placeholder, .vjs-icon-replay-30 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before, .vjs-icon-replay-30:before {\n content: \"\\f11e\";\n}\n\n.video-js .vjs-skip-forward-5 .vjs-icon-placeholder, .vjs-icon-forward-5 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before, .vjs-icon-forward-5:before {\n content: \"\\f11f\";\n}\n\n.video-js .vjs-skip-forward-10 .vjs-icon-placeholder, .vjs-icon-forward-10 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before, .vjs-icon-forward-10:before {\n content: \"\\f120\";\n}\n\n.video-js .vjs-skip-forward-30 .vjs-icon-placeholder, .vjs-icon-forward-30 {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before, .vjs-icon-forward-30:before {\n content: \"\\f121\";\n}\n\n.video-js .vjs-audio-button .vjs-icon-placeholder, .vjs-icon-audio {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-audio-button .vjs-icon-placeholder:before, .vjs-icon-audio:before {\n content: \"\\f122\";\n}\n\n.vjs-icon-next-item {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-next-item:before {\n content: \"\\f123\";\n}\n\n.vjs-icon-previous-item {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-previous-item:before {\n content: \"\\f124\";\n}\n\n.vjs-icon-shuffle {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-shuffle:before {\n content: \"\\f125\";\n}\n\n.vjs-icon-cast {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-cast:before {\n content: \"\\f126\";\n}\n\n.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder, .vjs-icon-picture-in-picture-enter {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before, .vjs-icon-picture-in-picture-enter:before {\n content: \"\\f127\";\n}\n\n.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder, .vjs-icon-picture-in-picture-exit {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before, .vjs-icon-picture-in-picture-exit:before {\n content: \"\\f128\";\n}\n\n.vjs-icon-facebook {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-facebook:before {\n content: \"\\f129\";\n}\n\n.vjs-icon-linkedin {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-linkedin:before {\n content: \"\\f12a\";\n}\n\n.vjs-icon-twitter {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-twitter:before {\n content: \"\\f12b\";\n}\n\n.vjs-icon-tumblr {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-tumblr:before {\n content: \"\\f12c\";\n}\n\n.vjs-icon-pinterest {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.vjs-icon-pinterest:before {\n content: \"\\f12d\";\n}\n\n.video-js .vjs-descriptions-button .vjs-icon-placeholder, .vjs-icon-audio-description {\n font-family: VideoJS;\n font-weight: 400;\n font-style: normal;\n}\n\n.video-js .vjs-descriptions-button .vjs-icon-placeholder:before, .vjs-icon-audio-description:before {\n content: \"\\f12e\";\n}\n\n.video-js {\n display: inline-block;\n vertical-align: top;\n box-sizing: border-box;\n color: #fff;\n background-color: #000;\n position: relative;\n padding: 0;\n font-size: 10px;\n line-height: 1;\n font-weight: 400;\n font-style: normal;\n font-family: Arial, Helvetica, sans-serif;\n word-break: initial;\n}\n\n.video-js:-moz-full-screen {\n position: absolute;\n}\n\n.video-js:-webkit-full-screen {\n width: 100% !important;\n height: 100% !important;\n}\n\n.video-js[tabindex=\"-1\"] {\n outline: 0;\n}\n\n.video-js *, .video-js :after, .video-js :before {\n box-sizing: inherit;\n}\n\n.video-js ul {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n list-style-position: outside;\n margin-left: 0;\n margin-right: 0;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.video-js.vjs-1-1, .video-js.vjs-16-9, .video-js.vjs-4-3, .video-js.vjs-9-16, .video-js.vjs-fluid {\n width: 100%;\n max-width: 100%;\n}\n\n.video-js.vjs-1-1:not(.vjs-audio-only-mode), .video-js.vjs-16-9:not(.vjs-audio-only-mode), .video-js.vjs-4-3:not(.vjs-audio-only-mode), .video-js.vjs-9-16:not(.vjs-audio-only-mode), .video-js.vjs-fluid:not(.vjs-audio-only-mode) {\n height: 0;\n}\n\n.video-js.vjs-16-9:not(.vjs-audio-only-mode) {\n padding-top: 56.25%;\n}\n\n.video-js.vjs-4-3:not(.vjs-audio-only-mode) {\n padding-top: 75%;\n}\n\n.video-js.vjs-9-16:not(.vjs-audio-only-mode) {\n padding-top: 177.7777777778%;\n}\n\n.video-js.vjs-1-1:not(.vjs-audio-only-mode) {\n padding-top: 100%;\n}\n\n.video-js.vjs-fill:not(.vjs-audio-only-mode) {\n width: 100%;\n height: 100%;\n}\n\n.video-js .vjs-tech {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.video-js.vjs-audio-only-mode .vjs-tech {\n display: none;\n}\n\nbody.vjs-full-window, body.vjs-pip-window {\n padding: 0;\n margin: 0;\n height: 100%;\n}\n\n.vjs-full-window .video-js.vjs-fullscreen, body.vjs-pip-window .video-js {\n position: fixed;\n overflow: hidden;\n z-index: 1000;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n\n.video-js.vjs-fullscreen:not(.vjs-ios-native-fs), body.vjs-pip-window .video-js {\n width: 100% !important;\n height: 100% !important;\n padding-top: 0 !important;\n display: block;\n}\n\n.video-js.vjs-fullscreen.vjs-user-inactive {\n cursor: none;\n}\n\n.vjs-pip-container .vjs-pip-text {\n position: absolute;\n bottom: 10%;\n font-size: 2em;\n background-color: rgba(0, 0, 0, 0.7);\n padding: 0.5em;\n text-align: center;\n width: 100%;\n}\n\n.vjs-layout-small.vjs-pip-container .vjs-pip-text, .vjs-layout-tiny.vjs-pip-container .vjs-pip-text, .vjs-layout-x-small.vjs-pip-container .vjs-pip-text {\n bottom: 0;\n font-size: 1.4em;\n}\n\n.vjs-hidden {\n display: none !important;\n}\n\n.vjs-disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.video-js .vjs-offscreen {\n height: 1px;\n left: -9999px;\n position: absolute;\n top: 0;\n width: 1px;\n}\n\n.vjs-lock-showing {\n display: block !important;\n opacity: 1 !important;\n visibility: visible !important;\n}\n\n.vjs-no-js {\n padding: 20px;\n color: #fff;\n background-color: #000;\n font-size: 18px;\n font-family: Arial, Helvetica, sans-serif;\n text-align: center;\n width: 300px;\n height: 150px;\n margin: 0 auto;\n}\n\n.vjs-no-js a, .vjs-no-js a:visited {\n color: #66a8cc;\n}\n\n.video-js .vjs-big-play-button {\n font-size: 3em;\n line-height: 1.5em;\n height: 1.63332em;\n width: 3em;\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n padding: 0;\n margin-top: -0.81666em;\n margin-left: -1.5em;\n cursor: pointer;\n opacity: 1;\n border: 0.06666em solid #fff;\n background-color: #2b333f;\n background-color: rgba(43, 51, 63, 0.7);\n border-radius: 0.3em;\n transition: all 0.4s;\n}\n\n.vjs-big-play-button .vjs-svg-icon {\n width: 1em;\n height: 1em;\n position: absolute;\n top: 50%;\n left: 50%;\n line-height: 1;\n transform: translate(-50%, -50%);\n}\n\n.video-js .vjs-big-play-button:focus, .video-js:hover .vjs-big-play-button {\n border-color: #fff;\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n transition: all 0s;\n}\n\n.vjs-controls-disabled .vjs-big-play-button, .vjs-error .vjs-big-play-button, .vjs-has-started .vjs-big-play-button, .vjs-using-native-controls .vjs-big-play-button {\n display: none;\n}\n\n.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button {\n display: block;\n}\n\n.video-js button {\n background: 0 0;\n border: none;\n color: inherit;\n display: inline-block;\n font-size: inherit;\n line-height: inherit;\n text-transform: none;\n text-decoration: none;\n transition: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.vjs-control .vjs-button {\n width: 100%;\n height: 100%;\n}\n\n.video-js .vjs-control.vjs-close-button {\n cursor: pointer;\n height: 3em;\n position: absolute;\n right: 0;\n top: 0.5em;\n z-index: 2;\n}\n\n.video-js .vjs-modal-dialog {\n background: rgba(0, 0, 0, 0.8);\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0));\n overflow: auto;\n}\n\n.video-js .vjs-modal-dialog > * {\n box-sizing: border-box;\n}\n\n.vjs-modal-dialog .vjs-modal-dialog-content {\n font-size: 1.2em;\n line-height: 1.5;\n padding: 20px 24px;\n z-index: 1;\n}\n\n.vjs-menu-button {\n cursor: pointer;\n}\n\n.vjs-menu-button.vjs-disabled {\n cursor: default;\n}\n\n.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu {\n display: none;\n}\n\n.vjs-menu .vjs-menu-content {\n display: block;\n padding: 0;\n margin: 0;\n font-family: Arial, Helvetica, sans-serif;\n overflow: auto;\n}\n\n.vjs-menu .vjs-menu-content > * {\n box-sizing: border-box;\n}\n\n.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu {\n display: none;\n}\n\n.vjs-menu li {\n display: flex;\n justify-content: center;\n list-style: none;\n margin: 0;\n padding: 0.2em 0;\n line-height: 1.4em;\n font-size: 1.2em;\n text-align: center;\n text-transform: lowercase;\n}\n\n.js-focus-visible .vjs-menu li.vjs-menu-item:hover, .vjs-menu li.vjs-menu-item:focus, .vjs-menu li.vjs-menu-item:hover {\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n}\n\n.js-focus-visible .vjs-menu li.vjs-selected:hover, .vjs-menu li.vjs-selected, .vjs-menu li.vjs-selected:focus, .vjs-menu li.vjs-selected:hover {\n background-color: #fff;\n color: #2b333f;\n}\n\n.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon, .vjs-menu li.vjs-selected .vjs-svg-icon, .vjs-menu li.vjs-selected:focus .vjs-svg-icon, .vjs-menu li.vjs-selected:hover .vjs-svg-icon {\n fill: #000;\n}\n\n.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible), .video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible) {\n background: 0 0;\n}\n\n.vjs-menu li.vjs-menu-title {\n text-align: center;\n text-transform: uppercase;\n font-size: 1em;\n line-height: 2em;\n padding: 0;\n margin: 0 0 0.3em 0;\n font-weight: 700;\n cursor: default;\n}\n\n.vjs-menu-button-popup .vjs-menu {\n display: none;\n position: absolute;\n bottom: 0;\n width: 10em;\n left: -3em;\n height: 0;\n margin-bottom: 1.5em;\n border-top-color: rgba(43, 51, 63, 0.7);\n}\n\n.vjs-pip-window .vjs-menu-button-popup .vjs-menu {\n left: unset;\n right: 1em;\n}\n\n.vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n background-color: #2b333f;\n background-color: rgba(43, 51, 63, 0.7);\n position: absolute;\n width: 100%;\n bottom: 1.5em;\n max-height: 15em;\n}\n\n.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 5em;\n}\n\n.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 10em;\n}\n\n.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 14em;\n}\n\n.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content, .vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 25em;\n}\n\n.vjs-menu-button-popup .vjs-menu.vjs-lock-showing, .vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu {\n display: block;\n}\n\n.video-js .vjs-menu-button-inline {\n transition: all 0.4s;\n overflow: hidden;\n}\n\n.video-js .vjs-menu-button-inline:before {\n width: 2.222222222em;\n}\n\n.video-js .vjs-menu-button-inline.vjs-slider-active, .video-js .vjs-menu-button-inline:focus, .video-js .vjs-menu-button-inline:hover {\n width: 12em;\n}\n\n.vjs-menu-button-inline .vjs-menu {\n opacity: 0;\n height: 100%;\n width: auto;\n position: absolute;\n left: 4em;\n top: 0;\n padding: 0;\n margin: 0;\n transition: all 0.4s;\n}\n\n.vjs-menu-button-inline.vjs-slider-active .vjs-menu, .vjs-menu-button-inline:focus .vjs-menu, .vjs-menu-button-inline:hover .vjs-menu {\n display: block;\n opacity: 1;\n}\n\n.vjs-menu-button-inline .vjs-menu-content {\n width: auto;\n height: 100%;\n margin: 0;\n overflow: hidden;\n}\n\n.video-js .vjs-control-bar {\n display: none;\n width: 100%;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3em;\n background-color: #2b333f;\n background-color: rgba(43, 51, 63, 0.7);\n}\n\n.video-js:not(.vjs-controls-disabled, .vjs-using-native-controls, .vjs-error) .vjs-control-bar.vjs-lock-showing {\n display: flex !important;\n}\n\n.vjs-audio-only-mode .vjs-control-bar, .vjs-has-started .vjs-control-bar {\n display: flex;\n visibility: visible;\n opacity: 1;\n transition: visibility 0.1s, opacity 0.1s;\n}\n\n.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n visibility: visible;\n opacity: 0;\n pointer-events: none;\n transition: visibility 1s, opacity 1s;\n}\n\n.vjs-controls-disabled .vjs-control-bar, .vjs-error .vjs-control-bar, .vjs-using-native-controls .vjs-control-bar {\n display: none !important;\n}\n\n.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar, .vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n\n.video-js .vjs-control {\n position: relative;\n text-align: center;\n margin: 0;\n padding: 0;\n height: 100%;\n width: 4em;\n flex: none;\n}\n\n.video-js .vjs-control.vjs-visible-text {\n width: auto;\n padding-left: 1em;\n padding-right: 1em;\n}\n\n.vjs-button > .vjs-icon-placeholder:before {\n font-size: 1.8em;\n line-height: 1.67;\n}\n\n.vjs-button > .vjs-icon-placeholder {\n display: block;\n}\n\n.vjs-button > .vjs-svg-icon {\n display: inline-block;\n}\n\n.video-js .vjs-control:focus, .video-js .vjs-control:focus:before, .video-js .vjs-control:hover:before {\n text-shadow: 0 0 1em #fff;\n}\n\n.video-js :not(.vjs-visible-text) > .vjs-control-text {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.video-js .vjs-custom-control-spacer {\n display: none;\n}\n\n.video-js .vjs-progress-control {\n cursor: pointer;\n flex: auto;\n display: flex;\n align-items: center;\n min-width: 4em;\n touch-action: none;\n}\n\n.video-js .vjs-progress-control.disabled {\n cursor: default;\n}\n\n.vjs-live .vjs-progress-control {\n display: none;\n}\n\n.vjs-liveui .vjs-progress-control {\n display: flex;\n align-items: center;\n}\n\n.video-js .vjs-progress-holder {\n flex: auto;\n transition: all 0.2s;\n height: 0.3em;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 10px;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder {\n font-size: 1.6666666667em;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled {\n font-size: 1em;\n}\n\n.video-js .vjs-progress-holder .vjs-load-progress, .video-js .vjs-progress-holder .vjs-load-progress div, .video-js .vjs-progress-holder .vjs-play-progress {\n position: absolute;\n display: block;\n height: 100%;\n margin: 0;\n padding: 0;\n width: 0;\n}\n\n.video-js .vjs-play-progress {\n background-color: #fff;\n}\n\n.video-js .vjs-play-progress:before {\n font-size: 0.9em;\n position: absolute;\n right: -0.5em;\n line-height: 0.35em;\n z-index: 1;\n}\n\n.vjs-svg-icons-enabled .vjs-play-progress:before {\n content: none !important;\n}\n\n.vjs-play-progress .vjs-svg-icon {\n position: absolute;\n top: -0.35em;\n right: -0.4em;\n width: 0.9em;\n height: 0.9em;\n pointer-events: none;\n line-height: 0.15em;\n z-index: 1;\n}\n\n.video-js .vjs-load-progress {\n background: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-load-progress div {\n background: rgba(115, 133, 159, 0.75);\n}\n\n.video-js .vjs-time-tooltip {\n background-color: #fff;\n background-color: rgba(255, 255, 255, 0.8);\n border-radius: 0.3em;\n color: #000;\n float: right;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n padding: 6px 8px 8px 8px;\n pointer-events: none;\n position: absolute;\n top: -3.4em;\n visibility: hidden;\n z-index: 1;\n}\n\n.video-js .vjs-progress-holder:focus .vjs-time-tooltip {\n display: none;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip, .video-js .vjs-progress-control:hover .vjs-time-tooltip {\n display: block;\n font-size: 0.6em;\n visibility: visible;\n}\n\n.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip {\n font-size: 1em;\n}\n\n.video-js .vjs-progress-control .vjs-mouse-display {\n display: none;\n position: absolute;\n width: 1px;\n height: 100%;\n background-color: #000;\n z-index: 1;\n}\n\n.video-js .vjs-progress-control:hover .vjs-mouse-display {\n display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {\n visibility: hidden;\n opacity: 0;\n transition: visibility 1s, opacity 1s;\n}\n\n.vjs-mouse-display .vjs-time-tooltip {\n color: #fff;\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.video-js .vjs-slider {\n position: relative;\n cursor: pointer;\n padding: 0;\n margin: 0 0.45em 0 0.45em;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-slider.disabled {\n cursor: default;\n}\n\n.video-js .vjs-slider:focus {\n text-shadow: 0 0 1em #fff;\n box-shadow: 0 0 1em #fff;\n}\n\n.video-js .vjs-mute-control {\n cursor: pointer;\n flex: none;\n}\n\n.video-js .vjs-volume-control {\n cursor: pointer;\n margin-right: 1em;\n display: flex;\n}\n\n.video-js .vjs-volume-control.vjs-volume-horizontal {\n width: 5em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control {\n visibility: visible;\n opacity: 0;\n width: 1px;\n height: 1px;\n margin-left: -1px;\n}\n\n.video-js .vjs-volume-panel {\n transition: width 1s;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active, .video-js .vjs-volume-panel .vjs-volume-control:active, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, .video-js .vjs-volume-panel:active .vjs-volume-control, .video-js .vjs-volume-panel:focus .vjs-volume-control {\n visibility: visible;\n opacity: 1;\n position: relative;\n transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal {\n width: 5em;\n height: 3em;\n margin-right: 0;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical {\n left: -3.5em;\n transition: left 0s;\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {\n width: 10em;\n transition: width 0.1s;\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only {\n width: 4em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n height: 8em;\n width: 3em;\n left: -3000em;\n transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js .vjs-volume-panel {\n display: flex;\n}\n\n.video-js .vjs-volume-bar {\n margin: 1.35em 0.45em;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal {\n width: 5em;\n height: 0.3em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical {\n width: 0.3em;\n height: 5em;\n margin: 1.35em auto;\n}\n\n.video-js .vjs-volume-level {\n position: absolute;\n bottom: 0;\n left: 0;\n background-color: #fff;\n}\n\n.video-js .vjs-volume-level:before {\n position: absolute;\n font-size: 0.9em;\n z-index: 1;\n}\n\n.vjs-slider-vertical .vjs-volume-level {\n width: 0.3em;\n}\n\n.vjs-slider-vertical .vjs-volume-level:before {\n top: -0.5em;\n left: -0.3em;\n z-index: 1;\n}\n\n.vjs-svg-icons-enabled .vjs-volume-level:before {\n content: none;\n}\n\n.vjs-volume-level .vjs-svg-icon {\n position: absolute;\n width: 0.9em;\n height: 0.9em;\n pointer-events: none;\n z-index: 1;\n}\n\n.vjs-slider-horizontal .vjs-volume-level {\n height: 0.3em;\n}\n\n.vjs-slider-horizontal .vjs-volume-level:before {\n line-height: 0.35em;\n right: -0.5em;\n}\n\n.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon {\n right: -0.3em;\n transform: translateY(-50%);\n}\n\n.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon {\n top: -0.55em;\n transform: translateX(-50%);\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical {\n width: 4em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level {\n height: 100%;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {\n width: 100%;\n}\n\n.video-js .vjs-volume-vertical {\n width: 3em;\n height: 8em;\n bottom: 8em;\n background-color: #2b333f;\n background-color: rgba(43, 51, 63, 0.7);\n}\n\n.video-js .vjs-volume-horizontal .vjs-menu {\n left: -2em;\n}\n\n.video-js .vjs-volume-tooltip {\n background-color: #fff;\n background-color: rgba(255, 255, 255, 0.8);\n border-radius: 0.3em;\n color: #000;\n float: right;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n padding: 6px 8px 8px 8px;\n pointer-events: none;\n position: absolute;\n top: -3.4em;\n visibility: hidden;\n z-index: 1;\n}\n\n.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip, .video-js .vjs-volume-control:hover .vjs-volume-tooltip {\n display: block;\n font-size: 1em;\n visibility: visible;\n}\n\n.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip, .video-js .vjs-volume-vertical:hover .vjs-volume-tooltip {\n left: 1em;\n top: -12px;\n}\n\n.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip {\n font-size: 1em;\n}\n\n.video-js .vjs-volume-control .vjs-mouse-display {\n display: none;\n position: absolute;\n width: 100%;\n height: 1px;\n background-color: #000;\n z-index: 1;\n}\n\n.video-js .vjs-volume-horizontal .vjs-mouse-display {\n width: 1px;\n height: 100%;\n}\n\n.video-js .vjs-volume-control:hover .vjs-mouse-display {\n display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display {\n visibility: hidden;\n opacity: 0;\n transition: visibility 1s, opacity 1s;\n}\n\n.vjs-mouse-display .vjs-volume-tooltip {\n color: #fff;\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.vjs-poster {\n display: inline-block;\n vertical-align: middle;\n cursor: pointer;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n}\n\n.vjs-has-started .vjs-poster, .vjs-using-native-controls .vjs-poster {\n display: none;\n}\n\n.vjs-audio.vjs-has-started .vjs-poster, .vjs-has-started.vjs-audio-poster-mode .vjs-poster, .vjs-pip-container.vjs-has-started .vjs-poster {\n display: block;\n}\n\n.vjs-poster img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n\n.video-js .vjs-live-control {\n display: flex;\n align-items: flex-start;\n flex: auto;\n font-size: 1em;\n line-height: 3em;\n}\n\n.video-js.vjs-liveui .vjs-live-control, .video-js:not(.vjs-live) .vjs-live-control {\n display: none;\n}\n\n.video-js .vjs-seek-to-live-control {\n align-items: center;\n cursor: pointer;\n flex: none;\n display: inline-flex;\n height: 100%;\n padding-left: 0.5em;\n padding-right: 0.5em;\n font-size: 1em;\n line-height: 3em;\n width: auto;\n min-width: 4em;\n}\n\n.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control, .video-js:not(.vjs-live) .vjs-seek-to-live-control {\n display: none;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge {\n cursor: auto;\n}\n\n.vjs-seek-to-live-control .vjs-icon-placeholder {\n margin-right: 0.5em;\n color: #888;\n}\n\n.vjs-svg-icons-enabled .vjs-seek-to-live-control {\n line-height: 0;\n}\n\n.vjs-seek-to-live-control .vjs-svg-icon {\n width: 1em;\n height: 1em;\n pointer-events: none;\n fill: #888;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder {\n color: red;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon {\n fill: red;\n}\n\n.video-js .vjs-time-control {\n flex: none;\n font-size: 1em;\n line-height: 3em;\n min-width: 2em;\n width: auto;\n padding-left: 1em;\n padding-right: 1em;\n}\n\n.video-js .vjs-current-time, .video-js .vjs-duration, .vjs-live .vjs-time-control, .vjs-live .vjs-time-divider {\n display: none;\n}\n\n.vjs-time-divider {\n display: none;\n line-height: 3em;\n}\n\n.video-js .vjs-play-control {\n cursor: pointer;\n}\n\n.video-js .vjs-play-control .vjs-icon-placeholder {\n flex: none;\n}\n\n.vjs-text-track-display {\n position: absolute;\n bottom: 3em;\n left: 0;\n right: 0;\n top: 0;\n pointer-events: none;\n}\n\n.vjs-error .vjs-text-track-display {\n display: none;\n}\n\n.video-js.vjs-controls-disabled .vjs-text-track-display, .video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {\n bottom: 1em;\n}\n\n.video-js .vjs-text-track {\n font-size: 1.4em;\n text-align: center;\n margin-bottom: 0.1em;\n}\n\n.vjs-subtitles {\n color: #fff;\n}\n\n.vjs-captions {\n color: #fc6;\n}\n\n.vjs-tt-cue {\n display: block;\n}\n\nvideo::-webkit-media-text-track-display {\n transform: translateY(-3em);\n}\n\n.video-js.vjs-controls-disabled video::-webkit-media-text-track-display, .video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display {\n transform: translateY(-1.5em);\n}\n\n.video-js .vjs-picture-in-picture-control {\n cursor: pointer;\n flex: none;\n}\n\n.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control, .vjs-pip-window .vjs-picture-in-picture-control {\n display: none;\n}\n\n.video-js .vjs-fullscreen-control {\n cursor: pointer;\n flex: none;\n}\n\n.video-js.vjs-audio-only-mode .vjs-fullscreen-control, .vjs-pip-window .vjs-fullscreen-control {\n display: none;\n}\n\n.vjs-playback-rate .vjs-playback-rate-value, .vjs-playback-rate > .vjs-menu-button {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vjs-playback-rate .vjs-playback-rate-value {\n pointer-events: none;\n font-size: 1.5em;\n line-height: 2;\n text-align: center;\n}\n\n.vjs-playback-rate .vjs-menu {\n width: 4em;\n left: 0;\n}\n\n.vjs-error .vjs-error-display .vjs-modal-dialog-content {\n font-size: 1.4em;\n text-align: center;\n}\n\n.vjs-error .vjs-error-display:before {\n color: #fff;\n content: \"X\";\n font-family: Arial, Helvetica, sans-serif;\n font-size: 4em;\n left: 0;\n line-height: 1;\n margin-top: -0.5em;\n position: absolute;\n text-shadow: 0.05em 0.05em 0.1em #000;\n text-align: center;\n top: 50%;\n vertical-align: middle;\n width: 100%;\n}\n\n.vjs-loading-spinner {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0.85;\n text-align: left;\n border: 0.6em solid rgba(43, 51, 63, 0.7);\n box-sizing: border-box;\n background-clip: padding-box;\n width: 5em;\n height: 5em;\n border-radius: 50%;\n visibility: hidden;\n}\n\n.vjs-seeking .vjs-loading-spinner, .vjs-waiting .vjs-loading-spinner {\n display: block;\n animation: vjs-spinner-show 0s linear 0.3s forwards;\n}\n\n.vjs-error .vjs-loading-spinner {\n display: none;\n}\n\n.vjs-loading-spinner:after, .vjs-loading-spinner:before {\n content: \"\";\n position: absolute;\n margin: -0.6em;\n box-sizing: inherit;\n width: inherit;\n height: inherit;\n border-radius: inherit;\n opacity: 1;\n border: inherit;\n border-color: transparent;\n border-top-color: #fff;\n}\n\n.vjs-seeking .vjs-loading-spinner:after, .vjs-seeking .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:before {\n animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n}\n\n.vjs-seeking .vjs-loading-spinner:before, .vjs-waiting .vjs-loading-spinner:before {\n border-top-color: #fff;\n}\n\n.vjs-seeking .vjs-loading-spinner:after, .vjs-waiting .vjs-loading-spinner:after {\n border-top-color: #fff;\n animation-delay: 0.44s;\n}\n\n@keyframes vjs-spinner-show {\n to {\n visibility: visible;\n }\n}\n@keyframes vjs-spinner-spin {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes vjs-spinner-fade {\n 0% {\n border-top-color: #73859f;\n }\n 20% {\n border-top-color: #73859f;\n }\n 35% {\n border-top-color: #fff;\n }\n 60% {\n border-top-color: #73859f;\n }\n 100% {\n border-top-color: #73859f;\n }\n}\n.video-js.vjs-audio-only-mode .vjs-captions-button {\n display: none;\n}\n\n.vjs-chapters-button .vjs-menu ul {\n width: 24em;\n}\n\n.video-js.vjs-audio-only-mode .vjs-descriptions-button {\n display: none;\n}\n\n.vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-svg-icon {\n width: 1.5em;\n height: 1.5em;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n vertical-align: middle;\n display: inline-block;\n margin-bottom: -0.1em;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n font-family: VideoJS;\n content: \"\\f10c\";\n font-size: 1.5em;\n line-height: inherit;\n}\n\n.video-js.vjs-audio-only-mode .vjs-subs-caps-button {\n display: none;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n vertical-align: middle;\n display: inline-block;\n margin-bottom: -0.1em;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n font-family: VideoJS;\n content: \" \\f12e\";\n font-size: 1.5em;\n line-height: inherit;\n}\n\n.video-js.vjs-layout-small .vjs-current-time, .video-js.vjs-layout-small .vjs-duration, .video-js.vjs-layout-small .vjs-playback-rate, .video-js.vjs-layout-small .vjs-remaining-time, .video-js.vjs-layout-small .vjs-time-divider, .video-js.vjs-layout-small .vjs-volume-control, .video-js.vjs-layout-tiny .vjs-current-time, .video-js.vjs-layout-tiny .vjs-duration, .video-js.vjs-layout-tiny .vjs-playback-rate, .video-js.vjs-layout-tiny .vjs-remaining-time, .video-js.vjs-layout-tiny .vjs-time-divider, .video-js.vjs-layout-tiny .vjs-volume-control, .video-js.vjs-layout-x-small .vjs-current-time, .video-js.vjs-layout-x-small .vjs-duration, .video-js.vjs-layout-x-small .vjs-playback-rate, .video-js.vjs-layout-x-small .vjs-remaining-time, .video-js.vjs-layout-x-small .vjs-time-divider, .video-js.vjs-layout-x-small .vjs-volume-control {\n display: none;\n}\n\n.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover {\n width: auto;\n width: initial;\n}\n\n.video-js.vjs-layout-tiny .vjs-progress-control, .video-js.vjs-layout-x-small .vjs-progress-control {\n display: none;\n}\n\n.video-js.vjs-layout-x-small .vjs-custom-control-spacer {\n flex: auto;\n display: block;\n}\n\n.vjs-modal-dialog.vjs-text-track-settings {\n background-color: #2b333f;\n background-color: rgba(43, 51, 63, 0.75);\n color: #fff;\n height: 70%;\n}\n\n.vjs-error .vjs-text-track-settings {\n display: none;\n}\n\n.vjs-text-track-settings .vjs-modal-dialog-content {\n display: table;\n}\n\n.vjs-text-track-settings .vjs-track-settings-colors, .vjs-text-track-settings .vjs-track-settings-controls, .vjs-text-track-settings .vjs-track-settings-font {\n display: table-cell;\n}\n\n.vjs-text-track-settings .vjs-track-settings-controls {\n text-align: right;\n vertical-align: bottom;\n}\n\n@supports (display: grid) {\n .vjs-text-track-settings .vjs-modal-dialog-content {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr;\n padding: 20px 24px 0 24px;\n }\n .vjs-track-settings-controls .vjs-default-button {\n margin-bottom: 20px;\n }\n .vjs-text-track-settings .vjs-track-settings-controls {\n grid-column: 1/-1;\n }\n .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content, .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content, .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content {\n grid-template-columns: 1fr;\n }\n}\n.vjs-text-track-settings select {\n font-size: inherit;\n}\n\n.vjs-track-setting > select {\n margin-right: 1em;\n margin-bottom: 0.5em;\n}\n\n.vjs-text-track-settings fieldset {\n margin: 10px;\n border: none;\n}\n\n.vjs-text-track-settings fieldset span {\n display: inline-block;\n padding: 0 0.6em 0.8em;\n}\n\n.vjs-text-track-settings fieldset span > select {\n max-width: 7.3em;\n}\n\n.vjs-text-track-settings legend {\n color: #fff;\n font-weight: 700;\n font-size: 1.2em;\n}\n\n.vjs-text-track-settings .vjs-label {\n margin: 0 0.5em 0.5em 0;\n}\n\n.vjs-track-settings-controls button:active, .vjs-track-settings-controls button:focus {\n outline-style: solid;\n outline-width: medium;\n background-image: linear-gradient(0deg, #fff 88%, #73859f 100%);\n}\n\n.vjs-track-settings-controls button:hover {\n color: rgba(43, 51, 63, 0.75);\n}\n\n.vjs-track-settings-controls button {\n background-color: #fff;\n background-image: linear-gradient(-180deg, #fff 88%, #73859f 100%);\n color: #2b333f;\n cursor: pointer;\n border-radius: 2px;\n}\n\n.vjs-track-settings-controls .vjs-default-button {\n margin-right: 1em;\n}\n\n.vjs-title-bar {\n background: rgba(0, 0, 0, 0.9);\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0) 100%);\n font-size: 1.2em;\n line-height: 1.5;\n transition: opacity 0.1s;\n padding: 0.666em 1.333em 4em;\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n.vjs-error .vjs-title-bar {\n display: none;\n}\n\n.vjs-title-bar-description, .vjs-title-bar-title {\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.vjs-title-bar-title {\n font-weight: 700;\n margin-bottom: 0.333em;\n}\n\n.vjs-playing.vjs-user-inactive .vjs-title-bar {\n opacity: 0;\n transition: opacity 1s;\n}\n\n.video-js .vjs-skip-forward-5 {\n cursor: pointer;\n}\n\n.video-js .vjs-skip-forward-10 {\n cursor: pointer;\n}\n\n.video-js .vjs-skip-forward-30 {\n cursor: pointer;\n}\n\n.video-js .vjs-skip-backward-5 {\n cursor: pointer;\n}\n\n.video-js .vjs-skip-backward-10 {\n cursor: pointer;\n}\n\n.video-js .vjs-skip-backward-30 {\n cursor: pointer;\n}\n\n@media print {\n .video-js > :not(.vjs-tech):not(.vjs-poster) {\n visibility: hidden;\n }\n}\n.vjs-resize-manager {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n z-index: -1000;\n}\n\n.js-focus-visible .video-js :focus:not(.focus-visible) {\n outline: 0;\n}\n\n.video-js :focus:not(:focus-visible) {\n outline: 0;\n}\n\n.carousel {\n position: relative;\n box-sizing: border-box;\n}\n\n.carousel *, .carousel *:before, .carousel *:after {\n box-sizing: inherit;\n}\n\n.carousel.is-draggable {\n cursor: move;\n cursor: grab;\n}\n\n.carousel.is-dragging {\n cursor: move;\n cursor: grabbing;\n}\n\n.carousel__viewport {\n position: relative;\n overflow: hidden;\n max-width: 100%;\n max-height: 100%;\n}\n\n.carousel__track {\n display: flex;\n}\n\n.carousel__slide {\n flex: 0 0 auto;\n width: var(--carousel-slide-width, 60%);\n max-width: 100%;\n padding: 1rem;\n position: relative;\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.has-dots {\n margin-bottom: calc(0.5rem + 22px);\n}\n\n.carousel__dots {\n margin: 0 auto;\n padding: 0;\n position: absolute;\n top: calc(100% + 0.5rem);\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n list-style: none;\n user-select: none;\n}\n\n.carousel__dots .carousel__dot {\n margin: 0;\n padding: 0;\n display: block;\n position: relative;\n width: 22px;\n height: 22px;\n cursor: pointer;\n}\n\n.carousel__dots .carousel__dot:after {\n content: \"\";\n width: 8px;\n height: 8px;\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: currentColor;\n opacity: 0.25;\n transition: opacity 0.15s ease-in-out;\n}\n\n.carousel__dots .carousel__dot.is-selected:after {\n opacity: 1;\n}\n\n.carousel__button {\n width: var(--carousel-button-width, 48px);\n height: var(--carousel-button-height, 48px);\n padding: 0;\n border: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: all;\n cursor: pointer;\n color: var(--carousel-button-color, currentColor);\n background: var(--carousel-button-bg, transparent);\n border-radius: var(--carousel-button-border-radius, 50%);\n box-shadow: var(--carousel-button-shadow, none);\n transition: opacity 0.15s ease;\n}\n\n.carousel__button.is-prev, .carousel__button.is-next {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.carousel__button.is-prev {\n left: 10px;\n}\n\n.carousel__button.is-next {\n right: 10px;\n}\n\n.carousel__button[disabled] {\n cursor: default;\n opacity: 0.3;\n}\n\n.carousel__button svg {\n width: var(--carousel-button-svg-width, 50%);\n height: var(--carousel-button-svg-height, 50%);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--carousel-button-svg-stroke-width, 1.5);\n stroke-linejoin: bevel;\n stroke-linecap: round;\n filter: var(--carousel-button-svg-filter, none);\n pointer-events: none;\n}\n\nhtml.with-fancybox {\n scroll-behavior: auto;\n}\n\nbody.compensate-for-scrollbar {\n overflow: hidden !important;\n touch-action: none;\n}\n\n.fancybox__container {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n direction: ltr;\n margin: 0;\n padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n color: var(--fancybox-color, #fff);\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n overflow: hidden;\n z-index: 1050;\n outline: none;\n transform-origin: top left;\n --carousel-button-width: 48px;\n --carousel-button-height: 48px;\n --carousel-button-svg-width: 24px;\n --carousel-button-svg-height: 24px;\n --carousel-button-svg-stroke-width: 2.5;\n --carousel-button-svg-filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4));\n}\n\n.fancybox__container *, .fancybox__container *::before, .fancybox__container *::after {\n box-sizing: inherit;\n}\n\n.fancybox__container :focus {\n outline: none;\n}\n\nbody:not(.is-using-mouse) .fancybox__container :focus {\n box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--fancybox-accent-color, rgba(1, 210, 232, 0.94));\n}\n\n@media all and (min-width: 1024px) {\n .fancybox__container {\n --carousel-button-width:48px;\n --carousel-button-height:48px;\n --carousel-button-svg-width:27px;\n --carousel-button-svg-height:27px;\n }\n}\n.fancybox__backdrop {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n background: var(--fancybox-bg, rgba(24, 24, 27, 0.92));\n}\n\n.fancybox__carousel {\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n height: 100%;\n z-index: 10;\n}\n\n.fancybox__carousel.has-dots {\n margin-bottom: calc(0.5rem + 22px);\n}\n\n.fancybox__viewport {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: visible;\n cursor: default;\n}\n\n.fancybox__track {\n display: flex;\n height: 100%;\n}\n\n.fancybox__slide {\n flex: 0 0 auto;\n width: 100%;\n max-width: 100%;\n margin: 0;\n padding: 48px 8px 8px 8px;\n position: relative;\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n outline: 0;\n overflow: auto;\n --carousel-button-width: 36px;\n --carousel-button-height: 36px;\n --carousel-button-svg-width: 22px;\n --carousel-button-svg-height: 22px;\n}\n\n.fancybox__slide::before, .fancybox__slide::after {\n content: \"\";\n flex: 0 0 0;\n margin: auto;\n}\n\n@media all and (min-width: 1024px) {\n .fancybox__slide {\n padding: 64px 100px;\n }\n}\n.fancybox__content {\n margin: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);\n padding: 36px;\n color: var(--fancybox-content-color, #374151);\n background: var(--fancybox-content-bg, #fff);\n position: relative;\n align-self: center;\n display: flex;\n flex-direction: column;\n z-index: 20;\n}\n\n.fancybox__content :focus:not(.carousel__button.is-close) {\n outline: thin dotted;\n box-shadow: none;\n}\n\n.fancybox__caption {\n align-self: center;\n max-width: 100%;\n margin: 0;\n padding: 1rem 0 0 0;\n line-height: 1.375;\n color: var(--fancybox-color, currentColor);\n visibility: visible;\n cursor: auto;\n flex-shrink: 0;\n overflow-wrap: anywhere;\n}\n\n.is-loading .fancybox__caption {\n visibility: hidden;\n}\n\n.fancybox__container > .carousel__dots {\n top: 100%;\n color: var(--fancybox-color, #fff);\n}\n\n.fancybox__nav .carousel__button {\n z-index: 40;\n}\n\n.fancybox__nav .carousel__button.is-next {\n right: 8px;\n}\n\n@media all and (min-width: 1024px) {\n .fancybox__nav .carousel__button.is-next {\n right: 40px;\n }\n}\n.fancybox__nav .carousel__button.is-prev {\n left: 8px;\n}\n\n@media all and (min-width: 1024px) {\n .fancybox__nav .carousel__button.is-prev {\n left: 40px;\n }\n}\n.carousel__button.is-close {\n position: absolute;\n top: 8px;\n right: 8px;\n top: calc(env(safe-area-inset-top, 0px) + 8px);\n right: calc(env(safe-area-inset-right, 0px) + 8px);\n z-index: 40;\n}\n\n@media all and (min-width: 1024px) {\n .carousel__button.is-close {\n right: 40px;\n }\n}\n.fancybox__content > .carousel__button.is-close {\n position: absolute;\n top: -40px;\n right: 0;\n color: var(--fancybox-color, #fff);\n}\n\n.fancybox__no-click, .fancybox__no-click button {\n pointer-events: none;\n}\n\n.fancybox__spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 50px;\n height: 50px;\n color: var(--fancybox-color, currentColor);\n}\n\n.fancybox__slide .fancybox__spinner {\n cursor: pointer;\n z-index: 1053;\n}\n\n.fancybox__spinner svg {\n animation: fancybox-rotate 2s linear infinite;\n transform-origin: center center;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n margin: auto;\n width: 100%;\n height: 100%;\n}\n\n.fancybox__spinner svg circle {\n fill: none;\n stroke-width: 2.75;\n stroke-miterlimit: 10;\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n animation: fancybox-dash 1.5s ease-in-out infinite;\n stroke-linecap: round;\n stroke: currentColor;\n}\n\n@keyframes fancybox-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes fancybox-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n.fancybox__backdrop, .fancybox__caption, .fancybox__nav, .carousel__dots, .carousel__button.is-close {\n opacity: var(--fancybox-opacity, 1);\n}\n\n.fancybox__container.is-animated[aria-hidden=false] .fancybox__backdrop, .fancybox__container.is-animated[aria-hidden=false] .fancybox__caption, .fancybox__container.is-animated[aria-hidden=false] .fancybox__nav, .fancybox__container.is-animated[aria-hidden=false] .carousel__dots, .fancybox__container.is-animated[aria-hidden=false] .carousel__button.is-close {\n animation: 0.15s ease backwards fancybox-fadeIn;\n}\n\n.fancybox__container.is-animated.is-closing .fancybox__backdrop, .fancybox__container.is-animated.is-closing .fancybox__caption, .fancybox__container.is-animated.is-closing .fancybox__nav, .fancybox__container.is-animated.is-closing .carousel__dots, .fancybox__container.is-animated.is-closing .carousel__button.is-close {\n animation: 0.15s ease both fancybox-fadeOut;\n}\n\n.fancybox-fadeIn {\n animation: 0.15s ease both fancybox-fadeIn;\n}\n\n.fancybox-fadeOut {\n animation: 0.1s ease both fancybox-fadeOut;\n}\n\n.fancybox-zoomInUp {\n animation: 0.2s ease both fancybox-zoomInUp;\n}\n\n.fancybox-zoomOutDown {\n animation: 0.15s ease both fancybox-zoomOutDown;\n}\n\n.fancybox-throwOutUp {\n animation: 0.15s ease both fancybox-throwOutUp;\n}\n\n.fancybox-throwOutDown {\n animation: 0.15s ease both fancybox-throwOutDown;\n}\n\n@keyframes fancybox-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fancybox-fadeOut {\n to {\n opacity: 0;\n }\n}\n@keyframes fancybox-zoomInUp {\n from {\n transform: scale(0.97) translate3d(0, 16px, 0);\n opacity: 0;\n }\n to {\n transform: scale(1) translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes fancybox-zoomOutDown {\n to {\n transform: scale(0.97) translate3d(0, 16px, 0);\n opacity: 0;\n }\n}\n@keyframes fancybox-throwOutUp {\n to {\n transform: translate3d(0, -30%, 0);\n opacity: 0;\n }\n}\n@keyframes fancybox-throwOutDown {\n to {\n transform: translate3d(0, 30%, 0);\n opacity: 0;\n }\n}\n.fancybox__carousel .carousel__slide {\n scrollbar-width: thin;\n scrollbar-color: #ccc rgba(255, 255, 255, 0.1);\n}\n\n.fancybox__carousel .carousel__slide::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.fancybox__carousel .carousel__slide::-webkit-scrollbar-track {\n background-color: rgba(255, 255, 255, 0.1);\n}\n\n.fancybox__carousel .carousel__slide::-webkit-scrollbar-thumb {\n background-color: #ccc;\n border-radius: 2px;\n box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);\n}\n\n.fancybox__carousel.is-draggable .fancybox__slide, .fancybox__carousel.is-draggable .fancybox__slide .fancybox__content {\n cursor: move;\n cursor: grab;\n}\n\n.fancybox__carousel.is-dragging .fancybox__slide, .fancybox__carousel.is-dragging .fancybox__slide .fancybox__content {\n cursor: move;\n cursor: grabbing;\n}\n\n.fancybox__carousel .fancybox__slide .fancybox__content {\n cursor: auto;\n}\n\n.fancybox__carousel .fancybox__slide.can-zoom_in .fancybox__content {\n cursor: zoom-in;\n}\n\n.fancybox__carousel .fancybox__slide.can-zoom_out .fancybox__content {\n cursor: zoom-out;\n}\n\n.fancybox__carousel .fancybox__slide.is-draggable .fancybox__content {\n cursor: move;\n cursor: grab;\n}\n\n.fancybox__carousel .fancybox__slide.is-dragging .fancybox__content {\n cursor: move;\n cursor: grabbing;\n}\n\n.fancybox__image {\n transform-origin: 0 0;\n user-select: none;\n transition: none;\n}\n\n.has-image .fancybox__content {\n padding: 0;\n background: rgba(0, 0, 0, 0);\n min-height: 1px;\n}\n\n.is-closing .has-image .fancybox__content {\n overflow: visible;\n}\n\n.has-image[data-image-fit=contain] {\n overflow: visible;\n touch-action: none;\n}\n\n.has-image[data-image-fit=contain] .fancybox__content {\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.has-image[data-image-fit=contain] .fancybox__image {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n}\n\n.has-image[data-image-fit=contain-w] {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.has-image[data-image-fit=contain-w] .fancybox__content {\n min-height: auto;\n}\n\n.has-image[data-image-fit=contain-w] .fancybox__image {\n max-width: 100%;\n height: auto;\n}\n\n.has-image[data-image-fit=cover] {\n overflow: visible;\n touch-action: none;\n}\n\n.has-image[data-image-fit=cover] .fancybox__content {\n width: 100%;\n height: 100%;\n}\n\n.has-image[data-image-fit=cover] .fancybox__image {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content, .fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content, .fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content {\n max-width: 100%;\n flex-shrink: 1;\n min-height: 1px;\n overflow: visible;\n}\n\n.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content, .fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content {\n width: 100%;\n height: 80%;\n}\n\n.fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content {\n width: 960px;\n height: 540px;\n max-width: 100%;\n max-height: 100%;\n}\n\n.fancybox__carousel .fancybox__slide.has-map .fancybox__content, .fancybox__carousel .fancybox__slide.has-pdf .fancybox__content, .fancybox__carousel .fancybox__slide.has-video .fancybox__content, .fancybox__carousel .fancybox__slide.has-html5video .fancybox__content {\n padding: 0;\n background: rgba(24, 24, 27, 0.9);\n color: #fff;\n}\n\n.fancybox__carousel .fancybox__slide.has-map .fancybox__content {\n background: #e5e3df;\n}\n\n.fancybox__html5video, .fancybox__iframe {\n border: 0;\n display: block;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0);\n}\n\n.fancybox-placeholder {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.fancybox__thumbs {\n flex: 0 0 auto;\n position: relative;\n padding: 0px 3px;\n opacity: var(--fancybox-opacity, 1);\n}\n\n.fancybox__container.is-animated[aria-hidden=false] .fancybox__thumbs {\n animation: 0.15s ease-in backwards fancybox-fadeIn;\n}\n\n.fancybox__container.is-animated.is-closing .fancybox__thumbs {\n opacity: 0;\n}\n\n.fancybox__thumbs .carousel__slide {\n flex: 0 0 auto;\n width: var(--fancybox-thumbs-width, 96px);\n margin: 0;\n padding: 8px 3px;\n box-sizing: content-box;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: visible;\n cursor: pointer;\n}\n\n.fancybox__thumbs .carousel__slide .fancybox__thumb::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-width: 5px;\n border-style: solid;\n border-color: var(--fancybox-accent-color, rgba(34, 213, 233, 0.96));\n opacity: 0;\n transition: opacity 0.15s ease;\n border-radius: var(--fancybox-thumbs-border-radius, 4px);\n}\n\n.fancybox__thumbs .carousel__slide.is-nav-selected .fancybox__thumb::after {\n opacity: 0.92;\n}\n\n.fancybox__thumbs .carousel__slide > * {\n pointer-events: none;\n user-select: none;\n}\n\n.fancybox__thumb {\n position: relative;\n width: 100%;\n padding-top: calc(100% / (var(--fancybox-thumbs-ratio, 1.5)));\n background-size: cover;\n background-position: center center;\n background-color: rgba(255, 255, 255, 0.1);\n background-repeat: no-repeat;\n border-radius: var(--fancybox-thumbs-border-radius, 4px);\n}\n\n.fancybox__toolbar {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n z-index: 20;\n background: linear-gradient(to top, hsla(0deg, 0%, 0%, 0) 0%, hsla(0deg, 0%, 0%, 0.006) 8.1%, hsla(0deg, 0%, 0%, 0.021) 15.5%, hsla(0deg, 0%, 0%, 0.046) 22.5%, hsla(0deg, 0%, 0%, 0.077) 29%, hsla(0deg, 0%, 0%, 0.114) 35.3%, hsla(0deg, 0%, 0%, 0.155) 41.2%, hsla(0deg, 0%, 0%, 0.198) 47.1%, hsla(0deg, 0%, 0%, 0.242) 52.9%, hsla(0deg, 0%, 0%, 0.285) 58.8%, hsla(0deg, 0%, 0%, 0.326) 64.7%, hsla(0deg, 0%, 0%, 0.363) 71%, hsla(0deg, 0%, 0%, 0.394) 77.5%, hsla(0deg, 0%, 0%, 0.419) 84.5%, hsla(0deg, 0%, 0%, 0.434) 91.9%, hsla(0deg, 0%, 0%, 0.44) 100%);\n padding: 0;\n touch-action: none;\n display: flex;\n justify-content: space-between;\n --carousel-button-svg-width: 20px;\n --carousel-button-svg-height: 20px;\n opacity: var(--fancybox-opacity, 1);\n text-shadow: var(--fancybox-toolbar-text-shadow, 1px 1px 1px rgba(0, 0, 0, 0.4));\n}\n\n@media all and (min-width: 1024px) {\n .fancybox__toolbar {\n padding: 8px;\n }\n}\n.fancybox__container.is-animated[aria-hidden=false] .fancybox__toolbar {\n animation: 0.15s ease-in backwards fancybox-fadeIn;\n}\n\n.fancybox__container.is-animated.is-closing .fancybox__toolbar {\n opacity: 0;\n}\n\n.fancybox__toolbar__items {\n display: flex;\n}\n\n.fancybox__toolbar__items--left {\n margin-right: auto;\n}\n\n.fancybox__toolbar__items--center {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.fancybox__toolbar__items--right {\n margin-left: auto;\n}\n\n@media (max-width: 640px) {\n .fancybox__toolbar__items--center:not(:last-child) {\n display: none;\n }\n}\n.fancybox__counter {\n min-width: 72px;\n padding: 0 10px;\n line-height: var(--carousel-button-height, 48px);\n text-align: center;\n font-size: 17px;\n font-variant-numeric: tabular-nums;\n -webkit-font-smoothing: subpixel-antialiased;\n}\n\n.fancybox__progress {\n background: var(--fancybox-accent-color, rgba(34, 213, 233, 0.96));\n height: 3px;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n transform: scaleX(0);\n transform-origin: 0;\n transition-property: transform;\n transition-timing-function: linear;\n z-index: 30;\n user-select: none;\n}\n\n.fancybox__container:fullscreen::backdrop {\n opacity: 0;\n}\n\n.fancybox__button--fullscreen g:nth-child(2) {\n display: none;\n}\n\n.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(1) {\n display: none;\n}\n\n.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(2) {\n display: block;\n}\n\n.fancybox__button--slideshow g:nth-child(2) {\n display: none;\n}\n\n.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(1) {\n display: none;\n}\n\n.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(2) {\n display: block;\n}","/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n\n@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-pointer-events{touch-action:pan-y}.swiper-pointer-events.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;animation:swiper-preloader-spin 1s infinite linear;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{100%{transform:rotate(360deg)}}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-next+.swiper-slide,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}",".vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:center;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-control:focus .vjs-svg-icon,.vjs-svg-icon:hover{filter:drop-shadow(0 0 .25em #fff)}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1gUV5auc6urCmxEGrq6VRD6ATQP5dHPKK8GRIyoKApoEBUDAiGzGmdUfKNRM4qLZrUZdGKcGN/GZJKd0SyOWTbfbmZ2NxqzM5IxRtNZd78vwYlJdtREoO7sudVNq6PmmxmKqrqPU+eee173P80Bh39Cu9DOEY4DHZBK3i20D/QRLcfxbE5sEVtwLpZzclw4ibFIkSCJUcZ4MBpMnnzwuKNsGWBL5i3qy6kO2dVpvUpKbkAP9fq62rdeGJ+TM/7C1nbIutfuWrWk5ci4zMxxR1qW/N+9JsmCGXj9VKWhFx/6tr/nz78INDm2C9yPF/fDcxLuyKxLBZ1ZBz2QTi+RSkiH5RrDQJ/GgGQadX9m0YSURs7GpSG905Zsk41uj14yul1OtieZ7QUk5GRG/YiS7PYYPSAZNRed9sq3+bOpz00rKb7pe/ZEZvbALxZAHT3AFoH8GXP3rt67QFn40kt8W13FjLTDb48c+fSi5/7h0P4dL5yz7DPtbmgmYxfQA9RL2+EOfTcvdp+1vmuBpvOll1As1S6ak0IvJzC7sKWJFtJgBd2uWcg+0Zyg7dzQfhcjXRgXGZRf5/a4A58IDU777Nl252AUk4m2ByRRjqTNqIDCEJeAnU3iCFwrkrNwXEzg4yFevBwypzxkcX+AIfk3VEKl3XmWbT8788SzvpvFJaiOezL6QyuSr9VNf97csNu0z3LuhR0wATUxZAfVBwVOy+nQFhxYdWaXlXe4HC4zWGWzzsrLDtmhI9pOWOHv7PTT7XybH1Z0+v2d5Abd3kmG+TsH23CS/KwTxx/JkzEwx6jcQOUc42LLwHJ/J93uZ9ygh3HuZGwqsY9dWDHQ58dxNqyqKRQTYdxwTubiOSs3FiMDkq0WSZQgCT0GBDOg2lxOAd1FlPVGs4AKBAcYHHaP2wPkHaivmLF5zYqnIZrvcHx5gN4k/6tchNW1DtdgNL2KrxEkS/kfnIHoVnp1VjmjpTf5r0lTzLj0mdS28tX+XGorU364eMPmnWVl8J36nlKGw3CZhjEiuMw8h8mKvhGD+4/lElBWjAhLJMg6fTw4zPZ8cOmcGQBm2Qxml1nAm13CpYGq1JKUlJJUzQn1PTAO0mgv6VMMpA/DuRfSWEu4lDIxdbAtdWIKvnn2Vk766CWfz9fpY0sH/UpdP50rfszaVpdVRmvIejEdLMk45s4Bu0EWHjeOySmFyZSiMahvZdNSn29peoI/YexYfKQTLeurTXXwEVLeSfInTWHkkMaeUx7sBvOCSTSj3AlcKjfueyS36tCrXDlgRtF0etFq9jhc1kfKuBT/OwMr0F4UUTTh1AN0g20+H/ScPcsIEsYu9d/zN5PmjprPtNwI1ZZcDK6iC97Mcjp2y2aX36f+QbpGHrgRuHlXJ+Zf6PFRL2uQSp8vxHeF2IoRb8Rd2rhMzsNxSRmEuKK4JFnkojhMcx6jzqHzGMGFcW+MhBj0bhf6cowN+45I4LHvwT6fteu7M42wGRI/pxcg6/MZdEvt1U1XaulHFXuLmqov/MukvRVL35/b3ODM1+4aPjtzeK7zmUkV2h3DN54HaQ9GzJvxHRb6Ks2gB81fwqraT+A7GvZJrRLRofU6G0urNL+zFw3v0FaVDFxsKEZW56F31r6ip6vOL+FCObBPuIMRiXld9RaMdLzRIOGhPey2T9vA/35DmZPK9IWaT9d/WgOGMieYqJ/dzjLIhZU118gbysxrNUGefxD6UO/hyNNllpFTOIbx32kSFQctnweV5PxTMHLjRqiAN+fQE9gL+Xy5WB6MOS4GJJuYbDUHhcKDhHGRbLzOpjsjdM1+iwAZLGeieehACX2hhI7SjK/ZUTNrvVje31TxJiFBGYViWFkCn9PMeX9fS6qVbzfCj4fOCTzDnuWy2c4xA7mdNkA3RS9FH2VeqzdCBlixxbzXjvkHU1I8BOYFb1pZvPIHSSIj4svT8xpzcxtXN+ZKyjdDvbz08niiF3PqV9Tn5NST8vg48MTaY8E5xqSSIsWoWHo+LtAzxdH/GDUyp37CBEYfso04F/NlMTcDJUTpECLY0HFGQHImE8xsEUdgnrQlixIvGhJA1BvxpDHGxEMBYFeNOHcBJlSjwe2JcSfbBEsGOPPBHg/6SBBOCsLLw0SpUxod0Z1bFMfLkbQ3UiZxEyd0Dx8t+SRBu18Q9msFbI4e3p1THEfkSEh7kEJ5orR10qTWDvbgPWn5aWvCYyOAjwgXyjJi34uMjo58L25cmRAeQZWI2PA1QQLsPESAH8WGFwZZ4SPoR73BHPzIPMJj9AreBzKUmrH4todT18ANvi1oc3YGjUT/0j+ExUwq8PI9BLaCQIpvewwYu2evAG/Vo/5avPdY7o+BemLLXw3y+AdkzP9bpIxB1wm5EYq8fesHbPEPtm6HrHvtx4jcGPR8fDDpkZBefIjB46QnlUNRltv4Z/pO/J6dxEjhYAtmoMeq+GozvUVvNYOW3m6GCIhoprcfr97B8AcIQYsfD8ljUvGNjvkrpj0ETA48ZMIxCeqsRIsQALE0gi2GB+glSOfbOjW3GSBM9yPq8/rpJXrJDz0BPxV6xdN4uiCGDQed3WhgFkBUZEFsmeyyBpzXrm7UGTBZG8Lh5aubFufk5eUsbrrFGr7McYdbltxa0nKYqRKbQjvikXYkTGM0f2xuyM3Ly21oXnWfvf6I1BmZwfh7EWWIYsg2nHhsDhOnczhJcmI6eBAmy3jZ3RiJmKQR/JA99FcwsfaVbNDDyi1rL9NPj9hfo61wjM6BjzOLijLpeTgk/pL+ip6tfYWupzeOgPny2tcUu9J/9mhxJlgyi985NFRbvCVewXUNXLJaW0RxZqtRYtnfYdcYomXQWdnJHQA3jiEEkeTQWcWxdDP9IvvVWvo2TK553XEMEq+s69/QDU1Q7p0zxwsm9qS379whr8NI2PJqLUyGyfNeX3eFfnJU2U+uHR9cVV1IqgurqwuV44XVp0h2qN55X5XJwtk59yP0IZuHrqBOBIuIYhkcoT6Kx79Pu2HS/IPZIMOqLWs/pteOOk4NPgEb6QAIdAPsyZk5Mwd+wVaHMexJv719W7xCu2l37UG6lvYdBcvHa08p89741zd63phTRGqL5ggo6SlvdbWXzCqsPq78NnSu7wnKy2HNZbVoRCI7UJEOyRj+sPE002tOOY7Qa5fXboFWkLNeqYUSZRocp9XwSUZxcQZ9Hw6LV2pOoVmvHQEDbGIENEG5i6bLgMSM4n8+FNLTtAds99DaWEvgcf4o5SyYe9x+kF6/tGoTPAdRmS/XQIEy//QxKC2oqioAI3tS5auvxCtzT6y6RK8fhChYcwCJaMJhxc0vqSxQ/qmgsrKAlBZUHlauheTpvd9uj5DnLzJct6qfq5fXbYHVIGcfrIVJihbaVLu1wW7Vbs8zK0A8e9Jvb91S9cVMjPrazD6gpfeZTXzYbCFMcppVRsGMpp55OWgx1/3JeAxW1Y7AORgM/m3rWrsdLkQVmEVSU16cX/e7uvkvpqRiQsG06XJ0t64Tf+l0nG1dt025gyOIZlvq5u9KSU1N2TW/rsWnnMRPyTDkctbhvIcNvYIXWyLzdwYLoYesUbaQG4iK2cWO2gdpeUYLqDD0MUTOPhDIGnZEs58yArR86FznuWEsU4YDi2x26dA4klkn8Qa6vhk2QUfX4Jxm/ngX9r7ogn1dmlmwqZmuhxtdg9XN/DEcUgqb+9hMyNansfaQET2mcROCmGEMVqxm5u+h6kN2MOwgqykV2wH9yQG9DvVFU38Pogaf4FVuE62KI/oJ02RDdWW2w5dqQwU/8+N1q1DlvsL863u61KLE7x/o8w0VJQM/Y/SQ3unIrqxueEa1BqT5VFNsO7p39/UC771a77RowpaKe9nvJQIT1Pog5LGx8XblBKmCNGTf3xMogAQvPnz9PYKX/08sVDTG1OKUlOLUgS/UaZtm1NAaYTsl7i9ZQ+L6O4Rl0OGa577LuWvc+C+x96/vYh0lLBuM+7XwI/dTLtdT7v4d6rRTWDnku0IBrqFnZ5bVIqKP8lasJlithWnaLhTsr8qFJBulF/70p4undou36HeTJ5+jv1fCybeQ8nH3+Xv6aENczmOFlab+hqMDg1rLOt12A+tiUFrYDwQ6c3RUJp601nzegTNX6WlYAI2zSUV945F6zU56ZmZVQaWspWcIADxJ9GmljQUnL2p2Dpr5T8H+5KJFu+vqBq8qvyHRzStLHPEO5SPYCV9nZe0yZT2RcH0oHvegSzNEJ0oGWU8iQWM12dgPEugngVceGIwZgPFp0BiT1a0a3R5Rcot7ihfA1J/20v96jX7zmTX9s583H0kwx6WnLd09cXrR9LGroOa9sHNbdyz8wcKk5lqhaVFJZNwmqtw884MXNdvJujpBa3xzuSaZH9sxa06Z7x+HJSduPbdYHv/DgmEhfbehvlmGN7JUkcG78GDM12CeyFFTPNqVeNxC1gzjz+c2nVo63Xxs8rKJWXoBJM0tmEbfGm4qzpoOH3xpzQfyxLzW1gnE9NHo6tol1eMEic4ZVPrjnVi0kqAe2sQ2bgqupScaq8WGlUWgWHI51SKJl/UYT6zccNsCSkBtiVZLsiefuFSDYT3Fi8Zk7EUnmjTRYtsFeuDDJS05MW79M3mr3mla+d8dzac31KTPmBYfFiYSUef48PhPjm9ryZsSGZZkdNvzq0Y9rdNcwDq5Dg5C3QW+7UN64IKptvS3tvHbvu5c9pv1Exau21rc9LIpwpQwUjTq8576yeVDz5+4WZ1nXT43wV60rPLJbDp/UksNrP3iQ2SA63Pst058gOYDbhRnRUw8l/sRt4HbxPzO4WYpInCpuVgSbVh6JXuwnnJngKTTCwaPWmG5Xbhpm1U0Yt3FyBGpGYemPM77p2TD904JjgJ2QFpFLeYpGx8X15Qx1Zk31p5ki9ZLUuXE0lmuJlcakJMVLeFS1iIvrB8drY0aloilakqCZwzwRORtxlgwxS4IThggJd4TDxoiaAIT80fFPGrCPPru+puFn504P/ybr4ihA/6dKASLshEJic7xE8tmzu3KzA7TABBe8y5fNbWo3ilQn/SuFKM16b2l5bOeayqfGhYmhIulU+fVNDdWVv4NMzX10MBHyPR5uhWUu8D9P1VnIMt4nGNgZGBgAOJ/1bf64vltvjJwszOAwAOlmqvINEc/WJyDgQlEAQA+dgnjAHicY2BkYGBnAAGOPgaG//85+hkYGVCBPgBGJwNkAAAAeJxjYGBgYB/EmKMPtxwAhg4B0gAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAe4CLgKKAtAC/ANiA4wDqAPgBDAEsATaBQgFWgXABggGLgZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format(\"woff\");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:\"\\f101\"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:\"\\f102\"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:\"\\f103\"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:\"\\f104\"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:\"\\f105\"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:\"\\f106\"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:\"\\f107\"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:\"\\f108\"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:\"\\f109\"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:\"\\f10a\"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:\"\\f10b\"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:\"\\f10c\"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:\"\\f10d\"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:\"\\f10e\"}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:\"\\f10f\"}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:\"\\f110\"}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:\"\\f111\"}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:\"\\f112\"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:\"\\f113\"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:\"\\f114\"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:\"\\f115\"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:\"\\f116\"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:\"\\f117\"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:\"\\f118\"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:\"\\f119\"}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:\"\\f11a\"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:\"\\f11b\"}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder,.vjs-icon-replay-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before,.vjs-icon-replay-5:before{content:\"\\f11c\"}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder,.vjs-icon-replay-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before,.vjs-icon-replay-10:before{content:\"\\f11d\"}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder,.vjs-icon-replay-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before,.vjs-icon-replay-30:before{content:\"\\f11e\"}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder,.vjs-icon-forward-5{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before,.vjs-icon-forward-5:before{content:\"\\f11f\"}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder,.vjs-icon-forward-10{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before,.vjs-icon-forward-10:before{content:\"\\f120\"}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder,.vjs-icon-forward-30{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before,.vjs-icon-forward-30:before{content:\"\\f121\"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:\"\\f122\"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:\"\\f123\"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:\"\\f124\"}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:\"\\f125\"}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:\"\\f126\"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:\"\\f127\"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:\"\\f128\"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:\"\\f129\"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:\"\\f12a\"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:\"\\f12b\"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:\"\\f12c\"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:\"\\f12d\"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:\"\\f12e\"}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex=\"-1\"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:rgba(0,0,0,.7);padding:.5em;text-align:center;width:100%}.vjs-layout-small.vjs-pip-container .vjs-pip-text,.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;transform:translate(-50%,-50%)}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon,.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-audio-only-mode .vjs-control-bar,.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js :not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translateX(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:\"X\";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:\"\";position:absolute;margin:-.6em;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:\"\\f10c\";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:\" \\f12e\";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.9) 0,rgba(0,0,0,.7) 60%,rgba(0,0,0,0) 100%);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-description,.vjs-title-bar-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5{cursor:pointer}.video-js .vjs-skip-forward-10{cursor:pointer}.video-js .vjs-skip-forward-30{cursor:pointer}.video-js .vjs-skip-backward-5{cursor:pointer}.video-js .vjs-skip-backward-10{cursor:pointer}.video-js .vjs-skip-backward-30{cursor:pointer}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0}.video-js :focus:not(:focus-visible){outline:0}",".carousel{position:relative;box-sizing:border-box}.carousel *,.carousel *:before,.carousel *:after{box-sizing:inherit}.carousel.is-draggable{cursor:move;cursor:grab}.carousel.is-dragging{cursor:move;cursor:grabbing}.carousel__viewport{position:relative;overflow:hidden;max-width:100%;max-height:100%}.carousel__track{display:flex}.carousel__slide{flex:0 0 auto;width:var(--carousel-slide-width, 60%);max-width:100%;padding:1rem;position:relative;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.has-dots{margin-bottom:calc(0.5rem + 22px)}.carousel__dots{margin:0 auto;padding:0;position:absolute;top:calc(100% + 0.5rem);left:0;right:0;display:flex;justify-content:center;list-style:none;user-select:none}.carousel__dots .carousel__dot{margin:0;padding:0;display:block;position:relative;width:22px;height:22px;cursor:pointer}.carousel__dots .carousel__dot:after{content:\"\";width:8px;height:8px;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background-color:currentColor;opacity:.25;transition:opacity .15s ease-in-out}.carousel__dots .carousel__dot.is-selected:after{opacity:1}.carousel__button{width:var(--carousel-button-width, 48px);height:var(--carousel-button-height, 48px);padding:0;border:0;display:flex;justify-content:center;align-items:center;pointer-events:all;cursor:pointer;color:var(--carousel-button-color, currentColor);background:var(--carousel-button-bg, transparent);border-radius:var(--carousel-button-border-radius, 50%);box-shadow:var(--carousel-button-shadow, none);transition:opacity .15s ease}.carousel__button.is-prev,.carousel__button.is-next{position:absolute;top:50%;transform:translateY(-50%)}.carousel__button.is-prev{left:10px}.carousel__button.is-next{right:10px}.carousel__button[disabled]{cursor:default;opacity:.3}.carousel__button svg{width:var(--carousel-button-svg-width, 50%);height:var(--carousel-button-svg-height, 50%);fill:none;stroke:currentColor;stroke-width:var(--carousel-button-svg-stroke-width, 1.5);stroke-linejoin:bevel;stroke-linecap:round;filter:var(--carousel-button-svg-filter, none);pointer-events:none}html.with-fancybox{scroll-behavior:auto}body.compensate-for-scrollbar{overflow:hidden !important;touch-action:none}.fancybox__container{position:fixed;top:0;left:0;bottom:0;right:0;direction:ltr;margin:0;padding:env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);box-sizing:border-box;display:flex;flex-direction:column;color:var(--fancybox-color, #fff);-webkit-tap-highlight-color:rgba(0,0,0,0);overflow:hidden;z-index:1050;outline:none;transform-origin:top left;--carousel-button-width: 48px;--carousel-button-height: 48px;--carousel-button-svg-width: 24px;--carousel-button-svg-height: 24px;--carousel-button-svg-stroke-width: 2.5;--carousel-button-svg-filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4))}.fancybox__container *,.fancybox__container *::before,.fancybox__container *::after{box-sizing:inherit}.fancybox__container :focus{outline:none}body:not(.is-using-mouse) .fancybox__container :focus{box-shadow:0 0 0 1px #fff,0 0 0 2px var(--fancybox-accent-color, rgba(1, 210, 232, 0.94))}@media all and (min-width: 1024px){.fancybox__container{--carousel-button-width:48px;--carousel-button-height:48px;--carousel-button-svg-width:27px;--carousel-button-svg-height:27px}}.fancybox__backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:var(--fancybox-bg, rgba(24, 24, 27, 0.92))}.fancybox__carousel{position:relative;flex:1 1 auto;min-height:0;height:100%;z-index:10}.fancybox__carousel.has-dots{margin-bottom:calc(0.5rem + 22px)}.fancybox__viewport{position:relative;width:100%;height:100%;overflow:visible;cursor:default}.fancybox__track{display:flex;height:100%}.fancybox__slide{flex:0 0 auto;width:100%;max-width:100%;margin:0;padding:48px 8px 8px 8px;position:relative;overscroll-behavior:contain;display:flex;flex-direction:column;outline:0;overflow:auto;--carousel-button-width: 36px;--carousel-button-height: 36px;--carousel-button-svg-width: 22px;--carousel-button-svg-height: 22px}.fancybox__slide::before,.fancybox__slide::after{content:\"\";flex:0 0 0;margin:auto}@media all and (min-width: 1024px){.fancybox__slide{padding:64px 100px}}.fancybox__content{margin:0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);padding:36px;color:var(--fancybox-content-color, #374151);background:var(--fancybox-content-bg, #fff);position:relative;align-self:center;display:flex;flex-direction:column;z-index:20}.fancybox__content :focus:not(.carousel__button.is-close){outline:thin dotted;box-shadow:none}.fancybox__caption{align-self:center;max-width:100%;margin:0;padding:1rem 0 0 0;line-height:1.375;color:var(--fancybox-color, currentColor);visibility:visible;cursor:auto;flex-shrink:0;overflow-wrap:anywhere}.is-loading .fancybox__caption{visibility:hidden}.fancybox__container>.carousel__dots{top:100%;color:var(--fancybox-color, #fff)}.fancybox__nav .carousel__button{z-index:40}.fancybox__nav .carousel__button.is-next{right:8px}@media all and (min-width: 1024px){.fancybox__nav .carousel__button.is-next{right:40px}}.fancybox__nav .carousel__button.is-prev{left:8px}@media all and (min-width: 1024px){.fancybox__nav .carousel__button.is-prev{left:40px}}.carousel__button.is-close{position:absolute;top:8px;right:8px;top:calc(env(safe-area-inset-top, 0px) + 8px);right:calc(env(safe-area-inset-right, 0px) + 8px);z-index:40}@media all and (min-width: 1024px){.carousel__button.is-close{right:40px}}.fancybox__content>.carousel__button.is-close{position:absolute;top:-40px;right:0;color:var(--fancybox-color, #fff)}.fancybox__no-click,.fancybox__no-click button{pointer-events:none}.fancybox__spinner{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:50px;height:50px;color:var(--fancybox-color, currentColor)}.fancybox__slide .fancybox__spinner{cursor:pointer;z-index:1053}.fancybox__spinner svg{animation:fancybox-rotate 2s linear infinite;transform-origin:center center;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;width:100%;height:100%}.fancybox__spinner svg circle{fill:none;stroke-width:2.75;stroke-miterlimit:10;stroke-dasharray:1,200;stroke-dashoffset:0;animation:fancybox-dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:currentColor}@keyframes fancybox-rotate{100%{transform:rotate(360deg)}}@keyframes fancybox-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.fancybox__backdrop,.fancybox__caption,.fancybox__nav,.carousel__dots,.carousel__button.is-close{opacity:var(--fancybox-opacity, 1)}.fancybox__container.is-animated[aria-hidden=false] .fancybox__backdrop,.fancybox__container.is-animated[aria-hidden=false] .fancybox__caption,.fancybox__container.is-animated[aria-hidden=false] .fancybox__nav,.fancybox__container.is-animated[aria-hidden=false] .carousel__dots,.fancybox__container.is-animated[aria-hidden=false] .carousel__button.is-close{animation:.15s ease backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .fancybox__backdrop,.fancybox__container.is-animated.is-closing .fancybox__caption,.fancybox__container.is-animated.is-closing .fancybox__nav,.fancybox__container.is-animated.is-closing .carousel__dots,.fancybox__container.is-animated.is-closing .carousel__button.is-close{animation:.15s ease both fancybox-fadeOut}.fancybox-fadeIn{animation:.15s ease both fancybox-fadeIn}.fancybox-fadeOut{animation:.1s ease both fancybox-fadeOut}.fancybox-zoomInUp{animation:.2s ease both fancybox-zoomInUp}.fancybox-zoomOutDown{animation:.15s ease both fancybox-zoomOutDown}.fancybox-throwOutUp{animation:.15s ease both fancybox-throwOutUp}.fancybox-throwOutDown{animation:.15s ease both fancybox-throwOutDown}@keyframes fancybox-fadeIn{from{opacity:0}to{opacity:1}}@keyframes fancybox-fadeOut{to{opacity:0}}@keyframes fancybox-zoomInUp{from{transform:scale(0.97) translate3d(0, 16px, 0);opacity:0}to{transform:scale(1) translate3d(0, 0, 0);opacity:1}}@keyframes fancybox-zoomOutDown{to{transform:scale(0.97) translate3d(0, 16px, 0);opacity:0}}@keyframes fancybox-throwOutUp{to{transform:translate3d(0, -30%, 0);opacity:0}}@keyframes fancybox-throwOutDown{to{transform:translate3d(0, 30%, 0);opacity:0}}.fancybox__carousel .carousel__slide{scrollbar-width:thin;scrollbar-color:#ccc rgba(255,255,255,.1)}.fancybox__carousel .carousel__slide::-webkit-scrollbar{width:8px;height:8px}.fancybox__carousel .carousel__slide::-webkit-scrollbar-track{background-color:rgba(255,255,255,.1)}.fancybox__carousel .carousel__slide::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:2px;box-shadow:inset 0 0 4px rgba(0,0,0,.2)}.fancybox__carousel.is-draggable .fancybox__slide,.fancybox__carousel.is-draggable .fancybox__slide .fancybox__content{cursor:move;cursor:grab}.fancybox__carousel.is-dragging .fancybox__slide,.fancybox__carousel.is-dragging .fancybox__slide .fancybox__content{cursor:move;cursor:grabbing}.fancybox__carousel .fancybox__slide .fancybox__content{cursor:auto}.fancybox__carousel .fancybox__slide.can-zoom_in .fancybox__content{cursor:zoom-in}.fancybox__carousel .fancybox__slide.can-zoom_out .fancybox__content{cursor:zoom-out}.fancybox__carousel .fancybox__slide.is-draggable .fancybox__content{cursor:move;cursor:grab}.fancybox__carousel .fancybox__slide.is-dragging .fancybox__content{cursor:move;cursor:grabbing}.fancybox__image{transform-origin:0 0;user-select:none;transition:none}.has-image .fancybox__content{padding:0;background:rgba(0,0,0,0);min-height:1px}.is-closing .has-image .fancybox__content{overflow:visible}.has-image[data-image-fit=contain]{overflow:visible;touch-action:none}.has-image[data-image-fit=contain] .fancybox__content{flex-direction:row;flex-wrap:wrap}.has-image[data-image-fit=contain] .fancybox__image{max-width:100%;max-height:100%;object-fit:contain}.has-image[data-image-fit=contain-w]{overflow-x:hidden;overflow-y:auto}.has-image[data-image-fit=contain-w] .fancybox__content{min-height:auto}.has-image[data-image-fit=contain-w] .fancybox__image{max-width:100%;height:auto}.has-image[data-image-fit=cover]{overflow:visible;touch-action:none}.has-image[data-image-fit=cover] .fancybox__content{width:100%;height:100%}.has-image[data-image-fit=cover] .fancybox__image{width:100%;height:100%;object-fit:cover}.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content,.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content,.fancybox__carousel .fancybox__slide.has-video .fancybox__content,.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content{max-width:100%;flex-shrink:1;min-height:1px;overflow:visible}.fancybox__carousel .fancybox__slide.has-iframe .fancybox__content,.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content{width:100%;height:80%}.fancybox__carousel .fancybox__slide.has-video .fancybox__content,.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content{width:960px;height:540px;max-width:100%;max-height:100%}.fancybox__carousel .fancybox__slide.has-map .fancybox__content,.fancybox__carousel .fancybox__slide.has-pdf .fancybox__content,.fancybox__carousel .fancybox__slide.has-video .fancybox__content,.fancybox__carousel .fancybox__slide.has-html5video .fancybox__content{padding:0;background:rgba(24,24,27,.9);color:#fff}.fancybox__carousel .fancybox__slide.has-map .fancybox__content{background:#e5e3df}.fancybox__html5video,.fancybox__iframe{border:0;display:block;height:100%;width:100%;background:rgba(0,0,0,0)}.fancybox-placeholder{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.fancybox__thumbs{flex:0 0 auto;position:relative;padding:0px 3px;opacity:var(--fancybox-opacity, 1)}.fancybox__container.is-animated[aria-hidden=false] .fancybox__thumbs{animation:.15s ease-in backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .fancybox__thumbs{opacity:0}.fancybox__thumbs .carousel__slide{flex:0 0 auto;width:var(--fancybox-thumbs-width, 96px);margin:0;padding:8px 3px;box-sizing:content-box;display:flex;align-items:center;justify-content:center;overflow:visible;cursor:pointer}.fancybox__thumbs .carousel__slide .fancybox__thumb::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;border-width:5px;border-style:solid;border-color:var(--fancybox-accent-color, rgba(34, 213, 233, 0.96));opacity:0;transition:opacity .15s ease;border-radius:var(--fancybox-thumbs-border-radius, 4px)}.fancybox__thumbs .carousel__slide.is-nav-selected .fancybox__thumb::after{opacity:.92}.fancybox__thumbs .carousel__slide>*{pointer-events:none;user-select:none}.fancybox__thumb{position:relative;width:100%;padding-top:calc(100%/(var(--fancybox-thumbs-ratio, 1.5)));background-size:cover;background-position:center center;background-color:rgba(255,255,255,.1);background-repeat:no-repeat;border-radius:var(--fancybox-thumbs-border-radius, 4px)}.fancybox__toolbar{position:absolute;top:0;right:0;left:0;z-index:20;background:linear-gradient(to top, hsla(0deg, 0%, 0%, 0) 0%, hsla(0deg, 0%, 0%, 0.006) 8.1%, hsla(0deg, 0%, 0%, 0.021) 15.5%, hsla(0deg, 0%, 0%, 0.046) 22.5%, hsla(0deg, 0%, 0%, 0.077) 29%, hsla(0deg, 0%, 0%, 0.114) 35.3%, hsla(0deg, 0%, 0%, 0.155) 41.2%, hsla(0deg, 0%, 0%, 0.198) 47.1%, hsla(0deg, 0%, 0%, 0.242) 52.9%, hsla(0deg, 0%, 0%, 0.285) 58.8%, hsla(0deg, 0%, 0%, 0.326) 64.7%, hsla(0deg, 0%, 0%, 0.363) 71%, hsla(0deg, 0%, 0%, 0.394) 77.5%, hsla(0deg, 0%, 0%, 0.419) 84.5%, hsla(0deg, 0%, 0%, 0.434) 91.9%, hsla(0deg, 0%, 0%, 0.44) 100%);padding:0;touch-action:none;display:flex;justify-content:space-between;--carousel-button-svg-width: 20px;--carousel-button-svg-height: 20px;opacity:var(--fancybox-opacity, 1);text-shadow:var(--fancybox-toolbar-text-shadow, 1px 1px 1px rgba(0, 0, 0, 0.4))}@media all and (min-width: 1024px){.fancybox__toolbar{padding:8px}}.fancybox__container.is-animated[aria-hidden=false] .fancybox__toolbar{animation:.15s ease-in backwards fancybox-fadeIn}.fancybox__container.is-animated.is-closing .fancybox__toolbar{opacity:0}.fancybox__toolbar__items{display:flex}.fancybox__toolbar__items--left{margin-right:auto}.fancybox__toolbar__items--center{position:absolute;left:50%;transform:translateX(-50%)}.fancybox__toolbar__items--right{margin-left:auto}@media(max-width: 640px){.fancybox__toolbar__items--center:not(:last-child){display:none}}.fancybox__counter{min-width:72px;padding:0 10px;line-height:var(--carousel-button-height, 48px);text-align:center;font-size:17px;font-variant-numeric:tabular-nums;-webkit-font-smoothing:subpixel-antialiased}.fancybox__progress{background:var(--fancybox-accent-color, rgba(34, 213, 233, 0.96));height:3px;left:0;position:absolute;right:0;top:0;transform:scaleX(0);transform-origin:0;transition-property:transform;transition-timing-function:linear;z-index:30;user-select:none}.fancybox__container:fullscreen::backdrop{opacity:0}.fancybox__button--fullscreen g:nth-child(2){display:none}.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(1){display:none}.fancybox__container:fullscreen .fancybox__button--fullscreen g:nth-child(2){display:block}.fancybox__button--slideshow g:nth-child(2){display:none}.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(1){display:none}.fancybox__container.has-slideshow .fancybox__button--slideshow g:nth-child(2){display:block}"]} \ No newline at end of file diff --git a/app/history-1.html b/app/history-1.html index 7f65354..cc838fa 100644 --- a/app/history-1.html +++ b/app/history-1.html @@ -1,77 +1,4 @@ - - - - - - Felix - - - - - - - - - - - - - - - - - - - - - - - - -

- - -
-
- - - - - - -
-
-

- «Чтобы стать хорошим
- механиком, нужно быть
- очень внимательным,
- замечать каждую
- мелочь»
-

- -

Василий Михайлов

-

- Финалист чемпионата
- «Лучший автомеханик РФ» 2022 года. -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - Не космонавт, но даже лучше -

    -

    - Как и многие в детстве, я хотел стать космонавтом. Но - однажды родители подарили мне велосипед. С этого момента я - увлекся транспортом и его ремонтом. Уже после были - мотоциклы, а затем автомобили. В 14 лет поступил в центр - технического творчества «Мотор». Потом от училища устроился - на работу в автобусный парк младшим специалистом. - Ремонтировал автобусы, которые выходили на линию в город. -

    -
  • -
  • -

    - О чемпионате -

    -

    - Мне знакомые порекомендовали поучаствовать в чемпионате. - Только на второй год я попал в сотню лидеров и на сам - чемпионат. Мне очень понравилось организация события. Даже - когда просто ждешь своей очереди, находишь массу полезных - инструментов и инструкций, слушаешь лекции, изучаешь - выставочные экспонаты. -

    -
  • -
-
-
-
- -
-
-
-

- «Что нужно для ремонта? Стандартный набор инструментов: молоток - и домкрат» -

-

- Сейчас у меня свой собственный бизнес — ремонт автомобилей. - Раньше я работал под открытым небом, теперь у меня своя - мастерская. Начинал с нуля, постепенно приумножал, докупал - инструменты, оборудование. -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - Профессиональный
    - механик или блогер? -

    -

    - Я видеоблогер, снимаю свою работу на видео. На съемках я - организую все так, чтобы сам владелец участвовал в ремонте. - Показываю людям процесс и интересные моменты, например, как - из плохого состояния мы доводим автомобиль до состояния - «конфетки». -

    -
  • -
  • -

    - «FELIX есть везде.
    - Это проверенный бренд, который не подводит» -

    -

    - В Питере FELIX можно приобрести в любом магазине. - Проверенный бренд, который не подводит. Классно, что он - подходит для разных автомобилей, не приходится думать и - смешивать с антифризами других марок —  просто выбираю - подходящий тип жидкости от FELIX. -

    -
  • -
-
-
-
- -
-
-
-

- культовый субарист
- и автор канала на ютуб -

-

- В детстве я играл в Colin McRae, и там персонаж как раз ездил на - Subaru. Мне захотелось тоже погонять на этой машине. И меня - затянуло во всё это потихоньку. Сейчас у меня в коллекции Subaru - Forester и Outback. Их я сам восстанавливал и доводил до ума. - Мой канал на YouTube @MasterMehanik во многом посвящен именно - этой марке, мне нравится помогать таким же преданным - «Субаристам» как и я.  -

-
-
-
-
- - - - - -
-
-

- 5 КОРОТКИХ ВОПРОСОВ -

-
    -
  • -

    - Свою машину
    - ремонтируешь сам? -

    -

    - Все машины я ремонтирую сам. Иногда отдаю в сервис, когда - нет технической возможности, например, сделать развал колес. -

    -
  • -
  • -

    - Чем любишь заниматься
    - в свободное время? -

    -

    - Увлекаюсь темой реставрации автомобилей. У меня есть - коллекция BMW 41 года — откладываю деньги, чтобы заняться - ими в полной мере и отреставрировать. -

    -
  • -
  • -

    - Самые популярные
    - ошибки автолюбителей? -

    -

    - Несвоевременное обслуживание автомобиля. Например, Subaru — - это капризный автомобиль. Перед дальней поездкой его - обязательно нужно осмотреть, проверить уровень антифриза и - масла в моторе. -

    -
  • -
  • -

    - Совет начинающим
    - автомеханикам? -

    -

    - Сейчас есть много обучений, которые могут помочь - профессионально расти в какой-то отдельной области. Поэтому - важно лишь иметь большое желание, развиваться и стремиться к - лучшему. -

    -
  • -
  • -

    - 3 основных навыка,
    - которыми обладает
    - профессиональный
    - автомеханик -

    -

    - Внимательность, хорошая память и стрессоустойчивость. -

    -
  • -
-
-
-
- - - -
- -
-
-
- - \ No newline at end of file + })(window, document, 'script', 'dataLayer', 'GTM-WN3RSSG')

«Чтобы стать хорошим
механиком, нужно быть
очень внимательным,
замечать каждую
мелочь»

Василий Михайлов

Финалист чемпионата
«Лучший автомеханик РФ» 2022 года.

  • Не космонавт, но даже лучше

    Как и многие в детстве, я хотел стать космонавтом. Но однажды родители подарили мне велосипед. С этого момента я увлекся транспортом и его ремонтом. Уже после были мотоциклы, а затем автомобили. В 14 лет поступил в центр технического творчества «Мотор». Потом от училища устроился на работу в автобусный парк младшим специалистом. Ремонтировал автобусы, которые выходили на линию в город.

  • О чемпионате

    Мне знакомые порекомендовали поучаствовать в чемпионате. Только на второй год я попал в сотню лидеров и на сам чемпионат. Мне очень понравилось организация события. Даже когда просто ждешь своей очереди, находишь массу полезных инструментов и инструкций, слушаешь лекции, изучаешь выставочные экспонаты.

«Что нужно для ремонта? Стандартный набор инструментов: молоток и домкрат»

Сейчас у меня свой собственный бизнес — ремонт автомобилей. Раньше я работал под открытым небом, теперь у меня своя мастерская. Начинал с нуля, постепенно приумножал, докупал инструменты, оборудование.

  • Профессиональный
    механик или блогер?

    Я видеоблогер, снимаю свою работу на видео. На съемках я организую все так, чтобы сам владелец участвовал в ремонте. Показываю людям процесс и интересные моменты, например, как из плохого состояния мы доводим автомобиль до состояния «конфетки».

  • «FELIX есть везде.
    Это проверенный бренд, который не подводит»

    В Питере FELIX можно приобрести в любом магазине. Проверенный бренд, который не подводит. Классно, что он подходит для разных автомобилей, не приходится думать и смешивать с антифризами других марок —  просто выбираю подходящий тип жидкости от FELIX.

культовый субарист
и автор канала на ютуб

В детстве я играл в Colin McRae, и там персонаж как раз ездил на Subaru. Мне захотелось тоже погонять на этой машине. И меня затянуло во всё это потихоньку. Сейчас у меня в коллекции Subaru Forester и Outback. Их я сам восстанавливал и доводил до ума. Мой канал на YouTube @MasterMehanik во многом посвящен именно этой марке, мне нравится помогать таким же преданным «Субаристам» как и я. 

5 КОРОТКИХ ВОПРОСОВ

  • Свою машину
    ремонтируешь сам?

    Все машины я ремонтирую сам. Иногда отдаю в сервис, когда нет технической возможности, например, сделать развал колес.

  • Чем любишь заниматься
    в свободное время?

    Увлекаюсь темой реставрации автомобилей. У меня есть коллекция BMW 41 года — откладываю деньги, чтобы заняться ими в полной мере и отреставрировать.

  • Самые популярные
    ошибки автолюбителей?

    Несвоевременное обслуживание автомобиля. Например, Subaru — это капризный автомобиль. Перед дальней поездкой его обязательно нужно осмотреть, проверить уровень антифриза и масла в моторе.

  • Совет начинающим
    автомеханикам?

    Сейчас есть много обучений, которые могут помочь профессионально расти в какой-то отдельной области. Поэтому важно лишь иметь большое желание, развиваться и стремиться к лучшему.

  • 3 основных навыка,
    которыми обладает
    профессиональный
    автомеханик

    Внимательность, хорошая память и стрессоустойчивость.

\ No newline at end of file diff --git a/app/history-2.html b/app/history-2.html index 50c86b2..e1722b2 100644 --- a/app/history-2.html +++ b/app/history-2.html @@ -1,77 +1,4 @@ - - - - - - Felix - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- - - - - - -
-
-

- «Секрет
- профессионализма —
- любить то, что делаешь,
- и делать это на уровне
- совершенства»
-

- -

Иван Туровский

-

- Финалист чемпионата
- «Лучший автомеханик РФ» 2022 года,
- в профессии больше 15 лет. -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - ПОЧЕМУ МАШИНЫ? -

    -

    - С самого детства автомобили были частью моей жизни. Мой - старший брат занимался ремонтом машин, и мне всегда было - интересно наблюдать за его работой. Мои игрушки были - необычные — моторчики, вентиляторы, отвертки. Это было - судьбоносно — я понял, что моя дорога связана с ремонтом - автомобилей. Сейчас у нас с братом свой небольшой автосервис - в Нижнем Тагиле. -

    -
  • -
  • -

    - В ЧЕМ КАЙФ? -

    -

    - Обожаю восстанавливать тачки с нуля. Не так давно был - проект, где я старый Чайзер собирал с голого кузова, - полностью прокладывал всю проводку, устанавливал контрактный - японский мотор. Все были в шоке, когда через три недели - машина выехала из гаража своим ходом. Вот такие моменты, - когда ты придаешь автомобилю новую жизнь, самые яркие. -

    -
  • -
-
-
-
- -
-
-
-

- «УЧИТЬСЯ И ПРОБОВАТЬ НОВОЕ — ПУТЬ К ПРОФЕССИОНАЛИЗМУ И УСПЕХУ» -

-

- Мне всегда интересно сделать что-то новое. Я не боюсь лезть в - мотор или коробку, с которыми раньше не имел дела. Есть много - литературы, которую можно изучить, если сталкиваешься со - сложностями. Так я расширяю свой кругозор и накапливаю опыт. -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - С FELIX Я ВСЕГДА
    - СПОКОЕН ЗА МОТОР -

    -

    - У меня в работе были случаи, когда антифриз неизвестного - производителя зимой из красного превращался в белый и просто - замерзал до состояния каши! Поэтому мы давно перешли на - антифризы FELIX, в качестве которых я уверен на все сто. - Клиентам всегда говорю, что экономить на замене антифриза — - себе дороже. -

    -
  • -
  • -

    - КАК НАЙТИ КЛИЕНТОВ? -

    -

    - Только профессионально выполнять свою работу! У меня нет - никакой рекламы, а очередь — на месяц вперед. Считаю, что - работать надо не «на поток», а на качество. Тогда один - довольный клиент принесет еще десять. Бывают случаи, когда - клиенты приезжают в отчаянии, готовые избавиться от своего - автомобиля, так как несколько СТО не смогли устранить - проблему. Но когда ты ее находишь и видишь, как машина - поехала, это приносит невероятное удовлетворение. -

    -
  • -
-
-
-
- -
-
-
-

- «Я всегда говорю, что у машины есть душа. Если к машине
- хорошо относишься, она тебя довезет в любое место» -

-
-
-
-
- - - - - -
-
-

- 5 КОРОТКИХ ВОПРОСОВ -

-
    -
  • -

    - Свою машину
    - ремонтируешь сам? -

    -

    - BMW требует особого ухода и регулярной замены деталей. - Поэтому свой бумер никому не доверяю, все делаю сам. -

    -
  • -
  • -

    - Чем любишь заниматься
    - в свободное время? -

    -

    - Такого не бывает. Но моя мечта — сделать собственный проект, - построить какой-нибудь уникальный автомобиль. -

    -
  • -
  • -

    - Совет начинающим
    - автомеханикам? -

    -

    - Любить свое дело. Выполнять свою работу качественно, - тщательно. Вот и все. И еще — не жалеть денег на - инструмент:) -

    -
  • -
  • -

    - Незаменимый инструмент
    - в твоем автосервисе? -

    -

    - Это диагностика, которую подарила мне супруга на день - рождения. Она ускоряет время поисков проблемы и расширяет - спектр услуг. -

    -
  • -
  • -

    - Самые популярные
    - ошибки автолюбителей? -

    -

    - Несвоевременная замена ремня ГРМ, масла в двигателе, масла в - коробке, антифриза. Зимой — «холодные» запуски. -

    -
  • -
-
-
-
- - - -
- -
-
-
- - \ No newline at end of file + })(window, document, 'script', 'dataLayer', 'GTM-WN3RSSG')

«Секрет
профессионализма —
любить то, что делаешь,
и делать это на уровне
совершенства»

Иван Туровский

Финалист чемпионата
«Лучший автомеханик РФ» 2022 года,
в профессии больше 15 лет.

  • ПОЧЕМУ МАШИНЫ?

    С самого детства автомобили были частью моей жизни. Мой старший брат занимался ремонтом машин, и мне всегда было интересно наблюдать за его работой. Мои игрушки были необычные — моторчики, вентиляторы, отвертки. Это было судьбоносно — я понял, что моя дорога связана с ремонтом автомобилей. Сейчас у нас с братом свой небольшой автосервис в Нижнем Тагиле.

  • В ЧЕМ КАЙФ?

    Обожаю восстанавливать тачки с нуля. Не так давно был проект, где я старый Чайзер собирал с голого кузова, полностью прокладывал всю проводку, устанавливал контрактный японский мотор. Все были в шоке, когда через три недели машина выехала из гаража своим ходом. Вот такие моменты, когда ты придаешь автомобилю новую жизнь, самые яркие.

«УЧИТЬСЯ И ПРОБОВАТЬ НОВОЕ — ПУТЬ К ПРОФЕССИОНАЛИЗМУ И УСПЕХУ»

Мне всегда интересно сделать что-то новое. Я не боюсь лезть в мотор или коробку, с которыми раньше не имел дела. Есть много литературы, которую можно изучить, если сталкиваешься со сложностями. Так я расширяю свой кругозор и накапливаю опыт.

  • С FELIX Я ВСЕГДА
    СПОКОЕН ЗА МОТОР

    У меня в работе были случаи, когда антифриз неизвестного производителя зимой из красного превращался в белый и просто замерзал до состояния каши! Поэтому мы давно перешли на антифризы FELIX, в качестве которых я уверен на все сто. Клиентам всегда говорю, что экономить на замене антифриза — себе дороже.

  • КАК НАЙТИ КЛИЕНТОВ?

    Только профессионально выполнять свою работу! У меня нет никакой рекламы, а очередь — на месяц вперед. Считаю, что работать надо не «на поток», а на качество. Тогда один довольный клиент принесет еще десять. Бывают случаи, когда клиенты приезжают в отчаянии, готовые избавиться от своего автомобиля, так как несколько СТО не смогли устранить проблему. Но когда ты ее находишь и видишь, как машина поехала, это приносит невероятное удовлетворение.

«Я всегда говорю, что у машины есть душа. Если к машине
хорошо относишься, она тебя довезет в любое место»

5 КОРОТКИХ ВОПРОСОВ

  • Свою машину
    ремонтируешь сам?

    BMW требует особого ухода и регулярной замены деталей. Поэтому свой бумер никому не доверяю, все делаю сам.

  • Чем любишь заниматься
    в свободное время?

    Такого не бывает. Но моя мечта — сделать собственный проект, построить какой-нибудь уникальный автомобиль.

  • Совет начинающим
    автомеханикам?

    Любить свое дело. Выполнять свою работу качественно, тщательно. Вот и все. И еще — не жалеть денег на инструмент:)

  • Незаменимый инструмент
    в твоем автосервисе?

    Это диагностика, которую подарила мне супруга на день рождения. Она ускоряет время поисков проблемы и расширяет спектр услуг.

  • Самые популярные
    ошибки автолюбителей?

    Несвоевременная замена ремня ГРМ, масла в двигателе, масла в коробке, антифриза. Зимой — «холодные» запуски.

\ No newline at end of file diff --git a/app/history-3.html b/app/history-3.html index 673b28a..92d3fd4 100644 --- a/app/history-3.html +++ b/app/history-3.html @@ -1,77 +1,4 @@ - - - - - - Felix - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- - - - - - -
-
-

- «ОТВЕТСТВЕННОСТЬ
- И СТАРАТЕЛЬНОСТЬ —
- ВОТ КЛЮЧЕВЫЕ КАЧЕСТВА
- ПРОФЕССИОНАЛА»
-

- -

Александр Конев

-

- Победитель чемпионата
- «Лучший автомеханик РФ» 2022 года,
- в профессии больше 15 лет. -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - ОТ ЛЮБВИ ДО ПРОФИ -

    -

    - Моя страсть с детства к технике и электрике переросла в - профессию. Мне нравилось разбирать, чинить, узнавать, как - что-то устроено. Сейчас я работаю в автосервисе и на себя, - совмещая две работы. -

    -
  • -
  • -

    - О ПОБЕДЕ НА ЧЕМПИОНАТЕ -

    -

    - На прошлом чемпионате я занял первое место среди - профессионалов — это очень круто! Но я не считаю себя самым - умным. Мне еще многому предстоит научиться. В нашей - специальности важно всегда оставаться в курсе новых - технологий и расширять свой опыт. -

    -
  • -
-
-
-
- -
-
-
-

- «ЧТОБЫ СТАТЬ
- ПРОФЕССИОНАЛом,
- НУЖНО НЕ БОЯТЬСЯ ДЕЛАТЬ
- ЛЮБУЮ РАБОТУ» -

-

- Наверное, главное — не искать клиентов, а быть ответственным и - совершенствоваться в своей работе, делать ее, даже если она - кажется сложной или малооплачиваемой, читать техническую - документацию. Клиенты найдут тебя благодаря «сарафанному радио». -

-
-
-
- -
- - - - -
-
-
    -
  • -

    - ВЫБИРАЮ FELIX -

    -

    - В плане технических жидкостей или расходников, доверяю либо - оригинальным, либо проверенным брендам, имеющим официальные - допуски автозаводов. Для меня это главный критерий качества, - потому что это моя репутация и моя ответственность, ошибки - недопустимы. Антифризы FELIX зарекомендовали себя, как - надежный продукт, поэтому всегда беру его, да и клиенты - довольны. -

    -
  • -
  • -

    - О женщинах за рулем -

    -

    - Заметил, что женщины более внимательны и щепетильны к - техническому состоянию автомобиля, регулярно приезжают, - проходят техническое обслуживание, беспокоятся о - безопасности. А мужчины часто откладывают ремонт до - последнего момента. -

    -
  • -
-
-
-
- -
-
-
-

- «НАДО ПОМНИТЬ, НА ДОРОГЕ ТЫ НЕ ОДИН, А ПОЛОМКА В ТВОЕМ АВТО - МОЖЕТ ПРИВЕСТИ К АВАРИИ, И ПОСТРАДАЮТ ДРУГИЕ ЛЮДИ» -

-
-
-
-
- - - - - -
-
-

- 5 КОРОТКИХ ВОПРОСОВ -

-
    -
  • -

    - Свою машину
    - ремонтируешь сам? -

    -

    - Да, что бы ни случилось — кузовной ремонт, проблемы по - электрике или механике. Не отвожу в другие сервисы, делаю - так, как мне нужно. -

    -
  • -
  • -

    - Чем любишь заниматься
    - в свободное время? -

    -

    - Стараюсь проводить время с семьей. Сын тоже тянется к - технике, и я его в этом поддерживаю. Есть небольшая - мастерская со станками — тут я, бывает, даже что-то - изобретаю. -

    -
  • -
  • -

    - Совет начинающим
    - автомеханикам? -

    -

    - Не бояться делать разную работу, даже если она кажется - сложной, малооплачиваемой или слишком ответственной. -

    -
  • -
  • -

    - Незаменимый инструмент
    - в твоем автосервисе? -

    -

    - Титановая монтажка, изготовленная на заказ, и мощный - гайковерт. -

    -
  • -
  • -

    - Самые популярные
    - ошибки автолюбителей? -

    -

    - Безответственность. Люди элементарно забывают проверять - технические жидкости, не заглядывают под капот, говоря: - «Потом как-нибудь сделаю, сейчас денег нет». -

    -
  • -
-
-
-
- - - -
- -
-
-
- - \ No newline at end of file + })(window, document, 'script', 'dataLayer', 'GTM-WN3RSSG')

«ОТВЕТСТВЕННОСТЬ
И СТАРАТЕЛЬНОСТЬ —
ВОТ КЛЮЧЕВЫЕ КАЧЕСТВА
ПРОФЕССИОНАЛА»

Александр Конев

Победитель чемпионата
«Лучший автомеханик РФ» 2022 года,
в профессии больше 15 лет.

  • ОТ ЛЮБВИ ДО ПРОФИ

    Моя страсть с детства к технике и электрике переросла в профессию. Мне нравилось разбирать, чинить, узнавать, как что-то устроено. Сейчас я работаю в автосервисе и на себя, совмещая две работы.

  • О ПОБЕДЕ НА ЧЕМПИОНАТЕ

    На прошлом чемпионате я занял первое место среди профессионалов — это очень круто! Но я не считаю себя самым умным. Мне еще многому предстоит научиться. В нашей специальности важно всегда оставаться в курсе новых технологий и расширять свой опыт.

«ЧТОБЫ СТАТЬ
ПРОФЕССИОНАЛом,
НУЖНО НЕ БОЯТЬСЯ ДЕЛАТЬ
ЛЮБУЮ РАБОТУ»

Наверное, главное — не искать клиентов, а быть ответственным и совершенствоваться в своей работе, делать ее, даже если она кажется сложной или малооплачиваемой, читать техническую документацию. Клиенты найдут тебя благодаря «сарафанному радио».

  • ВЫБИРАЮ FELIX

    В плане технических жидкостей или расходников, доверяю либо оригинальным, либо проверенным брендам, имеющим официальные допуски автозаводов. Для меня это главный критерий качества, потому что это моя репутация и моя ответственность, ошибки недопустимы. Антифризы FELIX зарекомендовали себя, как надежный продукт, поэтому всегда беру его, да и клиенты довольны.

  • О женщинах за рулем

    Заметил, что женщины более внимательны и щепетильны к техническому состоянию автомобиля, регулярно приезжают, проходят техническое обслуживание, беспокоятся о безопасности. А мужчины часто откладывают ремонт до последнего момента.

«НАДО ПОМНИТЬ, НА ДОРОГЕ ТЫ НЕ ОДИН, А ПОЛОМКА В ТВОЕМ АВТО МОЖЕТ ПРИВЕСТИ К АВАРИИ, И ПОСТРАДАЮТ ДРУГИЕ ЛЮДИ»

5 КОРОТКИХ ВОПРОСОВ

  • Свою машину
    ремонтируешь сам?

    Да, что бы ни случилось — кузовной ремонт, проблемы по электрике или механике. Не отвожу в другие сервисы, делаю так, как мне нужно.

  • Чем любишь заниматься
    в свободное время?

    Стараюсь проводить время с семьей. Сын тоже тянется к технике, и я его в этом поддерживаю. Есть небольшая мастерская со станками — тут я, бывает, даже что-то изобретаю.

  • Совет начинающим
    автомеханикам?

    Не бояться делать разную работу, даже если она кажется сложной, малооплачиваемой или слишком ответственной.

  • Незаменимый инструмент
    в твоем автосервисе?

    Титановая монтажка, изготовленная на заказ, и мощный гайковерт.

  • Самые популярные
    ошибки автолюбителей?

    Безответственность. Люди элементарно забывают проверять технические жидкости, не заглядывают под капот, говоря: «Потом как-нибудь сделаю, сейчас денег нет».

\ No newline at end of file diff --git a/app/index.html b/app/index.html index d13a88a..e271353 100644 --- a/app/index.html +++ b/app/index.html @@ -1,77 +1,4 @@ - - - - - - Felix - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- - - - - - - - - - - - - - -
- -
-

- Профессиональный
- антифриз -

- Без вариантов -
-
-
-
-
-
-
- -
-
- -

- Быть - профессионалом -

-

-  — значит уметь выбирать лучшее, задавать
- стандарты качества, не соглашаться
- на компромиссы. Такова философия
- настоящих автомехаников. -

- Узнайте больше! -
-
-
-
- -
-
-

НАШИ ПАРТНЕРЫ

-
-
-
    -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
  • - Логотип партнера -
  • -
-
-
- -
-
-
-
-
-
-
-
- - Информационное письмо - -
- -
- - Информационное письмо - -
- -
- - Информационное письмо - -
- -
- - Информационное письмо - -
- -
- - Информационное письмо - -
- -
- - Информационное письмо - -
- -
- - Информационное письмо - -
-
-
- - -
-
-
-
-
-

- АВТОСЕРВИСЫ РЕКОМЕНДУЮТ -

-

- Официальные дилерские центры,
- автосервисы и СТО выбирают
- антифризы FELIX для гарантийного
- и постгарантийного обслуживания
- автомобилей. -

-
-
-
-
-

Профессиональный
антифриз

Без вариантов

Быть профессионалом

 — значит уметь выбирать лучшее, задавать
стандарты качества, не соглашаться
на компромиссы. Такова философия
настоящих автомехаников.

Узнайте больше!

НАШИ ПАРТНЕРЫ

  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
  • Логотип партнера
Информационное письмо
Информационное письмо
Информационное письмо
Информационное письмо
Информационное письмо
Информационное письмо
Информационное письмо

АВТОСЕРВИСЫ РЕКОМЕНДУЮТ

Официальные дилерские центры,
автосервисы и СТО выбирают
антифризы FELIX для гарантийного
и постгарантийного обслуживания
автомобилей.

- -
-
-

- - Выбирая антифризы Felix, - -
- вы выбираете качество, - -
- надежность и безопасность. -
-

-

- Выбирая антифризы -
- Felix, вы выбираете -
- качество, надежность -
- и безопасность. -
-

-

- Антифриз FELIX защитит двигатель вашего автомобиля от коррозии, перегрева - и замерзания: -

-
    -
  • -
    - -

    - Соответствует международным стандартам
    - качества:
    - ASTM D 3306, ASTM D 4985, ASTM D 6210,
    - KSM 2142, BS 6580, SAE J 1034, JIS K 2234; -

    -

    - Соответствует международным стандартам качества: - ASTM D 3306, ASTM D 4985, ASTM D 6210, KSM 2142, BS 6580, SAE J 1034, - JIS K 2234; -

    -
  • -
  • -
    - -

    - - Поставляется на автозаводы для первой конвейерной
    - заливки,
    - в дилерские центры и автосервисы
    - для технического обслуживания; -

    -

    - - Поставляется на автозаводы для первой конвейерной заливки, - в дилерские центры и автосервисы для технического обслуживания; -

    -
  • -
  • -
    - -

    - Качество антифриза FELIX подтверждено - в специализированной
    - американской лаборатории ABIC Testing Laboratories, INC; -

    -

    - Качество антифриза FELIX подтверждено - в специализированной американской лаборатории ABIC Testing - Laboratories, INC; -

    -
  • -
  • -
    - -
    -

    - - Антифриз FELIX — самый используемый антифриз в России
    - на протяжении последних 5 лет*. -

    -

    - - Антифриз FELIX — самый используемый антифриз в России - на протяжении последних 5 лет*. -

    -
    -
  • -
-
-
-
-
-
-
- - - - Участник конкурса - - -
-
-
- «Ваш двигатель
- под надежной защитой» -
- -
-

Василий Михайлов

-

- Финалист чемпионата
- «Лучший автомеханик РФ» 2022 года. -

-
- -

- Как выглядит топ-автомеханик? Какие профессиональные награды - существуют  в этой сфере? Какой путь нужно пройти, чтобы стать - профи в мире автомеханики? Мы решили задать все эти вопросы - настоящим профессионалам своего дела. -

- - Читать интервью - -
-
-
- - -
- - - - Участник конкурса - - -
-
-
- «С FELIX я всегда
- спокоен за мотор» -
- -
-

Иван Туровский

-

- Финалист чемпионата
- «Лучший автомеханик РФ» 2022 года, в профессии больше 15 лет. -

-
- -

- Как выглядит топ-автомеханик? Какие профессиональные награды - существуют  в этой сфере? Какой путь нужно пройти, чтобы стать - профи в мире автомеханики? Мы решили задать все эти вопросы - настоящим профессионалам своего дела. -

- - Читать интервью - -
-
-
- - -
- - - - Участник конкурса - - -
-
-
- «Дорожу репутацией —
- выбираю FELIX» -
- -
-

Александр Конев

-

- Победитель чемпионата
- «Лучший автомеханик РФ» 2022 года, в профессии больше 15 лет. -

-
- -

- Как выглядит топ-автомеханик? Какие профессиональные награды - существуют  в этой сфере? Какой путь нужно пройти, чтобы стать - профи в мире автомеханики? Мы решили задать все эти вопросы - настоящим профессионалам своего дела. -

- - Читать интервью - -
-
-
-
-
- -
-
-
- -
- - -
-
-
-
- -
-
-
-
-

Кто здесь профи?

-

проверяем автосервисы!

-
-

- Вместе с блогером Васей РНД мы проводим скрытые проверки, чтобы - выяснить, как работают автосервисы в разных городах России: от - частных станций обслуживания до крупных сетей. -

-

- Теперь мы знаем, в каких СТО работают настоящие профессионалы, а - кому лучше не доверять свой автомобиль — узнайте и вы! -

-
-
-
-
    -
  • -
    - FELIX рекомендует - -
    -
    -

    - Автосервис, ул. Аральская 23, Уфа -

    -

    - Аврора, ул. Авроры 6/1, Уфа -

    -

    - RemZona, ул. Курская, 14А, Ростов-на-Дону -

    -

    - PodrezGarage, ул. Орбитальная, 3Е, Ростов-на-Дону -

    -

    - На Колесах.ру, мкр. Северное Чертаново, ЮАО, 5, Москва -

    -

    - Автоджин, ул. Островского, 4, рабочий поселок Горбатовка -

    -

    - Геликон, ул. Юлиуса Фучика 2А, Нижний Новрогод -

    -

    - KOLOBOX, Коминтерна, 39, к. 1, Нижний Новгород -

    -

    - КОНКУРЕНТ, Коминтерна, 39 б, Нижний Новгород -

    -
    -
  • -
  • -
    - Не прошли проверку FELIX - -
    -
    -

    - BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа -

    -

    - Fit Service, Казахская улица, 60, Ростов-на-Дону -

    -

    - Авантаж Стайл, ул. Вильнюсская, 5, Москва -

    -

    - Механик-СПб, ул. Благодатная, 63, Санкт-Петербург -

    -

    - Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва -

    -

    - Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург -

    -

    - Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург -

    -

    - Беркут, Российская ул., 206А, Краснодар -

    -

    - Техдок, Ялтинская ул., 18, Краснодар -

    -

    - Триалл, Черкасская ул., 66/1, Краснодар -

    -

    - БестВей, Коминтерна, 47А1, Нижний Новгород -

    -
    -
  • -
-
-
-
-
-
-
-
-
-
-
- -
- -
- -
- -
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - -
-
-
- Смотрите выпуски спецпроекта и узнайте, как проходила проверка! -
-
-
- -
-
    -
  • -
    - FELIX рекомендует - -
    -
    -

    - Автосервис, ул. Аральская 23, Уфа -

    -

    - Аврора, ул. Авроры 6/1, Уфа -

    -

    - RemZona, ул. Курская, 14А, Ростов-на-Дону -

    -

    - PodrezGarage, ул. Орбитальная, 3Е, Ростов-на-Дону -

    -

    - На Колесах.ру, мкр. Северное Чертаново, ЮАО, 5, Москва -

    -

    - Автоджин, ул. Островского, 4, рабочий поселок Горбатовка -

    -

    - Геликон, ул. Юлиуса Фучика 2А, Нижний Новрогод -

    -

    - KOLOBOX, Коминтерна, 39, к. 1, Нижний Новгород -

    -

    - КОНКУРЕНТ, Коминтерна, 39 б, Нижний Новгород -

    -
    -
  • -
  • -
    - Не прошли проверку FELIX - -
    -
    -

    - BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа -

    -

    - Fit Service, Казахская улица, 60, Ростов-на-Дону -

    -

    - Авантаж Стайл, ул. Вильнюсская, 5, Москва -

    -

    - Механик-СПб, ул. Благодатная, 63, Санкт-Петербург -

    -

    - Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва -

    -

    - Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург -

    -

    - Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург -

    -

    - Беркут, Российская ул., 206А, Краснодар -

    -

    - Техдок, Ялтинская ул., 18, Краснодар -

    -

    - Триалл, Черкасская ул., 66/1, Краснодар -

    -

    - БестВей, Коминтерна, 47А1, Нижний Новгород -

    -
    -
  • -
-
-
- -
-
-
-
    -
  • -
    -
    - Антифриз FELIX Carbox G12+, красный -
    -
    -

    - Антифриз FELIX Carbox G12+, красный -

    - Карбоксилатный (OAT) -

    - Профессиональный антифриз с увеличенным ресурсом эксплуатации — - 5 лет или 250 000 км -

    - Подробнее -
    -
    -
  • -
  • -
    -
    - Антифриз FELIX Prolonger G11, зеленый -
    - -
    -

    - Антифриз FELIX Prolonger G11, зеленый -

    - Гибридный (HOAT) -

    - Профессиональный антифриз с усиленной антикоррозийной защитой -

    - Подробнее -
    -
    -
  • -
  • -
    -
    - Антифриз FELIX JDM, розовый -
    -
    -

    Антифриз FELIX JDM, розовый

    - Лобридный (P-OAT) -

    - Рекомендован к заливке в автомобили KIA, HYUNDAI, MAZDA, - MITSUBISHI -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX DRAGON G12+, красный -
    -
    -

    - Антифриз FELIX DRAGON G12+, красный -

    - Карбоксилатный (OAT) -

    - Рекомендован к заливке в китайские авто HAVAL, GEELY, CHERY, - CHANGAN, GAC -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX EVO G12++, фиолетовый -
    -
    -

    - Антифриз FELIX EVO G12++, фиолетовый -

    - Лобридный (PSi-OAT) -

    - Рекомендован к заливке в автомобили VOLKSWAGEN, SKODA, AUDI, - PORSCHE, SEAT -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX TYPE-D G12+, желтый -
    -
    -

    - Антифриз FELIX TYPE-D G12+, желтый -

    - Карбоксилатный (OAT) -

    - Рекомендован к заливке в автомобили RENAULT, NISSAN -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX JDM, зеленый -
    -
    -

    Антифриз FELIX JDM, зеленый

    - Лобридный (P-OAT) -

    - Рекомендован к заливке в автомобили KIA, HYUNDAI, MAZDA, - MITSUBISHI -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX EVOLT, сине-зеленый -
    -
    -

    - Антифриз FELIX EVOLT, сине-зеленый -

    - Карбоксилатный (OAT) -

    - Рекомендован к заливке в электромобили и авто с гибридным - двигателем -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX Expert G11, синий -
    - -
    -

    - Антифриз FELIX Expert G11, синий -

    - Гибридный (HOAT) -

    - Универсальный продукт для автомобилей, где требуется гибридный - состав антифриза -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - 
-							Антифриз FELIX Energy G12+, желтый -
    - -
    -

    - Антифриз FELIX Energy G12+, желтый -

    - Карбоксилатный (OAT) -

    - Профессиональный карбоксилатный антифриз с увеличенным ресурсом - эксплуатации -

    - Подробнее -
    -
    -
  • - -
  • -
    -
    - Антифриз FELIX CARBOX SQ G12+ -
    -
    -

    Антифриз FELIX CARBOX SQ G12+

    - Карбоксилатный (OAT) -

    - Рекомендован к заливке в грузовые автомобили, высоконагруженную - технику, суда и лодки -

    - Подробнее -
    -
    -
  • -
-
- - -
-
-
-
-
-

- Купить FELIX напрямую от производителя -

- -
-
- - - -
- -
-
-
- - \ No newline at end of file +
-->

Выбирая антифризы Felix,
вы выбираете качество,
надежность и безопасность.

Выбирая антифризы
Felix, вы выбираете
качество, надежность
и безопасность.

Антифриз FELIX защитит двигатель вашего автомобиля от коррозии, перегрева и замерзания:

  • Соответствует международным стандартам
    качества:
    ASTM D 3306, ASTM D 4985, ASTM D 6210,
    KSM 2142, BS 6580, SAE J 1034, JIS K 2234;

    Соответствует международным стандартам качества: ASTM D 3306, ASTM D 4985, ASTM D 6210, KSM 2142, BS 6580, SAE J 1034, JIS K 2234;

  • Поставляется на автозаводы для первой конвейерной
    заливки,
    в дилерские центры и автосервисы
    для технического обслуживания;

    Поставляется на автозаводы для первой конвейерной заливки, в дилерские центры и автосервисы для технического обслуживания;

  • Качество антифриза FELIX подтверждено в специализированной
    американской лаборатории ABIC Testing Laboratories, INC;

    Качество антифриза FELIX подтверждено в специализированной американской лаборатории ABIC Testing Laboratories, INC;

  • Антифриз FELIX — самый используемый антифриз в России
    на протяжении последних 5 лет*.

    Антифриз FELIX — самый используемый антифриз в России на протяжении последних 5 лет*.

Участник конкурса
«Ваш двигатель
под надежной защитой»

Василий Михайлов

Финалист чемпионата
«Лучший автомеханик РФ» 2022 года.

Как выглядит топ-автомеханик? Какие профессиональные награды существуют  в этой сфере? Какой путь нужно пройти, чтобы стать профи в мире автомеханики? Мы решили задать все эти вопросы настоящим профессионалам своего дела.

Читать интервью
Участник конкурса
«С FELIX я всегда
спокоен за мотор»

Иван Туровский

Финалист чемпионата
«Лучший автомеханик РФ» 2022 года, в профессии больше 15 лет.

Как выглядит топ-автомеханик? Какие профессиональные награды существуют  в этой сфере? Какой путь нужно пройти, чтобы стать профи в мире автомеханики? Мы решили задать все эти вопросы настоящим профессионалам своего дела.

Читать интервью
Участник конкурса
«Дорожу репутацией —
выбираю FELIX»

Александр Конев

Победитель чемпионата
«Лучший автомеханик РФ» 2022 года, в профессии больше 15 лет.

Как выглядит топ-автомеханик? Какие профессиональные награды существуют  в этой сфере? Какой путь нужно пройти, чтобы стать профи в мире автомеханики? Мы решили задать все эти вопросы настоящим профессионалам своего дела.

Читать интервью

Кто здесь профи?

проверяем автосервисы!

Вместе с блогером Васей РНД мы проводим скрытые проверки, чтобы выяснить, как работают автосервисы в разных городах России: от частных станций обслуживания до крупных сетей.

Теперь мы знаем, в каких СТО работают настоящие профессионалы, а кому лучше не доверять свой автомобиль — узнайте и вы!

  • FELIX рекомендует

    Автосервис, ул. Аральская 23, Уфа

    Аврора, ул. Авроры 6/1, Уфа

    RemZona, ул. Курская, 14А, Ростов-на-Дону

    PodrezGarage, ул. Орбитальная, 3Е, Ростов-на-Дону

    На Колесах.ру, мкр. Северное Чертаново, ЮАО, 5, Москва

    Автоджин, ул. Островского, 4, рабочий поселок Горбатовка

    Геликон, ул. Юлиуса Фучика 2А, Нижний Новрогод

    KOLOBOX, Коминтерна, 39, к. 1, Нижний Новгород

    КОНКУРЕНТ, Коминтерна, 39 б, Нижний Новгород

  • Не прошли проверку FELIX

    BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа

    Fit Service, Казахская улица, 60, Ростов-на-Дону

    Авантаж Стайл, ул. Вильнюсская, 5, Москва

    Механик-СПб, ул. Благодатная, 63, Санкт-Петербург

    Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва

    Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург

    Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург

    Беркут, Российская ул., 206А, Краснодар

    Техдок, Ялтинская ул., 18, Краснодар

    Триалл, Черкасская ул., 66/1, Краснодар

    БестВей, Коминтерна, 47А1, Нижний Новгород

Смотрите выпуски спецпроекта и узнайте, как проходила проверка!
  • FELIX рекомендует

    Автосервис, ул. Аральская 23, Уфа

    Аврора, ул. Авроры 6/1, Уфа

    RemZona, ул. Курская, 14А, Ростов-на-Дону

    PodrezGarage, ул. Орбитальная, 3Е, Ростов-на-Дону

    На Колесах.ру, мкр. Северное Чертаново, ЮАО, 5, Москва

    Автоджин, ул. Островского, 4, рабочий поселок Горбатовка

    Геликон, ул. Юлиуса Фучика 2А, Нижний Новрогод

    KOLOBOX, Коминтерна, 39, к. 1, Нижний Новгород

    КОНКУРЕНТ, Коминтерна, 39 б, Нижний Новгород

  • Не прошли проверку FELIX

    BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа

    Fit Service, Казахская улица, 60, Ростов-на-Дону

    Авантаж Стайл, ул. Вильнюсская, 5, Москва

    Механик-СПб, ул. Благодатная, 63, Санкт-Петербург

    Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва

    Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург

    Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург

    Беркут, Российская ул., 206А, Краснодар

    Техдок, Ялтинская ул., 18, Краснодар

    Триалл, Черкасская ул., 66/1, Краснодар

    БестВей, Коминтерна, 47А1, Нижний Новгород

  • Антифриз FELIX Carbox G12+, красный

    Антифриз FELIX Carbox G12+, красный

    Карбоксилатный (OAT)

    Профессиональный антифриз с увеличенным ресурсом эксплуатации — 5 лет или 250 000 км

    Подробнее
  • Антифриз FELIX Prolonger G11, зеленый

    Антифриз FELIX Prolonger G11, зеленый

    Гибридный (HOAT)

    Профессиональный антифриз с усиленной антикоррозийной защитой

    Подробнее
  • Антифриз FELIX JDM, розовый

    Антифриз FELIX JDM, розовый

    Лобридный (P-OAT)

    Рекомендован к заливке в автомобили KIA, HYUNDAI, MAZDA, MITSUBISHI

    Подробнее
  • Антифриз FELIX DRAGON G12+, красный

    Антифриз FELIX DRAGON G12+, красный

    Карбоксилатный (OAT)

    Рекомендован к заливке в китайские авто HAVAL, GEELY, CHERY, CHANGAN, GAC

    Подробнее
  • Антифриз FELIX EVO G12++, фиолетовый

    Антифриз FELIX EVO G12++, фиолетовый

    Лобридный (PSi-OAT)

    Рекомендован к заливке в автомобили VOLKSWAGEN, SKODA, AUDI, PORSCHE, SEAT

    Подробнее
  • Антифриз FELIX TYPE-D G12+, желтый

    Антифриз FELIX TYPE-D G12+, желтый

    Карбоксилатный (OAT)

    Рекомендован к заливке в автомобили RENAULT, NISSAN

    Подробнее
  • Антифриз FELIX JDM, зеленый

    Антифриз FELIX JDM, зеленый

    Лобридный (P-OAT)

    Рекомендован к заливке в автомобили KIA, HYUNDAI, MAZDA, MITSUBISHI

    Подробнее
  • Антифриз FELIX EVOLT, сине-зеленый

    Антифриз FELIX EVOLT, сине-зеленый

    Карбоксилатный (OAT)

    Рекомендован к заливке в электромобили и авто с гибридным двигателем

    Подробнее
  • Антифриз FELIX Expert G11, синий

    Антифриз FELIX Expert G11, синий

    Гибридный (HOAT)

    Универсальный продукт для автомобилей, где требуется гибридный состав антифриза

    Подробнее
  • 
+							Антифриз FELIX Energy G12+, желтый

    Антифриз FELIX Energy G12+, желтый

    Карбоксилатный (OAT)

    Профессиональный карбоксилатный антифриз с увеличенным ресурсом эксплуатации

    Подробнее
  • Антифриз FELIX CARBOX SQ G12+

    Антифриз FELIX CARBOX SQ G12+

    Карбоксилатный (OAT)

    Рекомендован к заливке в грузовые автомобили, высоконагруженную технику, суда и лодки

    Подробнее

Купить FELIX напрямую от производителя

  • Логотип магазина Озон
  • Логотип магазина Вайлдбериз
  • Логотип магазина Яндекс маркет
  • Логотип магазина Сбер Мега Маркет
  • Логотип магазина Kazan Express
\ No newline at end of file diff --git a/app/js/main.js b/app/js/main.js index 72a91f2..b5690fb 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -1,80236 +1,2 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/@fancyapps/ui/dist/fancybox.esm.js": -/*!*********************************************************!*\ - !*** ./node_modules/@fancyapps/ui/dist/fancybox.esm.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Carousel: () => (/* binding */ y), -/* harmony export */ Fancybox: () => (/* binding */ R), -/* harmony export */ Panzoom: () => (/* binding */ d) -/* harmony export */ }); -// @fancyapps/ui/Fancybox v4.0.31 -const t=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t),e=(...i)=>{let s=!1;"boolean"==typeof i[0]&&(s=i.shift());let o=i[0];if(!o||"object"!=typeof o)throw new Error("extendee must be an object");const n=i.slice(1),a=n.length;for(let i=0;i(t=parseFloat(t)||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t){return!!(t&&"object"==typeof t&&t instanceof Element&&t!==document.body)&&(!t.__Panzoom&&(function(t){const e=getComputedStyle(t)["overflow-y"],i=getComputedStyle(t)["overflow-x"],s=("scroll"===e||"auto"===e)&&Math.abs(t.scrollHeight-t.clientHeight)>1,o=("scroll"===i||"auto"===i)&&Math.abs(t.scrollWidth-t.clientWidth)>1;return s||o}(t)?t:s(t.parentNode)))},o="undefined"!=typeof window&&window.ResizeObserver||class{constructor(t){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=t}observe(t){if(this.observables.some((e=>e.el===t)))return;const e={el:t,size:{height:t.clientHeight,width:t.clientWidth}};this.observables.push(e)}unobserve(t){this.observables=this.observables.filter((e=>e.el!==t))}disconnect(){this.observables=[]}check(){const t=this.observables.filter((t=>{const e=t.el.clientHeight,i=t.el.clientWidth;if(t.size.height!==e||t.size.width!==i)return t.size.height=e,t.size.width=i,!0})).map((t=>t.el));t.length>0&&this.callback(t),window.requestAnimationFrame(this.boundCheck)}};class n{constructor(t){this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY}}const a=(t,e)=>e?Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2):0,r=(t,e)=>e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t;class h{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=t,this.startPointers=[],this.currentPointers=[],this._pointerStart=t=>{if(t.buttons>0&&0!==t.button)return;const e=new n(t);this.currentPointers.some((t=>t.id===e.id))||this._triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerStart(new n(e),t)},this._move=t=>{const e=this.currentPointers.slice(),i=(t=>"changedTouches"in t)(t)?Array.from(t.changedTouches).map((t=>new n(t))):[new n(t)];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(this.currentPointers[e]=t)}this._moveCallback(e,this.currentPointers.slice(),t)},this._triggerPointerEnd=(t,e)=>{const i=this.currentPointers.findIndex((e=>e.id===t.id));return!(i<0)&&(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(t,e),!0)},this._pointerEnd=t=>{t.buttons>0&&0!==t.button||this._triggerPointerEnd(new n(t),t)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerEnd(new n(e),t)},this._startCallback=e,this._moveCallback=i,this._endCallback=s,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(t,e){return!!this._startCallback(t,e)&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}}class l{constructor(t={}){this.options=e(!0,{},t),this.plugins=[],this.events={};for(const t of["on","once"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(t,e,...i){t=String(t);let s=(o=t,n=this.options,o.split(".").reduce((function(t,e){return t&&t[e]}),n));var o,n;return"function"==typeof s&&(s=s.call(this,this,...i)),void 0===s?e:s}localize(t,e=[]){return t=(t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,i,s)=>{let o="";s?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(o=this.option(`l10n.${i}`)),o||(o=t);for(let t=0;te))}on(e,i){if(t(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(" ").forEach((t=>{const e=this.events[t]=this.events[t]||[];-1==e.indexOf(i)&&e.push(i)})),this}once(e,i){if(t(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(" ").forEach((t=>{const e=(...s)=>{this.off(t,e),i.call(this,this,...s)};e._=i,this.on(t,e)})),this}off(e,i){if(!t(e))return e.split(" ").forEach((t=>{const e=this.events[t];if(!e||!e.length)return this;let s=-1;for(let t=0,o=e.length;t1||Math.abs(e.left-this.dragStart.rect.left)>1))return t.preventDefault(),void t.stopPropagation();!1!==this.trigger("click",t)&&this.option("zoom")&&"toggleZoom"===this.option("click")&&(t.preventDefault(),t.stopPropagation(),this.zoomWithClick(t))}onWheel(t){!1!==this.trigger("wheel",t)&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(t)}zoomWithWheel(t){void 0===this.changedDelta&&(this.changedDelta=0);const e=Math.max(-1,Math.min(1,-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)),i=this.content.scale;let s=i*(100+e*this.option("wheelFactor"))/100;if(e<0&&Math.abs(i-this.option("minScale"))<.01||e>0&&Math.abs(i-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(e),s=i):(this.changedDelta=0,s=Math.max(Math.min(s,this.option("maxScale")),this.option("minScale"))),this.changedDelta>this.option("wheelLimit"))return;if(t.preventDefault(),s===i)return;const o=this.$content.getBoundingClientRect(),n=t.clientX-o.left,a=t.clientY-o.top;this.zoomTo(s,{x:n,y:a})}zoomWithClick(t){const e=this.$content.getClientRects()[0],i=t.clientX-e.left,s=t.clientY-e.top;this.toggleZoom({x:i,y:s})}attachEvents(){this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();const t=new h(this.$container,{start:(e,i)=>{if(!this.option("touch"))return!1;if(this.velocity.scale<0)return!1;const o=i.composedPath()[0];if(!t.currentPointers.length){if(-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(o.nodeName))return!1;if(this.option("textSelection")&&((t,e,i)=>{const s=t.childNodes,o=document.createRange();for(let t=0;t=a.left&&i>=a.top&&e<=a.right&&i<=a.bottom)return n}return!1})(o,e.clientX,e.clientY))return!1}return!s(o)&&(!1!==this.trigger("touchStart",i)&&("mousedown"===i.type&&i.preventDefault(),this.state="pointerdown",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0))},move:(e,i,s)=>{if("pointerdown"!==this.state)return;if(!1===this.trigger("touchMove",s))return void s.preventDefault();if(i.length<2&&!0===this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale"))return;if(i.length>1&&(!this.option("zoom")||!1===this.option("pinchToZoom")))return;const o=r(e[0],e[1]),n=r(i[0],i[1]),h=n.clientX-o.clientX,l=n.clientY-o.clientY,c=a(e[0],e[1]),d=a(i[0],i[1]),u=c&&d?d/c:1;this.dragOffset.x+=h,this.dragOffset.y+=l,this.dragOffset.scale*=u,this.dragOffset.time=Date.now()-this.dragPosition.time;const f=1===this.dragStart.scale&&this.option("lockAxis");if(f&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=t>45&&t<135?"y":"x"}if("xy"===f||"y"!==this.lockAxis){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset["x"===this.lockAxis?"y":"x"]=0),this.$container.classList.add(this.option("draggingClass")),this.transform.scale===this.option("baseScale")&&"y"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option("baseScale")&&"x"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const e=r(t.startPointers[0],t.startPointers[1]),i=e.clientX-this.dragStart.rect.x,s=e.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,s);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=n}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(e,i)=>{if("pointerdown"!==this.state)return;if(this._dragOffset={...this.dragOffset},t.currentPointers.length)return void this.resetDragPosition();if(this.state="decel",this.friction=this.option("decelFriction"),this.recalculateTransform(),this.$container.classList.remove(this.option("draggingClass")),!1===this.trigger("touchEnd",i))return;if("decel"!==this.state)return;const s=this.option("minScale");if(this.transform.scale.01){const t=this.dragPosition.midPoint||e,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:t.clientX-i.left,y:t.clientY-i.top})}else;}});this.pointerTracker=t}initObserver(){this.resizeObserver||(this.resizeObserver=new o((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const t=this.$container.getBoundingClientRect();t.width&&t.height?((Math.abs(t.width-this.container.width)>1||Math.abs(t.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:t,y:e,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:t,y:e,scale:i},this.dragPosition={...this.dragPosition,x:t,y:e,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(t){!0!==t&&this.trigger("beforeUpdate");const e=this.$container,s=this.$content,o=this.$viewport,n=s instanceof HTMLImageElement,a=this.option("zoom"),r=this.option("resizeParent",a);let h=this.option("width"),l=this.option("height"),c=h||(d=s,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(t=>Math.max(parseFloat(t.naturalHeight||0),parseFloat(t.height&&t.height.baseVal&&t.height.baseVal.value||0),parseFloat(t.offsetHeight||0),parseFloat(t.scrollHeight||0)))(s);Object.assign(s.style,{width:h?`${h}px`:"",height:l?`${l}px`:"",maxWidth:"",maxHeight:""}),r&&Object.assign(o.style,{width:"",height:""});const f=this.option("ratio");c=i(c*f),u=i(u*f),h=c,l=u;const g=s.getBoundingClientRect(),p=o.getBoundingClientRect(),m=o==e?p:e.getBoundingClientRect();let y=Math.max(o.offsetWidth,i(p.width)),v=Math.max(o.offsetHeight,i(p.height)),b=window.getComputedStyle(o);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,a){if(Math.abs(c-g.width)>.1||Math.abs(u-g.height)>.1){const t=((t,e,i,s)=>{const o=Math.min(i/t||0,s/e);return{width:t*o||0,height:e*o||0}})(c,u,Math.min(c,g.width),Math.min(u,g.height));h=i(t.width),l=i(t.height)}Object.assign(s.style,{width:`${h}px`,height:`${l}px`,transform:""})}if(r&&(Object.assign(o.style,{width:`${h}px`,height:`${l}px`}),this.viewport={...this.viewport,width:h,height:l}),n&&a&&"function"!=typeof this.options.maxScale){const t=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:t}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:h,fitHeight:l,width:h,height:l,scale:1,isZoomable:a},this.container={width:m.width,height:m.height},!0!==t&&this.trigger("afterUpdate")}zoomIn(t){this.zoomTo(this.content.scale+(t||this.option("step")))}zoomOut(t){this.zoomTo(this.content.scale-(t||this.option("step")))}toggleZoom(t={}){const e=this.option("maxScale"),i=this.option("baseScale"),s=this.content.scale>i+.5*(e-i)?i:e;this.zoomTo(s,t)}zoomTo(t=this.option("baseScale"),{x:e=null,y:s=null}={}){t=Math.max(Math.min(t,this.option("maxScale")),this.option("minScale"));const o=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===e&&(e=this.content.width*o*.5),null===s&&(s=this.content.height*o*.5);const{deltaX:n,deltaY:a}=this.getZoomDelta(t,e,s);e=this.content.x-n,s=this.content.y-a,this.panTo({x:e,y:s,scale:t,friction:this.option("zoomFriction")})}getZoomDelta(t,e=0,i=0){const s=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,n=e>0&&s?e/s:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*t-s)*n,deltaY:(this.content.fitHeight*t-o)*a}}panTo({x:t=this.content.x,y:e=this.content.y,scale:i,friction:s=this.option("friction"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:s,boundY:o}=this.getBounds(i);s&&(t=Math.max(Math.min(t,s.to),s.from)),o&&(e=Math.max(Math.min(e,o.to),o.from))}this.friction=s,this.transform={...this.transform,x:t,y:e,scale:i},s?(this.state="panning",this.velocity={x:(1/this.friction-1)*(t-this.content.x),y:(1/this.friction-1)*(e-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(t){let e=this.boundX,s=this.boundY;if(void 0!==e&&void 0!==s)return{boundX:e,boundY:s};e={from:0,to:0},s={from:0,to:0},t=t||this.transform.scale;const o=this.content.fitWidth*t,n=this.content.fitHeight*t,a=this.viewport.width,r=this.viewport.height;if(oe.to),i&&(n=this.content.yi.to),s||o){let i=((s?e.from:e.to)-this.content.x)*t;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=e.from&&o<=e.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(n||a){let e=((n?i.from:i.to)-this.content.y)*t;const s=this.content.y+(e+this.velocity.y)/this.friction;s>=i.from&&s<=i.to&&(e+=this.velocity.y),this.velocity.y=e,this.recalculateTransform()}}setDragResistance(){if("pointerdown"!==this.state)return;const{boundX:t,boundY:e}=this.getBounds(this.dragPosition.scale);let i,s,o,n;if(t&&(i=this.dragPosition.xt.to),e&&(o=this.dragPosition.ye.to),(i||s)&&(!i||!s)){const e=i?t.from:t.to,s=e-this.dragPosition.x;this.dragPosition.x=e-.3*s}if((o||n)&&(!o||!n)){const t=o?e.from:e.to,i=t-this.dragPosition.y;this.dragPosition.y=t-.3*i}}setDragForce(){"pointerdown"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(t){let e,s,o;if(t?(e=i(this.transform.x),s=i(this.transform.y),o=this.transform.scale,this.content={...this.content,x:e,y:s,scale:o}):(e=i(this.content.x),s=i(this.content.y),o=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:e,y:s}),this.trigger("beforeTransform"),e=i(this.content.x),s=i(this.content.y),t&&this.option("zoom")){let t,n;t=i(this.content.fitWidth*o),n=i(this.content.fitHeight*o),this.content.width=t,this.content.height=n,this.transform={...this.transform,width:t,height:n,scale:o},Object.assign(this.$content.style,{width:`${t}px`,height:`${n}px`,maxWidth:"none",maxHeight:"none",transform:`translate3d(${e}px, ${s}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${e}px, ${s}px, 0) scale(${o})`;this.trigger("afterTransform")}endAnimation(t){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state="ready",this.handleCursor(),!0!==t&&this.trigger("endAnimation")}handleCursor(){const t=this.option("draggableClass");t&&this.option("touch")&&(1==this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(t):this.$container.classList.add(t))}detachEvents(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){"destroy"!==this.state&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}d.version="4.0.31",d.Plugins={};const u=(t,e)=>{let i=0;return function(...s){const o=(new Date).getTime();if(!(o-i{e.preventDefault(),e.stopPropagation(),this.carousel["slide"+("next"===t?"Next":"Prev")]()})),e}build(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add(...this.option("classNames.main").split(" ")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}onRefresh(){const t=this.carousel.pages.length;t<=1||t>1&&this.carousel.elemDimWidth=t-1&&this.$next.setAttribute("disabled","")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on("refresh change",this.onRefresh)}detach(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}f.defaults={prevTpl:'',nextTpl:'',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};class g{constructor(t){this.carousel=t,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(t){this.target=this.carousel,this.nav=t,this.attachEvents()}addAsNavFor(t){this.target=t,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(t,e,i){const s=i.target.closest(".carousel__slide");if(!s)return;i.stopPropagation();const o=parseInt(s.dataset.index,10),n=this.target.findPageForSlide(o);this.target.page!==n&&this.target.slideTo(n,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){const t=this.target.pages[this.target.page].indexes[0],e=this.nav.findPageForSlide(t);this.nav.slideTo(e),this.markSelectedSlide(t)}markSelectedSlide(t){this.selectedIndex=t,[...this.nav.slides].filter((t=>t.$el&&t.$el.classList.remove("is-nav-selected")));const e=this.nav.slides[t];e&&e.$el&&e.$el.classList.add("is-nav-selected")}attach(t){const e=t.options.Sync;(e.target||e.nav)&&(e.target?this.addAsNavFor(e.target):e.nav&&this.addAsTargetFor(e.nav),this.friction=e.friction)}detach(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}g.defaults={friction:.92};const p={Navigation:f,Dots:class{constructor(t){this.carousel=t,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length{if(!("page"in t.target.dataset))return;t.preventDefault(),t.stopPropagation();const e=parseInt(t.target.dataset.page,10),i=this.carousel;e!==i.page&&(i.pages.length<3&&i.option("infinite")?i[0==e?"slidePrev":"slideNext"]():i.slideTo(e))})),this.$list=t,this.carousel.$container.appendChild(t),this.carousel.$container.classList.add("has-dots"),t}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}rebuildDots(){let t=this.$list;const e=!!t,i=this.carousel.pages.length;if(i<2)return void(e&&this.removeList());e||(t=this.buildList());const s=this.$list.children.length;if(s>i)for(let t=i;t{const i=t.code;let s;"Enter"===i||"NumpadEnter"===i?s=e:"ArrowRight"===i?s=e.nextSibling:"ArrowLeft"===i&&(s=e.previousSibling),s&&s.click()})),this.$list.appendChild(e)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((t=>{t.classList.remove("is-selected")}));const t=this.$list.childNodes[this.carousel.page];t&&t.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:g};const m={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class y extends l{constructor(t,i={}){if(super(i=e(!0,{},m,i)),this.state="init",this.$container=t,!(this.$container instanceof HTMLElement))throw new Error("No root element provided");this.slideNext=u(this.slideNext.bind(this),250),this.slidePrev=u(this.slidePrev.bind(this),250),this.init(),t.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(y.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const t=this.option("prefix"),e=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${t}${e.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(t+e.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${t}${e.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(t+e.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[];this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((t=>{const e={$el:t,isDom:!0};this.slides.push(e),this.trigger("createSlide",e,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=e(!0,[...this.slides],this.options.slides))}updateMetrics(){let t,e=0,s=[];this.slides.forEach(((i,o)=>{const n=i.$el,a=i.isDom||!t?this.getSlideMetrics(n):t;i.index=o,i.width=a,i.left=e,t=a,e+=a,s.push(o)}));let o=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),n=getComputedStyle(this.$track);o-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),this.contentWidth=e,this.viewportWidth=o;const a=[],r=this.option("slidesPerPage");if(Number.isInteger(r)&&e>o)for(let t=0;to)&&(a.push({indexes:[],slides:[]}),t=a.length-1,e=0),e+=s.width,a[t].indexes.push(i),a[t].slides.push(s)}}const h=this.option("center"),l=this.option("fill");a.forEach(((t,i)=>{t.index=i,t.width=t.slides.reduce(((t,e)=>t+e.width),0),t.left=t.slides[0].left,h&&(t.left+=.5*(o-t.width)*-1),l&&!this.option("infiniteX",this.option("infinite"))&&e>o&&(t.left=Math.max(t.left,0),t.left=Math.min(t.left,e-o))}));const c=[];let d;a.forEach((t=>{const e={...t};d&&e.left===d.left?(d.width+=e.width,d.slides=[...d.slides,...e.slides],d.indexes=[...d.indexes,...e.indexes]):(e.index=c.length,d=e,c.push(e))})),this.pages=c;let u=this.page;if(null===u){const t=this.option("initialSlide");u=null!==t?this.findPageForSlide(t):parseInt(this.option("initialPage",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger("refresh")}getSlideMetrics(t){if(!t){const e=this.slides[0];(t=document.createElement("div")).dataset.isTestEl=1,t.style.visibility="hidden",t.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),e.customClass&&t.classList.add(...e.customClass.split(" ")),this.$track.prepend(t)}let e=Math.max(t.offsetWidth,i(t.getBoundingClientRect().width));const s=t.currentStyle||window.getComputedStyle(t);return e=e+(parseFloat(s.marginLeft)||0)+(parseFloat(s.marginRight)||0),t.dataset.isTestEl&&t.remove(),e}findPageForSlide(t){t=parseInt(t,10)||0;const e=this.pages.find((e=>e.indexes.indexOf(t)>-1));return e?e.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(t,e={}){const{x:i=-1*this.setPage(t,!0),y:s=0,friction:o=this.option("friction")}=e;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:s,friction:o,ignoreBounds:!0}),"ready"===this.state&&"ready"===this.Panzoom.state&&this.trigger("settle"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const t=e(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option("textSelection",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new d(this.$container,t),this.Panzoom.on({"*":(t,...e)=>this.trigger(`Panzoom.${t}`,...e),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const t=this.contentWidth,e=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option("preload"),o=this.option("infiniteX",this.option("infinite")),n=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach((r=>{let h,l,c=0;h=i-n,l=i+e+a,h-=s*(e+n+a),l+=s*(e+n+a);const d=r.left+r.width>h&&r.lefth&&r.lefth&&r.lefti&&r.left<=i+e+a&&(c=0)):this.removeSlideEl(r),r.hasDiff=c}));let r=0,h=0;this.slides.forEach(((e,i)=>{let s=0;e.$el?(i!==r||e.hasDiff?s=h+e.hasDiff*t:h=0,e.$el.style.left=Math.abs(s)>.1?`${h+e.hasDiff*t}px`:"",r++):h+=e.width})),this.markSelectedSlides()}createSlideEl(t){if(!t)return;if(t.$el){let e=t.$el.dataset.index;if(!e||parseInt(e,10)!==t.index){let e;t.$el.dataset.index=t.index,t.$el.querySelectorAll("[data-lazy-srcset]").forEach((t=>{t.srcset=t.dataset.lazySrcset})),t.$el.querySelectorAll("[data-lazy-src]").forEach((t=>{let e=t.dataset.lazySrc;t instanceof HTMLImageElement?t.src=e:t.style.backgroundImage=`url('${e}')`})),(e=t.$el.dataset.lazySrc)&&(t.$el.style.backgroundImage=`url('${e}')`),t.state="ready"}return}const e=document.createElement("div");e.dataset.index=t.index,e.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),t.customClass&&e.classList.add(...t.customClass.split(" ")),t.html&&(e.innerHTML=t.html);const i=[];this.slides.forEach(((t,e)=>{t.$el&&i.push(e)}));const s=t.index;let o=null;if(i.length){let t=i.reduce(((t,e)=>Math.abs(e-s){const o=i.$el;if(!o)return;const n=this.pages[this.page];n&&n.indexes&&n.indexes.indexOf(s)>-1?(t&&!o.classList.contains(t)&&(o.classList.add(t),this.trigger("selectSlide",i)),o.removeAttribute(e)):(t&&o.classList.contains(t)&&(o.classList.remove(t),this.trigger("unselectSlide",i)),o.setAttribute(e,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const t=this.contentWidth,e=this.viewportWidth;if(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||te&&(i.content.x-=t,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&"pointerdown"===i.state&&i.resetDragPosition(),s}onTouchEnd(t,e){const i=this.option("dragFree");if(!i&&this.pages.length>1&&t.dragOffset.time<350&&Math.abs(t.dragOffset.y)<1&&Math.abs(t.dragOffset.x)>5)this[t.dragOffset.x<0?"slideNext":"slidePrev"]();else if(i){const[,e]=this.getPageFromPosition(-1*t.transform.x);this.setPage(e)}else this.slideToClosest()}slideToClosest(t={}){let[,e]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(e,t)}getPageFromPosition(t){const e=this.pages.length;this.option("center")&&(t+=.5*this.viewportWidth);const i=Math.floor(t/this.contentWidth);t-=i*this.contentWidth;let s=this.slides.find((e=>e.left<=t&&e.left+e.width>t));if(s){let t=this.findPageForSlide(s.index);return[t,t+i*e]}return[0,0]}setPage(t,e){let i=0,s=parseInt(t,10)||0;const o=this.page,n=this.pageIndex,a=this.pages.length,r=this.contentWidth,h=this.viewportWidth;if(t=(s%a+a)%a,this.option("infiniteX",this.option("infinite"))&&r>h){const o=Math.floor(s/a)||0,n=r;if(i=this.pages[t].left+o*n,!0===e&&a>2){let t=-1*this.Panzoom.content.x;const e=i-n,o=i+n,r=Math.abs(t-i),h=Math.abs(t-e),l=Math.abs(t-o);l{this.removeSlideEl(t)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}y.version="4.0.31",y.Plugins=p;const v=!("undefined"==typeof window||!window.document||!window.document.createElement);let b=null;const x=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],w=t=>{if(t&&v){null===b&&document.createElement("div").focus({get preventScroll(){return b=!0,!1}});try{if(t.setActive)t.setActive();else if(b)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch(t){}}};const $={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{},tpl:'
'};class C{constructor(t){this.fancybox=t,this.$container=null,this.state="init";for(const t of["onPrepare","onClosing","onKeydown"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(t,e){e===t.option("Thumbs.key")&&this.toggle()}build(){if(this.$container)return;const t=document.createElement("div");t.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel.nextSibling),this.Carousel=new y(t,e(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",((t,e)=>{e.preventDefault(),this.fancybox[e.deltaY<0?"prev":"next"]()})),this.$container=t,this.state="visible"}getSlides(){const t=[];for(const e of this.fancybox.items){const i=e.thumb;i&&t.push({html:this.fancybox.option("Thumbs.tpl").replace(/\{\{src\}\}/gi,i),customClass:`has-thumb has-${e.type||"image"}`})}return t}toggle(){"visible"===this.state?this.hide():"hidden"===this.state?this.show():this.build()}show(){"hidden"===this.state&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}hide(){"visible"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}C.defaults=$;const S=(t,e)=>{const i=new URL(t),s=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[t,i]of[...s,...Object.entries(e)])"t"===t?o.set("start",parseInt(i)):o.set(t,i);o=o.toString();let n=t.match(/#t=((.*)?\d+s)/);return n&&(o+=`#t=${n[1]}`),o},E={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'',format:""}};class P{constructor(t){this.fancybox=t;for(const t of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}onInit(){for(const t of this.fancybox.items)this.processType(t)}processType(t){if(t.html)return t.src=t.html,t.type="html",void delete t.html;const i=t.src||"";let s=t.type||this.fancybox.options.type,o=null;if(!i||"string"==typeof i){if(o=i.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const e=S(i,this.fancybox.option("Html.youtube")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://www.youtube-nocookie.com/embed/${n}?${e}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${n}/mqdefault.jpg`,t.vendor="youtube",s="video"}else if(o=i.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){const e=S(i,this.fancybox.option("Html.vimeo")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://player.vimeo.com/video/${n}?${e}`,t.vendor="vimeo",s="video"}else(o=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`//maps.google.${o[1]}/?ll=${(o[2]?o[2]+"&z="+Math.floor(o[3])+(o[4]?o[4].replace(/^\//,"&"):""):o[4]+"").replace(/\?/,"&")}&output=${o[4]&&o[4].indexOf("layer=c")>0?"svembed":"embed"}`,s="map"):(o=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`//maps.google.${o[1]}/maps?q=${o[2].replace("query=","q=").replace("api=1","")}&output=embed`,s="map");s||("#"===i.charAt(0)?s="inline":(o=i.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(s="html5video",t.format=t.format||"video/"+("ogv"===o[1]?"ogg":o[1])):i.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":i.match(/\.(pdf)((\?|#).*)?$/i)&&(s="pdf")),t.type=s||this.fancybox.option("defaultType","image"),"html5video"!==s&&"video"!==s||(t.video=e({},this.fancybox.option("Html.video"),t.video),t._width&&t._height?t.ratio=parseFloat(t._width)/parseFloat(t._height):t.ratio=t.ratio||t.video.ratio||E.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&(this.setContent(t),t.index===this.fancybox.getSlide().index&&this.playVideo(t))}))}onCreateSlide(t,e,i){"ready"===this.fancybox.state&&this.setContent(i)}loadInlineContent(t){let e;if(t.src instanceof HTMLElement)e=t.src;else if("string"==typeof t.src){const i=t.src.split("#",2),s=2===i.length&&""===i[0]?i[1]:i[0];e=document.getElementById(s)}if(e){if("clone"===t.type||e.$placeHolder){e=e.cloneNode(!0);let i=e.getAttribute("id");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${t.index}`,e.setAttribute("id",i)}else{const t=document.createElement("div");t.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(t,e),e.$placeHolder=t}this.fancybox.setContent(t,e)}else this.fancybox.setError(t,"{{ELEMENT_NOT_FOUND}}")}loadAjaxContent(t){const e=this.fancybox,i=new XMLHttpRequest;e.showLoading(t),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&"ready"===e.state&&(e.hideLoading(t),200===i.status?e.setContent(t,i.responseText):e.setError(t,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=t.ajax||null;i.open(s?"POST":"GET",t.src),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(s),t.xhr=i}loadIframeContent(t){const e=this.fancybox,i=document.createElement("iframe");if(i.className="fancybox__iframe",i.setAttribute("id",`fancybox__iframe_${e.id}_${t.index}`),i.setAttribute("allow","autoplay; fullscreen"),i.setAttribute("scrolling","auto"),t.$iframe=i,"iframe"!==t.type||!1===t.preload)return i.setAttribute("src",t.src),this.fancybox.setContent(t,i),void this.resizeIframe(t);e.showLoading(t);const s=document.createElement("div");s.style.visibility="hidden",this.fancybox.setContent(t,s),s.appendChild(i),i.onerror=()=>{e.setError(t,"{{IFRAME_ERROR}}")},i.onload=()=>{e.hideLoading(t);let s=!1;i.isReady||(i.isReady=!0,s=!0),i.src.length&&(i.parentNode.style.visibility="",this.resizeIframe(t),s&&e.revealContent(t))},i.setAttribute("src",t.src)}setAspectRatio(t){const e=t.$content,i=t.ratio;if(!e)return;let s=t._width,o=t._height;if(i||s&&o){Object.assign(e.style,{width:s&&o?"100%":"",height:s&&o?"100%":"",maxWidth:"",maxHeight:""});let t=e.offsetWidth,n=e.offsetHeight;if(s=s||t,o=o||n,s>t||o>n){let e=Math.min(t/s,n/o);s*=e,o*=e}Math.abs(s/o-i)>.01&&(i{t.$el&&(t.$iframe&&this.resizeIframe(t),t.ratio&&this.setAspectRatio(t))}))}setContent(t){if(t&&!t.isDom){switch(t.type){case"html":this.fancybox.setContent(t,t.src);break;case"html5video":this.fancybox.setContent(t,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.format||t.html5video&&t.html5video.format||"").replace("{{poster}}",t.poster||t.thumb||""));break;case"inline":case"clone":this.loadInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case"video":case"map":t.preload=!1;case"iframe":this.loadIframeContent(t)}t.ratio&&this.setAspectRatio(t)}}onSelectSlide(t,e,i){"ready"===t.state&&this.playVideo(i)}playVideo(t){if("html5video"===t.type&&t.video.autoplay)try{const e=t.$el.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(t){}if("video"!==t.type||!t.$iframe||!t.$iframe.contentWindow)return;const e=()=>{if("done"===t.state&&t.$iframe&&t.$iframe.contentWindow){let e;if(t.$iframe.isReady)return t.video&&t.video.autoplay&&(e="youtube"==t.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(e&&t.$iframe.contentWindow.postMessage(JSON.stringify(e),"*"));"youtube"===t.vendor&&(e={event:"listening",id:t.$iframe.getAttribute("id")},t.$iframe.contentWindow.postMessage(JSON.stringify(e),"*"))}t.poller=setTimeout(e,250)};e()}onUnselectSlide(t,e,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(t){}return}let s=!1;"vimeo"==i.vendor?s={method:"pause",value:"true"}:"youtube"===i.vendor&&(s={event:"command",func:"pauseVideo"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),"*"),clearTimeout(i.poller)}onRemoveSlide(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const s=i.$content;"inline"===i.type&&s&&(s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=s&&s.$placeHolder;o&&(o.parentNode.insertBefore(s,o),o.remove(),s.$placeHolder=null)}onMessage(t){try{let e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event)for(let e of document.getElementsByClassName("fancybox__iframe"))e.contentWindow===t.source&&(e.isReady=1)}else"https://www.youtube-nocookie.com"===t.origin&&"onReady"===e.event&&(document.getElementById(e.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}P.defaults=E;class T{constructor(t){this.fancybox=t;for(const t of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&this.setContent(t)}))}onDone(t,e){this.handleCursor(e)}onClosing(t){clearTimeout(this.clickTimer),this.clickTimer=null,t.Carousel.slides.forEach((t=>{t.$image&&(t.state="destroy"),t.Panzoom&&t.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(t.getSlide())&&this.zoomOut()}onCreateSlide(t,e,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(t,e,i){i.$image&&(i.$el.classList.remove(t.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(t){if(t.isDom||t.html||t.type&&"image"!==t.type)return;if(t.$image)return;t.type="image",t.state="loading";const e=document.createElement("div");e.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(e=>{e.stopImmediatePropagation(),this.onImageStatusChange(t)})),i.addEventListener("error",(()=>{this.onImageStatusChange(t)})),i.src=t.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),t.srcset&&i.setAttribute("srcset",t.srcset),t.sizes&&i.setAttribute("sizes",t.sizes),t.$image=i;const s=this.fancybox.option("Image.wrap");if(s){const o=document.createElement("div");o.classList.add("string"==typeof s?s:"fancybox__image-wrap"),o.appendChild(i),e.appendChild(o),t.$wrap=o}else e.appendChild(i);t.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(t,e),i.complete||i.error?this.onImageStatusChange(t):this.fancybox.showLoading(t)}onImageStatusChange(t){const e=t.$image;e&&"loading"===t.state&&(e.complete&&e.naturalWidth&&e.naturalHeight?(this.fancybox.hideLoading(t),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(t),t.$el.addEventListener("wheel",(e=>this.onWheel(t,e)),{passive:!1}),t.$content.addEventListener("click",(e=>this.onClick(t,e)),{passive:!1}),this.revealContent(t)):this.fancybox.setError(t,"{{IMAGE_ERROR}}"))}initSlidePanzoom(t){t.Panzoom||(t.Panzoom=new d(t.$el,e(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:t.$wrap,content:t.$image,width:t._width,height:t._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),t.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",t)})),t.Panzoom.on("endAnimation",(()=>{"zoomIn"===t.state&&this.fancybox.done(t),this.handleCursor(t),this.fancybox.trigger("Image.endAnimation",t)})),t.Panzoom.on("afterUpdate",(()=>{this.handleCursor(t),this.fancybox.trigger("Image.afterUpdate",t)})))}revealContent(t){null===this.fancybox.Carousel.prevPage&&t.index===this.fancybox.options.startIndex&&this.canZoom(t)?this.zoomIn():this.fancybox.revealContent(t)}getZoomInfo(t){const e=t.$thumb.getBoundingClientRect(),i=e.width,s=e.height,o=t.$content.getBoundingClientRect(),n=o.width,a=o.height,r=o.top-e.top,h=o.left-e.left;let l=this.fancybox.option("Image.zoomOpacity");return"auto"===l&&(l=Math.abs(i/s-n/a)>.1),{top:r,left:h,scale:n&&i?i/n:1,opacity:l}}canZoom(t){const e=this.fancybox,i=e.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(t.Panzoom&&!t.Panzoom.content.width)return!1;if(!e.option("Image.zoom")||"contain"!==e.option("Image.fit"))return!1;const s=t.$thumb;if(!s||"loading"===t.state)return!1;i.classList.add("fancybox__no-click");const o=s.getBoundingClientRect();let n;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const t=document.elementFromPoint(o.left+1,o.top+1)===s,e=document.elementFromPoint(o.right-1,o.bottom-1)===s;n=t&&e}else n=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===s;return i.classList.remove("fancybox__no-click"),n}zoomIn(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom,{top:s,left:o,scale:n,opacity:a}=this.getZoomInfo(e);t.trigger("reveal",e),i.panTo({x:-1*o,y:-1*s,scale:n,friction:0,ignoreBounds:!0}),e.$content.style.visibility="",e.state="zoomIn",!0===a&&i.on("afterTransform",(t=>{"zoomIn"!==e.state&&"zoomOut"!==e.state||(t.$content.style.opacity=Math.min(1,1-(1-t.content.scale)/(1-n)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom;if(!i)return;e.state="zoomOut",t.state="customClosing",e.$caption&&(e.$caption.style.visibility="hidden");let s=this.fancybox.option("Image.zoomFriction");const o=t=>{const{top:o,left:n,scale:a,opacity:r}=this.getZoomInfo(e);t||r||(s*=.82),i.panTo({x:-1*n,y:-1*o,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener("scroll",o),i.once("endAnimation",(()=>{window.removeEventListener("scroll",o),t.destroy()})),o()}handleCursor(t){if("image"!==t.type||!t.$el)return;const e=t.Panzoom,i=this.fancybox.option("Image.click",!1,t),s=this.fancybox.option("Image.touch"),o=t.$el.classList,n=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");if(o.remove(a),o.remove(n),e&&"toggleZoom"===i){e&&1===e.content.scale&&e.option("maxScale")-e.content.scale>.01?o.add(n):e.content.scale>1&&!s&&o.add(a)}else"close"===i&&o.add(a)}onWheel(t,e){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",e))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===t.state&&t.Panzoom&&t.Panzoom.zoomWithWheel(e);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[e.deltaY<0?"prev":"next"]()}}onClick(t,e){if("ready"!==this.fancybox.state)return;const i=t.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case"toggleZoom":e.stopPropagation(),t.Panzoom&&t.Panzoom.zoomWithClick(e);break;case"close":this.fancybox.close();break;case"next":e.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option("Image.click"),n=this.fancybox.option("Image.doubleClick");n?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(n)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(o)}),300):s(o)}onPageChange(t,e){const i=t.getSlide();e.slides.forEach((t=>{t.Panzoom&&"done"===t.state&&t.index!==i.index&&t.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}T.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class L{constructor(t){this.fancybox=t;for(const t of["onChange","onClosing"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}onChange(t){const e=t.Carousel;this.timer&&clearTimeout(this.timer);const i=null===e.prevPage,s=t.getSlide(),o=new URL(document.URL).hash;let n=!1;if(s.slug)n="#"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,o=t.option("slug")||i&&i.fancybox;o&&o.length&&"true"!==o&&(n="#"+o+(e.slides.length>1?"-"+(s.index+1):""))}i&&(this.origHash=o!==n?o:""),n&&o!==n&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+n),i&&(this.hasCreatedHistory=!0)}catch(t){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(t){}}attach(t){t.on(this.events)}detach(t){t.off(this.events)}static startFromUrl(){const t=L.Fancybox;if(!t||t.getInstance()||!1===t.defaults.Hash)return;const{hash:e,slug:i,index:s}=L.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug="${e}"]`);if(o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),t.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${i}"]`);n.length&&(null===s&&1===n.length?o=n[0]:s&&(o=n[s-1]),o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:t,index:e}=L.getParsedURL(),i=L.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(t){const i=s.Carousel;if(t===s.option("slug"))return i.slideTo(e-1);for(let e of i.slides)if(e.slug&&e.slug===t)return i.slideTo(e.index);const o=s.getSlide(),n=o.$trigger&&o.$trigger.dataset;if(n&&n.fancybox===t)return i.slideTo(e-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}L.startFromUrl()}static create(t){function e(){window.addEventListener("hashchange",L.onHashChange,!1),L.startFromUrl()}L.Fancybox=t,v&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",e)}))}static destroy(){window.removeEventListener("hashchange",L.onHashChange,!1)}static getParsedURL(){const t=window.location.hash.substr(1),e=t.split("-"),i=e.length>1&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||null;return{hash:t,slug:e.join("-"),index:i}}}const _={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(t){_.pageXOffset=window.pageXOffset,_.pageYOffset=window.pageYOffset,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class A{constructor(t){this.fancybox=t,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const t=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),t);let e=this.$progress;e||(e=document.createElement("div"),e.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel),this.$progress=e,e.offsetHeight),e.style.transitionDuration=`${t}ms`,e.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const z={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:' / ',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'\n \n \n ',click:function(t){t.preventDefault(),_.element()?_.deactivate():_.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'\n \n \n ',click:function(t){t.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'',click:function(t){t.preventDefault();const e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'',click:function(t){t.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'',click:function(t){t.stopPropagation();const e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'',attr:{"data-fancybox-close":"",tabindex:0}}}};class k{constructor(t){this.fancybox=t,this.$container=null,this.state="init";for(const t of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(t,e)=>this.onRefresh(e),"Image.afterUpdate":(t,e)=>this.onRefresh(e)}}onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let t=!1;for(const e of this.fancybox.items)if("image"===e.type){t=!0;break}if(!t)return void(this.state="disabled")}for(const e of this.fancybox.option("Toolbar.display")){if("close"===(t(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}}onPrepare(){const t=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new A(t),!t.Carousel.prevPage&&(t.option("slideshow.autoStart")&&this.Slideshow.activate(),t.option("fullscreen.autoStart")&&!_.element())))try{_.activate(t.$container)}catch(t){}}onFsChange(){window.scrollTo(_.pageXOffset,_.pageYOffset)}onSettle(){const t=this.fancybox,e=this.Slideshow;e&&e.isActive()&&(t.getSlide().index!==t.Carousel.slides.length-1||t.option("infinite")?"done"===t.getSlide().state&&e.setTimer():e.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(t,e){const i=this.Slideshow;e.index===t.getSlide().index&&(this.update(),i&&i.isActive()&&(t.option("infinite")||e.index!==t.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(t){t&&t.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||t&&"done"!==t.state||this.Slideshow.deactivate())}onKeydown(t,e,i){" "===e&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(t){let e;"div"===t.type?e=document.createElement("div"):(e=document.createElement("link"===t.type?"a":"button"),e.classList.add("carousel__button")),e.innerHTML=t.html,e.setAttribute("tabindex",t.tabindex||0),t.class&&e.classList.add(...t.class.split(" "));for(const i in t.attr)e.setAttribute(i,t.attr[i]);t.label&&e.setAttribute("title",this.fancybox.localize(`{{${t.label}}}`)),t.click&&e.addEventListener("click",t.click.bind(this)),"prev"===t.id&&e.setAttribute("data-fancybox-prev",""),"next"===t.id&&e.setAttribute("data-fancybox-next","");const i=e.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),e}build(){this.cleanup();const i=this.fancybox.option("Toolbar.items"),s=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],o=this.fancybox.plugins.Thumbs;for(const n of this.fancybox.option("Toolbar.display")){let a,r;if(t(n)?(a=n.id,r=e({},i[a],n)):(a=n,r=i[a]),["counter","next","prev","slideshow"].includes(a)&&this.fancybox.items.length<2)continue;if("fullscreen"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===a&&(!o||"disabled"===o.state))continue;if(!r)continue;let h=r.position||"right",l=s.find((t=>t.position===h));l&&l.items.push(r)}const n=document.createElement("div");n.classList.add("fancybox__toolbar");for(const t of s)if(t.items.length){const e=document.createElement("div");e.classList.add("fancybox__toolbar__items"),e.classList.add(`fancybox__toolbar__items--${t.position}`);for(const i of t.items)e.appendChild(this.createElement(i));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const t=this.fancybox.getSlide(),e=t.index,i=this.fancybox.items.length,s=t.downloadSrc||("image"!==t.type||t.error?null:t.src);for(const t of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex"),t.setAttribute("href",s),t.setAttribute("download",s),t.setAttribute("target","_blank")):(t.setAttribute("disabled",""),t.setAttribute("tabindex",-1),t.removeAttribute("href"),t.removeAttribute("download"));const o=t.Panzoom,n=o&&o.option("maxScale")>o.option("baseScale");for(const t of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))n?t.removeAttribute("disabled"):t.setAttribute("disabled","");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))e.innerHTML=t.index+1;for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))t.innerHTML=i;if(!this.fancybox.option("infinite")){for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===e?t.setAttribute("disabled",""):t.removeAttribute("disabled");for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))e===i-1?t.setAttribute("disabled",""):t.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}k.defaults=z;const O={ScrollLock:class{constructor(t){this.fancybox=t,this.viewport=null,this.pendingUpdate=null;for(const t of["onReady","onResize","onTouchstart","onTouchmove"])this[t]=this[t].bind(this)}onReady(){const t=window.visualViewport;t&&(this.viewport=t,this.startY=0,t.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const t=this.fancybox,e=this.viewport,i=e.scale||1,s=t.$container;if(!s)return;let o="",n="",a="";i-1>.1&&(o=e.width*i+"px",n=e.height*i+"px",a=`translate3d(${e.offsetLeft}px, ${e.offsetTop}px, 0) scale(${1/i})`),s.style.width=o,s.style.height=n,s.style.transform=a}onTouchstart(t){this.startY=t.touches?t.touches[0].screenY:t.screenY}onTouchmove(t){const e=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!t.cancelable)return;if(t.touches.length>1||1!==i)return;const o=s(t.composedPath()[0]);if(!o)return void t.preventDefault();const n=window.getComputedStyle(o),a=parseInt(n.getPropertyValue("height"),10),r=t.touches?t.touches[0].screenY:t.screenY,h=e<=r&&0===o.scrollTop,l=e>=r&&o.scrollHeight-o.scrollTop===a;(h||l)&&t.preventDefault()}onWheel(t){s(t.composedPath()[0])||t.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const t=this.viewport;t&&(t.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}},Thumbs:C,Html:P,Toolbar:k,Image:T,Hash:L};const M={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},I=new Map;let F=0;class R extends l{constructor(t,i={}){t=t.map((t=>(t.width&&(t._width=t.width),t.height&&(t._height=t.height),t))),super(e(!0,{},M,i)),this.bindHandlers(),this.state="init",this.setItems(t),this.attachPlugins(R.Plugins),this.trigger("init"),!0===this.option("hideScrollbar")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),I.set(this.id,this),this.trigger("prepare"),this.state="ready",this.trigger("ready"),this.$container.setAttribute("aria-hidden","false"),this.option("trapFocus")&&this.focus()}option(t,...e){const i=this.getSlide();let s=i?i[t]:void 0;return void 0!==s?("function"==typeof s&&(s=s.call(this,this,...e)),s):super.option(t,...e)}bindHandlers(){for(const t of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[t]=this[t].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let t=this.option("template.main");t&&(this.$root.insertAdjacentHTML("beforeend",this.localize(t)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((t=>this.$container.setAttribute(...t))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++F,this.$container.setAttribute("id","fancybox-"+this.id));const e=this.option("mainClass");return e&&this.$container.classList.add(...e.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(t){const e=[];for(const i of t){const t=i.$trigger;if(t){const e=t.dataset||{};i.src=e.src||t.getAttribute("href")||i.src,i.type=e.type||i.type,!i.src&&t instanceof HTMLImageElement&&(i.src=t.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let t=i.$trigger&&i.$trigger.origTarget;t&&(s=t instanceof HTMLImageElement?t:t.querySelector("img:not([aria-hidden])")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=s||null;let o=i.thumb;!o&&s&&(o=s.currentSrc||s.src,!o&&s.dataset&&(o=s.dataset.lazySrc||s.dataset.src)),o||"image"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||"",e.push(i)}this.items=e}initCarousel(){return this.Carousel=new y(this.$carousel,e(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let t="x";return this.option("dragToClose")&&(t+="y"),t}}},on:{"*":(t,...e)=>this.trigger(`Carousel.${t}`,...e),init:t=>this.Carousel=t,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(t,e){let i=e.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,e)),"string"==typeof i&&i.length){const t=document.createElement("div"),s=`fancybox__caption_${this.id}_${e.index}`;t.className="fancybox__caption",t.innerHTML=i,t.setAttribute("id",s),e.$caption=e.$el.appendChild(t),e.$el.classList.add("has-caption"),e.$el.setAttribute("aria-labelledby",s)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(t){this.isTopmost()&&this.focus(t)}onClick(t){if(t.defaultPrevented)return;let e=t.composedPath()[0];if(e.matches("[data-fancybox-close]"))return t.preventDefault(),void R.close(!1,t);if(e.matches("[data-fancybox-next]"))return t.preventDefault(),void R.next();if(e.matches("[data-fancybox-prev]"))return t.preventDefault(),void R.prev();const i=document.activeElement;if(i){if(i.closest("[contenteditable]"))return;e.matches(x)||i.blur()}if(e.closest(".fancybox__content"))return;if(getSelection().toString().length)return;if(!1===this.trigger("click",t))return;switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const t=this.getSlide().Panzoom;return!t||1===t.content.scale}onTouchEnd(t){const e=t.dragOffset.y;Math.abs(e)>=150||Math.abs(e)>=35&&t.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(t.content.y<0?"Up":"Down")),this.close()):"y"===t.lockAxis&&t.panTo({y:0})}onTransform(t){if(this.$backdrop){const e=Math.abs(t.content.y),i=e<1?"":Math.max(.33,Math.min(1,1-e/t.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(t){if(!this.isTopmost())return;document.body.classList.remove("is-using-mouse");const e=t.key,i=this.option("keyboard");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const s=t.composedPath()[0],o=document.activeElement&&document.activeElement.classList,n=o&&o.contains("carousel__button");if("Escape"!==e&&!n){if(t.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName))return}if(!1===this.trigger("keydown",e,t))return;const a=i[e];"function"==typeof this[a]&&this[a]()}getSlide(){const t=this.Carousel;if(!t)return null;const e=null===t.page?t.option("initialPage"):t.page,i=t.pages||[];return i.length&&i[e]?i[e].slides[0]:null}focus(t){if(R.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const e=this.$container,i=this.getSlide(),s="done"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;t&&t.preventDefault(),R.ignoreFocusChange=!0;const o=Array.from(e.querySelectorAll(x));let n,a=[];for(let t of o){const e=t.offsetParent,i=s&&s.contains(t),o=!this.Carousel.$viewport.contains(t);e&&(i||o)?(a.push(t),void 0!==t.dataset.origTabindex&&(t.tabIndex=t.dataset.origTabindex,t.removeAttribute("data-orig-tabindex")),(t.hasAttribute("autoFocus")||!n&&i&&!t.classList.contains("carousel__button"))&&(n=t)):(t.dataset.origTabindex=void 0===t.dataset.origTabindex?t.getAttribute("tabindex"):t.dataset.origTabindex,t.tabIndex=-1)}t?a.indexOf(t.target)>-1?this.lastFocus=t.target:this.lastFocus===e?w(a[a.length-1]):w(e):this.option("autoFocus")&&n?w(n):a.indexOf(document.activeElement)<0&&w(e),this.lastFocus=document.activeElement,R.ignoreFocusChange=!1}hideScrollbar(){if(!v)return;const t=window.innerWidth-document.documentElement.getBoundingClientRect().width,e="fancybox-style-noscroll";let i=document.getElementById(e);i||t>0&&(i=document.createElement("style"),i.id=e,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${t}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const t=document.getElementById("fancybox-style-noscroll");t&&t.remove()}clearContent(t){this.Carousel.trigger("removeSlide",t),t.$content&&(t.$content.remove(),t.$content=null),t.$closeButton&&(t.$closeButton.remove(),t.$closeButton=null),t._className&&t.$el.classList.remove(t._className)}setContent(t,e,i={}){let s;const o=t.$el;if(e instanceof HTMLElement)["img","iframe","video","audio"].indexOf(e.nodeName.toLowerCase())>-1?(s=document.createElement("div"),s.appendChild(e)):s=e;else{const t=document.createRange().createContextualFragment(e);s=document.createElement("div"),s.appendChild(t)}if(t.filter&&!t.error&&(s=s.querySelector(t.filter)),s instanceof Element)return t._className=`has-${i.suffix||t.type||"unknown"}`,o.classList.add(t._className),s.classList.add("fancybox__content"),"none"!==s.style.display&&"none"!==getComputedStyle(s).getPropertyValue("display")||(s.style.display=t.display||this.option("defaultDisplay")||"flex"),t.id&&s.setAttribute("id",t.id),t.$content=s,o.prepend(s),this.manageCloseButton(t),"loading"!==t.state&&this.revealContent(t),s;this.setError(t,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(t){const e=void 0===t.closeButton?this.option("closeButton"):t.closeButton;if(!e||"top"===e&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(t=>this.close(t))),"inside"===e?(t.$closeButton&&t.$closeButton.remove(),t.$closeButton=t.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(t){this.trigger("reveal",t),t.$content.style.visibility="";let e=!1;t.error||"loading"===t.state||null!==this.Carousel.prevPage||t.index!==this.options.startIndex||(e=void 0===t.showClass?this.option("showClass"):t.showClass),e?(t.state="animating",this.animateCSS(t.$content,e,(()=>{this.done(t)}))):this.done(t)}animateCSS(t,e,i){if(t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!t||!e)return void("function"==typeof i&&i());const s=function(o){o.currentTarget===this&&(t.removeEventListener("animationend",s),i&&i(),t.classList.remove(e))};t.addEventListener("animationend",s),t.classList.add(e)}done(t){t.state="done",this.trigger("done",t);const e=this.getSlide();e&&t.index===e.index&&this.option("autoFocus")&&this.focus()}setError(t,e){t.error=e,this.hideLoading(t),this.clearContent(t);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(e||"

{{ERROR}}

"),this.setContent(t,i,{suffix:"error"})}showLoading(t){t.state="loading",t.$el.classList.add("is-loading");let e=t.$el.querySelector(".fancybox__spinner");e||(e=document.createElement("div"),e.classList.add("fancybox__spinner"),e.innerHTML=this.option("template.spinner"),e.addEventListener("click",(()=>{this.Carousel.Panzoom.velocity||this.close()})),t.$el.prepend(e))}hideLoading(t){const e=t.$el&&t.$el.querySelector(".fancybox__spinner");e&&(e.remove(),t.$el.classList.remove("is-loading")),"loading"===t.state&&(this.trigger("load",t),t.state="ready")}next(){const t=this.Carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.Carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.Carousel&&this.Carousel.slideTo(...t)}isClosing(){return["closing","customClosing","destroy"].includes(this.state)}isTopmost(){return R.getInstance().id==this.id}close(t){if(t&&t.preventDefault(),this.isClosing())return;if(!1===this.trigger("shouldClose",t))return;if(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",t),"destroy"===this.state)return;this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");const e=this.getSlide();if(this.Carousel.slides.forEach((t=>{t.$content&&t.index!==e.index&&this.Carousel.trigger("removeSlide",t)})),"closing"===this.state){const t=void 0===e.hideClass?this.option("hideClass"):e.hideClass;this.animateCSS(e.$content,t,(()=>{this.destroy()}),!0)}}destroy(){if("destroy"===this.state)return;this.state="destroy",this.trigger("destroy");const t=this.option("placeFocusBack")?this.option("triggerTarget",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,t&&w(t),I.delete(this.id);const e=R.getInstance();e?e.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}static show(t,e={}){return new R(t,e)}static fromEvent(t,e={}){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;const i=t.composedPath()[0];let s,o,n,a=i;if((a.matches("[data-fancybox-trigger]")||(a=a.closest("[data-fancybox-trigger]")))&&(e.triggerTarget=a,s=a&&a.dataset&&a.dataset.fancyboxTrigger),s){const t=document.querySelectorAll(`[data-fancybox="${s}"]`),e=parseInt(a.dataset.fancyboxIndex,10)||0;a=t.length?t[e]:a}Array.from(R.openers.keys()).reverse().some((e=>{n=a||i;let s=!1;try{n instanceof Element&&("string"==typeof e||e instanceof String)&&(s=n.matches(e)||(n=n.closest(e)))}catch(t){}return!!s&&(t.preventDefault(),o=e,!0)}));let r=!1;if(o){e.event=t,e.target=n,n.origTarget=i,r=R.fromOpener(o,e);const s=R.getInstance();s&&"ready"===s.state&&t.detail&&document.body.classList.add("is-using-mouse")}return r}static fromOpener(t,i={}){let s=[],o=i.startIndex||0,n=i.target||null;const a=void 0!==(i=e({},i,R.openers.get(t))).groupAll&&i.groupAll,r=void 0===i.groupAttr?"data-fancybox":i.groupAttr,h=r&&n?n.getAttribute(`${r}`):"";if(!n||h||a){const e=i.root||(n?n.getRootNode():document.body);s=[].slice.call(e.querySelectorAll(t))}if(n&&!a&&(s=h?s.filter((t=>t.getAttribute(`${r}`)===h)):[n]),!s.length)return!1;const l=R.getInstance();return!(l&&s.indexOf(l.options.$trigger)>-1)&&(o=n?s.indexOf(n):o,s=s.map((function(t){const e=["false","0","no","null","undefined"],i=["true","1","yes"],s=Object.assign({},t.dataset),o={};for(let[t,n]of Object.entries(s))if("fancybox"!==t)if("width"===t||"height"===t)o[`_${t}`]=n;else if("string"==typeof n||n instanceof String)if(e.indexOf(n)>-1)o[t]=!1;else if(i.indexOf(o[t])>-1)o[t]=!0;else try{o[t]=JSON.parse(n)}catch(e){o[t]=n}else o[t]=n;return t instanceof Element&&(o.$trigger=t),o})),new R(s,e({},i,{startIndex:o,$trigger:n})))}static bind(t,e={}){function i(){document.body.addEventListener("click",R.fromEvent,!1)}v&&(R.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener("DOMContentLoaded",i)),R.openers.set(t,e))}static unbind(t){R.openers.delete(t),R.openers.size||R.destroy()}static destroy(){let t;for(;t=R.getInstance();)t.destroy();R.openers=new Map,document.body.removeEventListener("click",R.fromEvent,!1)}static getInstance(t){if(t)return I.get(t);return Array.from(I.values()).reverse().find((t=>!t.isClosing()&&t))||null}static close(t=!0,e){if(t)for(const t of I.values())t.close(e);else{const t=R.getInstance();t&&t.close(e)}}static next(){const t=R.getInstance();t&&t.next()}static prev(){const t=R.getInstance();t&&t.prev()}}R.version="4.0.31",R.defaults=M,R.openers=new Map,R.Plugins=O,R.bind("[data-fancybox]");for(const[t,e]of Object.entries(R.Plugins||{}))"function"==typeof e.create&&e.create(R); - - -/***/ }), - -/***/ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ decodeB64ToUint8Array) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - - -var atob = function atob(s) { - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().atob) ? global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(s) : Buffer.from(s, 'base64').toString('binary'); -}; - -function decodeB64ToUint8Array(b64Text) { - var decodedString = atob(b64Text); - var array = new Uint8Array(decodedString.length); - - for (var i = 0; i < decodedString.length; i++) { - array[i] = decodedString.charCodeAt(i); - } - - return array; -} - -/***/ }), - -/***/ "./node_modules/@videojs/vhs-utils/es/media-groups.js": -/*!************************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/media-groups.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ forEachMediaGroup: () => (/* binding */ forEachMediaGroup) -/* harmony export */ }); -/** - * Loops through all supported media groups in master and calls the provided - * callback for each group - * - * @param {Object} master - * The parsed master manifest object - * @param {string[]} groups - * The media groups to call the callback for - * @param {Function} callback - * Callback to call for each media group - */ -var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) { - groups.forEach(function (mediaType) { - for (var groupKey in master.mediaGroups[mediaType]) { - for (var labelKey in master.mediaGroups[mediaType][groupKey]) { - var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey]; - callback(mediaProperties, mediaType, groupKey, labelKey); - } - } - }); -}; - -/***/ }), - -/***/ "./node_modules/@videojs/vhs-utils/es/resolve-url.js": -/*!***********************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/resolve-url.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); - - -var DEFAULT_LOCATION = 'http://example.com'; - -var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { - // return early if we don't need to resolve - if (/^[a-z]+:/i.test(relativeUrl)) { - return relativeUrl; - } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location - - - if (/^data:/.test(baseUrl)) { - baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; - } // IE11 supports URL but not the URL constructor - // feature detect the behavior we want - - - var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; - var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) - // and if baseUrl isn't an absolute url - - var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location - - if (nativeURL) { - baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); - } else if (!/\/\//i.test(baseUrl)) { - baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); - } - - if (nativeURL) { - var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol - // and if we're location-less, remove the location - // otherwise, return the url unmodified - - if (removeLocation) { - return newUrl.href.slice(DEFAULT_LOCATION.length); - } else if (protocolLess) { - return newUrl.href.slice(newUrl.protocol.length); - } - - return newUrl.href; - } - - return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); - -/***/ }), - -/***/ "./node_modules/@videojs/vhs-utils/es/stream.js": -/*!******************************************************!*\ - !*** ./node_modules/@videojs/vhs-utils/es/stream.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Stream) -/* harmony export */ }); -/** - * @file stream.js - */ - -/** - * A lightweight readable stream implemention that handles event dispatching. - * - * @class Stream - */ -var Stream = /*#__PURE__*/function () { - function Stream() { - this.listeners = {}; - } - /** - * Add a listener for a specified event type. - * - * @param {string} type the event name - * @param {Function} listener the callback to be invoked when an event of - * the specified type occurs - */ - - - var _proto = Stream.prototype; - - _proto.on = function on(type, listener) { - if (!this.listeners[type]) { - this.listeners[type] = []; - } - - this.listeners[type].push(listener); - } - /** - * Remove a listener for a specified event type. - * - * @param {string} type the event name - * @param {Function} listener a function previously registered for this - * type of event through `on` - * @return {boolean} if we could turn it off or not - */ - ; - - _proto.off = function off(type, listener) { - if (!this.listeners[type]) { - return false; - } - - var index = this.listeners[type].indexOf(listener); // TODO: which is better? - // In Video.js we slice listener functions - // on trigger so that it does not mess up the order - // while we loop through. - // - // Here we slice on off so that the loop in trigger - // can continue using it's old reference to loop without - // messing up the order. - - this.listeners[type] = this.listeners[type].slice(0); - this.listeners[type].splice(index, 1); - return index > -1; - } - /** - * Trigger an event of the specified type on this stream. Any additional - * arguments to this function are passed as parameters to event listeners. - * - * @param {string} type the event name - */ - ; - - _proto.trigger = function trigger(type) { - var callbacks = this.listeners[type]; - - if (!callbacks) { - return; - } // Slicing the arguments on every invocation of this method - // can add a significant amount of overhead. Avoid the - // intermediate object creation for the common case of a - // single callback argument - - - if (arguments.length === 2) { - var length = callbacks.length; - - for (var i = 0; i < length; ++i) { - callbacks[i].call(this, arguments[1]); - } - } else { - var args = Array.prototype.slice.call(arguments, 1); - var _length = callbacks.length; - - for (var _i = 0; _i < _length; ++_i) { - callbacks[_i].apply(this, args); - } - } - } - /** - * Destroys the stream and cleans up. - */ - ; - - _proto.dispose = function dispose() { - this.listeners = {}; - } - /** - * Forwards all `data` events on this stream to the destination stream. The - * destination stream should provide a method `push` to receive the data - * events as they arrive. - * - * @param {Stream} destination the stream that will receive all `data` events - * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options - */ - ; - - _proto.pipe = function pipe(destination) { - this.on('data', function (data) { - destination.push(data); - }); - }; - - return Stream; -}(); - - - -/***/ }), - -/***/ "./node_modules/@videojs/xhr/lib/http-handler.js": -/*!*******************************************************!*\ - !*** ./node_modules/@videojs/xhr/lib/http-handler.js ***! - \*******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); - -var httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) { - if (decodeResponseBody === void 0) { - decodeResponseBody = false; - } - - return function (err, response, responseBody) { - // if the XHR failed, return that error - if (err) { - callback(err); - return; - } // if the HTTP status code is 4xx or 5xx, the request also failed - - - if (response.statusCode >= 400 && response.statusCode <= 599) { - var cause = responseBody; - - if (decodeResponseBody) { - if (window.TextDecoder) { - var charset = getCharset(response.headers && response.headers['content-type']); - - try { - cause = new TextDecoder(charset).decode(responseBody); - } catch (e) {} - } else { - cause = String.fromCharCode.apply(null, new Uint8Array(responseBody)); - } - } - - callback({ - cause: cause - }); - return; - } // otherwise, request succeeded - - - callback(null, responseBody); - }; -}; - -function getCharset(contentTypeHeader) { - if (contentTypeHeader === void 0) { - contentTypeHeader = ''; - } - - return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) { - var _contentType$split = contentType.split('='), - type = _contentType$split[0], - value = _contentType$split[1]; - - if (type.trim() === 'charset') { - return value.trim(); - } - - return charset; - }, 'utf-8'); -} - -module.exports = httpResponseHandler; - -/***/ }), - -/***/ "./node_modules/@videojs/xhr/lib/index.js": -/*!************************************************!*\ - !*** ./node_modules/@videojs/xhr/lib/index.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); - -var _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"); - -var isFunction = __webpack_require__(/*! is-function */ "./node_modules/is-function/index.js"); - -createXHR.httpHandler = __webpack_require__(/*! ./http-handler.js */ "./node_modules/@videojs/xhr/lib/http-handler.js"); -/** - * @license - * slighly modified parse-headers 2.0.2 - * Copyright (c) 2014 David Björklund - * Available under the MIT license - * - */ - -var parseHeaders = function parseHeaders(headers) { - var result = {}; - - if (!headers) { - return result; - } - - headers.trim().split('\n').forEach(function (row) { - var index = row.indexOf(':'); - var key = row.slice(0, index).trim().toLowerCase(); - var value = row.slice(index + 1).trim(); - - if (typeof result[key] === 'undefined') { - result[key] = value; - } else if (Array.isArray(result[key])) { - result[key].push(value); - } else { - result[key] = [result[key], value]; - } - }); - return result; -}; - -module.exports = createXHR; // Allow use of default import syntax in TypeScript - -module.exports["default"] = createXHR; -createXHR.XMLHttpRequest = window.XMLHttpRequest || noop; -createXHR.XDomainRequest = "withCredentials" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest; -forEachArray(["get", "put", "post", "patch", "head", "delete"], function (method) { - createXHR[method === "delete" ? "del" : method] = function (uri, options, callback) { - options = initParams(uri, options, callback); - options.method = method.toUpperCase(); - return _createXHR(options); - }; -}); - -function forEachArray(array, iterator) { - for (var i = 0; i < array.length; i++) { - iterator(array[i]); - } -} - -function isEmpty(obj) { - for (var i in obj) { - if (obj.hasOwnProperty(i)) return false; - } - - return true; -} - -function initParams(uri, options, callback) { - var params = uri; - - if (isFunction(options)) { - callback = options; - - if (typeof uri === "string") { - params = { - uri: uri - }; - } - } else { - params = _extends({}, options, { - uri: uri - }); - } - - params.callback = callback; - return params; -} - -function createXHR(uri, options, callback) { - options = initParams(uri, options, callback); - return _createXHR(options); -} - -function _createXHR(options) { - if (typeof options.callback === "undefined") { - throw new Error("callback argument missing"); - } - - var called = false; - - var callback = function cbOnce(err, response, body) { - if (!called) { - called = true; - options.callback(err, response, body); - } - }; - - function readystatechange() { - if (xhr.readyState === 4) { - setTimeout(loadFunc, 0); - } - } - - function getBody() { - // Chrome with requestType=blob throws errors arround when even testing access to responseText - var body = undefined; - - if (xhr.response) { - body = xhr.response; - } else { - body = xhr.responseText || getXml(xhr); - } - - if (isJson) { - try { - body = JSON.parse(body); - } catch (e) {} - } - - return body; - } - - function errorFunc(evt) { - clearTimeout(timeoutTimer); - - if (!(evt instanceof Error)) { - evt = new Error("" + (evt || "Unknown XMLHttpRequest Error")); - } - - evt.statusCode = 0; - return callback(evt, failureResponse); - } // will load the data & process the response in a special response object - - - function loadFunc() { - if (aborted) return; - var status; - clearTimeout(timeoutTimer); - - if (options.useXDR && xhr.status === undefined) { - //IE8 CORS GET successful response doesn't have a status field, but body is fine - status = 200; - } else { - status = xhr.status === 1223 ? 204 : xhr.status; - } - - var response = failureResponse; - var err = null; - - if (status !== 0) { - response = { - body: getBody(), - statusCode: status, - method: method, - headers: {}, - url: uri, - rawRequest: xhr - }; - - if (xhr.getAllResponseHeaders) { - //remember xhr can in fact be XDR for CORS in IE - response.headers = parseHeaders(xhr.getAllResponseHeaders()); - } - } else { - err = new Error("Internal XMLHttpRequest Error"); - } - - return callback(err, response, response.body); - } - - var xhr = options.xhr || null; - - if (!xhr) { - if (options.cors || options.useXDR) { - xhr = new createXHR.XDomainRequest(); - } else { - xhr = new createXHR.XMLHttpRequest(); - } - } - - var key; - var aborted; - var uri = xhr.url = options.uri || options.url; - var method = xhr.method = options.method || "GET"; - var body = options.body || options.data; - var headers = xhr.headers = options.headers || {}; - var sync = !!options.sync; - var isJson = false; - var timeoutTimer; - var failureResponse = { - body: undefined, - headers: {}, - statusCode: 0, - method: method, - url: uri, - rawRequest: xhr - }; - - if ("json" in options && options.json !== false) { - isJson = true; - headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json"); //Don't override existing accept header declared by user - - if (method !== "GET" && method !== "HEAD") { - headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json"); //Don't override existing accept header declared by user - - body = JSON.stringify(options.json === true ? body : options.json); - } - } - - xhr.onreadystatechange = readystatechange; - xhr.onload = loadFunc; - xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function. - - xhr.onprogress = function () {// IE must die - }; - - xhr.onabort = function () { - aborted = true; - }; - - xhr.ontimeout = errorFunc; - xhr.open(method, uri, !sync, options.username, options.password); //has to be after open - - if (!sync) { - xhr.withCredentials = !!options.withCredentials; - } // Cannot set timeout with sync request - // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly - // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent - - - if (!sync && options.timeout > 0) { - timeoutTimer = setTimeout(function () { - if (aborted) return; - aborted = true; //IE9 may still call readystatechange - - xhr.abort("timeout"); - var e = new Error("XMLHttpRequest timeout"); - e.code = "ETIMEDOUT"; - errorFunc(e); - }, options.timeout); - } - - if (xhr.setRequestHeader) { - for (key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - } else if (options.headers && !isEmpty(options.headers)) { - throw new Error("Headers cannot be set on an XDomainRequest object"); - } - - if ("responseType" in options) { - xhr.responseType = options.responseType; - } - - if ("beforeSend" in options && typeof options.beforeSend === "function") { - options.beforeSend(xhr); - } // Microsoft Edge browser sends "undefined" when send is called with undefined value. - // XMLHttpRequest spec says to pass null as body to indicate no body - // See https://github.com/naugtur/xhr/issues/100. - - - xhr.send(body || null); - return xhr; -} - -function getXml(xhr) { - // xhr.responseXML will throw Exception "InvalidStateError" or "DOMException" - // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML. - try { - if (xhr.responseType === "document") { - return xhr.responseXML; - } - - var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === "parsererror"; - - if (xhr.responseType === "" && !firefoxBugTakenEffect) { - return xhr.responseXML; - } - } catch (e) {} - - return null; -} - -function noop() {} - -/***/ }), - -/***/ "./src/js/components/accordion.js": -/*!****************************************!*\ - !*** ./src/js/components/accordion.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ toggleAccordion: () => (/* binding */ toggleAccordion) -/* harmony export */ }); -let items = document.querySelectorAll('.accordion__item'); -let title = document.querySelectorAll('.accordion__title-wrapper'); -const toggleAccordion = () => { - title.forEach(question => question.addEventListener('click', function () { - let thisItem = this.parentNode; - items.forEach(item => { - if (thisItem == item) { - thisItem.classList.toggle('active'); - return; - } - item.classList.remove('active'); - }); - })); -}; - -/***/ }), - -/***/ "./src/js/components/burger-menu.js": -/*!******************************************!*\ - !*** ./src/js/components/burger-menu.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ changeMenu: () => (/* binding */ changeMenu) -/* harmony export */ }); -const burger = document.querySelector('.burger-js'); -const menu = document.querySelector('.menu-js'); -const menuLinks = document.querySelectorAll('.nav__link'); -const changeMenu = () => { - burger?.addEventListener('click', () => { - menu?.classList.toggle('active'); - burger?.classList.toggle('active'); - if (menu?.classList.contains('active')) { - document.body.style.overflowY = 'hidden'; - } else { - document.body.style.overflowY = 'auto'; - } - }); - menuLinks.forEach(el => { - el.addEventListener('click', () => { - menu?.classList.remove('active'); - document.body.style.overflowY = 'auto'; - burger?.classList.remove('active'); - }); - }); -}; - -/***/ }), - -/***/ "./src/js/components/paint-btn.js": -/*!****************************************!*\ - !*** ./src/js/components/paint-btn.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ paintBtn: () => (/* binding */ paintBtn) -/* harmony export */ }); -const btnNext = document.querySelector('.nav-history__next'); -const paintBtn = () => { - try { - const scrollToTop = () => { - const top = window.scrollY; - if (top >= 100) { - btnNext.classList.add('active'); - } else { - btnNext.classList.remove('active'); - } - }; - scrollToTop(); - window.addEventListener('scroll', () => { - scrollToTop(); - }); - } catch (e) { - console.log(e); - } -}; - -/***/ }), - -/***/ "./src/js/components/scroll-smooth.js": -/*!********************************************!*\ - !*** ./src/js/components/scroll-smooth.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addSmoothScroll: () => (/* binding */ addSmoothScroll) -/* harmony export */ }); -/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/smooth-scroll/dist/smooth-scroll.js */ "./node_modules/smooth-scroll/dist/smooth-scroll.js"); -/* harmony import */ var _node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0__); - -const header = document.querySelector('header'); -const btnUpWrapper = document.querySelector('.btn-up-wrapper'); -const addSmoothScroll = () => { - const scroll = new (_node_modules_smooth_scroll_dist_smooth_scroll_js__WEBPACK_IMPORTED_MODULE_0___default())('a[href*="#"]', { - header: '.header', - speed: 500 - }); - const scrollToTop = () => { - const top = window.scrollY; - if (top >= 100) { - header.classList.add('active'); - } else { - header.classList.remove('active'); - } - if (top >= 300) { - btnUpWrapper.classList.add('active'); - } else { - btnUpWrapper.classList.remove('active'); - } - }; - scrollToTop(); - window.addEventListener('scroll', () => { - scrollToTop(); - }); -}; - -/***/ }), - -/***/ "./src/js/components/sliders.js": -/*!**************************************!*\ - !*** ./src/js/components/sliders.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ initializationSliders: () => (/* binding */ initializationSliders) -/* harmony export */ }); -/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.esm.js"); - -swiper__WEBPACK_IMPORTED_MODULE_0__["default"].use([swiper__WEBPACK_IMPORTED_MODULE_0__.Navigation, swiper__WEBPACK_IMPORTED_MODULE_0__.Pagination, swiper__WEBPACK_IMPORTED_MODULE_0__.Autoplay]); -const initializationSliders = () => { - try { - const recomendationsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.recommendations__slider', { - slidesPerView: '1', - navigation: { - nextEl: '.recommendations__slider-navigation-next', - prevEl: '.recommendations__slider-navigation-prev' - }, - loop: true - }); - const goodsSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.goods__slider', { - slidesPerView: 3, - loop: true, - navigation: { - nextEl: '.goods__slider-next', - prevEl: '.goods__slider-prev' - }, - pagination: { - clickable: true, - el: '.goods__slider-pagination', - clickable: true - }, - breakpoints: { - 940: { - slidesPerView: 4 - }, - 764: { - slidesPerView: 3 - }, - 600: { - slidesPerView: 2 - }, - 0: { - slidesPerView: 1 - } - } - }); - const professionalSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.professional__slider', { - navigation: { - nextEl: '.professional__slider-navigation-next', - prevEl: '.professional__slider-navigation-prev' - }, - paginationClickable: true, - // loop: true, - initialSlide: 1, - centeredSlides: true, - slidesPerView: 2, - speed: 1000, - zoom: { - maxRatio: 1.6 - }, - pagination: { - clickable: true, - el: '.professional__slider-pagination', - clickable: true - }, - breakpoints: { - 993: { - spaceBetween: -180 - }, - 860: { - spaceBetween: -260, - slidesPerView: 2 - }, - 768: { - spaceBetween: -200 - }, - 500: { - spaceBetween: -80 - }, - 320: { - slidesPerView: 1.6, - spaceBetween: -80 - } - }, - allowTouchMove: false - }); - const interviewSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.interview__slider', { - navigation: { - nextEl: '.interview__slider-navigation-next', - prevEl: '.interview__slider-navigation-prev' - }, - pagination: { - el: '.interview__slider-pagination', - clickable: true - }, - allowTouchMove: false, - paginationClickable: true, - centeredSlides: true, - loop: true, - speed: 1000 - }); - const partnersSlider = new swiper__WEBPACK_IMPORTED_MODULE_0__["default"]('.partners__wrapper', { - freeMode: true, - grabCursor: true, - centeredSlides: true, - slidesPerView: 'auto', - loop: true, - speed: 2000, - autoplay: { - enabled: true, - delay: 1, - disableOnInteraction: true - }, - freeModeMomentum: true - }); - document.querySelector('.partners__wrapper').addEventListener('mouseover', function () { - partnersSlider.autoplay.stop(); - }); - document.querySelector('.partners__wrapper').addEventListener('mouseout', function () { - partnersSlider.autoplay.start(); - }); - window.addEventListener('scroll', () => { - if (!partnersSlider.autoplay.running) { - partnersSlider.autoplay.start(); - } - }); - } catch (e) { - console.error(e); - } -}; - -/***/ }), - -/***/ "./src/js/components/video-player.js": -/*!*******************************************!*\ - !*** ./src/js/components/video-player.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addVideoPlayer: () => (/* binding */ addVideoPlayer) -/* harmony export */ }); -/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "./node_modules/video.js/dist/video.es.js"); - -const playBtn = document.querySelector('.video__btn'); -const videoTitle = document.querySelector('.video__title'); -const videoText = document.querySelector('.video__text'); -const videoLink = document.querySelector('.video__link'); -const videoGradient = document.querySelector('.video__gradient'); -const videoIntro = document.querySelector('.video__intro'); -const videoMask = document.querySelector('.video__mask'); -const videoJsTech = document.querySelector('.vjs-tech'); -const addVideoPlayer = () => { - try { - let isPreviewVideo = true; - const videoPlayer = (0,video_js__WEBPACK_IMPORTED_MODULE_0__["default"])(document.getElementById('video__player'), { - autoplay: true, - loop: true, - muted: true, - controls: false, - playToggle: false - }); - const loadMainVideo = (desktopUrl, mobileUrl) => { - if (window.screen.width > 768) { - videoPlayer.src({ - type: 'video/mp4', - src: `./videos/${desktopUrl}` - }); - } else { - videoPlayer.src({ - type: 'video/mp4', - src: `./videos/${mobileUrl}` - }); - } - }; - loadMainVideo('preview.mp4', 'preview-mobile.mp4'); - videoPlayer.volume(0.7); - const changePlayerStatus = () => { - videoPlayer.play(); - videoPlayer.addClass('play'); - videoPlayer.muted(false); - videoPlayer.controls(true); - videoPlayer.loop(false); - playBtn.classList.add('hide'); - videoTitle.classList.add('hide'); - videoText.classList.add('hide'); - videoLink.classList.add('hide'); - }; - videoPlayer.on('play', () => { - if (!videoPlayer.played()) { - videoPlayer.addClass('play'); - videoPlayer.removeClass('play'); - playBtn?.classList.add('hide'); - } else if (videoPlayer.played() && videoPlayer.loop()) { - videoPlayer.removeClass('play'); - } else if (videoPlayer.played() && !videoPlayer.loop()) { - videoPlayer.removeClass('play'); - playBtn?.classList.add('hide'); - } - }); - videoPlayer.on('pause', () => { - playBtn?.classList.remove('hide'); - }); - videoPlayer.on('ended', () => { - playBtn?.classList.remove('hide'); - videoMask?.classList.remove('visible'); - }); - videoMask.addEventListener('click', () => { - playBtn?.classList.remove('hide'); - videoPlayer.pause(); - videoMask?.classList.remove('visible'); - }); - playBtn.addEventListener('click', () => { - if (isPreviewVideo === true) { - loadMainVideo('video.mp4', 'video-mobile.mp4'); - isPreviewVideo = false; - } - document.querySelector('.video__inner').classList.add('active'); - document.querySelector('.video-js').classList.add('active'); - document.querySelector('.vjs-poster').classList.add('active'); - videoPlayer.fluid(true); - videoGradient?.classList.add('hide'); - videoMask?.classList.add('visible'); - playBtn?.classList.add('center-position'); - document.querySelector('video').style.objectFit = 'contain'; - if (videoPlayer.muted()) { - videoPlayer.currentTime(0); - changePlayerStatus(); - } else { - changePlayerStatus(); - } - }); - } catch (e) { - console.log(e); - } -}; - -/***/ }), - -/***/ "./node_modules/global/document.js": -/*!*****************************************!*\ - !*** ./node_modules/global/document.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var topLevel = typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : - typeof window !== 'undefined' ? window : {} -var minDoc = __webpack_require__(/*! min-document */ "?34aa"); - -var doccy; - -if (typeof document !== 'undefined') { - doccy = document; -} else { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } -} - -module.exports = doccy; - - -/***/ }), - -/***/ "./node_modules/global/window.js": -/*!***************************************!*\ - !*** ./node_modules/global/window.js ***! - \***************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var win; - -if (typeof window !== "undefined") { - win = window; -} else if (typeof __webpack_require__.g !== "undefined") { - win = __webpack_require__.g; -} else if (typeof self !== "undefined"){ - win = self; -} else { - win = {}; -} - -module.exports = win; - - -/***/ }), - -/***/ "./node_modules/is-function/index.js": -/*!*******************************************!*\ - !*** ./node_modules/is-function/index.js ***! - \*******************************************/ -/***/ ((module) => { - -module.exports = isFunction - -var toString = Object.prototype.toString - -function isFunction (fn) { - if (!fn) { - return false - } - var string = toString.call(fn) - return string === '[object Function]' || - (typeof fn === 'function' && string !== '[object RegExp]') || - (typeof window !== 'undefined' && - // IE8 and below - (fn === window.setTimeout || - fn === window.alert || - fn === window.confirm || - fn === window.prompt)) -}; - - -/***/ }), - -/***/ "./node_modules/keycode/index.js": -/*!***************************************!*\ - !*** ./node_modules/keycode/index.js ***! - \***************************************/ -/***/ ((module, exports) => { - -// Source: http://jsfiddle.net/vWx8V/ -// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes - -/** - * Conenience method returns corresponding value for given keyName or keyCode. - * - * @param {Mixed} keyCode {Number} or keyName {String} - * @return {Mixed} - * @api public - */ - -function keyCode(searchInput) { - // Keyboard Events - if (searchInput && 'object' === typeof searchInput) { - var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode - if (hasKeyCode) searchInput = hasKeyCode - } - - // Numbers - if ('number' === typeof searchInput) return names[searchInput] - - // Everything else (cast to string) - var search = String(searchInput) - - // check codes - var foundNamedKey = codes[search.toLowerCase()] - if (foundNamedKey) return foundNamedKey - - // check aliases - var foundNamedKey = aliases[search.toLowerCase()] - if (foundNamedKey) return foundNamedKey - - // weird character? - if (search.length === 1) return search.charCodeAt(0) - - return undefined -} - -/** - * Compares a keyboard event with a given keyCode or keyName. - * - * @param {Event} event Keyboard event that should be tested - * @param {Mixed} keyCode {Number} or keyName {String} - * @return {Boolean} - * @api public - */ -keyCode.isEventKey = function isEventKey(event, nameOrCode) { - if (event && 'object' === typeof event) { - var keyCode = event.which || event.keyCode || event.charCode - if (keyCode === null || keyCode === undefined) { return false; } - if (typeof nameOrCode === 'string') { - // check codes - var foundNamedKey = codes[nameOrCode.toLowerCase()] - if (foundNamedKey) { return foundNamedKey === keyCode; } - - // check aliases - var foundNamedKey = aliases[nameOrCode.toLowerCase()] - if (foundNamedKey) { return foundNamedKey === keyCode; } - } else if (typeof nameOrCode === 'number') { - return nameOrCode === keyCode; - } - return false; - } -} - -exports = module.exports = keyCode; - -/** - * Get by name - * - * exports.code['enter'] // => 13 - */ - -var codes = exports.code = exports.codes = { - 'backspace': 8, - 'tab': 9, - 'enter': 13, - 'shift': 16, - 'ctrl': 17, - 'alt': 18, - 'pause/break': 19, - 'caps lock': 20, - 'esc': 27, - 'space': 32, - 'page up': 33, - 'page down': 34, - 'end': 35, - 'home': 36, - 'left': 37, - 'up': 38, - 'right': 39, - 'down': 40, - 'insert': 45, - 'delete': 46, - 'command': 91, - 'left command': 91, - 'right command': 93, - 'numpad *': 106, - 'numpad +': 107, - 'numpad -': 109, - 'numpad .': 110, - 'numpad /': 111, - 'num lock': 144, - 'scroll lock': 145, - 'my computer': 182, - 'my calculator': 183, - ';': 186, - '=': 187, - ',': 188, - '-': 189, - '.': 190, - '/': 191, - '`': 192, - '[': 219, - '\\': 220, - ']': 221, - "'": 222 -} - -// Helper aliases - -var aliases = exports.aliases = { - 'windows': 91, - '⇧': 16, - '⌥': 18, - '⌃': 17, - '⌘': 91, - 'ctl': 17, - 'control': 17, - 'option': 18, - 'pause': 19, - 'break': 19, - 'caps': 20, - 'return': 13, - 'escape': 27, - 'spc': 32, - 'spacebar': 32, - 'pgup': 33, - 'pgdn': 34, - 'ins': 45, - 'del': 46, - 'cmd': 91 -} - -/*! - * Programatically add the following - */ - -// lower case chars -for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 - -// numbers -for (var i = 48; i < 58; i++) codes[i - 48] = i - -// function keys -for (i = 1; i < 13; i++) codes['f'+i] = i + 111 - -// numpad keys -for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 - -/** - * Get by code - * - * exports.name[13] // => 'Enter' - */ - -var names = exports.names = exports.title = {} // title for backward compat - -// Create reverse mapping -for (i in codes) names[codes[i]] = i - -// Add aliases -for (var alias in aliases) { - codes[alias] = aliases[alias] -} - - -/***/ }), - -/***/ "./node_modules/m3u8-parser/dist/m3u8-parser.es.js": -/*!*********************************************************!*\ - !*** ./node_modules/m3u8-parser/dist/m3u8-parser.es.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ LineStream: () => (/* binding */ LineStream), -/* harmony export */ ParseStream: () => (/* binding */ ParseStream), -/* harmony export */ Parser: () => (/* binding */ Parser) -/* harmony export */ }); -/* harmony import */ var _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/stream.js */ "./node_modules/@videojs/vhs-utils/es/stream.js"); -/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); -/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array.js */ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); -/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */ - - - - -/** - * @file m3u8/line-stream.js - */ -/** - * A stream that buffers string input and generates a `data` event for each - * line. - * - * @class LineStream - * @extends Stream - */ - -class LineStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.buffer = ''; - } - /** - * Add new data to be parsed. - * - * @param {string} data the text to process - */ - - - push(data) { - let nextNewline; - this.buffer += data; - nextNewline = this.buffer.indexOf('\n'); - - for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\n')) { - this.trigger('data', this.buffer.substring(0, nextNewline)); - this.buffer = this.buffer.substring(nextNewline + 1); - } - } - -} - -const TAB = String.fromCharCode(0x09); - -const parseByterange = function (byterangeString) { - // optionally match and capture 0+ digits before `@` - // optionally match and capture 0+ digits after `@` - const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || ''); - const result = {}; - - if (match[1]) { - result.length = parseInt(match[1], 10); - } - - if (match[2]) { - result.offset = parseInt(match[2], 10); - } - - return result; -}; -/** - * "forgiving" attribute list psuedo-grammar: - * attributes -> keyvalue (',' keyvalue)* - * keyvalue -> key '=' value - * key -> [^=]* - * value -> '"' [^"]* '"' | [^,]* - */ - - -const attributeSeparator = function () { - const key = '[^=]*'; - const value = '"[^"]*"|[^,]*'; - const keyvalue = '(?:' + key + ')=(?:' + value + ')'; - return new RegExp('(?:^|,)(' + keyvalue + ')'); -}; -/** - * Parse attributes from a line given the separator - * - * @param {string} attributes the attribute line to parse - */ - - -const parseAttributes = function (attributes) { - const result = {}; - - if (!attributes) { - return result; - } // split the string using attributes as the separator - - - const attrs = attributes.split(attributeSeparator()); - let i = attrs.length; - let attr; - - while (i--) { - // filter out unmatched portions of the string - if (attrs[i] === '') { - continue; - } // split the key and value - - - attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value - - attr[0] = attr[0].replace(/^\s+|\s+$/g, ''); - attr[1] = attr[1].replace(/^\s+|\s+$/g, ''); - attr[1] = attr[1].replace(/^['"](.*)['"]$/g, '$1'); - result[attr[0]] = attr[1]; - } - - return result; -}; -/** - * A line-level M3U8 parser event stream. It expects to receive input one - * line at a time and performs a context-free parse of its contents. A stream - * interpretation of a manifest can be useful if the manifest is expected to - * be too large to fit comfortably into memory or the entirety of the input - * is not immediately available. Otherwise, it's probably much easier to work - * with a regular `Parser` object. - * - * Produces `data` events with an object that captures the parser's - * interpretation of the input. That object has a property `tag` that is one - * of `uri`, `comment`, or `tag`. URIs only have a single additional - * property, `line`, which captures the entirety of the input without - * interpretation. Comments similarly have a single additional property - * `text` which is the input without the leading `#`. - * - * Tags always have a property `tagType` which is the lower-cased version of - * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance, - * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized - * tags are given the tag type `unknown` and a single additional property - * `data` with the remainder of the input. - * - * @class ParseStream - * @extends Stream - */ - - -class ParseStream extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.customParsers = []; - this.tagMappers = []; - } - /** - * Parses an additional line of input. - * - * @param {string} line a single line of an M3U8 file to parse - */ - - - push(line) { - let match; - let event; // strip whitespace - - line = line.trim(); - - if (line.length === 0) { - // ignore empty lines - return; - } // URIs - - - if (line[0] !== '#') { - this.trigger('data', { - type: 'uri', - uri: line - }); - return; - } // map tags - - - const newLines = this.tagMappers.reduce((acc, mapper) => { - const mappedLine = mapper(line); // skip if unchanged - - if (mappedLine === line) { - return acc; - } - - return acc.concat([mappedLine]); - }, [line]); - newLines.forEach(newLine => { - for (let i = 0; i < this.customParsers.length; i++) { - if (this.customParsers[i].call(this, newLine)) { - return; - } - } // Comments - - - if (newLine.indexOf('#EXT') !== 0) { - this.trigger('data', { - type: 'comment', - text: newLine.slice(1) - }); - return; - } // strip off any carriage returns here so the regex matching - // doesn't have to account for them. - - - newLine = newLine.replace('\r', ''); // Tags - - match = /^#EXTM3U/.exec(newLine); - - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'm3u' - }); - return; - } - - match = /^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'inf' - }; - - if (match[1]) { - event.duration = parseFloat(match[1]); - } - - if (match[2]) { - event.title = match[2]; - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'targetduration' - }; - - if (match[1]) { - event.duration = parseInt(match[1], 10); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'version' - }; - - if (match[1]) { - event.version = parseInt(match[1], 10); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'media-sequence' - }; - - if (match[1]) { - event.number = parseInt(match[1], 10); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'discontinuity-sequence' - }; - - if (match[1]) { - event.number = parseInt(match[1], 10); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'playlist-type' - }; - - if (match[1]) { - event.playlistType = match[1]; - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine); - - if (match) { - event = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(parseByterange(match[1]), { - type: 'tag', - tagType: 'byterange' - }); - this.trigger('data', event); - return; - } - - match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'allow-cache' - }; - - if (match[1]) { - event.allowed = !/NO/.test(match[1]); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-MAP:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'map' - }; - - if (match[1]) { - const attributes = parseAttributes(match[1]); - - if (attributes.URI) { - event.uri = attributes.URI; - } - - if (attributes.BYTERANGE) { - event.byterange = parseByterange(attributes.BYTERANGE); - } - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'stream-inf' - }; - - if (match[1]) { - event.attributes = parseAttributes(match[1]); - - if (event.attributes.RESOLUTION) { - const split = event.attributes.RESOLUTION.split('x'); - const resolution = {}; - - if (split[0]) { - resolution.width = parseInt(split[0], 10); - } - - if (split[1]) { - resolution.height = parseInt(split[1], 10); - } - - event.attributes.RESOLUTION = resolution; - } - - if (event.attributes.BANDWIDTH) { - event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10); - } - - if (event.attributes['FRAME-RATE']) { - event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']); - } - - if (event.attributes['PROGRAM-ID']) { - event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10); - } - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'media' - }; - - if (match[1]) { - event.attributes = parseAttributes(match[1]); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-ENDLIST/.exec(newLine); - - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'endlist' - }); - return; - } - - match = /^#EXT-X-DISCONTINUITY/.exec(newLine); - - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'discontinuity' - }); - return; - } - - match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'program-date-time' - }; - - if (match[1]) { - event.dateTimeString = match[1]; - event.dateTimeObject = new Date(match[1]); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-KEY:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'key' - }; - - if (match[1]) { - event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array - - if (event.attributes.IV) { - if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') { - event.attributes.IV = event.attributes.IV.substring(2); - } - - event.attributes.IV = event.attributes.IV.match(/.{8}/g); - event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16); - event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16); - event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16); - event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16); - event.attributes.IV = new Uint32Array(event.attributes.IV); - } - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-START:(.*)$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'start' - }; - - if (match[1]) { - event.attributes = parseAttributes(match[1]); - event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']); - event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'cue-out-cont' - }; - - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'cue-out' - }; - - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine); - - if (match) { - event = { - type: 'tag', - tagType: 'cue-in' - }; - - if (match[1]) { - event.data = match[1]; - } else { - event.data = ''; - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-SKIP:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'skip' - }; - event.attributes = parseAttributes(match[1]); - - if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) { - event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10); - } - - if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) { - event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-PART:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'part' - }; - event.attributes = parseAttributes(match[1]); - ['DURATION'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['INDEPENDENT', 'GAP'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/.test(event.attributes[key]); - } - }); - - if (event.attributes.hasOwnProperty('BYTERANGE')) { - event.attributes.byterange = parseByterange(event.attributes.BYTERANGE); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'server-control' - }; - event.attributes = parseAttributes(match[1]); - ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/.test(event.attributes[key]); - } - }); - this.trigger('data', event); - return; - } - - match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'part-inf' - }; - event.attributes = parseAttributes(match[1]); - ['PART-TARGET'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - this.trigger('data', event); - return; - } - - match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'preload-hint' - }; - event.attributes = parseAttributes(match[1]); - ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseInt(event.attributes[key], 10); - const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset'; - event.attributes.byterange = event.attributes.byterange || {}; - event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object. - - delete event.attributes[key]; - } - }); - this.trigger('data', event); - return; - } - - match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'rendition-report' - }; - event.attributes = parseAttributes(match[1]); - ['LAST-MSN', 'LAST-PART'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseInt(event.attributes[key], 10); - } - }); - this.trigger('data', event); - return; - } - - match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine); - - if (match && match[1]) { - event = { - type: 'tag', - tagType: 'daterange' - }; - event.attributes = parseAttributes(match[1]); - ['ID', 'CLASS'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = String(event.attributes[key]); - } - }); - ['START-DATE', 'END-DATE'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = new Date(event.attributes[key]); - } - }); - ['DURATION', 'PLANNED-DURATION'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = parseFloat(event.attributes[key]); - } - }); - ['END-ON-NEXT'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = /YES/i.test(event.attributes[key]); - } - }); - ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) { - if (event.attributes.hasOwnProperty(key)) { - event.attributes[key] = event.attributes[key].toString(16); - } - }); - const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/; - - for (const key in event.attributes) { - if (!clientAttributePattern.test(key)) { - continue; - } - - const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]); - const isDecimalFloating = /^\d+(\.\d+)?$/.test(event.attributes[key]); - event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]); - } - - this.trigger('data', event); - return; - } - - match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine); - - if (match) { - this.trigger('data', { - type: 'tag', - tagType: 'independent-segments' - }); - return; - } // unknown tag type - - - this.trigger('data', { - type: 'tag', - data: newLine.slice(4) - }); - }); - } - /** - * Add a parser for custom headers - * - * @param {Object} options a map of options for the added parser - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {string} options.customType the custom type to register to the output - * @param {Function} [options.dataParser] function to parse the line into an object - * @param {boolean} [options.segment] should tag data be attached to the segment object - */ - - - addParser({ - expression, - customType, - dataParser, - segment - }) { - if (typeof dataParser !== 'function') { - dataParser = line => line; - } - - this.customParsers.push(line => { - const match = expression.exec(line); - - if (match) { - this.trigger('data', { - type: 'custom', - data: dataParser(line), - customType, - segment - }); - return true; - } - }); - } - /** - * Add a custom header mapper - * - * @param {Object} options - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {Function} options.map function to translate tag into a different tag - */ - - - addTagMapper({ - expression, - map - }) { - const mapFn = line => { - if (expression.test(line)) { - return map(line); - } - - return line; - }; - - this.tagMappers.push(mapFn); - } - -} - -const camelCase = str => str.toLowerCase().replace(/-(\w)/g, a => a[1].toUpperCase()); - -const camelCaseKeys = function (attributes) { - const result = {}; - Object.keys(attributes).forEach(function (key) { - result[camelCase(key)] = attributes[key]; - }); - return result; -}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration -// we need this helper because defaults are based upon targetDuration and -// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before -// target durations are set. - - -const setHoldBack = function (manifest) { - const { - serverControl, - targetDuration, - partTargetDuration - } = manifest; - - if (!serverControl) { - return; - } - - const tag = '#EXT-X-SERVER-CONTROL'; - const hb = 'holdBack'; - const phb = 'partHoldBack'; - const minTargetDuration = targetDuration && targetDuration * 3; - const minPartDuration = partTargetDuration && partTargetDuration * 2; - - if (targetDuration && !serverControl.hasOwnProperty(hb)) { - serverControl[hb] = minTargetDuration; - this.trigger('info', { - message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).` - }); - } - - if (minTargetDuration && serverControl[hb] < minTargetDuration) { - this.trigger('warn', { - message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})` - }); - serverControl[hb] = minTargetDuration; - } // default no part hold back to part target duration * 3 - - - if (partTargetDuration && !serverControl.hasOwnProperty(phb)) { - serverControl[phb] = partTargetDuration * 3; - this.trigger('info', { - message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).` - }); - } // if part hold back is too small default it to part target duration * 2 - - - if (partTargetDuration && serverControl[phb] < minPartDuration) { - this.trigger('warn', { - message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).` - }); - serverControl[phb] = minPartDuration; - } -}; -/** - * A parser for M3U8 files. The current interpretation of the input is - * exposed as a property `manifest` on parser objects. It's just two lines to - * create and parse a manifest once you have the contents available as a string: - * - * ```js - * var parser = new m3u8.Parser(); - * parser.push(xhr.responseText); - * ``` - * - * New input can later be applied to update the manifest object by calling - * `push` again. - * - * The parser attempts to create a usable manifest object even if the - * underlying input is somewhat nonsensical. It emits `info` and `warning` - * events during the parse if it encounters input that seems invalid or - * requires some property of the manifest object to be defaulted. - * - * @class Parser - * @extends Stream - */ - - -class Parser extends _videojs_vhs_utils_es_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"] { - constructor() { - super(); - this.lineStream = new LineStream(); - this.parseStream = new ParseStream(); - this.lineStream.pipe(this.parseStream); - /* eslint-disable consistent-this */ - - const self = this; - /* eslint-enable consistent-this */ - - const uris = []; - let currentUri = {}; // if specified, the active EXT-X-MAP definition - - let currentMap; // if specified, the active decryption key - - let key; - let hasParts = false; - - const noop = function () {}; - - const defaultMediaGroups = { - 'AUDIO': {}, - 'VIDEO': {}, - 'CLOSED-CAPTIONS': {}, - 'SUBTITLES': {} - }; // This is the Widevine UUID from DASH IF IOP. The same exact string is - // used in MPDs with Widevine encrypted streams. - - const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities - - let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data - - this.manifest = { - allowCache: true, - discontinuityStarts: [], - segments: [] - }; // keep track of the last seen segment's byte range end, as segments are not required - // to provide the offset, in which case it defaults to the next byte after the - // previous segment - - let lastByterangeEnd = 0; // keep track of the last seen part's byte range end. - - let lastPartByterangeEnd = 0; - const daterangeTags = {}; - this.on('end', () => { - // only add preloadSegment if we don't yet have a uri for it. - // and we actually have parts/preloadHints - if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) { - return; - } - - if (!currentUri.map && currentMap) { - currentUri.map = currentMap; - } - - if (!currentUri.key && key) { - currentUri.key = key; - } - - if (!currentUri.timeline && typeof currentTimeline === 'number') { - currentUri.timeline = currentTimeline; - } - - this.manifest.preloadSegment = currentUri; - }); // update the manifest with the m3u8 entry from the parse stream - - this.parseStream.on('data', function (entry) { - let mediaGroup; - let rendition; - ({ - tag() { - // switch based on the tag type - (({ - version() { - if (entry.version) { - this.manifest.version = entry.version; - } - }, - - 'allow-cache'() { - this.manifest.allowCache = entry.allowed; - - if (!('allowed' in entry)) { - this.trigger('info', { - message: 'defaulting allowCache to YES' - }); - this.manifest.allowCache = true; - } - }, - - byterange() { - const byterange = {}; - - if ('length' in entry) { - currentUri.byterange = byterange; - byterange.length = entry.length; - - if (!('offset' in entry)) { - /* - * From the latest spec (as of this writing): - * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2 - * - * Same text since EXT-X-BYTERANGE's introduction in draft 7: - * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1) - * - * "If o [offset] is not present, the sub-range begins at the next byte - * following the sub-range of the previous media segment." - */ - entry.offset = lastByterangeEnd; - } - } - - if ('offset' in entry) { - currentUri.byterange = byterange; - byterange.offset = entry.offset; - } - - lastByterangeEnd = byterange.offset + byterange.length; - }, - - endlist() { - this.manifest.endList = true; - }, - - inf() { - if (!('mediaSequence' in this.manifest)) { - this.manifest.mediaSequence = 0; - this.trigger('info', { - message: 'defaulting media sequence to zero' - }); - } - - if (!('discontinuitySequence' in this.manifest)) { - this.manifest.discontinuitySequence = 0; - this.trigger('info', { - message: 'defaulting discontinuity sequence to zero' - }); - } - - if (entry.duration > 0) { - currentUri.duration = entry.duration; - } - - if (entry.duration === 0) { - currentUri.duration = 0.01; - this.trigger('info', { - message: 'updating zero segment duration to a small value' - }); - } - - this.manifest.segments = uris; - }, - - key() { - if (!entry.attributes) { - this.trigger('warn', { - message: 'ignoring key declaration without attribute list' - }); - return; - } // clear the active encryption key - - - if (entry.attributes.METHOD === 'NONE') { - key = null; - return; - } - - if (!entry.attributes.URI) { - this.trigger('warn', { - message: 'ignoring key declaration without URI' - }); - return; - } - - if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') { - this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. - - this.manifest.contentProtection['com.apple.fps.1_0'] = { - attributes: entry.attributes - }; - return; - } - - if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') { - this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this. - - this.manifest.contentProtection['com.microsoft.playready'] = { - uri: entry.attributes.URI - }; - return; - } // check if the content is encrypted for Widevine - // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf - - - if (entry.attributes.KEYFORMAT === widevineUuid) { - const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC']; - - if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) { - this.trigger('warn', { - message: 'invalid key method provided for Widevine' - }); - return; - } - - if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') { - this.trigger('warn', { - message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead' - }); - } - - if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') { - this.trigger('warn', { - message: 'invalid key URI provided for Widevine' - }); - return; - } - - if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) { - this.trigger('warn', { - message: 'invalid key ID provided for Widevine' - }); - return; - } // if Widevine key attributes are valid, store them as `contentProtection` - // on the manifest to emulate Widevine tag structure in a DASH mpd - - - this.manifest.contentProtection = this.manifest.contentProtection || {}; - this.manifest.contentProtection['com.widevine.alpha'] = { - attributes: { - schemeIdUri: entry.attributes.KEYFORMAT, - // remove '0x' from the key id string - keyId: entry.attributes.KEYID.substring(2) - }, - // decode the base64-encoded PSSH box - pssh: (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array_js__WEBPACK_IMPORTED_MODULE_2__["default"])(entry.attributes.URI.split(',')[1]) - }; - return; - } - - if (!entry.attributes.METHOD) { - this.trigger('warn', { - message: 'defaulting key method to AES-128' - }); - } // setup an encryption key for upcoming segments - - - key = { - method: entry.attributes.METHOD || 'AES-128', - uri: entry.attributes.URI - }; - - if (typeof entry.attributes.IV !== 'undefined') { - key.iv = entry.attributes.IV; - } - }, - - 'media-sequence'() { - if (!isFinite(entry.number)) { - this.trigger('warn', { - message: 'ignoring invalid media sequence: ' + entry.number - }); - return; - } - - this.manifest.mediaSequence = entry.number; - }, - - 'discontinuity-sequence'() { - if (!isFinite(entry.number)) { - this.trigger('warn', { - message: 'ignoring invalid discontinuity sequence: ' + entry.number - }); - return; - } - - this.manifest.discontinuitySequence = entry.number; - currentTimeline = entry.number; - }, - - 'playlist-type'() { - if (!/VOD|EVENT/.test(entry.playlistType)) { - this.trigger('warn', { - message: 'ignoring unknown playlist type: ' + entry.playlist - }); - return; - } - - this.manifest.playlistType = entry.playlistType; - }, - - map() { - currentMap = {}; - - if (entry.uri) { - currentMap.uri = entry.uri; - } - - if (entry.byterange) { - currentMap.byterange = entry.byterange; - } - - if (key) { - currentMap.key = key; - } - }, - - 'stream-inf'() { - this.manifest.playlists = uris; - this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; - - if (!entry.attributes) { - this.trigger('warn', { - message: 'ignoring empty stream-inf attributes' - }); - return; - } - - if (!currentUri.attributes) { - currentUri.attributes = {}; - } - - (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(currentUri.attributes, entry.attributes); - }, - - media() { - this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups; - - if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) { - this.trigger('warn', { - message: 'ignoring incomplete or missing media group' - }); - return; - } // find the media group, creating defaults as necessary - - - const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE]; - mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {}; - mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata - - rendition = { - default: /yes/i.test(entry.attributes.DEFAULT) - }; - - if (rendition.default) { - rendition.autoselect = true; - } else { - rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT); - } - - if (entry.attributes.LANGUAGE) { - rendition.language = entry.attributes.LANGUAGE; - } - - if (entry.attributes.URI) { - rendition.uri = entry.attributes.URI; - } - - if (entry.attributes['INSTREAM-ID']) { - rendition.instreamId = entry.attributes['INSTREAM-ID']; - } - - if (entry.attributes.CHARACTERISTICS) { - rendition.characteristics = entry.attributes.CHARACTERISTICS; - } - - if (entry.attributes.FORCED) { - rendition.forced = /yes/i.test(entry.attributes.FORCED); - } // insert the new rendition - - - mediaGroup[entry.attributes.NAME] = rendition; - }, - - discontinuity() { - currentTimeline += 1; - currentUri.discontinuity = true; - this.manifest.discontinuityStarts.push(uris.length); - }, - - 'program-date-time'() { - if (typeof this.manifest.dateTimeString === 'undefined') { - // PROGRAM-DATE-TIME is a media-segment tag, but for backwards - // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag - // to the manifest object - // TODO: Consider removing this in future major version - this.manifest.dateTimeString = entry.dateTimeString; - this.manifest.dateTimeObject = entry.dateTimeObject; - } - - currentUri.dateTimeString = entry.dateTimeString; - currentUri.dateTimeObject = entry.dateTimeObject; - }, - - targetduration() { - if (!isFinite(entry.duration) || entry.duration < 0) { - this.trigger('warn', { - message: 'ignoring invalid target duration: ' + entry.duration - }); - return; - } - - this.manifest.targetDuration = entry.duration; - setHoldBack.call(this, this.manifest); - }, - - start() { - if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) { - this.trigger('warn', { - message: 'ignoring start declaration without appropriate attribute list' - }); - return; - } - - this.manifest.start = { - timeOffset: entry.attributes['TIME-OFFSET'], - precise: entry.attributes.PRECISE - }; - }, - - 'cue-out'() { - currentUri.cueOut = entry.data; - }, - - 'cue-out-cont'() { - currentUri.cueOutCont = entry.data; - }, - - 'cue-in'() { - currentUri.cueIn = entry.data; - }, - - 'skip'() { - this.manifest.skip = camelCaseKeys(entry.attributes); - this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']); - }, - - 'part'() { - hasParts = true; // parts are always specifed before a segment - - const segmentIndex = this.manifest.segments.length; - const part = camelCaseKeys(entry.attributes); - currentUri.parts = currentUri.parts || []; - currentUri.parts.push(part); - - if (part.byterange) { - if (!part.byterange.hasOwnProperty('offset')) { - part.byterange.offset = lastPartByterangeEnd; - } - - lastPartByterangeEnd = part.byterange.offset + part.byterange.length; - } - - const partIndex = currentUri.parts.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']); - - if (this.manifest.renditionReports) { - this.manifest.renditionReports.forEach((r, i) => { - if (!r.hasOwnProperty('lastPart')) { - this.trigger('warn', { - message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART` - }); - } - }); - } - }, - - 'server-control'() { - const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes); - - if (!attrs.hasOwnProperty('canBlockReload')) { - attrs.canBlockReload = false; - this.trigger('info', { - message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false' - }); - } - - setHoldBack.call(this, this.manifest); - - if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) { - this.trigger('warn', { - message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set' - }); - } - }, - - 'preload-hint'() { - // parts are always specifed before a segment - const segmentIndex = this.manifest.segments.length; - const hint = camelCaseKeys(entry.attributes); - const isPart = hint.type && hint.type === 'PART'; - currentUri.preloadHints = currentUri.preloadHints || []; - currentUri.preloadHints.push(hint); - - if (hint.byterange) { - if (!hint.byterange.hasOwnProperty('offset')) { - // use last part byterange end or zero if not a part. - hint.byterange.offset = isPart ? lastPartByterangeEnd : 0; - - if (isPart) { - lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length; - } - } - } - - const index = currentUri.preloadHints.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']); - - if (!hint.type) { - return; - } // search through all preload hints except for the current one for - // a duplicate type. - - - for (let i = 0; i < currentUri.preloadHints.length - 1; i++) { - const otherHint = currentUri.preloadHints[i]; - - if (!otherHint.type) { - continue; - } - - if (otherHint.type === hint.type) { - this.trigger('warn', { - message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}` - }); - } - } - }, - - 'rendition-report'() { - const report = camelCaseKeys(entry.attributes); - this.manifest.renditionReports = this.manifest.renditionReports || []; - this.manifest.renditionReports.push(report); - const index = this.manifest.renditionReports.length - 1; - const required = ['LAST-MSN', 'URI']; - - if (hasParts) { - required.push('LAST-PART'); - } - - this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required); - }, - - 'part-inf'() { - this.manifest.partInf = camelCaseKeys(entry.attributes); - this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']); - - if (this.manifest.partInf.partTarget) { - this.manifest.partTargetDuration = this.manifest.partInf.partTarget; - } - - setHoldBack.call(this, this.manifest); - }, - - 'daterange'() { - this.manifest.daterange = this.manifest.daterange || []; - this.manifest.daterange.push(camelCaseKeys(entry.attributes)); - const index = this.manifest.daterange.length - 1; - this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']); - const daterange = this.manifest.daterange[index]; - - if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE' - }); - } - - if (daterange.duration && daterange.duration < 0) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE DURATION must not be negative' - }); - } - - if (daterange.plannedDuration && daterange.plannedDuration < 0) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative' - }); - } - - const endOnNextYes = !!daterange.endOnNext; - - if (endOnNextYes && !daterange.class) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute' - }); - } - - if (endOnNextYes && (daterange.duration || daterange.endDate)) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes' - }); - } - - if (daterange.duration && daterange.endDate) { - const startDate = daterange.startDate; - const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration); - this.manifest.daterange[index].endDate = new Date(newDateInSeconds); - } - - if (daterange && !this.manifest.dateTimeString) { - this.trigger('warn', { - message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag' - }); - } - - if (!daterangeTags[daterange.id]) { - daterangeTags[daterange.id] = daterange; - } else { - for (const attribute in daterangeTags[daterange.id]) { - if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) { - this.trigger('warn', { - message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values' - }); - break; - } - } - } - }, - - 'independent-segments'() { - this.manifest.independentSegments = true; - } - - })[entry.tagType] || noop).call(self); - }, - - uri() { - currentUri.uri = entry.uri; - uris.push(currentUri); // if no explicit duration was declared, use the target duration - - if (this.manifest.targetDuration && !('duration' in currentUri)) { - this.trigger('warn', { - message: 'defaulting segment duration to the target duration' - }); - currentUri.duration = this.manifest.targetDuration; - } // annotate with encryption information, if necessary - - - if (key) { - currentUri.key = key; - } - - currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary - - if (currentMap) { - currentUri.map = currentMap; - } // reset the last byterange end as it needs to be 0 between parts - - - lastPartByterangeEnd = 0; // prepare for the next URI - - currentUri = {}; - }, - - comment() {// comments are not important for playback - }, - - custom() { - // if this is segment-level data attach the output to the segment - if (entry.segment) { - currentUri.custom = currentUri.custom || {}; - currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object - } else { - this.manifest.custom = this.manifest.custom || {}; - this.manifest.custom[entry.customType] = entry.data; - } - } - - })[entry.type].call(self); - }); - } - - warnOnMissingAttributes_(identifier, attributes, required) { - const missing = []; - required.forEach(function (key) { - if (!attributes.hasOwnProperty(key)) { - missing.push(key); - } - }); - - if (missing.length) { - this.trigger('warn', { - message: `${identifier} lacks required attribute(s): ${missing.join(', ')}` - }); - } - } - /** - * Parse the input string and update the manifest object. - * - * @param {string} chunk a potentially incomplete portion of the manifest - */ - - - push(chunk) { - this.lineStream.push(chunk); - } - /** - * Flush any remaining input. This can be handy if the last line of an M3U8 - * manifest did not contain a trailing newline but the file has been - * completely received. - */ - - - end() { - // flush any buffered input - this.lineStream.push('\n'); - this.trigger('end'); - } - /** - * Add an additional parser for non-standard tags - * - * @param {Object} options a map of options for the added parser - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {string} options.type the type to register to the output - * @param {Function} [options.dataParser] function to parse the line into an object - * @param {boolean} [options.segment] should tag data be attached to the segment object - */ - - - addParser(options) { - this.parseStream.addParser(options); - } - /** - * Add a custom header mapper - * - * @param {Object} options - * @param {RegExp} options.expression a regular expression to match the custom header - * @param {Function} options.map function to translate tag into a different tag - */ - - - addTagMapper(options) { - this.parseStream.addTagMapper(options); - } - -} - - - - -/***/ }), - -/***/ "./node_modules/mpd-parser/dist/mpd-parser.es.js": -/*!*******************************************************!*\ - !*** ./node_modules/mpd-parser/dist/mpd-parser.es.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION), -/* harmony export */ addSidxSegmentsToPlaylist: () => (/* binding */ addSidxSegmentsToPlaylist$1), -/* harmony export */ generateSidxKey: () => (/* binding */ generateSidxKey), -/* harmony export */ inheritAttributes: () => (/* binding */ inheritAttributes), -/* harmony export */ parse: () => (/* binding */ parse), -/* harmony export */ parseUTCTiming: () => (/* binding */ parseUTCTiming), -/* harmony export */ stringToMpdXml: () => (/* binding */ stringToMpdXml), -/* harmony export */ toM3u8: () => (/* binding */ toM3u8), -/* harmony export */ toPlaylists: () => (/* binding */ toPlaylists) -/* harmony export */ }); -/* harmony import */ var _videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/es/resolve-url */ "./node_modules/@videojs/vhs-utils/es/resolve-url.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/es/media-groups */ "./node_modules/@videojs/vhs-utils/es/media-groups.js"); -/* harmony import */ var _videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @videojs/vhs-utils/es/decode-b64-to-uint8-array */ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js"); -/* harmony import */ var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @xmldom/xmldom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js"); -/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */ - - - - - - -var version = "1.2.2"; - -const isObject = obj => { - return !!obj && typeof obj === 'object'; -}; - -const merge = (...objects) => { - return objects.reduce((result, source) => { - if (typeof source !== 'object') { - return result; - } - - Object.keys(source).forEach(key => { - if (Array.isArray(result[key]) && Array.isArray(source[key])) { - result[key] = result[key].concat(source[key]); - } else if (isObject(result[key]) && isObject(source[key])) { - result[key] = merge(result[key], source[key]); - } else { - result[key] = source[key]; - } - }); - return result; - }, {}); -}; -const values = o => Object.keys(o).map(k => o[k]); - -const range = (start, end) => { - const result = []; - - for (let i = start; i < end; i++) { - result.push(i); - } - - return result; -}; -const flatten = lists => lists.reduce((x, y) => x.concat(y), []); -const from = list => { - if (!list.length) { - return []; - } - - const result = []; - - for (let i = 0; i < list.length; i++) { - result.push(list[i]); - } - - return result; -}; -const findIndexes = (l, key) => l.reduce((a, e, i) => { - if (e[key]) { - a.push(i); - } - - return a; -}, []); -/** - * Returns a union of the included lists provided each element can be identified by a key. - * - * @param {Array} list - list of lists to get the union of - * @param {Function} keyFunction - the function to use as a key for each element - * - * @return {Array} the union of the arrays - */ - -const union = (lists, keyFunction) => { - return values(lists.reduce((acc, list) => { - list.forEach(el => { - acc[keyFunction(el)] = el; - }); - return acc; - }, {})); -}; - -var errors = { - INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD', - INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING', - DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST', - DASH_INVALID_XML: 'DASH_INVALID_XML', - NO_BASE_URL: 'NO_BASE_URL', - MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION', - SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED', - UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME' -}; - -/** - * @typedef {Object} SingleUri - * @property {string} uri - relative location of segment - * @property {string} resolvedUri - resolved location of segment - * @property {Object} byterange - Object containing information on how to make byte range - * requests following byte-range-spec per RFC2616. - * @property {String} byterange.length - length of range request - * @property {String} byterange.offset - byte offset of range request - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1 - */ - -/** - * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object - * that conforms to how m3u8-parser is structured - * - * @see https://github.com/videojs/m3u8-parser - * - * @param {string} baseUrl - baseUrl provided by nodes - * @param {string} source - source url for segment - * @param {string} range - optional range used for range calls, - * follows RFC 2616, Clause 14.35.1 - * @return {SingleUri} full segment information transformed into a format similar - * to m3u8-parser - */ - -const urlTypeToSegment = ({ - baseUrl = '', - source = '', - range = '', - indexRange = '' -}) => { - const segment = { - uri: source, - resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(baseUrl || '', source) - }; - - if (range || indexRange) { - const rangeStr = range ? range : indexRange; - const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible - - let startRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[0]) : parseInt(ranges[0], 10); - let endRange = (global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt) ? global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER - - if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') { - startRange = Number(startRange); - } - - if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') { - endRange = Number(endRange); - } - - let length; - - if (typeof endRange === 'bigint' || typeof startRange === 'bigint') { - length = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(endRange) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(startRange) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - length = endRange - startRange + 1; - } - - if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) { - length = Number(length); - } // byterange should be inclusive according to - // RFC 2616, Clause 14.35.1 - - - segment.byterange = { - length, - offset: startRange - }; - } - - return segment; -}; -const byteRangeToString = byterange => { - // `endRange` is one less than `offset + length` because the HTTP range - // header uses inclusive ranges - let endRange; - - if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') { - endRange = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.offset) + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(byterange.length) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - endRange = byterange.offset + byterange.length - 1; - } - - return `${byterange.offset}-${endRange}`; -}; - -/** - * parse the end number attribue that can be a string - * number, or undefined. - * - * @param {string|number|undefined} endNumber - * The end number attribute. - * - * @return {number|null} - * The result of parsing the end number. - */ - -const parseEndNumber = endNumber => { - if (endNumber && typeof endNumber !== 'number') { - endNumber = parseInt(endNumber, 10); - } - - if (isNaN(endNumber)) { - return null; - } - - return endNumber; -}; -/** - * Functions for calculating the range of available segments in static and dynamic - * manifests. - */ - - -const segmentRange = { - /** - * Returns the entire range of available segments for a static MPD - * - * @param {Object} attributes - * Inheritied MPD attributes - * @return {{ start: number, end: number }} - * The start and end numbers for available segments - */ - static(attributes) { - const { - duration, - timescale = 1, - sourceDuration, - periodDuration - } = attributes; - const endNumber = parseEndNumber(attributes.endNumber); - const segmentDuration = duration / timescale; - - if (typeof endNumber === 'number') { - return { - start: 0, - end: endNumber - }; - } - - if (typeof periodDuration === 'number') { - return { - start: 0, - end: periodDuration / segmentDuration - }; - } - - return { - start: 0, - end: sourceDuration / segmentDuration - }; - }, - - /** - * Returns the current live window range of available segments for a dynamic MPD - * - * @param {Object} attributes - * Inheritied MPD attributes - * @return {{ start: number, end: number }} - * The start and end numbers for available segments - */ - dynamic(attributes) { - const { - NOW, - clientOffset, - availabilityStartTime, - timescale = 1, - duration, - periodStart = 0, - minimumUpdatePeriod = 0, - timeShiftBufferDepth = Infinity - } = attributes; - const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated - // after retrieving UTC server time. - - const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock. - // Convert the period start time to EPOCH. - - const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update. - - const periodEndWC = now + minimumUpdatePeriod; - const periodDuration = periodEndWC - periodStartWC; - const segmentCount = Math.ceil(periodDuration * timescale / duration); - const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration); - const availableEnd = Math.floor((now - periodStartWC) * timescale / duration); - return { - start: Math.max(0, availableStart), - end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd) - }; - } - -}; -/** - * Maps a range of numbers to objects with information needed to build the corresponding - * segment list - * - * @name toSegmentsCallback - * @function - * @param {number} number - * Number of the segment - * @param {number} index - * Index of the number in the range list - * @return {{ number: Number, duration: Number, timeline: Number, time: Number }} - * Object with segment timing and duration info - */ - -/** - * Returns a callback for Array.prototype.map for mapping a range of numbers to - * information needed to build the segment list. - * - * @param {Object} attributes - * Inherited MPD attributes - * @return {toSegmentsCallback} - * Callback map function - */ - -const toSegments = attributes => number => { - const { - duration, - timescale = 1, - periodStart, - startNumber = 1 - } = attributes; - return { - number: startNumber + number, - duration: duration / timescale, - timeline: periodStart, - time: number * duration - }; -}; -/** - * Returns a list of objects containing segment timing and duration info used for - * building the list of segments. This uses the @duration attribute specified - * in the MPD manifest to derive the range of segments. - * - * @param {Object} attributes - * Inherited MPD attributes - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info - */ - -const parseByDuration = attributes => { - const { - type, - duration, - timescale = 1, - periodDuration, - sourceDuration - } = attributes; - const { - start, - end - } = segmentRange[type](attributes); - const segments = range(start, end).map(toSegments(attributes)); - - if (type === 'static') { - const index = segments.length - 1; // section is either a period or the full source - - const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration - - segments[index].duration = sectionDuration - duration / timescale * index; - } - - return segments; -}; - -/** - * Translates SegmentBase into a set of segments. - * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each - * node should be translated into segment. - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @return {Object.} list of segments - */ - -const segmentsFromBase = attributes => { - const { - baseUrl, - initialization = {}, - sourceDuration, - indexRange = '', - periodStart, - presentationTime, - number = 0, - duration - } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1) - - if (!baseUrl) { - throw new Error(errors.NO_BASE_URL); - } - - const initSegment = urlTypeToSegment({ - baseUrl, - source: initialization.sourceURL, - range: initialization.range - }); - const segment = urlTypeToSegment({ - baseUrl, - source: baseUrl, - indexRange - }); - segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source - // (since SegmentBase is only for one total segment) - - if (duration) { - const segmentTimeInfo = parseByDuration(attributes); - - if (segmentTimeInfo.length) { - segment.duration = segmentTimeInfo[0].duration; - segment.timeline = segmentTimeInfo[0].timeline; - } - } else if (sourceDuration) { - segment.duration = sourceDuration; - segment.timeline = periodStart; - } // If presentation time is provided, these segments are being generated by SIDX - // references, and should use the time provided. For the general case of SegmentBase, - // there should only be one segment in the period, so its presentation time is the same - // as its period start. - - - segment.presentationTime = presentationTime || periodStart; - segment.number = number; - return [segment]; -}; -/** - * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist - * according to the sidx information given. - * - * playlist.sidx has metadadata about the sidx where-as the sidx param - * is the parsed sidx box itself. - * - * @param {Object} playlist the playlist to update the sidx information for - * @param {Object} sidx the parsed sidx box - * @return {Object} the playlist object with the updated sidx information - */ - -const addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => { - // Retain init segment information - const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing - - const sourceDuration = playlist.sidx.duration; // Retain source timeline - - const timeline = playlist.timeline || 0; - const sidxByteRange = playlist.sidx.byterange; - const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx - - const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes - - const mediaReferences = sidx.references.filter(r => r.referenceType !== 1); - const segments = []; - const type = playlist.endList ? 'static' : 'dynamic'; - const periodStart = playlist.sidx.timeline; - let presentationTime = periodStart; - let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box - - let startIndex; // eslint-disable-next-line - - if (typeof sidx.firstOffset === 'bigint') { - startIndex = global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(sidxEnd) + sidx.firstOffset; - } else { - startIndex = sidxEnd + sidx.firstOffset; - } - - for (let i = 0; i < mediaReferences.length; i++) { - const reference = sidx.references[i]; // size of the referenced (sub)segment - - const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale - // this will be converted to seconds when generating segments - - const duration = reference.subsegmentDuration; // should be an inclusive range - - let endIndex; // eslint-disable-next-line - - if (typeof startIndex === 'bigint') { - endIndex = startIndex + global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size) - global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(1); - } else { - endIndex = startIndex + size - 1; - } - - const indexRange = `${startIndex}-${endIndex}`; - const attributes = { - baseUrl, - timescale, - timeline, - periodStart, - presentationTime, - number, - duration, - sourceDuration, - indexRange, - type - }; - const segment = segmentsFromBase(attributes)[0]; - - if (initSegment) { - segment.map = initSegment; - } - - segments.push(segment); - - if (typeof startIndex === 'bigint') { - startIndex += global_window__WEBPACK_IMPORTED_MODULE_1___default().BigInt(size); - } else { - startIndex += size; - } - - presentationTime += duration / timescale; - number++; - } - - playlist.segments = segments; - return playlist; -}; - -const SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen) - -const TIME_FUDGE = 1 / 60; -/** - * Given a list of timelineStarts, combines, dedupes, and sorts them. - * - * @param {TimelineStart[]} timelineStarts - list of timeline starts - * - * @return {TimelineStart[]} the combined and deduped timeline starts - */ - -const getUniqueTimelineStarts = timelineStarts => { - return union(timelineStarts, ({ - timeline - }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1); -}; -/** - * Finds the playlist with the matching NAME attribute. - * - * @param {Array} playlists - playlists to search through - * @param {string} name - the NAME attribute to search for - * - * @return {Object|null} the matching playlist object, or null - */ - -const findPlaylistWithName = (playlists, name) => { - for (let i = 0; i < playlists.length; i++) { - if (playlists[i].attributes.NAME === name) { - return playlists[i]; - } - } - - return null; -}; -/** - * Gets a flattened array of media group playlists. - * - * @param {Object} manifest - the main manifest object - * - * @return {Array} the media group playlists - */ - -const getMediaGroupPlaylists = manifest => { - let mediaGroupPlaylists = []; - (0,_videojs_vhs_utils_es_media_groups__WEBPACK_IMPORTED_MODULE_2__.forEachMediaGroup)(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => { - mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []); - }); - return mediaGroupPlaylists; -}; -/** - * Updates the playlist's media sequence numbers. - * - * @param {Object} config - options object - * @param {Object} config.playlist - the playlist to update - * @param {number} config.mediaSequence - the mediaSequence number to start with - */ - -const updateMediaSequenceForPlaylist = ({ - playlist, - mediaSequence -}) => { - playlist.mediaSequence = mediaSequence; - playlist.segments.forEach((segment, index) => { - segment.number = playlist.mediaSequence + index; - }); -}; -/** - * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists - * and a complete list of timeline starts. - * - * If no matching playlist is found, only the discontinuity sequence number of the playlist - * will be updated. - * - * Since early available timelines are not supported, at least one segment must be present. - * - * @param {Object} config - options object - * @param {Object[]} oldPlaylists - the old playlists to use as a reference - * @param {Object[]} newPlaylists - the new playlists to update - * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point - */ - -const updateSequenceNumbers = ({ - oldPlaylists, - newPlaylists, - timelineStarts -}) => { - newPlaylists.forEach(playlist => { - playlist.discontinuitySequence = timelineStarts.findIndex(function ({ - timeline - }) { - return timeline === playlist.timeline; - }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory - // (see ISO_23009-1-2012 5.3.5.2). - // - // If the same Representation existed in a prior Period, it will retain the same NAME. - - const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME); - - if (!oldPlaylist) { - // Since this is a new playlist, the media sequence values can start from 0 without - // consequence. - return; - } // TODO better support for live SIDX - // - // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD). - // This is evident by a playlist only having a single SIDX reference. In a multiperiod - // playlist there would need to be multiple SIDX references. In addition, live SIDX is - // not supported when the SIDX properties change on refreshes. - // - // In the future, if support needs to be added, the merging logic here can be called - // after SIDX references are resolved. For now, exit early to prevent exceptions being - // thrown due to undefined references. - - - if (playlist.sidx) { - return; - } // Since we don't yet support early available timelines, we don't need to support - // playlists with no segments. - - - const firstNewSegment = playlist.segments[0]; - const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) { - return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE; - }); // No matching segment from the old playlist means the entire playlist was refreshed. - // In this case the media sequence should account for this update, and the new segments - // should be marked as discontinuous from the prior content, since the last prior - // timeline was removed. - - if (oldMatchingSegmentIndex === -1) { - updateMediaSequenceForPlaylist({ - playlist, - mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length - }); - playlist.segments[0].discontinuity = true; - playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content. - // - // If the new playlist's timeline is the same as the last seen segment's timeline, - // then a discontinuity can be added to identify that there's potentially missing - // content. If there's no missing content, the discontinuity should still be rather - // harmless. It's possible that if segment durations are accurate enough, that the - // existence of a gap can be determined using the presentation times and durations, - // but if the segment timing info is off, it may introduce more problems than simply - // adding the discontinuity. - // - // If the new playlist's timeline is different from the last seen segment's timeline, - // then a discontinuity can be added to identify that this is the first seen segment - // of a new timeline. However, the logic at the start of this function that - // determined the disconinuity sequence by timeline index is now off by one (the - // discontinuity of the newest timeline hasn't yet fallen off the manifest...since - // we added it), so the disconinuity sequence must be decremented. - // - // A period may also have a duration of zero, so the case of no segments is handled - // here even though we don't yet support early available periods. - - if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) { - playlist.discontinuitySequence--; - } - - return; - } // If the first segment matched with a prior segment on a discontinuity (it's matching - // on the first segment of a period), then the discontinuitySequence shouldn't be the - // timeline's matching one, but instead should be the one prior, and the first segment - // of the new manifest should be marked with a discontinuity. - // - // The reason for this special case is that discontinuity sequence shows how many - // discontinuities have fallen off of the playlist, and discontinuities are marked on - // the first segment of a new "timeline." Because of this, while DASH will retain that - // Period while the "timeline" exists, HLS keeps track of it via the discontinuity - // sequence, and that first segment is an indicator, but can be removed before that - // timeline is gone. - - - const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex]; - - if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) { - firstNewSegment.discontinuity = true; - playlist.discontinuityStarts.unshift(0); - playlist.discontinuitySequence--; - } - - updateMediaSequenceForPlaylist({ - playlist, - mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number - }); - }); -}; -/** - * Given an old parsed manifest object and a new parsed manifest object, updates the - * sequence and timing values within the new manifest to ensure that it lines up with the - * old. - * - * @param {Array} oldManifest - the old main manifest object - * @param {Array} newManifest - the new main manifest object - * - * @return {Object} the updated new manifest object - */ - -const positionManifestOnTimeline = ({ - oldManifest, - newManifest -}) => { - // Starting from v4.1.2 of the IOP, section 4.4.3.3 states: - // - // "MPD@availabilityStartTime and Period@start shall not be changed over MPD updates." - // - // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160 - // - // Because of this change, and the difficulty of supporting periods with changing start - // times, periods with changing start times are not supported. This makes the logic much - // simpler, since periods with the same start time can be considerred the same period - // across refreshes. - // - // To give an example as to the difficulty of handling periods where the start time may - // change, if a single period manifest is refreshed with another manifest with a single - // period, and both the start and end times are increased, then the only way to determine - // if it's a new period or an old one that has changed is to look through the segments of - // each playlist and determine the presentation time bounds to find a match. In addition, - // if the period start changed to exceed the old period end, then there would be no - // match, and it would not be possible to determine whether the refreshed period is a new - // one or the old one. - const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest)); - const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that - // there's a "memory leak" in that it will never stop growing, in reality, only a couple - // of properties are saved for each seen Period. Even long running live streams won't - // generate too many Periods, unless the stream is watched for decades. In the future, - // this can be optimized by mapping to discontinuity sequence numbers for each timeline, - // but it may not become an issue, and the additional info can be useful for debugging. - - newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]); - updateSequenceNumbers({ - oldPlaylists, - newPlaylists, - timelineStarts: newManifest.timelineStarts - }); - return newManifest; -}; - -const generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange); - -const mergeDiscontiguousPlaylists = playlists => { - // Break out playlists into groups based on their baseUrl - const playlistsByBaseUrl = playlists.reduce(function (acc, cur) { - if (!acc[cur.attributes.baseUrl]) { - acc[cur.attributes.baseUrl] = []; - } - - acc[cur.attributes.baseUrl].push(cur); - return acc; - }, {}); - let allPlaylists = []; - Object.values(playlistsByBaseUrl).forEach(playlistGroup => { - const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => { - // assuming playlist IDs are the same across periods - // TODO: handle multiperiod where representation sets are not the same - // across periods - const name = playlist.attributes.id + (playlist.attributes.lang || ''); - - if (!acc[name]) { - // First Period - acc[name] = playlist; - acc[name].attributes.timelineStarts = []; - } else { - // Subsequent Periods - if (playlist.segments) { - // first segment of subsequent periods signal a discontinuity - if (playlist.segments[0]) { - playlist.segments[0].discontinuity = true; - } - - acc[name].segments.push(...playlist.segments); - } // bubble up contentProtection, this assumes all DRM content - // has the same contentProtection - - - if (playlist.attributes.contentProtection) { - acc[name].attributes.contentProtection = playlist.attributes.contentProtection; - } - } - - acc[name].attributes.timelineStarts.push({ - // Although they represent the same number, it's important to have both to make it - // compatible with HLS potentially having a similar attribute. - start: playlist.attributes.periodStart, - timeline: playlist.attributes.periodStart - }); - return acc; - }, {})); - allPlaylists = allPlaylists.concat(mergedPlaylists); - }); - return allPlaylists.map(playlist => { - playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity'); - return playlist; - }); -}; - -const addSidxSegmentsToPlaylist = (playlist, sidxMapping) => { - const sidxKey = generateSidxKey(playlist.sidx); - const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx; - - if (sidxMatch) { - addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri); - } - - return playlist; -}; -const addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => { - if (!Object.keys(sidxMapping).length) { - return playlists; - } - - for (const i in playlists) { - playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping); - } - - return playlists; -}; -const formatAudioPlaylist = ({ - attributes, - segments, - sidx, - mediaSequence, - discontinuitySequence, - discontinuityStarts -}, isAudioOnly) => { - const playlist = { - attributes: { - NAME: attributes.id, - BANDWIDTH: attributes.bandwidth, - CODECS: attributes.codecs, - ['PROGRAM-ID']: 1 - }, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - discontinuitySequence, - discontinuityStarts, - timelineStarts: attributes.timelineStarts, - mediaSequence, - segments - }; - - if (attributes.contentProtection) { - playlist.contentProtection = attributes.contentProtection; - } - - if (attributes.serviceLocation) { - playlist.attributes.serviceLocation = attributes.serviceLocation; - } - - if (sidx) { - playlist.sidx = sidx; - } - - if (isAudioOnly) { - playlist.attributes.AUDIO = 'audio'; - playlist.attributes.SUBTITLES = 'subs'; - } - - return playlist; -}; -const formatVttPlaylist = ({ - attributes, - segments, - mediaSequence, - discontinuityStarts, - discontinuitySequence -}) => { - if (typeof segments === 'undefined') { - // vtt tracks may use single file in BaseURL - segments = [{ - uri: attributes.baseUrl, - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - duration: attributes.sourceDuration, - number: 0 - }]; // targetDuration should be the same duration as the only segment - - attributes.duration = attributes.sourceDuration; - } - - const m3u8Attributes = { - NAME: attributes.id, - BANDWIDTH: attributes.bandwidth, - ['PROGRAM-ID']: 1 - }; - - if (attributes.codecs) { - m3u8Attributes.CODECS = attributes.codecs; - } - - const vttPlaylist = { - attributes: m3u8Attributes, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - timelineStarts: attributes.timelineStarts, - discontinuityStarts, - discontinuitySequence, - mediaSequence, - segments - }; - - if (attributes.serviceLocation) { - vttPlaylist.attributes.serviceLocation = attributes.serviceLocation; - } - - return vttPlaylist; -}; -const organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => { - let mainPlaylist; - const formattedPlaylists = playlists.reduce((a, playlist) => { - const role = playlist.attributes.role && playlist.attributes.role.value || ''; - const language = playlist.attributes.lang || ''; - let label = playlist.attributes.label || 'main'; - - if (language && !playlist.attributes.label) { - const roleLabel = role ? ` (${role})` : ''; - label = `${playlist.attributes.lang}${roleLabel}`; - } - - if (!a[label]) { - a[label] = { - language, - autoselect: true, - default: role === 'main', - playlists: [], - uri: '' - }; - } - - const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping); - a[label].playlists.push(formatted); - - if (typeof mainPlaylist === 'undefined' && role === 'main') { - mainPlaylist = playlist; - mainPlaylist.default = true; - } - - return a; - }, {}); // if no playlists have role "main", mark the first as main - - if (!mainPlaylist) { - const firstLabel = Object.keys(formattedPlaylists)[0]; - formattedPlaylists[firstLabel].default = true; - } - - return formattedPlaylists; -}; -const organizeVttPlaylists = (playlists, sidxMapping = {}) => { - return playlists.reduce((a, playlist) => { - const label = playlist.attributes.label || playlist.attributes.lang || 'text'; - - if (!a[label]) { - a[label] = { - language: label, - default: false, - autoselect: false, - playlists: [], - uri: '' - }; - } - - a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping)); - return a; - }, {}); -}; - -const organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => { - if (!svc) { - return svcObj; - } - - svc.forEach(service => { - const { - channel, - language - } = service; - svcObj[language] = { - autoselect: false, - default: false, - instreamId: channel, - language - }; - - if (service.hasOwnProperty('aspectRatio')) { - svcObj[language].aspectRatio = service.aspectRatio; - } - - if (service.hasOwnProperty('easyReader')) { - svcObj[language].easyReader = service.easyReader; - } - - if (service.hasOwnProperty('3D')) { - svcObj[language]['3D'] = service['3D']; - } - }); - return svcObj; -}, {}); - -const formatVideoPlaylist = ({ - attributes, - segments, - sidx, - discontinuityStarts -}) => { - const playlist = { - attributes: { - NAME: attributes.id, - AUDIO: 'audio', - SUBTITLES: 'subs', - RESOLUTION: { - width: attributes.width, - height: attributes.height - }, - CODECS: attributes.codecs, - BANDWIDTH: attributes.bandwidth, - ['PROGRAM-ID']: 1 - }, - uri: '', - endList: attributes.type === 'static', - timeline: attributes.periodStart, - resolvedUri: attributes.baseUrl || '', - targetDuration: attributes.duration, - discontinuityStarts, - timelineStarts: attributes.timelineStarts, - segments - }; - - if (attributes.frameRate) { - playlist.attributes['FRAME-RATE'] = attributes.frameRate; - } - - if (attributes.contentProtection) { - playlist.contentProtection = attributes.contentProtection; - } - - if (attributes.serviceLocation) { - playlist.attributes.serviceLocation = attributes.serviceLocation; - } - - if (sidx) { - playlist.sidx = sidx; - } - - return playlist; -}; - -const videoOnly = ({ - attributes -}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video'; - -const audioOnly = ({ - attributes -}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio'; - -const vttOnly = ({ - attributes -}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text'; -/** - * Contains start and timeline properties denoting a timeline start. For DASH, these will - * be the same number. - * - * @typedef {Object} TimelineStart - * @property {number} start - the start time of the timeline - * @property {number} timeline - the timeline number - */ - -/** - * Adds appropriate media and discontinuity sequence values to the segments and playlists. - * - * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a - * DASH specific attribute used in constructing segment URI's from templates. However, from - * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence` - * value, which should start at the original media sequence value (or 0) and increment by 1 - * for each segment thereafter. Since DASH's `startNumber` values are independent per - * period, it doesn't make sense to use it for `number`. Instead, assume everything starts - * from a 0 mediaSequence value and increment from there. - * - * Note that VHS currently doesn't use the `number` property, but it can be helpful for - * debugging and making sense of the manifest. - * - * For live playlists, to account for values increasing in manifests when periods are - * removed on refreshes, merging logic should be used to update the numbers to their - * appropriate values (to ensure they're sequential and increasing). - * - * @param {Object[]} playlists - the playlists to update - * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest - */ - - -const addMediaSequenceValues = (playlists, timelineStarts) => { - // increment all segments sequentially - playlists.forEach(playlist => { - playlist.mediaSequence = 0; - playlist.discontinuitySequence = timelineStarts.findIndex(function ({ - timeline - }) { - return timeline === playlist.timeline; - }); - - if (!playlist.segments) { - return; - } - - playlist.segments.forEach((segment, index) => { - segment.number = index; - }); - }); -}; -/** - * Given a media group object, flattens all playlists within the media group into a single - * array. - * - * @param {Object} mediaGroupObject - the media group object - * - * @return {Object[]} - * The media group playlists - */ - -const flattenMediaGroupPlaylists = mediaGroupObject => { - if (!mediaGroupObject) { - return []; - } - - return Object.keys(mediaGroupObject).reduce((acc, label) => { - const labelContents = mediaGroupObject[label]; - return acc.concat(labelContents.playlists); - }, []); -}; -const toM3u8 = ({ - dashPlaylists, - locations, - contentSteering, - sidxMapping = {}, - previousManifest, - eventStream -}) => { - if (!dashPlaylists.length) { - return {}; - } // grab all main manifest attributes - - - const { - sourceDuration: duration, - type, - suggestedPresentationDelay, - minimumUpdatePeriod - } = dashPlaylists[0].attributes; - const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist); - const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly)); - const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly)); - const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean); - const manifest = { - allowCache: true, - discontinuityStarts: [], - segments: [], - endList: true, - mediaGroups: { - AUDIO: {}, - VIDEO: {}, - ['CLOSED-CAPTIONS']: {}, - SUBTITLES: {} - }, - uri: '', - duration, - playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping) - }; - - if (minimumUpdatePeriod >= 0) { - manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000; - } - - if (locations) { - manifest.locations = locations; - } - - if (contentSteering) { - manifest.contentSteering = contentSteering; - } - - if (type === 'dynamic') { - manifest.suggestedPresentationDelay = suggestedPresentationDelay; - } - - if (eventStream && eventStream.length > 0) { - manifest.eventStream = eventStream; - } - - const isAudioOnly = manifest.playlists.length === 0; - const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null; - const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null; - const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup)); - const playlistTimelineStarts = formattedPlaylists.map(({ - timelineStarts - }) => timelineStarts); - manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts); - addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts); - - if (organizedAudioGroup) { - manifest.mediaGroups.AUDIO.audio = organizedAudioGroup; - } - - if (organizedVttGroup) { - manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup; - } - - if (captions.length) { - manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions); - } - - if (previousManifest) { - return positionManifestOnTimeline({ - oldManifest: previousManifest, - newManifest: manifest - }); - } - - return manifest; -}; - -/** - * Calculates the R (repetition) value for a live stream (for the final segment - * in a manifest where the r value is negative 1) - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {number} time - * current time (typically the total time up until the final segment) - * @param {number} duration - * duration property for the given - * - * @return {number} - * R value to reach the end of the given period - */ -const getLiveRValue = (attributes, time, duration) => { - const { - NOW, - clientOffset, - availabilityStartTime, - timescale = 1, - periodStart = 0, - minimumUpdatePeriod = 0 - } = attributes; - const now = (NOW + clientOffset) / 1000; - const periodStartWC = availabilityStartTime + periodStart; - const periodEndWC = now + minimumUpdatePeriod; - const periodDuration = periodEndWC - periodStartWC; - return Math.ceil((periodDuration * timescale - time) / duration); -}; -/** - * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment - * timing and duration - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]} segmentTimeline - * List of objects representing the attributes of each S element contained within - * - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info - */ - - -const parseByTimeline = (attributes, segmentTimeline) => { - const { - type, - minimumUpdatePeriod = 0, - media = '', - sourceDuration, - timescale = 1, - startNumber = 1, - periodStart: timeline - } = attributes; - const segments = []; - let time = -1; - - for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) { - const S = segmentTimeline[sIndex]; - const duration = S.d; - const repeat = S.r || 0; - const segmentTime = S.t || 0; - - if (time < 0) { - // first segment - time = segmentTime; - } - - if (segmentTime && segmentTime > time) { - // discontinuity - // TODO: How to handle this type of discontinuity - // timeline++ here would treat it like HLS discontuity and content would - // get appended without gap - // E.G. - // - // - // - // - // would have $Time$ values of [0, 1, 2, 5] - // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY) - // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP) - // does the value of sourceDuration consider this when calculating arbitrary - // negative @r repeat value? - // E.G. Same elements as above with this added at the end - // - // with a sourceDuration of 10 - // Would the 2 gaps be included in the time duration calculations resulting in - // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments - // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ? - time = segmentTime; - } - - let count; - - if (repeat < 0) { - const nextS = sIndex + 1; - - if (nextS === segmentTimeline.length) { - // last segment - if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) { - count = getLiveRValue(attributes, time, duration); - } else { - // TODO: This may be incorrect depending on conclusion of TODO above - count = (sourceDuration * timescale - time) / duration; - } - } else { - count = (segmentTimeline[nextS].t - time) / duration; - } - } else { - count = repeat + 1; - } - - const end = startNumber + segments.length + count; - let number = startNumber + segments.length; - - while (number < end) { - segments.push({ - number, - duration: duration / timescale, - time, - timeline - }); - time += duration; - number++; - } - } - - return segments; -}; - -const identifierPattern = /\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g; -/** - * Replaces template identifiers with corresponding values. To be used as the callback - * for String.prototype.replace - * - * @name replaceCallback - * @function - * @param {string} match - * Entire match of identifier - * @param {string} identifier - * Name of matched identifier - * @param {string} format - * Format tag string. Its presence indicates that padding is expected - * @param {string} width - * Desired length of the replaced value. Values less than this width shall be left - * zero padded - * @return {string} - * Replacement for the matched identifier - */ - -/** - * Returns a function to be used as a callback for String.prototype.replace to replace - * template identifiers - * - * @param {Obect} values - * Object containing values that shall be used to replace known identifiers - * @param {number} values.RepresentationID - * Value of the Representation@id attribute - * @param {number} values.Number - * Number of the corresponding segment - * @param {number} values.Bandwidth - * Value of the Representation@bandwidth attribute. - * @param {number} values.Time - * Timestamp value of the corresponding segment - * @return {replaceCallback} - * Callback to be used with String.prototype.replace to replace identifiers - */ - -const identifierReplacement = values => (match, identifier, format, width) => { - if (match === '$$') { - // escape sequence - return '$'; - } - - if (typeof values[identifier] === 'undefined') { - return match; - } - - const value = '' + values[identifier]; - - if (identifier === 'RepresentationID') { - // Format tag shall not be present with RepresentationID - return value; - } - - if (!format) { - width = 1; - } else { - width = parseInt(width, 10); - } - - if (value.length >= width) { - return value; - } - - return `${new Array(width - value.length + 1).join('0')}${value}`; -}; -/** - * Constructs a segment url from a template string - * - * @param {string} url - * Template string to construct url from - * @param {Obect} values - * Object containing values that shall be used to replace known identifiers - * @param {number} values.RepresentationID - * Value of the Representation@id attribute - * @param {number} values.Number - * Number of the corresponding segment - * @param {number} values.Bandwidth - * Value of the Representation@bandwidth attribute. - * @param {number} values.Time - * Timestamp value of the corresponding segment - * @return {string} - * Segment url with identifiers replaced - */ - -const constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values)); -/** - * Generates a list of objects containing timing and duration information about each - * segment needed to generate segment uris and the complete segment object - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {{number: number, duration: number, time: number, timeline: number}[]} - * List of Objects with segment timing and duration info - */ - -const parseTemplateInfo = (attributes, segmentTimeline) => { - if (!attributes.duration && !segmentTimeline) { - // if neither @duration or SegmentTimeline are present, then there shall be exactly - // one media segment - return [{ - number: attributes.startNumber || 1, - duration: attributes.sourceDuration, - time: 0, - timeline: attributes.periodStart - }]; - } - - if (attributes.duration) { - return parseByDuration(attributes); - } - - return parseByTimeline(attributes, segmentTimeline); -}; -/** - * Generates a list of segments using information provided by the SegmentTemplate element - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {Object[]} - * List of segment objects - */ - -const segmentsFromTemplate = (attributes, segmentTimeline) => { - const templateValues = { - RepresentationID: attributes.id, - Bandwidth: attributes.bandwidth || 0 - }; - const { - initialization = { - sourceURL: '', - range: '' - } - } = attributes; - const mapSegment = urlTypeToSegment({ - baseUrl: attributes.baseUrl, - source: constructTemplateUrl(initialization.sourceURL, templateValues), - range: initialization.range - }); - const segments = parseTemplateInfo(attributes, segmentTimeline); - return segments.map(segment => { - templateValues.Number = segment.number; - templateValues.Time = segment.time; - const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2 - // - if timescale isn't present on any level, default to 1. - - const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 - - const presentationTimeOffset = attributes.presentationTimeOffset || 0; - const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is - // calculated in mpd-parser prior to this, so it's assumed to be available. - attributes.periodStart + (segment.time - presentationTimeOffset) / timescale; - const map = { - uri, - timeline: segment.timeline, - duration: segment.duration, - resolvedUri: (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(attributes.baseUrl || '', uri), - map: mapSegment, - number: segment.number, - presentationTime - }; - return map; - }); -}; - -/** - * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14) - * to an object that matches the output of a segment in videojs/mpd-parser - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object} segmentUrl - * node to translate into a segment object - * @return {Object} translated segment object - */ - -const SegmentURLToSegmentObject = (attributes, segmentUrl) => { - const { - baseUrl, - initialization = {} - } = attributes; - const initSegment = urlTypeToSegment({ - baseUrl, - source: initialization.sourceURL, - range: initialization.range - }); - const segment = urlTypeToSegment({ - baseUrl, - source: segmentUrl.media, - range: segmentUrl.mediaRange - }); - segment.map = initSegment; - return segment; -}; -/** - * Generates a list of segments using information provided by the SegmentList element - * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each - * node should be translated into segment. - * - * @param {Object} attributes - * Object containing all inherited attributes from parent elements with attribute - * names as keys - * @param {Object[]|undefined} segmentTimeline - * List of objects representing the attributes of each S element contained within - * the SegmentTimeline element - * @return {Object.} list of segments - */ - - -const segmentsFromList = (attributes, segmentTimeline) => { - const { - duration, - segmentUrls = [], - periodStart - } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR - // if both SegmentTimeline and @duration are defined, it is outside of spec. - - if (!duration && !segmentTimeline || duration && segmentTimeline) { - throw new Error(errors.SEGMENT_TIME_UNSPECIFIED); - } - - const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject)); - let segmentTimeInfo; - - if (duration) { - segmentTimeInfo = parseByDuration(attributes); - } - - if (segmentTimeline) { - segmentTimeInfo = parseByTimeline(attributes, segmentTimeline); - } - - const segments = segmentTimeInfo.map((segmentTime, index) => { - if (segmentUrlMap[index]) { - const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2 - // - if timescale isn't present on any level, default to 1. - - const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0 - - const presentationTimeOffset = attributes.presentationTimeOffset || 0; - segment.timeline = segmentTime.timeline; - segment.duration = segmentTime.duration; - segment.number = segmentTime.number; - segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale; - return segment; - } // Since we're mapping we should get rid of any blank segments (in case - // the given SegmentTimeline is handling for more elements than we have - // SegmentURLs for). - - }).filter(segment => segment); - return segments; -}; - -const generateSegments = ({ - attributes, - segmentInfo -}) => { - let segmentAttributes; - let segmentsFn; - - if (segmentInfo.template) { - segmentsFn = segmentsFromTemplate; - segmentAttributes = merge(attributes, segmentInfo.template); - } else if (segmentInfo.base) { - segmentsFn = segmentsFromBase; - segmentAttributes = merge(attributes, segmentInfo.base); - } else if (segmentInfo.list) { - segmentsFn = segmentsFromList; - segmentAttributes = merge(attributes, segmentInfo.list); - } - - const segmentsInfo = { - attributes - }; - - if (!segmentsFn) { - return segmentsInfo; - } - - const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which - // must be in seconds. Since we've generated the segment list, we no longer need - // @duration to be in @timescale units, so we can convert it here. - - if (segmentAttributes.duration) { - const { - duration, - timescale = 1 - } = segmentAttributes; - segmentAttributes.duration = duration / timescale; - } else if (segments.length) { - // if there is no @duration attribute, use the largest segment duration as - // as target duration - segmentAttributes.duration = segments.reduce((max, segment) => { - return Math.max(max, Math.ceil(segment.duration)); - }, 0); - } else { - segmentAttributes.duration = 0; - } - - segmentsInfo.attributes = segmentAttributes; - segmentsInfo.segments = segments; // This is a sidx box without actual segment information - - if (segmentInfo.base && segmentAttributes.indexRange) { - segmentsInfo.sidx = segments[0]; - segmentsInfo.segments = []; - } - - return segmentsInfo; -}; -const toPlaylists = representations => representations.map(generateSegments); - -const findChildren = (element, name) => from(element.childNodes).filter(({ - tagName -}) => tagName === name); -const getContent = element => element.textContent.trim(); - -/** - * Converts the provided string that may contain a division operation to a number. - * - * @param {string} value - the provided string value - * - * @return {number} the parsed string value - */ -const parseDivisionValue = value => { - return parseFloat(value.split('/').reduce((prev, current) => prev / current)); -}; - -const parseDuration = str => { - const SECONDS_IN_YEAR = 365 * 24 * 60 * 60; - const SECONDS_IN_MONTH = 30 * 24 * 60 * 60; - const SECONDS_IN_DAY = 24 * 60 * 60; - const SECONDS_IN_HOUR = 60 * 60; - const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S - - const durationRegex = /P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/; - const match = durationRegex.exec(str); - - if (!match) { - return 0; - } - - const [year, month, day, hour, minute, second] = match.slice(1); - return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0); -}; -const parseDate = str => { - // Date format without timezone according to ISO 8601 - // YYY-MM-DDThh:mm:ss.ssssss - const dateRegex = /^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is - // expressed by ending with 'Z' - - if (dateRegex.test(str)) { - str += 'Z'; - } - - return Date.parse(str); -}; - -const parsers = { - /** - * Specifies the duration of the entire Media Presentation. Format is a duration string - * as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - mediaPresentationDuration(value) { - return parseDuration(value); - }, - - /** - * Specifies the Segment availability start time for all Segments referred to in this - * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability - * time. Format is a date string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The date as seconds from unix epoch - */ - availabilityStartTime(value) { - return parseDate(value) / 1000; - }, - - /** - * Specifies the smallest period between potential changes to the MPD. Format is a - * duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - minimumUpdatePeriod(value) { - return parseDuration(value); - }, - - /** - * Specifies the suggested presentation delay. Format is a - * duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - suggestedPresentationDelay(value) { - return parseDuration(value); - }, - - /** - * specifices the type of mpd. Can be either "static" or "dynamic" - * - * @param {string} value - * value of attribute as a string - * - * @return {string} - * The type as a string - */ - type(value) { - return value; - }, - - /** - * Specifies the duration of the smallest time shifting buffer for any Representation - * in the MPD. Format is a duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - timeShiftBufferDepth(value) { - return parseDuration(value); - }, - - /** - * Specifies the PeriodStart time of the Period relative to the availabilityStarttime. - * Format is a duration string as specified in ISO 8601 - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The duration in seconds - */ - start(value) { - return parseDuration(value); - }, - - /** - * Specifies the width of the visual presentation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed width - */ - width(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the height of the visual presentation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed height - */ - height(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the bitrate of the representation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed bandwidth - */ - bandwidth(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the frame rate of the representation - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed frame rate - */ - frameRate(value) { - return parseDivisionValue(value); - }, - - /** - * Specifies the number of the first Media Segment in this Representation in the Period - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed number - */ - startNumber(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the timescale in units per seconds - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed timescale - */ - timescale(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the presentationTimeOffset. - * - * @param {string} value - * value of the attribute as a string - * - * @return {number} - * The parsed presentationTimeOffset - */ - presentationTimeOffset(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the constant approximate Segment duration - * NOTE: The element also contains an @duration attribute. This duration - * specifies the duration of the Period. This attribute is currently not - * supported by the rest of the parser, however we still check for it to prevent - * errors. - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed duration - */ - duration(value) { - const parsedValue = parseInt(value, 10); - - if (isNaN(parsedValue)) { - return parseDuration(value); - } - - return parsedValue; - }, - - /** - * Specifies the Segment duration, in units of the value of the @timescale. - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed duration - */ - d(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the MPD start time, in @timescale units, the first Segment in the series - * starts relative to the beginning of the Period - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed time - */ - t(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the repeat count of the number of following contiguous Segments with the - * same duration expressed by the value of @d - * - * @param {string} value - * value of attribute as a string - * @return {number} - * The parsed number - */ - r(value) { - return parseInt(value, 10); - }, - - /** - * Specifies the presentationTime. - * - * @param {string} value - * value of the attribute as a string - * - * @return {number} - * The parsed presentationTime - */ - presentationTime(value) { - return parseInt(value, 10); - }, - - /** - * Default parser for all other attributes. Acts as a no-op and just returns the value - * as a string - * - * @param {string} value - * value of attribute as a string - * @return {string} - * Unparsed value - */ - DEFAULT(value) { - return value; - } - -}; -/** - * Gets all the attributes and values of the provided node, parses attributes with known - * types, and returns an object with attribute names mapped to values. - * - * @param {Node} el - * The node to parse attributes from - * @return {Object} - * Object with all attributes of el parsed - */ - -const parseAttributes = el => { - if (!(el && el.attributes)) { - return {}; - } - - return from(el.attributes).reduce((a, e) => { - const parseFn = parsers[e.name] || parsers.DEFAULT; - a[e.name] = parseFn(e.value); - return a; - }, {}); -}; - -const keySystemsMap = { - 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey', - 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha', - 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready', - 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime' -}; -/** - * Builds a list of urls that is the product of the reference urls and BaseURL values - * - * @param {Object[]} references - * List of objects containing the reference URL as well as its attributes - * @param {Node[]} baseUrlElements - * List of BaseURL nodes from the mpd - * @return {Object[]} - * List of objects with resolved urls and attributes - */ - -const buildBaseUrls = (references, baseUrlElements) => { - if (!baseUrlElements.length) { - return references; - } - - return flatten(references.map(function (reference) { - return baseUrlElements.map(function (baseUrlElement) { - const initialBaseUrl = getContent(baseUrlElement); - const resolvedBaseUrl = (0,_videojs_vhs_utils_es_resolve_url__WEBPACK_IMPORTED_MODULE_0__["default"])(reference.baseUrl, initialBaseUrl); - const finalBaseUrl = merge(parseAttributes(baseUrlElement), { - baseUrl: resolvedBaseUrl - }); // If the URL is resolved, we want to get the serviceLocation from the reference - // assuming there is no serviceLocation on the initialBaseUrl - - if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) { - finalBaseUrl.serviceLocation = reference.serviceLocation; - } - - return finalBaseUrl; - }); - })); -}; -/** - * Contains all Segment information for its containing AdaptationSet - * - * @typedef {Object} SegmentInformation - * @property {Object|undefined} template - * Contains the attributes for the SegmentTemplate node - * @property {Object[]|undefined} segmentTimeline - * Contains a list of atrributes for each S node within the SegmentTimeline node - * @property {Object|undefined} list - * Contains the attributes for the SegmentList node - * @property {Object|undefined} base - * Contains the attributes for the SegmentBase node - */ - -/** - * Returns all available Segment information contained within the AdaptationSet node - * - * @param {Node} adaptationSet - * The AdaptationSet node to get Segment information from - * @return {SegmentInformation} - * The Segment information contained within the provided AdaptationSet - */ - -const getSegmentInformation = adaptationSet => { - const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0]; - const segmentList = findChildren(adaptationSet, 'SegmentList')[0]; - const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({ - tag: 'SegmentURL' - }, parseAttributes(s))); - const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0]; - const segmentTimelineParentNode = segmentList || segmentTemplate; - const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0]; - const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate; - const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both - // @initialization and an node. @initialization can be templated, - // while the node can have a url and range specified. If the has - // both @initialization and an subelement we opt to override with - // the node, as this interaction is not defined in the spec. - - const template = segmentTemplate && parseAttributes(segmentTemplate); - - if (template && segmentInitialization) { - template.initialization = segmentInitialization && parseAttributes(segmentInitialization); - } else if (template && template.initialization) { - // If it is @initialization we convert it to an object since this is the format that - // later functions will rely on for the initialization segment. This is only valid - // for - template.initialization = { - sourceURL: template.initialization - }; - } - - const segmentInfo = { - template, - segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)), - list: segmentList && merge(parseAttributes(segmentList), { - segmentUrls, - initialization: parseAttributes(segmentInitialization) - }), - base: segmentBase && merge(parseAttributes(segmentBase), { - initialization: parseAttributes(segmentInitialization) - }) - }; - Object.keys(segmentInfo).forEach(key => { - if (!segmentInfo[key]) { - delete segmentInfo[key]; - } - }); - return segmentInfo; -}; -/** - * Contains Segment information and attributes needed to construct a Playlist object - * from a Representation - * - * @typedef {Object} RepresentationInformation - * @property {SegmentInformation} segmentInfo - * Segment information for this Representation - * @property {Object} attributes - * Inherited attributes for this Representation - */ - -/** - * Maps a Representation node to an object containing Segment information and attributes - * - * @name inheritBaseUrlsCallback - * @function - * @param {Node} representation - * Representation node from the mpd - * @return {RepresentationInformation} - * Representation information needed to construct a Playlist object - */ - -/** - * Returns a callback for Array.prototype.map for mapping Representation nodes to - * Segment information and attributes using inherited BaseURL nodes. - * - * @param {Object} adaptationSetAttributes - * Contains attributes inherited by the AdaptationSet - * @param {Object[]} adaptationSetBaseUrls - * List of objects containing resolved base URLs and attributes - * inherited by the AdaptationSet - * @param {SegmentInformation} adaptationSetSegmentInfo - * Contains Segment information for the AdaptationSet - * @return {inheritBaseUrlsCallback} - * Callback map function - */ - -const inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => { - const repBaseUrlElements = findChildren(representation, 'BaseURL'); - const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements); - const attributes = merge(adaptationSetAttributes, parseAttributes(representation)); - const representationSegmentInfo = getSegmentInformation(representation); - return repBaseUrls.map(baseUrl => { - return { - segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo), - attributes: merge(attributes, baseUrl) - }; - }); -}; -/** - * Tranforms a series of content protection nodes to - * an object containing pssh data by key system - * - * @param {Node[]} contentProtectionNodes - * Content protection nodes - * @return {Object} - * Object containing pssh data by key system - */ - -const generateKeySystemInformation = contentProtectionNodes => { - return contentProtectionNodes.reduce((acc, node) => { - const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated - // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system - // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do - // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one). - - if (attributes.schemeIdUri) { - attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase(); - } - - const keySystem = keySystemsMap[attributes.schemeIdUri]; - - if (keySystem) { - acc[keySystem] = { - attributes - }; - const psshNode = findChildren(node, 'cenc:pssh')[0]; - - if (psshNode) { - const pssh = getContent(psshNode); - acc[keySystem].pssh = pssh && (0,_videojs_vhs_utils_es_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_3__["default"])(pssh); - } - } - - return acc; - }, {}); -}; // defined in ANSI_SCTE 214-1 2016 - - -const parseCaptionServiceMetadata = service => { - // 608 captions - if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') { - const values = typeof service.value !== 'string' ? [] : service.value.split(';'); - return values.map(value => { - let channel; - let language; // default language to value - - language = value; - - if (/^CC\d=/.test(value)) { - [channel, language] = value.split('='); - } else if (/^CC\d$/.test(value)) { - channel = value; - } - - return { - channel, - language - }; - }); - } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') { - const values = typeof service.value !== 'string' ? [] : service.value.split(';'); - return values.map(value => { - const flags = { - // service or channel number 1-63 - 'channel': undefined, - // language is a 3ALPHA per ISO 639.2/B - // field is required - 'language': undefined, - // BIT 1/0 or ? - // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown - 'aspectRatio': 1, - // BIT 1/0 - // easy reader flag indicated the text is tailed to the needs of beginning readers - // default 0, or off - 'easyReader': 0, - // BIT 1/0 - // If 3d metadata is present (CEA-708.1) then 1 - // default 0 - '3D': 0 - }; - - if (/=/.test(value)) { - const [channel, opts = ''] = value.split('='); - flags.channel = channel; - flags.language = value; - opts.split(',').forEach(opt => { - const [name, val] = opt.split(':'); - - if (name === 'lang') { - flags.language = val; // er for easyReadery - } else if (name === 'er') { - flags.easyReader = Number(val); // war for wide aspect ratio - } else if (name === 'war') { - flags.aspectRatio = Number(val); - } else if (name === '3D') { - flags['3D'] = Number(val); - } - }); - } else { - flags.language = value; - } - - if (flags.channel) { - flags.channel = 'SERVICE' + flags.channel; - } - - return flags; - }); - } -}; -/** - * A map callback that will parse all event stream data for a collection of periods - * DASH ISO_IEC_23009 5.10.2.2 - * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing - * - * @param {PeriodInformation} period object containing necessary period information - * @return a collection of parsed eventstream event objects - */ - -const toEventStream = period => { - // get and flatten all EventStreams tags and parse attributes and children - return flatten(findChildren(period.node, 'EventStream').map(eventStream => { - const eventStreamAttributes = parseAttributes(eventStream); - const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects - - return findChildren(eventStream, 'Event').map(event => { - const eventAttributes = parseAttributes(event); - const presentationTime = eventAttributes.presentationTime || 0; - const timescale = eventStreamAttributes.timescale || 1; - const duration = eventAttributes.duration || 0; - const start = presentationTime / timescale + period.attributes.start; - return { - schemeIdUri, - value: eventStreamAttributes.value, - id: eventAttributes.id, - start, - end: start + duration / timescale, - messageData: getContent(event) || eventAttributes.messageData, - contentEncoding: eventStreamAttributes.contentEncoding, - presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0 - }; - }); - })); -}; -/** - * Maps an AdaptationSet node to a list of Representation information objects - * - * @name toRepresentationsCallback - * @function - * @param {Node} adaptationSet - * AdaptationSet node from the mpd - * @return {RepresentationInformation[]} - * List of objects containing Representaion information - */ - -/** - * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of - * Representation information objects - * - * @param {Object} periodAttributes - * Contains attributes inherited by the Period - * @param {Object[]} periodBaseUrls - * Contains list of objects with resolved base urls and attributes - * inherited by the Period - * @param {string[]} periodSegmentInfo - * Contains Segment Information at the period level - * @return {toRepresentationsCallback} - * Callback map function - */ - -const toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => { - const adaptationSetAttributes = parseAttributes(adaptationSet); - const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL')); - const role = findChildren(adaptationSet, 'Role')[0]; - const roleAttributes = { - role: parseAttributes(role) - }; - let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes); - const accessibility = findChildren(adaptationSet, 'Accessibility')[0]; - const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility)); - - if (captionServices) { - attrs = merge(attrs, { - captionServices - }); - } - - const label = findChildren(adaptationSet, 'Label')[0]; - - if (label && label.childNodes.length) { - const labelVal = label.childNodes[0].nodeValue.trim(); - attrs = merge(attrs, { - label: labelVal - }); - } - - const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection')); - - if (Object.keys(contentProtection).length) { - attrs = merge(attrs, { - contentProtection - }); - } - - const segmentInfo = getSegmentInformation(adaptationSet); - const representations = findChildren(adaptationSet, 'Representation'); - const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo); - return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo))); -}; -/** - * Contains all period information for mapping nodes onto adaptation sets. - * - * @typedef {Object} PeriodInformation - * @property {Node} period.node - * Period node from the mpd - * @property {Object} period.attributes - * Parsed period attributes from node plus any added - */ - -/** - * Maps a PeriodInformation object to a list of Representation information objects for all - * AdaptationSet nodes contained within the Period. - * - * @name toAdaptationSetsCallback - * @function - * @param {PeriodInformation} period - * Period object containing necessary period information - * @param {number} periodStart - * Start time of the Period within the mpd - * @return {RepresentationInformation[]} - * List of objects containing Representaion information - */ - -/** - * Returns a callback for Array.prototype.map for mapping Period nodes to a list of - * Representation information objects - * - * @param {Object} mpdAttributes - * Contains attributes inherited by the mpd - * @param {Object[]} mpdBaseUrls - * Contains list of objects with resolved base urls and attributes - * inherited by the mpd - * @return {toAdaptationSetsCallback} - * Callback map function - */ - -const toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => { - const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL')); - const periodAttributes = merge(mpdAttributes, { - periodStart: period.attributes.start - }); - - if (typeof period.attributes.duration === 'number') { - periodAttributes.periodDuration = period.attributes.duration; - } - - const adaptationSets = findChildren(period.node, 'AdaptationSet'); - const periodSegmentInfo = getSegmentInformation(period.node); - return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo))); -}; -/** - * Tranforms an array of content steering nodes into an object - * containing CDN content steering information from the MPD manifest. - * - * For more information on the DASH spec for Content Steering parsing, see: - * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf - * - * @param {Node[]} contentSteeringNodes - * Content steering nodes - * @param {Function} eventHandler - * The event handler passed into the parser options to handle warnings - * @return {Object} - * Object containing content steering data - */ - -const generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => { - // If there are more than one ContentSteering tags, throw an error - if (contentSteeringNodes.length > 1) { - eventHandler({ - type: 'warn', - message: 'The MPD manifest should contain no more than one ContentSteering tag' - }); - } // Return a null value if there are no ContentSteering tags - - - if (!contentSteeringNodes.length) { - return null; - } - - const infoFromContentSteeringTag = merge({ - serverURL: getContent(contentSteeringNodes[0]) - }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value - // to `false` if it doesn't exist - - infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true'; - return infoFromContentSteeringTag; -}; -/** - * Gets Period@start property for a given period. - * - * @param {Object} options - * Options object - * @param {Object} options.attributes - * Period attributes - * @param {Object} [options.priorPeriodAttributes] - * Prior period attributes (if prior period is available) - * @param {string} options.mpdType - * The MPD@type these periods came from - * @return {number|null} - * The period start, or null if it's an early available period or error - */ - -const getPeriodStart = ({ - attributes, - priorPeriodAttributes, - mpdType -}) => { - // Summary of period start time calculation from DASH spec section 5.3.2.1 - // - // A period's start is the first period's start + time elapsed after playing all - // prior periods to this one. Periods continue one after the other in time (without - // gaps) until the end of the presentation. - // - // The value of Period@start should be: - // 1. if Period@start is present: value of Period@start - // 2. if previous period exists and it has @duration: previous Period@start + - // previous Period@duration - // 3. if this is first period and MPD@type is 'static': 0 - // 4. in all other cases, consider the period an "early available period" (note: not - // currently supported) - // (1) - if (typeof attributes.start === 'number') { - return attributes.start; - } // (2) - - - if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') { - return priorPeriodAttributes.start + priorPeriodAttributes.duration; - } // (3) - - - if (!priorPeriodAttributes && mpdType === 'static') { - return 0; - } // (4) - // There is currently no logic for calculating the Period@start value if there is - // no Period@start or prior Period@start and Period@duration available. This is not made - // explicit by the DASH interop guidelines or the DASH spec, however, since there's - // nothing about any other resolution strategies, it's implied. Thus, this case should - // be considered an early available period, or error, and null should suffice for both - // of those cases. - - - return null; -}; -/** - * Traverses the mpd xml tree to generate a list of Representation information objects - * that have inherited attributes from parent nodes - * - * @param {Node} mpd - * The root node of the mpd - * @param {Object} options - * Available options for inheritAttributes - * @param {string} options.manifestUri - * The uri source of the mpd - * @param {number} options.NOW - * Current time per DASH IOP. Default is current time in ms since epoch - * @param {number} options.clientOffset - * Client time difference from NOW (in milliseconds) - * @return {RepresentationInformation[]} - * List of objects containing Representation information - */ - -const inheritAttributes = (mpd, options = {}) => { - const { - manifestUri = '', - NOW = Date.now(), - clientOffset = 0, - // TODO: For now, we are expecting an eventHandler callback function - // to be passed into the mpd parser as an option. - // In the future, we should enable stream parsing by using the Stream class from vhs-utils. - // This will support new features including a standardized event handler. - // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing. - // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9 - eventHandler = function () {} - } = options; - const periodNodes = findChildren(mpd, 'Period'); - - if (!periodNodes.length) { - throw new Error(errors.INVALID_NUMBER_OF_PERIOD); - } - - const locations = findChildren(mpd, 'Location'); - const mpdAttributes = parseAttributes(mpd); - const mpdBaseUrls = buildBaseUrls([{ - baseUrl: manifestUri - }], findChildren(mpd, 'BaseURL')); - const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'. - - mpdAttributes.type = mpdAttributes.type || 'static'; - mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0; - mpdAttributes.NOW = NOW; - mpdAttributes.clientOffset = clientOffset; - - if (locations.length) { - mpdAttributes.locations = locations.map(getContent); - } - - const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to - // adding properties that require looking at prior periods is to parse attributes and add - // missing ones before toAdaptationSets is called. If more such properties are added, it - // may be better to refactor toAdaptationSets. - - periodNodes.forEach((node, index) => { - const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary - // for this period. - - const priorPeriod = periods[index - 1]; - attributes.start = getPeriodStart({ - attributes, - priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null, - mpdType: mpdAttributes.type - }); - periods.push({ - node, - attributes - }); - }); - return { - locations: mpdAttributes.locations, - contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler), - // TODO: There are occurences where this `representationInfo` array contains undesired - // duplicates. This generally occurs when there are multiple BaseURL nodes that are - // direct children of the MPD node. When we attempt to resolve URLs from a combination of the - // parent BaseURL and a child BaseURL, and the value does not resolve, - // we end up returning the child BaseURL multiple times. - // We need to determine a way to remove these duplicates in a safe way. - // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527 - representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))), - eventStream: flatten(periods.map(toEventStream)) - }; -}; - -const stringToMpdXml = manifestString => { - if (manifestString === '') { - throw new Error(errors.DASH_EMPTY_MANIFEST); - } - - const parser = new _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_4__.DOMParser(); - let xml; - let mpd; - - try { - xml = parser.parseFromString(manifestString, 'application/xml'); - mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null; - } catch (e) {// ie 11 throws on invalid xml - } - - if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) { - throw new Error(errors.DASH_INVALID_XML); - } - - return mpd; -}; - -/** - * Parses the manifest for a UTCTiming node, returning the nodes attributes if found - * - * @param {string} mpd - * XML string of the MPD manifest - * @return {Object|null} - * Attributes of UTCTiming node specified in the manifest. Null if none found - */ - -const parseUTCTimingScheme = mpd => { - const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0]; - - if (!UTCTimingNode) { - return null; - } - - const attributes = parseAttributes(UTCTimingNode); - - switch (attributes.schemeIdUri) { - case 'urn:mpeg:dash:utc:http-head:2014': - case 'urn:mpeg:dash:utc:http-head:2012': - attributes.method = 'HEAD'; - break; - - case 'urn:mpeg:dash:utc:http-xsdate:2014': - case 'urn:mpeg:dash:utc:http-iso:2014': - case 'urn:mpeg:dash:utc:http-xsdate:2012': - case 'urn:mpeg:dash:utc:http-iso:2012': - attributes.method = 'GET'; - break; - - case 'urn:mpeg:dash:utc:direct:2014': - case 'urn:mpeg:dash:utc:direct:2012': - attributes.method = 'DIRECT'; - attributes.value = Date.parse(attributes.value); - break; - - case 'urn:mpeg:dash:utc:http-ntp:2014': - case 'urn:mpeg:dash:utc:ntp:2014': - case 'urn:mpeg:dash:utc:sntp:2014': - default: - throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME); - } - - return attributes; -}; - -const VERSION = version; -/* - * Given a DASH manifest string and options, parses the DASH manifest into an object in the - * form outputed by m3u8-parser and accepted by videojs/http-streaming. - * - * For live DASH manifests, if `previousManifest` is provided in options, then the newly - * parsed DASH manifest will have its media sequence and discontinuity sequence values - * updated to reflect its position relative to the prior manifest. - * - * @param {string} manifestString - the DASH manifest as a string - * @param {options} [options] - any options - * - * @return {Object} the manifest object - */ - -const parse = (manifestString, options = {}) => { - const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options); - const playlists = toPlaylists(parsedManifestInfo.representationInfo); - return toM3u8({ - dashPlaylists: playlists, - locations: parsedManifestInfo.locations, - contentSteering: parsedManifestInfo.contentSteeringInfo, - sidxMapping: options.sidxMapping, - previousManifest: options.previousManifest, - eventStream: parsedManifestInfo.eventStream - }); -}; -/** - * Parses the manifest for a UTCTiming node, returning the nodes attributes if found - * - * @param {string} manifestString - * XML string of the MPD manifest - * @return {Object|null} - * Attributes of UTCTiming node specified in the manifest. Null if none found - */ - - -const parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString)); - - - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js": -/*!********************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes. - * - * Works with anything that has a `length` property and index access properties, including NodeList. - * - * @template {unknown} T - * @param {Array | ({length:number, [number]: T})} list - * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate - * @param {Partial>?} ac `Array.prototype` by default, - * allows injecting a custom implementation in tests - * @returns {T | undefined} - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find - * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find - */ -function find(list, predicate, ac) { - if (ac === undefined) { - ac = Array.prototype; - } - if (list && typeof ac.find === 'function') { - return ac.find.call(list, predicate); - } - for (var i = 0; i < list.length; i++) { - if (Object.prototype.hasOwnProperty.call(list, i)) { - var item = list[i]; - if (predicate.call(undefined, item, i, list)) { - return item; - } - } - } -} - -/** - * "Shallow freezes" an object to render it immutable. - * Uses `Object.freeze` if available, - * otherwise the immutability is only in the type. - * - * Is used to create "enum like" objects. - * - * @template T - * @param {T} object the object to freeze - * @param {Pick = Object} oc `Object` by default, - * allows to inject custom object constructor for tests - * @returns {Readonly} - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze - */ -function freeze(object, oc) { - if (oc === undefined) { - oc = Object - } - return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object -} - -/** - * Since we can not rely on `Object.assign` we provide a simplified version - * that is sufficient for our needs. - * - * @param {Object} target - * @param {Object | null | undefined} source - * - * @returns {Object} target - * @throws TypeError if target is not an object - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign - */ -function assign(target, source) { - if (target === null || typeof target !== 'object') { - throw new TypeError('target is not an object') - } - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - return target -} - -/** - * All mime types that are allowed as input to `DOMParser.parseFromString` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec - * @see DOMParser.prototype.parseFromString - */ -var MIME_TYPE = freeze({ - /** - * `text/html`, the only mime type that triggers treating an XML document as HTML. - * - * @see DOMParser.SupportedType.isHTML - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec - */ - HTML: 'text/html', - - /** - * Helper method to check a mime type if it indicates an HTML document - * - * @param {string} [value] - * @returns {boolean} - * - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ - isHTML: function (value) { - return value === MIME_TYPE.HTML - }, - - /** - * `application/xml`, the standard mime type for XML documents. - * - * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration - * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_APPLICATION: 'application/xml', - - /** - * `text/html`, an alias for `application/xml`. - * - * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 - * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_TEXT: 'text/xml', - - /** - * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, - * but is parsed as an XML document. - * - * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec - * @see https://en.wikipedia.org/wiki/XHTML Wikipedia - */ - XML_XHTML_APPLICATION: 'application/xhtml+xml', - - /** - * `image/svg+xml`, - * - * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration - * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 - * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia - */ - XML_SVG_IMAGE: 'image/svg+xml', -}) - -/** - * Namespaces that are used in this code base. - * - * @see http://www.w3.org/TR/REC-xml-names - */ -var NAMESPACE = freeze({ - /** - * The XHTML namespace. - * - * @see http://www.w3.org/1999/xhtml - */ - HTML: 'http://www.w3.org/1999/xhtml', - - /** - * Checks if `uri` equals `NAMESPACE.HTML`. - * - * @param {string} [uri] - * - * @see NAMESPACE.HTML - */ - isHTML: function (uri) { - return uri === NAMESPACE.HTML - }, - - /** - * The SVG namespace. - * - * @see http://www.w3.org/2000/svg - */ - SVG: 'http://www.w3.org/2000/svg', - - /** - * The `xml:` namespace. - * - * @see http://www.w3.org/XML/1998/namespace - */ - XML: 'http://www.w3.org/XML/1998/namespace', - - /** - * The `xmlns:` namespace - * - * @see https://www.w3.org/2000/xmlns/ - */ - XMLNS: 'http://www.w3.org/2000/xmlns/', -}) - -exports.assign = assign; -exports.find = find; -exports.freeze = freeze; -exports.MIME_TYPE = MIME_TYPE; -exports.NAMESPACE = NAMESPACE; - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); -var dom = __webpack_require__(/*! ./dom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js") -var entities = __webpack_require__(/*! ./entities */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js"); -var sax = __webpack_require__(/*! ./sax */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js"); - -var DOMImplementation = dom.DOMImplementation; - -var NAMESPACE = conventions.NAMESPACE; - -var ParseError = sax.ParseError; -var XMLReader = sax.XMLReader; - -/** - * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends: - * - * > XML parsed entities are often stored in computer files which, - * > for editing convenience, are organized into lines. - * > These lines are typically separated by some combination - * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA). - * > - * > To simplify the tasks of applications, the XML processor must behave - * > as if it normalized all line breaks in external parsed entities (including the document entity) - * > on input, before parsing, by translating all of the following to a single #xA character: - * > - * > 1. the two-character sequence #xD #xA - * > 2. the two-character sequence #xD #x85 - * > 3. the single character #x85 - * > 4. the single character #x2028 - * > 5. any #xD character that is not immediately followed by #xA or #x85. - * - * @param {string} input - * @returns {string} - */ -function normalizeLineEndings(input) { - return input - .replace(/\r[\n\u0085]/g, '\n') - .replace(/[\r\u0085\u2028]/g, '\n') -} - -/** - * @typedef Locator - * @property {number} [columnNumber] - * @property {number} [lineNumber] - */ - -/** - * @typedef DOMParserOptions - * @property {DOMHandler} [domBuilder] - * @property {Function} [errorHandler] - * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing - * defaults to `normalizeLineEndings` - * @property {Locator} [locator] - * @property {Record} [xmlns] - * - * @see normalizeLineEndings - */ - -/** - * The DOMParser interface provides the ability to parse XML or HTML source code - * from a string into a DOM `Document`. - * - * _xmldom is different from the spec in that it allows an `options` parameter, - * to override the default behavior._ - * - * @param {DOMParserOptions} [options] - * @constructor - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization - */ -function DOMParser(options){ - this.options = options ||{locator:{}}; -} - -DOMParser.prototype.parseFromString = function(source,mimeType){ - var options = this.options; - var sax = new XMLReader(); - var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler - var errorHandler = options.errorHandler; - var locator = options.locator; - var defaultNSMap = options.xmlns||{}; - var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1; - var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; - if(locator){ - domBuilder.setDocumentLocator(locator) - } - - sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); - sax.domBuilder = options.domBuilder || domBuilder; - if(isHTML){ - defaultNSMap[''] = NAMESPACE.HTML; - } - defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; - var normalize = options.normalizeLineEndings || normalizeLineEndings; - if (source && typeof source === 'string') { - sax.parse( - normalize(source), - defaultNSMap, - entityMap - ) - } else { - sax.errorHandler.error('invalid doc source') - } - return domBuilder.doc; -} -function buildErrorHandler(errorImpl,domBuilder,locator){ - if(!errorImpl){ - if(domBuilder instanceof DOMHandler){ - return domBuilder; - } - errorImpl = domBuilder ; - } - var errorHandler = {} - var isCallback = errorImpl instanceof Function; - locator = locator||{} - function build(key){ - var fn = errorImpl[key]; - if(!fn && isCallback){ - fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; - } - errorHandler[key] = fn && function(msg){ - fn('[xmldom '+key+']\t'+msg+_locator(locator)); - }||function(){}; - } - build('warning'); - build('error'); - build('fatalError'); - return errorHandler; -} - -//console.log('#\n\n\n\n\n\n\n####') -/** - * +ContentHandler+ErrorHandler - * +LexicalHandler+EntityResolver2 - * -DeclHandler-DTDHandler - * - * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler - * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 - * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html - */ -function DOMHandler() { - this.cdata = false; -} -function position(locator,node){ - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; -} -/** - * @see org.xml.sax.ContentHandler#startDocument - * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html - */ -DOMHandler.prototype = { - startDocument : function() { - this.doc = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.doc.documentURI = this.locator.systemId; - } - }, - startElement:function(namespaceURI, localName, qName, attrs) { - var doc = this.doc; - var el = doc.createElementNS(namespaceURI, qName||localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - - this.locator && position(this.locator,el) - for (var i = 0 ; i < len; i++) { - var namespaceURI = attrs.getURI(i); - var value = attrs.getValue(i); - var qName = attrs.getQName(i); - var attr = doc.createAttributeNS(namespaceURI, qName); - this.locator &&position(attrs.getLocator(i),attr); - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr) - } - }, - endElement:function(namespaceURI, localName, qName) { - var current = this.currentElement - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping:function(prefix, uri) { - }, - endPrefixMapping:function(prefix) { - }, - processingInstruction:function(target, data) { - var ins = this.doc.createProcessingInstruction(target, data); - this.locator && position(this.locator,ins) - appendElement(this, ins); - }, - ignorableWhitespace:function(ch, start, length) { - }, - characters:function(chars, start, length) { - chars = _toString.apply(this,arguments) - //console.log(chars) - if(chars){ - if (this.cdata) { - var charNode = this.doc.createCDATASection(chars); - } else { - var charNode = this.doc.createTextNode(chars); - } - if(this.currentElement){ - this.currentElement.appendChild(charNode); - }else if(/^\s*$/.test(chars)){ - this.doc.appendChild(charNode); - //process xml - } - this.locator && position(this.locator,charNode) - } - }, - skippedEntity:function(name) { - }, - endDocument:function() { - this.doc.normalize(); - }, - setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ - locator.lineNumber = 0; - } - }, - //LexicalHandler - comment:function(chars, start, length) { - chars = _toString.apply(this,arguments) - var comm = this.doc.createComment(chars); - this.locator && position(this.locator,comm) - appendElement(this, comm); - }, - - startCDATA:function() { - //used in characters() methods - this.cdata = true; - }, - endCDATA:function() { - this.cdata = false; - }, - - startDTD:function(name, publicId, systemId) { - var impl = this.doc.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator,dt) - appendElement(this, dt); - this.doc.doctype = dt; - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning:function(error) { - console.warn('[xmldom warning]\t'+error,_locator(this.locator)); - }, - error:function(error) { - console.error('[xmldom error]\t'+error,_locator(this.locator)); - }, - fatalError:function(error) { - throw new ParseError(error, this.locator); - } -} -function _locator(l){ - if(l){ - return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' - } -} -function _toString(chars,start,length){ - if(typeof chars == 'string'){ - return chars.substr(start,length) - }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") - if(chars.length >= start+length || start){ - return new java.lang.String(chars,start,length)+''; - } - return chars; - } -} - -/* - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html - * used method of org.xml.sax.ext.LexicalHandler: - * #comment(chars, start, length) - * #startCDATA() - * #endCDATA() - * #startDTD(name, publicId, systemId) - * - * - * IGNORED method of org.xml.sax.ext.LexicalHandler: - * #endDTD() - * #startEntity(name) - * #endEntity(name) - * - * - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html - * IGNORED method of org.xml.sax.ext.DeclHandler - * #attributeDecl(eName, aName, type, mode, value) - * #elementDecl(name, model) - * #externalEntityDecl(name, publicId, systemId) - * #internalEntityDecl(name, value) - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html - * IGNORED method of org.xml.sax.EntityResolver2 - * #resolveEntity(String name,String publicId,String baseURI,String systemId) - * #resolveEntity(publicId, systemId) - * #getExternalSubset(name, baseURI) - * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html - * IGNORED method of org.xml.sax.DTDHandler - * #notationDecl(name, publicId, systemId) {}; - * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; - */ -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ - DOMHandler.prototype[key] = function(){return null} -}) - -/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ -function appendElement (hander,node) { - if (!hander.currentElement) { - hander.doc.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } -}//appendChild and setAttributeNS are preformance key - -exports.__DOMHandler = DOMHandler; -exports.normalizeLineEndings = normalizeLineEndings; -exports.DOMParser = DOMParser; - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js": -/*!************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var conventions = __webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js"); - -var find = conventions.find; -var NAMESPACE = conventions.NAMESPACE; - -/** - * A prerequisite for `[].filter`, to drop elements that are empty - * @param {string} input - * @returns {boolean} - */ -function notEmptyString (input) { - return input !== '' -} -/** - * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * - * @param {string} input - * @returns {string[]} (can be empty) - */ -function splitOnASCIIWhitespace(input) { - // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE - return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : [] -} - -/** - * Adds element as a key to current if it is not already present. - * - * @param {Record} current - * @param {string} element - * @returns {Record} - */ -function orderedSetReducer (current, element) { - if (!current.hasOwnProperty(element)) { - current[element] = true; - } - return current; -} - -/** - * @see https://infra.spec.whatwg.org/#ordered-set - * @param {string} input - * @returns {string[]} - */ -function toOrderedSet(input) { - if (!input) return []; - var list = splitOnASCIIWhitespace(input); - return Object.keys(list.reduce(orderedSetReducer, {})) -} - -/** - * Uses `list.indexOf` to implement something like `Array.prototype.includes`, - * which we can not rely on being available. - * - * @param {any[]} list - * @returns {function(any): boolean} - */ -function arrayIncludes (list) { - return function(element) { - return list && list.indexOf(element) !== -1; - } -} - -function copy(src,dest){ - for(var p in src){ - if (Object.prototype.hasOwnProperty.call(src, p)) { - dest[p] = src[p]; - } - } -} - -/** -^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? -^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? - */ -function _extends(Class,Super){ - var pt = Class.prototype; - if(!(pt instanceof Super)){ - function t(){}; - t.prototype = Super.prototype; - t = new t(); - copy(pt,t); - Class.prototype = pt = t; - } - if(pt.constructor != Class){ - if(typeof Class != 'function'){ - console.error("unknown Class:"+Class) - } - pt.constructor = Class - } -} - -// Node Types -var NodeType = {} -var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; -var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; -var TEXT_NODE = NodeType.TEXT_NODE = 3; -var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; -var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; -var ENTITY_NODE = NodeType.ENTITY_NODE = 6; -var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; -var COMMENT_NODE = NodeType.COMMENT_NODE = 8; -var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; -var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; -var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; -var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - -// ExceptionCode -var ExceptionCode = {} -var ExceptionMessage = {}; -var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); -var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); -var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); -var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); -var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); -var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); -var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); -var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); -var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); -var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); -//level2 -var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); -var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); -var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); -var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); -var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - -/** - * DOM Level 2 - * Object DOMException - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html - * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html - */ -function DOMException(code, message) { - if(message instanceof Error){ - var error = message; - }else{ - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); - } - error.code = code; - if(message) this.message = this.message + ": " + message; - return error; -}; -DOMException.prototype = Error.prototype; -copy(ExceptionCode,DOMException) - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 - * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. - * The items in the NodeList are accessible via an integral index, starting from 0. - */ -function NodeList() { -}; -NodeList.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length:0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(index) { - return index >= 0 && index < this.length ? this[index] : null; - }, - toString:function(isHTML,nodeFilter){ - for(var buf = [], i = 0;i=0){ - var lastIndex = list.length-1 - while(i0 || key == 'xmlns'){ -// return null; -// } - //console.log() - var i = this.length; - while(i--){ - var attr = this[i]; - //console.log(attr.nodeName,key) - if(attr.nodeName == key){ - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - /* returns Node */ - setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR - var el = attr.ownerElement, oldAttr; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - - /* returns Node */ - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - - - },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - - //for level2 - removeNamedItemNS:function(namespaceURI,localName){ - var attr = this.getNamedItemNS(namespaceURI,localName); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i = this.length; - while(i--){ - var node = this[i]; - if(node.localName == localName && node.namespaceURI == namespaceURI){ - return node; - } - } - return null; - } -}; - -/** - * The DOMImplementation interface represents an object providing methods - * which are not dependent on any particular document. - * Such an object is returned by the `Document.implementation` property. - * - * __The individual methods describe the differences compared to the specs.__ - * - * @constructor - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN - * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial) - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core - * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core - * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard - */ -function DOMImplementation() { -} - -DOMImplementation.prototype = { - /** - * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. - * The different implementations fairly diverged in what kind of features were reported. - * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. - * - * @deprecated It is deprecated and modern browsers return true in all cases. - * - * @param {string} feature - * @param {string} [version] - * @returns {boolean} always true - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN - * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard - */ - hasFeature: function(feature, version) { - return true; - }, - /** - * Creates an XML Document object of the specified type with its document element. - * - * __It behaves slightly different from the description in the living standard__: - * - There is no interface/class `XMLDocument`, it returns a `Document` instance. - * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string|null} namespaceURI - * @param {string} qualifiedName - * @param {DocumentType=null} doctype - * @returns {Document} - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocument: function(namespaceURI, qualifiedName, doctype){ - var doc = new Document(); - doc.implementation = this; - doc.childNodes = new NodeList(); - doc.doctype = doctype || null; - if (doctype){ - doc.appendChild(doctype); - } - if (qualifiedName){ - var root = doc.createElementNS(namespaceURI, qualifiedName); - doc.appendChild(root); - } - return doc; - }, - /** - * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. - * - * __This behavior is slightly different from the in the specs__: - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string} qualifiedName - * @param {string} [publicId] - * @param {string} [systemId] - * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation - * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocumentType: function(qualifiedName, publicId, systemId){ - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId || ''; - node.systemId = systemId || ''; - - return node; - } -}; - - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 - */ - -function Node() { -}; - -Node.prototype = { - firstChild : null, - lastChild : null, - previousSibling : null, - nextSibling : null, - attributes : null, - parentNode : null, - childNodes : null, - ownerDocument : null, - nodeValue : null, - namespaceURI : null, - prefix : null, - localName : null, - // Modified in DOM Level 2: - insertBefore:function(newChild, refChild){//raises - return _insertBefore(this,newChild,refChild); - }, - replaceChild:function(newChild, oldChild){//raises - _insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument); - if(oldChild){ - this.removeChild(oldChild); - } - }, - removeChild:function(oldChild){ - return _removeChild(this,oldChild); - }, - appendChild:function(newChild){ - return this.insertBefore(newChild,null); - }, - hasChildNodes:function(){ - return this.firstChild != null; - }, - cloneNode:function(deep){ - return cloneNode(this.ownerDocument||this,this,deep); - }, - // Modified in DOM Level 2: - normalize:function(){ - var child = this.firstChild; - while(child){ - var next = child.nextSibling; - if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ - this.removeChild(next); - child.appendData(next.data); - }else{ - child.normalize(); - child = next; - } - } - }, - // Introduced in DOM Level 2: - isSupported:function(feature, version){ - return this.ownerDocument.implementation.hasFeature(feature,version); - }, - // Introduced in DOM Level 2: - hasAttributes:function(){ - return this.attributes.length>0; - }, - /** - * Look up the prefix associated to the given namespace URI, starting from this node. - * **The default namespace declarations are ignored by this method.** - * See Namespace Prefix Lookup for details on the algorithm used by this method. - * - * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ - * - * @param {string | null} namespaceURI - * @returns {string | null} - * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix - * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo - * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix - * @see https://github.com/xmldom/xmldom/issues/322 - */ - lookupPrefix:function(namespaceURI){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - for(var n in map){ - if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) { - return n; - } - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI:function(prefix){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - if(Object.prototype.hasOwnProperty.call(map, prefix)){ - return map[prefix] ; - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace:function(namespaceURI){ - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; - } -}; - - -function _xmlEncoder(c){ - return c == '<' && '<' || - c == '>' && '>' || - c == '&' && '&' || - c == '"' && '"' || - '&#'+c.charCodeAt()+';' -} - - -copy(NodeType,Node); -copy(NodeType,Node.prototype); - -/** - * @param callback return true for continue,false for break - * @return boolean true: break visit; - */ -function _visitNode(node,callback){ - if(callback(node)){ - return true; - } - if(node = node.firstChild){ - do{ - if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } -} - - - -function Document(){ - this.ownerDocument = this; -} - -function _onAddAttribute(doc,el,newAttr){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns === NAMESPACE.XMLNS){ - //update namespace - el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value - } -} - -function _onRemoveAttribute(doc,el,newAttr,remove){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns === NAMESPACE.XMLNS){ - //update namespace - delete el._nsMap[newAttr.prefix?newAttr.localName:''] - } -} - -/** - * Updates `el.childNodes`, updating the indexed items and it's `length`. - * Passing `newChild` means it will be appended. - * Otherwise it's assumed that an item has been removed, - * and `el.firstNode` and it's `.nextSibling` are used - * to walk the current list of child nodes. - * - * @param {Document} doc - * @param {Node} el - * @param {Node} [newChild] - * @private - */ -function _onUpdateChild (doc, el, newChild) { - if(doc && doc._inc){ - doc._inc++; - //update childNodes - var cs = el.childNodes; - if (newChild) { - cs[cs.length++] = newChild; - } else { - var child = el.firstChild; - var i = 0; - while (child) { - cs[i++] = child; - child = child.nextSibling; - } - cs.length = i; - delete cs[cs.length]; - } - } -} - -/** - * Removes the connections between `parentNode` and `child` - * and any existing `child.previousSibling` or `child.nextSibling`. - * - * @see https://github.com/xmldom/xmldom/issues/135 - * @see https://github.com/xmldom/xmldom/issues/145 - * - * @param {Node} parentNode - * @param {Node} child - * @returns {Node} the child that was removed. - * @private - */ -function _removeChild (parentNode, child) { - var previous = child.previousSibling; - var next = child.nextSibling; - if (previous) { - previous.nextSibling = next; - } else { - parentNode.firstChild = next; - } - if (next) { - next.previousSibling = previous; - } else { - parentNode.lastChild = previous; - } - child.parentNode = null; - child.previousSibling = null; - child.nextSibling = null; - _onUpdateChild(parentNode.ownerDocument, parentNode); - return child; -} - -/** - * Returns `true` if `node` can be a parent for insertion. - * @param {Node} node - * @returns {boolean} - */ -function hasValidParentNodeType(node) { - return ( - node && - (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE) - ); -} - -/** - * Returns `true` if `node` can be inserted according to it's `nodeType`. - * @param {Node} node - * @returns {boolean} - */ -function hasInsertableNodeType(node) { - return ( - node && - (isElementNode(node) || - isTextNode(node) || - isDocTypeNode(node) || - node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || - node.nodeType === Node.COMMENT_NODE || - node.nodeType === Node.PROCESSING_INSTRUCTION_NODE) - ); -} - -/** - * Returns true if `node` is a DOCTYPE node - * @param {Node} node - * @returns {boolean} - */ -function isDocTypeNode(node) { - return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; -} - -/** - * Returns true if the node is an element - * @param {Node} node - * @returns {boolean} - */ -function isElementNode(node) { - return node && node.nodeType === Node.ELEMENT_NODE; -} -/** - * Returns true if `node` is a text node - * @param {Node} node - * @returns {boolean} - */ -function isTextNode(node) { - return node && node.nodeType === Node.TEXT_NODE; -} - -/** - * Check if en element node can be inserted before `child`, or at the end if child is falsy, - * according to the presence and position of a doctype node on the same level. - * - * @param {Document} doc The document node - * @param {Node} child the node that would become the nextSibling if the element would be inserted - * @returns {boolean} `true` if an element can be inserted before child - * @private - * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function isElementInsertionPossible(doc, child) { - var parentChildNodes = doc.childNodes || []; - if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { - return false; - } - var docTypeNode = find(parentChildNodes, isDocTypeNode); - return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); -} - -/** - * Check if en element node can be inserted before `child`, or at the end if child is falsy, - * according to the presence and position of a doctype node on the same level. - * - * @param {Node} doc The document node - * @param {Node} child the node that would become the nextSibling if the element would be inserted - * @returns {boolean} `true` if an element can be inserted before child - * @private - * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function isElementReplacementPossible(doc, child) { - var parentChildNodes = doc.childNodes || []; - - function hasElementChildThatIsNotChild(node) { - return isElementNode(node) && node !== child; - } - - if (find(parentChildNodes, hasElementChildThatIsNotChild)) { - return false; - } - var docTypeNode = find(parentChildNodes, isDocTypeNode); - return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); -} - -/** - * @private - * Steps 1-5 of the checks before inserting and before replacing a child are the same. - * - * @param {Node} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node=} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreInsertionValidity1to5(parent, node, child) { - // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException. - if (!hasValidParentNodeType(parent)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType); - } - // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException. - // not implemented! - // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException. - if (child && child.parentNode !== parent) { - throw new DOMException(NOT_FOUND_ERR, 'child not in parent'); - } - if ( - // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. - !hasInsertableNodeType(node) || - // 5. If either `node` is a Text node and `parent` is a document, - // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 - // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) - // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. - (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) - ) { - throw new DOMException( - HIERARCHY_REQUEST_ERR, - 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType - ); - } -} - -/** - * @private - * Step 6 of the checks before inserting and before replacing a child are different. - * - * @param {Document} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node | undefined} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreInsertionValidityInDocument(parent, node, child) { - var parentChildNodes = parent.childNodes || []; - var nodeChildNodes = node.childNodes || []; - - // DocumentFragment - if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - var nodeChildElements = nodeChildNodes.filter(isElementNode); - // If node has more than one element child or has a Text node child. - if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); - } - // Otherwise, if `node` has one element child and either `parent` has an element child, - // `child` is a doctype, or `child` is non-null and a doctype is following `child`. - if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); - } - } - // Element - if (isElementNode(node)) { - // `parent` has an element child, `child` is a doctype, - // or `child` is non-null and a doctype is following `child`. - if (!isElementInsertionPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); - } - } - // DocumentType - if (isDocTypeNode(node)) { - // `parent` has a doctype child, - if (find(parentChildNodes, isDocTypeNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); - } - var parentElementChild = find(parentChildNodes, isElementNode); - // `child` is non-null and an element is preceding `child`, - if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); - } - // or `child` is null and `parent` has an element child. - if (!child && parentElementChild) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present'); - } - } -} - -/** - * @private - * Step 6 of the checks before inserting and before replacing a child are different. - * - * @param {Document} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node | undefined} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - * @see https://dom.spec.whatwg.org/#concept-node-replace - */ -function assertPreReplacementValidityInDocument(parent, node, child) { - var parentChildNodes = parent.childNodes || []; - var nodeChildNodes = node.childNodes || []; - - // DocumentFragment - if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - var nodeChildElements = nodeChildNodes.filter(isElementNode); - // If `node` has more than one element child or has a Text node child. - if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); - } - // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`. - if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); - } - } - // Element - if (isElementNode(node)) { - // `parent` has an element child that is not `child` or a doctype is following `child`. - if (!isElementReplacementPossible(parent, child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); - } - } - // DocumentType - if (isDocTypeNode(node)) { - function hasDoctypeChildThatIsNotChild(node) { - return isDocTypeNode(node) && node !== child; - } - - // `parent` has a doctype child that is not `child`, - if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); - } - var parentElementChild = find(parentChildNodes, isElementNode); - // or an element is preceding `child`. - if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { - throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); - } - } -} - -/** - * @private - * @param {Node} parent the parent node to insert `node` into - * @param {Node} node the node to insert - * @param {Node=} child the node that should become the `nextSibling` of `node` - * @returns {Node} - * @throws DOMException for several node combinations that would create a DOM that is not well-formed. - * @throws DOMException if `child` is provided but is not a child of `parent`. - * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity - */ -function _insertBefore(parent, node, child, _inDocumentAssertion) { - // To ensure pre-insertion validity of a node into a parent before a child, run these steps: - assertPreInsertionValidity1to5(parent, node, child); - - // If parent is a document, and any of the statements below, switched on the interface node implements, - // are true, then throw a "HierarchyRequestError" DOMException. - if (parent.nodeType === Node.DOCUMENT_NODE) { - (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); - } - - var cp = node.parentNode; - if(cp){ - cp.removeChild(node);//remove and update - } - if(node.nodeType === DOCUMENT_FRAGMENT_NODE){ - var newFirst = node.firstChild; - if (newFirst == null) { - return node; - } - var newLast = node.lastChild; - }else{ - newFirst = newLast = node; - } - var pre = child ? child.previousSibling : parent.lastChild; - - newFirst.previousSibling = pre; - newLast.nextSibling = child; - - - if(pre){ - pre.nextSibling = newFirst; - }else{ - parent.firstChild = newFirst; - } - if(child == null){ - parent.lastChild = newLast; - }else{ - child.previousSibling = newLast; - } - do{ - newFirst.parentNode = parent; - }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) - _onUpdateChild(parent.ownerDocument||parent, parent); - //console.log(parent.lastChild.nextSibling == null) - if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { - node.firstChild = node.lastChild = null; - } - return node; -} - -/** - * Appends `newChild` to `parentNode`. - * If `newChild` is already connected to a `parentNode` it is first removed from it. - * - * @see https://github.com/xmldom/xmldom/issues/135 - * @see https://github.com/xmldom/xmldom/issues/145 - * @param {Node} parentNode - * @param {Node} newChild - * @returns {Node} - * @private - */ -function _appendSingleChild (parentNode, newChild) { - if (newChild.parentNode) { - newChild.parentNode.removeChild(newChild); - } - newChild.parentNode = parentNode; - newChild.previousSibling = parentNode.lastChild; - newChild.nextSibling = null; - if (newChild.previousSibling) { - newChild.previousSibling.nextSibling = newChild; - } else { - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); - return newChild; -} - -Document.prototype = { - //implementation : null, - nodeName : '#document', - nodeType : DOCUMENT_NODE, - /** - * The DocumentType node of the document. - * - * @readonly - * @type DocumentType - */ - doctype : null, - documentElement : null, - _inc : 1, - - insertBefore : function(newChild, refChild){//raises - if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ - var child = newChild.firstChild; - while(child){ - var next = child.nextSibling; - this.insertBefore(child,refChild); - child = next; - } - return newChild; - } - _insertBefore(this, newChild, refChild); - newChild.ownerDocument = this; - if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { - this.documentElement = newChild; - } - - return newChild; - }, - removeChild : function(oldChild){ - if(this.documentElement == oldChild){ - this.documentElement = null; - } - return _removeChild(this,oldChild); - }, - replaceChild: function (newChild, oldChild) { - //raises - _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); - newChild.ownerDocument = this; - if (oldChild) { - this.removeChild(oldChild); - } - if (isElementNode(newChild)) { - this.documentElement = newChild; - } - }, - // Introduced in DOM Level 2: - importNode : function(importedNode,deep){ - return importNode(this,importedNode,deep); - }, - // Introduced in DOM Level 2: - getElementById : function(id){ - var rtv = null; - _visitNode(this.documentElement,function(node){ - if(node.nodeType == ELEMENT_NODE){ - if(node.getAttribute('id') == id){ - rtv = node; - return true; - } - } - }) - return rtv; - }, - - /** - * The `getElementsByClassName` method of `Document` interface returns an array-like object - * of all child elements which have **all** of the given class name(s). - * - * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. - * - * - * Warning: This is a live LiveNodeList. - * Changes in the DOM will reflect in the array as the changes occur. - * If an element selected by this array no longer qualifies for the selector, - * it will automatically be removed. Be aware of this for iteration purposes. - * - * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName - * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname - */ - getElementsByClassName: function(classNames) { - var classNamesSet = toOrderedSet(classNames) - return new LiveNodeList(this, function(base) { - var ls = []; - if (classNamesSet.length > 0) { - _visitNode(base.documentElement, function(node) { - if(node !== base && node.nodeType === ELEMENT_NODE) { - var nodeClassNames = node.getAttribute('class') - // can be null if the attribute does not exist - if (nodeClassNames) { - // before splitting and iterating just compare them for the most common case - var matches = classNames === nodeClassNames; - if (!matches) { - var nodeClassNamesSet = toOrderedSet(nodeClassNames) - matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)) - } - if(matches) { - ls.push(node); - } - } - } - }); - } - return ls; - }); - }, - - //document factory method: - createElement : function(tagName){ - var node = new Element(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.localName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment : function(){ - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode : function(data){ - var node = new Text(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createComment : function(data){ - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createCDATASection : function(data){ - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createProcessingInstruction : function(target,data){ - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.nodeName = node.target = target; - node.nodeValue = node.data = data; - return node; - }, - createAttribute : function(name){ - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference : function(name){ - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - // Introduced in DOM Level 2: - createElementNS : function(namespaceURI,qualifiedName){ - var node = new Element(); - var pl = qualifiedName.split(':'); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - // Introduced in DOM Level 2: - createAttributeNS : function(namespaceURI,qualifiedName){ - var node = new Attr(); - var pl = qualifiedName.split(':'); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - return node; - } -}; -_extends(Document,Node); - - -function Element() { - this._nsMap = {}; -}; -Element.prototype = { - nodeType : ELEMENT_NODE, - hasAttribute : function(name){ - return this.getAttributeNode(name)!=null; - }, - getAttribute : function(name){ - var attr = this.getAttributeNode(name); - return attr && attr.value || ''; - }, - getAttributeNode : function(name){ - return this.attributes.getNamedItem(name); - }, - setAttribute : function(name, value){ - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - removeAttribute : function(name){ - var attr = this.getAttributeNode(name) - attr && this.removeAttributeNode(attr); - }, - - //four real opeartion method - appendChild:function(newChild){ - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - return this.insertBefore(newChild,null); - }else{ - return _appendSingleChild(this,newChild); - } - }, - setAttributeNode : function(newAttr){ - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS : function(newAttr){ - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode : function(oldAttr){ - //console.log(this == oldAttr.ownerElement) - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS : function(namespaceURI, localName){ - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - - hasAttributeNS : function(namespaceURI, localName){ - return this.getAttributeNodeNS(namespaceURI, localName)!=null; - }, - getAttributeNS : function(namespaceURI, localName){ - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ''; - }, - setAttributeNS : function(namespaceURI, qualifiedName, value){ - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - getAttributeNodeNS : function(namespaceURI, localName){ - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - - getElementsByTagName : function(tagName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS : function(namespaceURI, localName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ - ls.push(node); - } - }); - return ls; - - }); - } -}; -Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; -Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; - - -_extends(Element,Node); -function Attr() { -}; -Attr.prototype.nodeType = ATTRIBUTE_NODE; -_extends(Attr,Node); - - -function CharacterData() { -}; -CharacterData.prototype = { - data : '', - substringData : function(offset, count) { - return this.data.substring(offset, offset+count); - }, - appendData: function(text) { - text = this.data+text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset,text) { - this.replaceData(offset,0,text); - - }, - appendChild:function(newChild){ - throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]) - }, - deleteData: function(offset, count) { - this.replaceData(offset,count,""); - }, - replaceData: function(offset, count, text) { - var start = this.data.substring(0,offset); - var end = this.data.substring(offset+count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } -} -_extends(CharacterData,Node); -function Text() { -}; -Text.prototype = { - nodeName : "#text", - nodeType : TEXT_NODE, - splitText : function(offset) { - var text = this.data; - var newText = text.substring(offset); - text = text.substring(0, offset); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if(this.parentNode){ - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; - } -} -_extends(Text,CharacterData); -function Comment() { -}; -Comment.prototype = { - nodeName : "#comment", - nodeType : COMMENT_NODE -} -_extends(Comment,CharacterData); - -function CDATASection() { -}; -CDATASection.prototype = { - nodeName : "#cdata-section", - nodeType : CDATA_SECTION_NODE -} -_extends(CDATASection,CharacterData); - - -function DocumentType() { -}; -DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; -_extends(DocumentType,Node); - -function Notation() { -}; -Notation.prototype.nodeType = NOTATION_NODE; -_extends(Notation,Node); - -function Entity() { -}; -Entity.prototype.nodeType = ENTITY_NODE; -_extends(Entity,Node); - -function EntityReference() { -}; -EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; -_extends(EntityReference,Node); - -function DocumentFragment() { -}; -DocumentFragment.prototype.nodeName = "#document-fragment"; -DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; -_extends(DocumentFragment,Node); - - -function ProcessingInstruction() { -} -ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; -_extends(ProcessingInstruction,Node); -function XMLSerializer(){} -XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){ - return nodeSerializeToString.call(node,isHtml,nodeFilter); -} -Node.prototype.toString = nodeSerializeToString; -function nodeSerializeToString(isHtml,nodeFilter){ - var buf = []; - var refNode = this.nodeType == 9 && this.documentElement || this; - var prefix = refNode.prefix; - var uri = refNode.namespaceURI; - - if(uri && prefix == null){ - //console.log(prefix) - var prefix = refNode.lookupPrefix(uri); - if(prefix == null){ - //isHTML = true; - var visibleNamespaces=[ - {namespace:uri,prefix:null} - //{namespace:uri,prefix:''} - ] - } - } - serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces); - //console.log('###',this.nodeType,uri,prefix,buf.join('')) - return buf.join(''); -} - -function needNamespaceDefine(node, isHTML, visibleNamespaces) { - var prefix = node.prefix || ''; - var uri = node.namespaceURI; - // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) , - // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl : - // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty. - // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using) - // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared : - // > [...] Furthermore, the attribute value [...] must not be an empty string. - // so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document. - if (!uri) { - return false; - } - if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { - return false; - } - - var i = visibleNamespaces.length - while (i--) { - var ns = visibleNamespaces[i]; - // get namespace prefix - if (ns.prefix === prefix) { - return ns.namespace !== uri; - } - } - return true; -} -/** - * Well-formed constraint: No < in Attribute Values - * > The replacement text of any entity referred to directly or indirectly - * > in an attribute value must not contain a <. - * @see https://www.w3.org/TR/xml11/#CleanAttrVals - * @see https://www.w3.org/TR/xml11/#NT-AttValue - * - * Literal whitespace other than space that appear in attribute values - * are serialized as their entity references, so they will be preserved. - * (In contrast to whitespace literals in the input which are normalized to spaces) - * @see https://www.w3.org/TR/xml11/#AVNormalize - * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes - */ -function addSerializedAttribute(buf, qualifiedName, value) { - buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"') -} - -function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){ - if (!visibleNamespaces) { - visibleNamespaces = []; - } - - if(nodeFilter){ - node = nodeFilter(node); - if(node){ - if(typeof node == 'string'){ - buf.push(node); - return; - } - }else{ - return; - } - //buf.sort.apply(attrs, attributeSorter); - } - - switch(node.nodeType){ - case ELEMENT_NODE: - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - - isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML - - var prefixedNodeName = nodeName - if (!isHTML && !node.prefix && node.namespaceURI) { - var defaultNS - // lookup current default ns from `xmlns` attribute - for (var ai = 0; ai < attrs.length; ai++) { - if (attrs.item(ai).name === 'xmlns') { - defaultNS = attrs.item(ai).value - break - } - } - if (!defaultNS) { - // lookup current default ns in visibleNamespaces - for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { - var namespace = visibleNamespaces[nsi] - if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) { - defaultNS = namespace.namespace - break - } - } - } - if (defaultNS !== node.namespaceURI) { - for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { - var namespace = visibleNamespaces[nsi] - if (namespace.namespace === node.namespaceURI) { - if (namespace.prefix) { - prefixedNodeName = namespace.prefix + ':' + nodeName - } - break - } - } - } - } - - buf.push('<', prefixedNodeName); - - for(var i=0;i'); - //if is cdata child node - if(isHTML && /^script$/i.test(nodeName)){ - while(child){ - if(child.data){ - buf.push(child.data); - }else{ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - } - child = child.nextSibling; - } - }else - { - while(child){ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - child = child.nextSibling; - } - } - buf.push(''); - }else{ - buf.push('/>'); - } - // remove added visible namespaces - //visibleNamespaces.length = startVisibleNamespaces; - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while(child){ - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return addSerializedAttribute(buf, node.name, node.value); - case TEXT_NODE: - /** - * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, - * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. - * If they are needed elsewhere, they must be escaped using either numeric character references or the strings - * `&` and `<` respectively. - * The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, - * be escaped using either `>` or a character reference when it appears in the string `]]>` in content, - * when that string is not marking the end of a CDATA section. - * - * In the content of elements, character data is any string of characters - * which does not contain the start-delimiter of any markup - * and does not include the CDATA-section-close delimiter, `]]>`. - * - * @see https://www.w3.org/TR/xml/#NT-CharData - * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node - */ - return buf.push(node.data - .replace(/[<&>]/g,_xmlEncoder) - ); - case CDATA_SECTION_NODE: - return buf.push( ''); - case COMMENT_NODE: - return buf.push( ""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push(''); - }else if(sysid && sysid!='.'){ - buf.push(' SYSTEM ', sysid, '>'); - }else{ - var sub = node.internalSubset; - if(sub){ - buf.push(" [",sub,"]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push( ""); - case ENTITY_REFERENCE_NODE: - return buf.push( '&',node.nodeName,';'); - //case ENTITY_NODE: - //case NOTATION_NODE: - default: - buf.push('??',node.nodeName); - } -} -function importNode(doc,node,deep){ - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - //var attrs = node2.attributes; - //var len = attrs.length; - //for(var i=0;i { - -"use strict"; - - -var freeze = (__webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js").freeze); - -/** - * The entities that are predefined in every XML document. - * - * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1 - * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0 - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia - */ -exports.XML_ENTITIES = freeze({ - amp: '&', - apos: "'", - gt: '>', - lt: '<', - quot: '"', -}); - -/** - * A map of all entities that are detected in an HTML document. - * They contain all entries from `XML_ENTITIES`. - * - * @see XML_ENTITIES - * @see DOMParser.parseFromString - * @see DOMImplementation.prototype.createHTMLDocument - * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec - * @see https://html.spec.whatwg.org/entities.json JSON - * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names - * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML) - * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML) - */ -exports.HTML_ENTITIES = freeze({ - Aacute: '\u00C1', - aacute: '\u00E1', - Abreve: '\u0102', - abreve: '\u0103', - ac: '\u223E', - acd: '\u223F', - acE: '\u223E\u0333', - Acirc: '\u00C2', - acirc: '\u00E2', - acute: '\u00B4', - Acy: '\u0410', - acy: '\u0430', - AElig: '\u00C6', - aelig: '\u00E6', - af: '\u2061', - Afr: '\uD835\uDD04', - afr: '\uD835\uDD1E', - Agrave: '\u00C0', - agrave: '\u00E0', - alefsym: '\u2135', - aleph: '\u2135', - Alpha: '\u0391', - alpha: '\u03B1', - Amacr: '\u0100', - amacr: '\u0101', - amalg: '\u2A3F', - AMP: '\u0026', - amp: '\u0026', - And: '\u2A53', - and: '\u2227', - andand: '\u2A55', - andd: '\u2A5C', - andslope: '\u2A58', - andv: '\u2A5A', - ang: '\u2220', - ange: '\u29A4', - angle: '\u2220', - angmsd: '\u2221', - angmsdaa: '\u29A8', - angmsdab: '\u29A9', - angmsdac: '\u29AA', - angmsdad: '\u29AB', - angmsdae: '\u29AC', - angmsdaf: '\u29AD', - angmsdag: '\u29AE', - angmsdah: '\u29AF', - angrt: '\u221F', - angrtvb: '\u22BE', - angrtvbd: '\u299D', - angsph: '\u2222', - angst: '\u00C5', - angzarr: '\u237C', - Aogon: '\u0104', - aogon: '\u0105', - Aopf: '\uD835\uDD38', - aopf: '\uD835\uDD52', - ap: '\u2248', - apacir: '\u2A6F', - apE: '\u2A70', - ape: '\u224A', - apid: '\u224B', - apos: '\u0027', - ApplyFunction: '\u2061', - approx: '\u2248', - approxeq: '\u224A', - Aring: '\u00C5', - aring: '\u00E5', - Ascr: '\uD835\uDC9C', - ascr: '\uD835\uDCB6', - Assign: '\u2254', - ast: '\u002A', - asymp: '\u2248', - asympeq: '\u224D', - Atilde: '\u00C3', - atilde: '\u00E3', - Auml: '\u00C4', - auml: '\u00E4', - awconint: '\u2233', - awint: '\u2A11', - backcong: '\u224C', - backepsilon: '\u03F6', - backprime: '\u2035', - backsim: '\u223D', - backsimeq: '\u22CD', - Backslash: '\u2216', - Barv: '\u2AE7', - barvee: '\u22BD', - Barwed: '\u2306', - barwed: '\u2305', - barwedge: '\u2305', - bbrk: '\u23B5', - bbrktbrk: '\u23B6', - bcong: '\u224C', - Bcy: '\u0411', - bcy: '\u0431', - bdquo: '\u201E', - becaus: '\u2235', - Because: '\u2235', - because: '\u2235', - bemptyv: '\u29B0', - bepsi: '\u03F6', - bernou: '\u212C', - Bernoullis: '\u212C', - Beta: '\u0392', - beta: '\u03B2', - beth: '\u2136', - between: '\u226C', - Bfr: '\uD835\uDD05', - bfr: '\uD835\uDD1F', - bigcap: '\u22C2', - bigcirc: '\u25EF', - bigcup: '\u22C3', - bigodot: '\u2A00', - bigoplus: '\u2A01', - bigotimes: '\u2A02', - bigsqcup: '\u2A06', - bigstar: '\u2605', - bigtriangledown: '\u25BD', - bigtriangleup: '\u25B3', - biguplus: '\u2A04', - bigvee: '\u22C1', - bigwedge: '\u22C0', - bkarow: '\u290D', - blacklozenge: '\u29EB', - blacksquare: '\u25AA', - blacktriangle: '\u25B4', - blacktriangledown: '\u25BE', - blacktriangleleft: '\u25C2', - blacktriangleright: '\u25B8', - blank: '\u2423', - blk12: '\u2592', - blk14: '\u2591', - blk34: '\u2593', - block: '\u2588', - bne: '\u003D\u20E5', - bnequiv: '\u2261\u20E5', - bNot: '\u2AED', - bnot: '\u2310', - Bopf: '\uD835\uDD39', - bopf: '\uD835\uDD53', - bot: '\u22A5', - bottom: '\u22A5', - bowtie: '\u22C8', - boxbox: '\u29C9', - boxDL: '\u2557', - boxDl: '\u2556', - boxdL: '\u2555', - boxdl: '\u2510', - boxDR: '\u2554', - boxDr: '\u2553', - boxdR: '\u2552', - boxdr: '\u250C', - boxH: '\u2550', - boxh: '\u2500', - boxHD: '\u2566', - boxHd: '\u2564', - boxhD: '\u2565', - boxhd: '\u252C', - boxHU: '\u2569', - boxHu: '\u2567', - boxhU: '\u2568', - boxhu: '\u2534', - boxminus: '\u229F', - boxplus: '\u229E', - boxtimes: '\u22A0', - boxUL: '\u255D', - boxUl: '\u255C', - boxuL: '\u255B', - boxul: '\u2518', - boxUR: '\u255A', - boxUr: '\u2559', - boxuR: '\u2558', - boxur: '\u2514', - boxV: '\u2551', - boxv: '\u2502', - boxVH: '\u256C', - boxVh: '\u256B', - boxvH: '\u256A', - boxvh: '\u253C', - boxVL: '\u2563', - boxVl: '\u2562', - boxvL: '\u2561', - boxvl: '\u2524', - boxVR: '\u2560', - boxVr: '\u255F', - boxvR: '\u255E', - boxvr: '\u251C', - bprime: '\u2035', - Breve: '\u02D8', - breve: '\u02D8', - brvbar: '\u00A6', - Bscr: '\u212C', - bscr: '\uD835\uDCB7', - bsemi: '\u204F', - bsim: '\u223D', - bsime: '\u22CD', - bsol: '\u005C', - bsolb: '\u29C5', - bsolhsub: '\u27C8', - bull: '\u2022', - bullet: '\u2022', - bump: '\u224E', - bumpE: '\u2AAE', - bumpe: '\u224F', - Bumpeq: '\u224E', - bumpeq: '\u224F', - Cacute: '\u0106', - cacute: '\u0107', - Cap: '\u22D2', - cap: '\u2229', - capand: '\u2A44', - capbrcup: '\u2A49', - capcap: '\u2A4B', - capcup: '\u2A47', - capdot: '\u2A40', - CapitalDifferentialD: '\u2145', - caps: '\u2229\uFE00', - caret: '\u2041', - caron: '\u02C7', - Cayleys: '\u212D', - ccaps: '\u2A4D', - Ccaron: '\u010C', - ccaron: '\u010D', - Ccedil: '\u00C7', - ccedil: '\u00E7', - Ccirc: '\u0108', - ccirc: '\u0109', - Cconint: '\u2230', - ccups: '\u2A4C', - ccupssm: '\u2A50', - Cdot: '\u010A', - cdot: '\u010B', - cedil: '\u00B8', - Cedilla: '\u00B8', - cemptyv: '\u29B2', - cent: '\u00A2', - CenterDot: '\u00B7', - centerdot: '\u00B7', - Cfr: '\u212D', - cfr: '\uD835\uDD20', - CHcy: '\u0427', - chcy: '\u0447', - check: '\u2713', - checkmark: '\u2713', - Chi: '\u03A7', - chi: '\u03C7', - cir: '\u25CB', - circ: '\u02C6', - circeq: '\u2257', - circlearrowleft: '\u21BA', - circlearrowright: '\u21BB', - circledast: '\u229B', - circledcirc: '\u229A', - circleddash: '\u229D', - CircleDot: '\u2299', - circledR: '\u00AE', - circledS: '\u24C8', - CircleMinus: '\u2296', - CirclePlus: '\u2295', - CircleTimes: '\u2297', - cirE: '\u29C3', - cire: '\u2257', - cirfnint: '\u2A10', - cirmid: '\u2AEF', - cirscir: '\u29C2', - ClockwiseContourIntegral: '\u2232', - CloseCurlyDoubleQuote: '\u201D', - CloseCurlyQuote: '\u2019', - clubs: '\u2663', - clubsuit: '\u2663', - Colon: '\u2237', - colon: '\u003A', - Colone: '\u2A74', - colone: '\u2254', - coloneq: '\u2254', - comma: '\u002C', - commat: '\u0040', - comp: '\u2201', - compfn: '\u2218', - complement: '\u2201', - complexes: '\u2102', - cong: '\u2245', - congdot: '\u2A6D', - Congruent: '\u2261', - Conint: '\u222F', - conint: '\u222E', - ContourIntegral: '\u222E', - Copf: '\u2102', - copf: '\uD835\uDD54', - coprod: '\u2210', - Coproduct: '\u2210', - COPY: '\u00A9', - copy: '\u00A9', - copysr: '\u2117', - CounterClockwiseContourIntegral: '\u2233', - crarr: '\u21B5', - Cross: '\u2A2F', - cross: '\u2717', - Cscr: '\uD835\uDC9E', - cscr: '\uD835\uDCB8', - csub: '\u2ACF', - csube: '\u2AD1', - csup: '\u2AD0', - csupe: '\u2AD2', - ctdot: '\u22EF', - cudarrl: '\u2938', - cudarrr: '\u2935', - cuepr: '\u22DE', - cuesc: '\u22DF', - cularr: '\u21B6', - cularrp: '\u293D', - Cup: '\u22D3', - cup: '\u222A', - cupbrcap: '\u2A48', - CupCap: '\u224D', - cupcap: '\u2A46', - cupcup: '\u2A4A', - cupdot: '\u228D', - cupor: '\u2A45', - cups: '\u222A\uFE00', - curarr: '\u21B7', - curarrm: '\u293C', - curlyeqprec: '\u22DE', - curlyeqsucc: '\u22DF', - curlyvee: '\u22CE', - curlywedge: '\u22CF', - curren: '\u00A4', - curvearrowleft: '\u21B6', - curvearrowright: '\u21B7', - cuvee: '\u22CE', - cuwed: '\u22CF', - cwconint: '\u2232', - cwint: '\u2231', - cylcty: '\u232D', - Dagger: '\u2021', - dagger: '\u2020', - daleth: '\u2138', - Darr: '\u21A1', - dArr: '\u21D3', - darr: '\u2193', - dash: '\u2010', - Dashv: '\u2AE4', - dashv: '\u22A3', - dbkarow: '\u290F', - dblac: '\u02DD', - Dcaron: '\u010E', - dcaron: '\u010F', - Dcy: '\u0414', - dcy: '\u0434', - DD: '\u2145', - dd: '\u2146', - ddagger: '\u2021', - ddarr: '\u21CA', - DDotrahd: '\u2911', - ddotseq: '\u2A77', - deg: '\u00B0', - Del: '\u2207', - Delta: '\u0394', - delta: '\u03B4', - demptyv: '\u29B1', - dfisht: '\u297F', - Dfr: '\uD835\uDD07', - dfr: '\uD835\uDD21', - dHar: '\u2965', - dharl: '\u21C3', - dharr: '\u21C2', - DiacriticalAcute: '\u00B4', - DiacriticalDot: '\u02D9', - DiacriticalDoubleAcute: '\u02DD', - DiacriticalGrave: '\u0060', - DiacriticalTilde: '\u02DC', - diam: '\u22C4', - Diamond: '\u22C4', - diamond: '\u22C4', - diamondsuit: '\u2666', - diams: '\u2666', - die: '\u00A8', - DifferentialD: '\u2146', - digamma: '\u03DD', - disin: '\u22F2', - div: '\u00F7', - divide: '\u00F7', - divideontimes: '\u22C7', - divonx: '\u22C7', - DJcy: '\u0402', - djcy: '\u0452', - dlcorn: '\u231E', - dlcrop: '\u230D', - dollar: '\u0024', - Dopf: '\uD835\uDD3B', - dopf: '\uD835\uDD55', - Dot: '\u00A8', - dot: '\u02D9', - DotDot: '\u20DC', - doteq: '\u2250', - doteqdot: '\u2251', - DotEqual: '\u2250', - dotminus: '\u2238', - dotplus: '\u2214', - dotsquare: '\u22A1', - doublebarwedge: '\u2306', - DoubleContourIntegral: '\u222F', - DoubleDot: '\u00A8', - DoubleDownArrow: '\u21D3', - DoubleLeftArrow: '\u21D0', - DoubleLeftRightArrow: '\u21D4', - DoubleLeftTee: '\u2AE4', - DoubleLongLeftArrow: '\u27F8', - DoubleLongLeftRightArrow: '\u27FA', - DoubleLongRightArrow: '\u27F9', - DoubleRightArrow: '\u21D2', - DoubleRightTee: '\u22A8', - DoubleUpArrow: '\u21D1', - DoubleUpDownArrow: '\u21D5', - DoubleVerticalBar: '\u2225', - DownArrow: '\u2193', - Downarrow: '\u21D3', - downarrow: '\u2193', - DownArrowBar: '\u2913', - DownArrowUpArrow: '\u21F5', - DownBreve: '\u0311', - downdownarrows: '\u21CA', - downharpoonleft: '\u21C3', - downharpoonright: '\u21C2', - DownLeftRightVector: '\u2950', - DownLeftTeeVector: '\u295E', - DownLeftVector: '\u21BD', - DownLeftVectorBar: '\u2956', - DownRightTeeVector: '\u295F', - DownRightVector: '\u21C1', - DownRightVectorBar: '\u2957', - DownTee: '\u22A4', - DownTeeArrow: '\u21A7', - drbkarow: '\u2910', - drcorn: '\u231F', - drcrop: '\u230C', - Dscr: '\uD835\uDC9F', - dscr: '\uD835\uDCB9', - DScy: '\u0405', - dscy: '\u0455', - dsol: '\u29F6', - Dstrok: '\u0110', - dstrok: '\u0111', - dtdot: '\u22F1', - dtri: '\u25BF', - dtrif: '\u25BE', - duarr: '\u21F5', - duhar: '\u296F', - dwangle: '\u29A6', - DZcy: '\u040F', - dzcy: '\u045F', - dzigrarr: '\u27FF', - Eacute: '\u00C9', - eacute: '\u00E9', - easter: '\u2A6E', - Ecaron: '\u011A', - ecaron: '\u011B', - ecir: '\u2256', - Ecirc: '\u00CA', - ecirc: '\u00EA', - ecolon: '\u2255', - Ecy: '\u042D', - ecy: '\u044D', - eDDot: '\u2A77', - Edot: '\u0116', - eDot: '\u2251', - edot: '\u0117', - ee: '\u2147', - efDot: '\u2252', - Efr: '\uD835\uDD08', - efr: '\uD835\uDD22', - eg: '\u2A9A', - Egrave: '\u00C8', - egrave: '\u00E8', - egs: '\u2A96', - egsdot: '\u2A98', - el: '\u2A99', - Element: '\u2208', - elinters: '\u23E7', - ell: '\u2113', - els: '\u2A95', - elsdot: '\u2A97', - Emacr: '\u0112', - emacr: '\u0113', - empty: '\u2205', - emptyset: '\u2205', - EmptySmallSquare: '\u25FB', - emptyv: '\u2205', - EmptyVerySmallSquare: '\u25AB', - emsp: '\u2003', - emsp13: '\u2004', - emsp14: '\u2005', - ENG: '\u014A', - eng: '\u014B', - ensp: '\u2002', - Eogon: '\u0118', - eogon: '\u0119', - Eopf: '\uD835\uDD3C', - eopf: '\uD835\uDD56', - epar: '\u22D5', - eparsl: '\u29E3', - eplus: '\u2A71', - epsi: '\u03B5', - Epsilon: '\u0395', - epsilon: '\u03B5', - epsiv: '\u03F5', - eqcirc: '\u2256', - eqcolon: '\u2255', - eqsim: '\u2242', - eqslantgtr: '\u2A96', - eqslantless: '\u2A95', - Equal: '\u2A75', - equals: '\u003D', - EqualTilde: '\u2242', - equest: '\u225F', - Equilibrium: '\u21CC', - equiv: '\u2261', - equivDD: '\u2A78', - eqvparsl: '\u29E5', - erarr: '\u2971', - erDot: '\u2253', - Escr: '\u2130', - escr: '\u212F', - esdot: '\u2250', - Esim: '\u2A73', - esim: '\u2242', - Eta: '\u0397', - eta: '\u03B7', - ETH: '\u00D0', - eth: '\u00F0', - Euml: '\u00CB', - euml: '\u00EB', - euro: '\u20AC', - excl: '\u0021', - exist: '\u2203', - Exists: '\u2203', - expectation: '\u2130', - ExponentialE: '\u2147', - exponentiale: '\u2147', - fallingdotseq: '\u2252', - Fcy: '\u0424', - fcy: '\u0444', - female: '\u2640', - ffilig: '\uFB03', - fflig: '\uFB00', - ffllig: '\uFB04', - Ffr: '\uD835\uDD09', - ffr: '\uD835\uDD23', - filig: '\uFB01', - FilledSmallSquare: '\u25FC', - FilledVerySmallSquare: '\u25AA', - fjlig: '\u0066\u006A', - flat: '\u266D', - fllig: '\uFB02', - fltns: '\u25B1', - fnof: '\u0192', - Fopf: '\uD835\uDD3D', - fopf: '\uD835\uDD57', - ForAll: '\u2200', - forall: '\u2200', - fork: '\u22D4', - forkv: '\u2AD9', - Fouriertrf: '\u2131', - fpartint: '\u2A0D', - frac12: '\u00BD', - frac13: '\u2153', - frac14: '\u00BC', - frac15: '\u2155', - frac16: '\u2159', - frac18: '\u215B', - frac23: '\u2154', - frac25: '\u2156', - frac34: '\u00BE', - frac35: '\u2157', - frac38: '\u215C', - frac45: '\u2158', - frac56: '\u215A', - frac58: '\u215D', - frac78: '\u215E', - frasl: '\u2044', - frown: '\u2322', - Fscr: '\u2131', - fscr: '\uD835\uDCBB', - gacute: '\u01F5', - Gamma: '\u0393', - gamma: '\u03B3', - Gammad: '\u03DC', - gammad: '\u03DD', - gap: '\u2A86', - Gbreve: '\u011E', - gbreve: '\u011F', - Gcedil: '\u0122', - Gcirc: '\u011C', - gcirc: '\u011D', - Gcy: '\u0413', - gcy: '\u0433', - Gdot: '\u0120', - gdot: '\u0121', - gE: '\u2267', - ge: '\u2265', - gEl: '\u2A8C', - gel: '\u22DB', - geq: '\u2265', - geqq: '\u2267', - geqslant: '\u2A7E', - ges: '\u2A7E', - gescc: '\u2AA9', - gesdot: '\u2A80', - gesdoto: '\u2A82', - gesdotol: '\u2A84', - gesl: '\u22DB\uFE00', - gesles: '\u2A94', - Gfr: '\uD835\uDD0A', - gfr: '\uD835\uDD24', - Gg: '\u22D9', - gg: '\u226B', - ggg: '\u22D9', - gimel: '\u2137', - GJcy: '\u0403', - gjcy: '\u0453', - gl: '\u2277', - gla: '\u2AA5', - glE: '\u2A92', - glj: '\u2AA4', - gnap: '\u2A8A', - gnapprox: '\u2A8A', - gnE: '\u2269', - gne: '\u2A88', - gneq: '\u2A88', - gneqq: '\u2269', - gnsim: '\u22E7', - Gopf: '\uD835\uDD3E', - gopf: '\uD835\uDD58', - grave: '\u0060', - GreaterEqual: '\u2265', - GreaterEqualLess: '\u22DB', - GreaterFullEqual: '\u2267', - GreaterGreater: '\u2AA2', - GreaterLess: '\u2277', - GreaterSlantEqual: '\u2A7E', - GreaterTilde: '\u2273', - Gscr: '\uD835\uDCA2', - gscr: '\u210A', - gsim: '\u2273', - gsime: '\u2A8E', - gsiml: '\u2A90', - Gt: '\u226B', - GT: '\u003E', - gt: '\u003E', - gtcc: '\u2AA7', - gtcir: '\u2A7A', - gtdot: '\u22D7', - gtlPar: '\u2995', - gtquest: '\u2A7C', - gtrapprox: '\u2A86', - gtrarr: '\u2978', - gtrdot: '\u22D7', - gtreqless: '\u22DB', - gtreqqless: '\u2A8C', - gtrless: '\u2277', - gtrsim: '\u2273', - gvertneqq: '\u2269\uFE00', - gvnE: '\u2269\uFE00', - Hacek: '\u02C7', - hairsp: '\u200A', - half: '\u00BD', - hamilt: '\u210B', - HARDcy: '\u042A', - hardcy: '\u044A', - hArr: '\u21D4', - harr: '\u2194', - harrcir: '\u2948', - harrw: '\u21AD', - Hat: '\u005E', - hbar: '\u210F', - Hcirc: '\u0124', - hcirc: '\u0125', - hearts: '\u2665', - heartsuit: '\u2665', - hellip: '\u2026', - hercon: '\u22B9', - Hfr: '\u210C', - hfr: '\uD835\uDD25', - HilbertSpace: '\u210B', - hksearow: '\u2925', - hkswarow: '\u2926', - hoarr: '\u21FF', - homtht: '\u223B', - hookleftarrow: '\u21A9', - hookrightarrow: '\u21AA', - Hopf: '\u210D', - hopf: '\uD835\uDD59', - horbar: '\u2015', - HorizontalLine: '\u2500', - Hscr: '\u210B', - hscr: '\uD835\uDCBD', - hslash: '\u210F', - Hstrok: '\u0126', - hstrok: '\u0127', - HumpDownHump: '\u224E', - HumpEqual: '\u224F', - hybull: '\u2043', - hyphen: '\u2010', - Iacute: '\u00CD', - iacute: '\u00ED', - ic: '\u2063', - Icirc: '\u00CE', - icirc: '\u00EE', - Icy: '\u0418', - icy: '\u0438', - Idot: '\u0130', - IEcy: '\u0415', - iecy: '\u0435', - iexcl: '\u00A1', - iff: '\u21D4', - Ifr: '\u2111', - ifr: '\uD835\uDD26', - Igrave: '\u00CC', - igrave: '\u00EC', - ii: '\u2148', - iiiint: '\u2A0C', - iiint: '\u222D', - iinfin: '\u29DC', - iiota: '\u2129', - IJlig: '\u0132', - ijlig: '\u0133', - Im: '\u2111', - Imacr: '\u012A', - imacr: '\u012B', - image: '\u2111', - ImaginaryI: '\u2148', - imagline: '\u2110', - imagpart: '\u2111', - imath: '\u0131', - imof: '\u22B7', - imped: '\u01B5', - Implies: '\u21D2', - in: '\u2208', - incare: '\u2105', - infin: '\u221E', - infintie: '\u29DD', - inodot: '\u0131', - Int: '\u222C', - int: '\u222B', - intcal: '\u22BA', - integers: '\u2124', - Integral: '\u222B', - intercal: '\u22BA', - Intersection: '\u22C2', - intlarhk: '\u2A17', - intprod: '\u2A3C', - InvisibleComma: '\u2063', - InvisibleTimes: '\u2062', - IOcy: '\u0401', - iocy: '\u0451', - Iogon: '\u012E', - iogon: '\u012F', - Iopf: '\uD835\uDD40', - iopf: '\uD835\uDD5A', - Iota: '\u0399', - iota: '\u03B9', - iprod: '\u2A3C', - iquest: '\u00BF', - Iscr: '\u2110', - iscr: '\uD835\uDCBE', - isin: '\u2208', - isindot: '\u22F5', - isinE: '\u22F9', - isins: '\u22F4', - isinsv: '\u22F3', - isinv: '\u2208', - it: '\u2062', - Itilde: '\u0128', - itilde: '\u0129', - Iukcy: '\u0406', - iukcy: '\u0456', - Iuml: '\u00CF', - iuml: '\u00EF', - Jcirc: '\u0134', - jcirc: '\u0135', - Jcy: '\u0419', - jcy: '\u0439', - Jfr: '\uD835\uDD0D', - jfr: '\uD835\uDD27', - jmath: '\u0237', - Jopf: '\uD835\uDD41', - jopf: '\uD835\uDD5B', - Jscr: '\uD835\uDCA5', - jscr: '\uD835\uDCBF', - Jsercy: '\u0408', - jsercy: '\u0458', - Jukcy: '\u0404', - jukcy: '\u0454', - Kappa: '\u039A', - kappa: '\u03BA', - kappav: '\u03F0', - Kcedil: '\u0136', - kcedil: '\u0137', - Kcy: '\u041A', - kcy: '\u043A', - Kfr: '\uD835\uDD0E', - kfr: '\uD835\uDD28', - kgreen: '\u0138', - KHcy: '\u0425', - khcy: '\u0445', - KJcy: '\u040C', - kjcy: '\u045C', - Kopf: '\uD835\uDD42', - kopf: '\uD835\uDD5C', - Kscr: '\uD835\uDCA6', - kscr: '\uD835\uDCC0', - lAarr: '\u21DA', - Lacute: '\u0139', - lacute: '\u013A', - laemptyv: '\u29B4', - lagran: '\u2112', - Lambda: '\u039B', - lambda: '\u03BB', - Lang: '\u27EA', - lang: '\u27E8', - langd: '\u2991', - langle: '\u27E8', - lap: '\u2A85', - Laplacetrf: '\u2112', - laquo: '\u00AB', - Larr: '\u219E', - lArr: '\u21D0', - larr: '\u2190', - larrb: '\u21E4', - larrbfs: '\u291F', - larrfs: '\u291D', - larrhk: '\u21A9', - larrlp: '\u21AB', - larrpl: '\u2939', - larrsim: '\u2973', - larrtl: '\u21A2', - lat: '\u2AAB', - lAtail: '\u291B', - latail: '\u2919', - late: '\u2AAD', - lates: '\u2AAD\uFE00', - lBarr: '\u290E', - lbarr: '\u290C', - lbbrk: '\u2772', - lbrace: '\u007B', - lbrack: '\u005B', - lbrke: '\u298B', - lbrksld: '\u298F', - lbrkslu: '\u298D', - Lcaron: '\u013D', - lcaron: '\u013E', - Lcedil: '\u013B', - lcedil: '\u013C', - lceil: '\u2308', - lcub: '\u007B', - Lcy: '\u041B', - lcy: '\u043B', - ldca: '\u2936', - ldquo: '\u201C', - ldquor: '\u201E', - ldrdhar: '\u2967', - ldrushar: '\u294B', - ldsh: '\u21B2', - lE: '\u2266', - le: '\u2264', - LeftAngleBracket: '\u27E8', - LeftArrow: '\u2190', - Leftarrow: '\u21D0', - leftarrow: '\u2190', - LeftArrowBar: '\u21E4', - LeftArrowRightArrow: '\u21C6', - leftarrowtail: '\u21A2', - LeftCeiling: '\u2308', - LeftDoubleBracket: '\u27E6', - LeftDownTeeVector: '\u2961', - LeftDownVector: '\u21C3', - LeftDownVectorBar: '\u2959', - LeftFloor: '\u230A', - leftharpoondown: '\u21BD', - leftharpoonup: '\u21BC', - leftleftarrows: '\u21C7', - LeftRightArrow: '\u2194', - Leftrightarrow: '\u21D4', - leftrightarrow: '\u2194', - leftrightarrows: '\u21C6', - leftrightharpoons: '\u21CB', - leftrightsquigarrow: '\u21AD', - LeftRightVector: '\u294E', - LeftTee: '\u22A3', - LeftTeeArrow: '\u21A4', - LeftTeeVector: '\u295A', - leftthreetimes: '\u22CB', - LeftTriangle: '\u22B2', - LeftTriangleBar: '\u29CF', - LeftTriangleEqual: '\u22B4', - LeftUpDownVector: '\u2951', - LeftUpTeeVector: '\u2960', - LeftUpVector: '\u21BF', - LeftUpVectorBar: '\u2958', - LeftVector: '\u21BC', - LeftVectorBar: '\u2952', - lEg: '\u2A8B', - leg: '\u22DA', - leq: '\u2264', - leqq: '\u2266', - leqslant: '\u2A7D', - les: '\u2A7D', - lescc: '\u2AA8', - lesdot: '\u2A7F', - lesdoto: '\u2A81', - lesdotor: '\u2A83', - lesg: '\u22DA\uFE00', - lesges: '\u2A93', - lessapprox: '\u2A85', - lessdot: '\u22D6', - lesseqgtr: '\u22DA', - lesseqqgtr: '\u2A8B', - LessEqualGreater: '\u22DA', - LessFullEqual: '\u2266', - LessGreater: '\u2276', - lessgtr: '\u2276', - LessLess: '\u2AA1', - lesssim: '\u2272', - LessSlantEqual: '\u2A7D', - LessTilde: '\u2272', - lfisht: '\u297C', - lfloor: '\u230A', - Lfr: '\uD835\uDD0F', - lfr: '\uD835\uDD29', - lg: '\u2276', - lgE: '\u2A91', - lHar: '\u2962', - lhard: '\u21BD', - lharu: '\u21BC', - lharul: '\u296A', - lhblk: '\u2584', - LJcy: '\u0409', - ljcy: '\u0459', - Ll: '\u22D8', - ll: '\u226A', - llarr: '\u21C7', - llcorner: '\u231E', - Lleftarrow: '\u21DA', - llhard: '\u296B', - lltri: '\u25FA', - Lmidot: '\u013F', - lmidot: '\u0140', - lmoust: '\u23B0', - lmoustache: '\u23B0', - lnap: '\u2A89', - lnapprox: '\u2A89', - lnE: '\u2268', - lne: '\u2A87', - lneq: '\u2A87', - lneqq: '\u2268', - lnsim: '\u22E6', - loang: '\u27EC', - loarr: '\u21FD', - lobrk: '\u27E6', - LongLeftArrow: '\u27F5', - Longleftarrow: '\u27F8', - longleftarrow: '\u27F5', - LongLeftRightArrow: '\u27F7', - Longleftrightarrow: '\u27FA', - longleftrightarrow: '\u27F7', - longmapsto: '\u27FC', - LongRightArrow: '\u27F6', - Longrightarrow: '\u27F9', - longrightarrow: '\u27F6', - looparrowleft: '\u21AB', - looparrowright: '\u21AC', - lopar: '\u2985', - Lopf: '\uD835\uDD43', - lopf: '\uD835\uDD5D', - loplus: '\u2A2D', - lotimes: '\u2A34', - lowast: '\u2217', - lowbar: '\u005F', - LowerLeftArrow: '\u2199', - LowerRightArrow: '\u2198', - loz: '\u25CA', - lozenge: '\u25CA', - lozf: '\u29EB', - lpar: '\u0028', - lparlt: '\u2993', - lrarr: '\u21C6', - lrcorner: '\u231F', - lrhar: '\u21CB', - lrhard: '\u296D', - lrm: '\u200E', - lrtri: '\u22BF', - lsaquo: '\u2039', - Lscr: '\u2112', - lscr: '\uD835\uDCC1', - Lsh: '\u21B0', - lsh: '\u21B0', - lsim: '\u2272', - lsime: '\u2A8D', - lsimg: '\u2A8F', - lsqb: '\u005B', - lsquo: '\u2018', - lsquor: '\u201A', - Lstrok: '\u0141', - lstrok: '\u0142', - Lt: '\u226A', - LT: '\u003C', - lt: '\u003C', - ltcc: '\u2AA6', - ltcir: '\u2A79', - ltdot: '\u22D6', - lthree: '\u22CB', - ltimes: '\u22C9', - ltlarr: '\u2976', - ltquest: '\u2A7B', - ltri: '\u25C3', - ltrie: '\u22B4', - ltrif: '\u25C2', - ltrPar: '\u2996', - lurdshar: '\u294A', - luruhar: '\u2966', - lvertneqq: '\u2268\uFE00', - lvnE: '\u2268\uFE00', - macr: '\u00AF', - male: '\u2642', - malt: '\u2720', - maltese: '\u2720', - Map: '\u2905', - map: '\u21A6', - mapsto: '\u21A6', - mapstodown: '\u21A7', - mapstoleft: '\u21A4', - mapstoup: '\u21A5', - marker: '\u25AE', - mcomma: '\u2A29', - Mcy: '\u041C', - mcy: '\u043C', - mdash: '\u2014', - mDDot: '\u223A', - measuredangle: '\u2221', - MediumSpace: '\u205F', - Mellintrf: '\u2133', - Mfr: '\uD835\uDD10', - mfr: '\uD835\uDD2A', - mho: '\u2127', - micro: '\u00B5', - mid: '\u2223', - midast: '\u002A', - midcir: '\u2AF0', - middot: '\u00B7', - minus: '\u2212', - minusb: '\u229F', - minusd: '\u2238', - minusdu: '\u2A2A', - MinusPlus: '\u2213', - mlcp: '\u2ADB', - mldr: '\u2026', - mnplus: '\u2213', - models: '\u22A7', - Mopf: '\uD835\uDD44', - mopf: '\uD835\uDD5E', - mp: '\u2213', - Mscr: '\u2133', - mscr: '\uD835\uDCC2', - mstpos: '\u223E', - Mu: '\u039C', - mu: '\u03BC', - multimap: '\u22B8', - mumap: '\u22B8', - nabla: '\u2207', - Nacute: '\u0143', - nacute: '\u0144', - nang: '\u2220\u20D2', - nap: '\u2249', - napE: '\u2A70\u0338', - napid: '\u224B\u0338', - napos: '\u0149', - napprox: '\u2249', - natur: '\u266E', - natural: '\u266E', - naturals: '\u2115', - nbsp: '\u00A0', - nbump: '\u224E\u0338', - nbumpe: '\u224F\u0338', - ncap: '\u2A43', - Ncaron: '\u0147', - ncaron: '\u0148', - Ncedil: '\u0145', - ncedil: '\u0146', - ncong: '\u2247', - ncongdot: '\u2A6D\u0338', - ncup: '\u2A42', - Ncy: '\u041D', - ncy: '\u043D', - ndash: '\u2013', - ne: '\u2260', - nearhk: '\u2924', - neArr: '\u21D7', - nearr: '\u2197', - nearrow: '\u2197', - nedot: '\u2250\u0338', - NegativeMediumSpace: '\u200B', - NegativeThickSpace: '\u200B', - NegativeThinSpace: '\u200B', - NegativeVeryThinSpace: '\u200B', - nequiv: '\u2262', - nesear: '\u2928', - nesim: '\u2242\u0338', - NestedGreaterGreater: '\u226B', - NestedLessLess: '\u226A', - NewLine: '\u000A', - nexist: '\u2204', - nexists: '\u2204', - Nfr: '\uD835\uDD11', - nfr: '\uD835\uDD2B', - ngE: '\u2267\u0338', - nge: '\u2271', - ngeq: '\u2271', - ngeqq: '\u2267\u0338', - ngeqslant: '\u2A7E\u0338', - nges: '\u2A7E\u0338', - nGg: '\u22D9\u0338', - ngsim: '\u2275', - nGt: '\u226B\u20D2', - ngt: '\u226F', - ngtr: '\u226F', - nGtv: '\u226B\u0338', - nhArr: '\u21CE', - nharr: '\u21AE', - nhpar: '\u2AF2', - ni: '\u220B', - nis: '\u22FC', - nisd: '\u22FA', - niv: '\u220B', - NJcy: '\u040A', - njcy: '\u045A', - nlArr: '\u21CD', - nlarr: '\u219A', - nldr: '\u2025', - nlE: '\u2266\u0338', - nle: '\u2270', - nLeftarrow: '\u21CD', - nleftarrow: '\u219A', - nLeftrightarrow: '\u21CE', - nleftrightarrow: '\u21AE', - nleq: '\u2270', - nleqq: '\u2266\u0338', - nleqslant: '\u2A7D\u0338', - nles: '\u2A7D\u0338', - nless: '\u226E', - nLl: '\u22D8\u0338', - nlsim: '\u2274', - nLt: '\u226A\u20D2', - nlt: '\u226E', - nltri: '\u22EA', - nltrie: '\u22EC', - nLtv: '\u226A\u0338', - nmid: '\u2224', - NoBreak: '\u2060', - NonBreakingSpace: '\u00A0', - Nopf: '\u2115', - nopf: '\uD835\uDD5F', - Not: '\u2AEC', - not: '\u00AC', - NotCongruent: '\u2262', - NotCupCap: '\u226D', - NotDoubleVerticalBar: '\u2226', - NotElement: '\u2209', - NotEqual: '\u2260', - NotEqualTilde: '\u2242\u0338', - NotExists: '\u2204', - NotGreater: '\u226F', - NotGreaterEqual: '\u2271', - NotGreaterFullEqual: '\u2267\u0338', - NotGreaterGreater: '\u226B\u0338', - NotGreaterLess: '\u2279', - NotGreaterSlantEqual: '\u2A7E\u0338', - NotGreaterTilde: '\u2275', - NotHumpDownHump: '\u224E\u0338', - NotHumpEqual: '\u224F\u0338', - notin: '\u2209', - notindot: '\u22F5\u0338', - notinE: '\u22F9\u0338', - notinva: '\u2209', - notinvb: '\u22F7', - notinvc: '\u22F6', - NotLeftTriangle: '\u22EA', - NotLeftTriangleBar: '\u29CF\u0338', - NotLeftTriangleEqual: '\u22EC', - NotLess: '\u226E', - NotLessEqual: '\u2270', - NotLessGreater: '\u2278', - NotLessLess: '\u226A\u0338', - NotLessSlantEqual: '\u2A7D\u0338', - NotLessTilde: '\u2274', - NotNestedGreaterGreater: '\u2AA2\u0338', - NotNestedLessLess: '\u2AA1\u0338', - notni: '\u220C', - notniva: '\u220C', - notnivb: '\u22FE', - notnivc: '\u22FD', - NotPrecedes: '\u2280', - NotPrecedesEqual: '\u2AAF\u0338', - NotPrecedesSlantEqual: '\u22E0', - NotReverseElement: '\u220C', - NotRightTriangle: '\u22EB', - NotRightTriangleBar: '\u29D0\u0338', - NotRightTriangleEqual: '\u22ED', - NotSquareSubset: '\u228F\u0338', - NotSquareSubsetEqual: '\u22E2', - NotSquareSuperset: '\u2290\u0338', - NotSquareSupersetEqual: '\u22E3', - NotSubset: '\u2282\u20D2', - NotSubsetEqual: '\u2288', - NotSucceeds: '\u2281', - NotSucceedsEqual: '\u2AB0\u0338', - NotSucceedsSlantEqual: '\u22E1', - NotSucceedsTilde: '\u227F\u0338', - NotSuperset: '\u2283\u20D2', - NotSupersetEqual: '\u2289', - NotTilde: '\u2241', - NotTildeEqual: '\u2244', - NotTildeFullEqual: '\u2247', - NotTildeTilde: '\u2249', - NotVerticalBar: '\u2224', - npar: '\u2226', - nparallel: '\u2226', - nparsl: '\u2AFD\u20E5', - npart: '\u2202\u0338', - npolint: '\u2A14', - npr: '\u2280', - nprcue: '\u22E0', - npre: '\u2AAF\u0338', - nprec: '\u2280', - npreceq: '\u2AAF\u0338', - nrArr: '\u21CF', - nrarr: '\u219B', - nrarrc: '\u2933\u0338', - nrarrw: '\u219D\u0338', - nRightarrow: '\u21CF', - nrightarrow: '\u219B', - nrtri: '\u22EB', - nrtrie: '\u22ED', - nsc: '\u2281', - nsccue: '\u22E1', - nsce: '\u2AB0\u0338', - Nscr: '\uD835\uDCA9', - nscr: '\uD835\uDCC3', - nshortmid: '\u2224', - nshortparallel: '\u2226', - nsim: '\u2241', - nsime: '\u2244', - nsimeq: '\u2244', - nsmid: '\u2224', - nspar: '\u2226', - nsqsube: '\u22E2', - nsqsupe: '\u22E3', - nsub: '\u2284', - nsubE: '\u2AC5\u0338', - nsube: '\u2288', - nsubset: '\u2282\u20D2', - nsubseteq: '\u2288', - nsubseteqq: '\u2AC5\u0338', - nsucc: '\u2281', - nsucceq: '\u2AB0\u0338', - nsup: '\u2285', - nsupE: '\u2AC6\u0338', - nsupe: '\u2289', - nsupset: '\u2283\u20D2', - nsupseteq: '\u2289', - nsupseteqq: '\u2AC6\u0338', - ntgl: '\u2279', - Ntilde: '\u00D1', - ntilde: '\u00F1', - ntlg: '\u2278', - ntriangleleft: '\u22EA', - ntrianglelefteq: '\u22EC', - ntriangleright: '\u22EB', - ntrianglerighteq: '\u22ED', - Nu: '\u039D', - nu: '\u03BD', - num: '\u0023', - numero: '\u2116', - numsp: '\u2007', - nvap: '\u224D\u20D2', - nVDash: '\u22AF', - nVdash: '\u22AE', - nvDash: '\u22AD', - nvdash: '\u22AC', - nvge: '\u2265\u20D2', - nvgt: '\u003E\u20D2', - nvHarr: '\u2904', - nvinfin: '\u29DE', - nvlArr: '\u2902', - nvle: '\u2264\u20D2', - nvlt: '\u003C\u20D2', - nvltrie: '\u22B4\u20D2', - nvrArr: '\u2903', - nvrtrie: '\u22B5\u20D2', - nvsim: '\u223C\u20D2', - nwarhk: '\u2923', - nwArr: '\u21D6', - nwarr: '\u2196', - nwarrow: '\u2196', - nwnear: '\u2927', - Oacute: '\u00D3', - oacute: '\u00F3', - oast: '\u229B', - ocir: '\u229A', - Ocirc: '\u00D4', - ocirc: '\u00F4', - Ocy: '\u041E', - ocy: '\u043E', - odash: '\u229D', - Odblac: '\u0150', - odblac: '\u0151', - odiv: '\u2A38', - odot: '\u2299', - odsold: '\u29BC', - OElig: '\u0152', - oelig: '\u0153', - ofcir: '\u29BF', - Ofr: '\uD835\uDD12', - ofr: '\uD835\uDD2C', - ogon: '\u02DB', - Ograve: '\u00D2', - ograve: '\u00F2', - ogt: '\u29C1', - ohbar: '\u29B5', - ohm: '\u03A9', - oint: '\u222E', - olarr: '\u21BA', - olcir: '\u29BE', - olcross: '\u29BB', - oline: '\u203E', - olt: '\u29C0', - Omacr: '\u014C', - omacr: '\u014D', - Omega: '\u03A9', - omega: '\u03C9', - Omicron: '\u039F', - omicron: '\u03BF', - omid: '\u29B6', - ominus: '\u2296', - Oopf: '\uD835\uDD46', - oopf: '\uD835\uDD60', - opar: '\u29B7', - OpenCurlyDoubleQuote: '\u201C', - OpenCurlyQuote: '\u2018', - operp: '\u29B9', - oplus: '\u2295', - Or: '\u2A54', - or: '\u2228', - orarr: '\u21BB', - ord: '\u2A5D', - order: '\u2134', - orderof: '\u2134', - ordf: '\u00AA', - ordm: '\u00BA', - origof: '\u22B6', - oror: '\u2A56', - orslope: '\u2A57', - orv: '\u2A5B', - oS: '\u24C8', - Oscr: '\uD835\uDCAA', - oscr: '\u2134', - Oslash: '\u00D8', - oslash: '\u00F8', - osol: '\u2298', - Otilde: '\u00D5', - otilde: '\u00F5', - Otimes: '\u2A37', - otimes: '\u2297', - otimesas: '\u2A36', - Ouml: '\u00D6', - ouml: '\u00F6', - ovbar: '\u233D', - OverBar: '\u203E', - OverBrace: '\u23DE', - OverBracket: '\u23B4', - OverParenthesis: '\u23DC', - par: '\u2225', - para: '\u00B6', - parallel: '\u2225', - parsim: '\u2AF3', - parsl: '\u2AFD', - part: '\u2202', - PartialD: '\u2202', - Pcy: '\u041F', - pcy: '\u043F', - percnt: '\u0025', - period: '\u002E', - permil: '\u2030', - perp: '\u22A5', - pertenk: '\u2031', - Pfr: '\uD835\uDD13', - pfr: '\uD835\uDD2D', - Phi: '\u03A6', - phi: '\u03C6', - phiv: '\u03D5', - phmmat: '\u2133', - phone: '\u260E', - Pi: '\u03A0', - pi: '\u03C0', - pitchfork: '\u22D4', - piv: '\u03D6', - planck: '\u210F', - planckh: '\u210E', - plankv: '\u210F', - plus: '\u002B', - plusacir: '\u2A23', - plusb: '\u229E', - pluscir: '\u2A22', - plusdo: '\u2214', - plusdu: '\u2A25', - pluse: '\u2A72', - PlusMinus: '\u00B1', - plusmn: '\u00B1', - plussim: '\u2A26', - plustwo: '\u2A27', - pm: '\u00B1', - Poincareplane: '\u210C', - pointint: '\u2A15', - Popf: '\u2119', - popf: '\uD835\uDD61', - pound: '\u00A3', - Pr: '\u2ABB', - pr: '\u227A', - prap: '\u2AB7', - prcue: '\u227C', - prE: '\u2AB3', - pre: '\u2AAF', - prec: '\u227A', - precapprox: '\u2AB7', - preccurlyeq: '\u227C', - Precedes: '\u227A', - PrecedesEqual: '\u2AAF', - PrecedesSlantEqual: '\u227C', - PrecedesTilde: '\u227E', - preceq: '\u2AAF', - precnapprox: '\u2AB9', - precneqq: '\u2AB5', - precnsim: '\u22E8', - precsim: '\u227E', - Prime: '\u2033', - prime: '\u2032', - primes: '\u2119', - prnap: '\u2AB9', - prnE: '\u2AB5', - prnsim: '\u22E8', - prod: '\u220F', - Product: '\u220F', - profalar: '\u232E', - profline: '\u2312', - profsurf: '\u2313', - prop: '\u221D', - Proportion: '\u2237', - Proportional: '\u221D', - propto: '\u221D', - prsim: '\u227E', - prurel: '\u22B0', - Pscr: '\uD835\uDCAB', - pscr: '\uD835\uDCC5', - Psi: '\u03A8', - psi: '\u03C8', - puncsp: '\u2008', - Qfr: '\uD835\uDD14', - qfr: '\uD835\uDD2E', - qint: '\u2A0C', - Qopf: '\u211A', - qopf: '\uD835\uDD62', - qprime: '\u2057', - Qscr: '\uD835\uDCAC', - qscr: '\uD835\uDCC6', - quaternions: '\u210D', - quatint: '\u2A16', - quest: '\u003F', - questeq: '\u225F', - QUOT: '\u0022', - quot: '\u0022', - rAarr: '\u21DB', - race: '\u223D\u0331', - Racute: '\u0154', - racute: '\u0155', - radic: '\u221A', - raemptyv: '\u29B3', - Rang: '\u27EB', - rang: '\u27E9', - rangd: '\u2992', - range: '\u29A5', - rangle: '\u27E9', - raquo: '\u00BB', - Rarr: '\u21A0', - rArr: '\u21D2', - rarr: '\u2192', - rarrap: '\u2975', - rarrb: '\u21E5', - rarrbfs: '\u2920', - rarrc: '\u2933', - rarrfs: '\u291E', - rarrhk: '\u21AA', - rarrlp: '\u21AC', - rarrpl: '\u2945', - rarrsim: '\u2974', - Rarrtl: '\u2916', - rarrtl: '\u21A3', - rarrw: '\u219D', - rAtail: '\u291C', - ratail: '\u291A', - ratio: '\u2236', - rationals: '\u211A', - RBarr: '\u2910', - rBarr: '\u290F', - rbarr: '\u290D', - rbbrk: '\u2773', - rbrace: '\u007D', - rbrack: '\u005D', - rbrke: '\u298C', - rbrksld: '\u298E', - rbrkslu: '\u2990', - Rcaron: '\u0158', - rcaron: '\u0159', - Rcedil: '\u0156', - rcedil: '\u0157', - rceil: '\u2309', - rcub: '\u007D', - Rcy: '\u0420', - rcy: '\u0440', - rdca: '\u2937', - rdldhar: '\u2969', - rdquo: '\u201D', - rdquor: '\u201D', - rdsh: '\u21B3', - Re: '\u211C', - real: '\u211C', - realine: '\u211B', - realpart: '\u211C', - reals: '\u211D', - rect: '\u25AD', - REG: '\u00AE', - reg: '\u00AE', - ReverseElement: '\u220B', - ReverseEquilibrium: '\u21CB', - ReverseUpEquilibrium: '\u296F', - rfisht: '\u297D', - rfloor: '\u230B', - Rfr: '\u211C', - rfr: '\uD835\uDD2F', - rHar: '\u2964', - rhard: '\u21C1', - rharu: '\u21C0', - rharul: '\u296C', - Rho: '\u03A1', - rho: '\u03C1', - rhov: '\u03F1', - RightAngleBracket: '\u27E9', - RightArrow: '\u2192', - Rightarrow: '\u21D2', - rightarrow: '\u2192', - RightArrowBar: '\u21E5', - RightArrowLeftArrow: '\u21C4', - rightarrowtail: '\u21A3', - RightCeiling: '\u2309', - RightDoubleBracket: '\u27E7', - RightDownTeeVector: '\u295D', - RightDownVector: '\u21C2', - RightDownVectorBar: '\u2955', - RightFloor: '\u230B', - rightharpoondown: '\u21C1', - rightharpoonup: '\u21C0', - rightleftarrows: '\u21C4', - rightleftharpoons: '\u21CC', - rightrightarrows: '\u21C9', - rightsquigarrow: '\u219D', - RightTee: '\u22A2', - RightTeeArrow: '\u21A6', - RightTeeVector: '\u295B', - rightthreetimes: '\u22CC', - RightTriangle: '\u22B3', - RightTriangleBar: '\u29D0', - RightTriangleEqual: '\u22B5', - RightUpDownVector: '\u294F', - RightUpTeeVector: '\u295C', - RightUpVector: '\u21BE', - RightUpVectorBar: '\u2954', - RightVector: '\u21C0', - RightVectorBar: '\u2953', - ring: '\u02DA', - risingdotseq: '\u2253', - rlarr: '\u21C4', - rlhar: '\u21CC', - rlm: '\u200F', - rmoust: '\u23B1', - rmoustache: '\u23B1', - rnmid: '\u2AEE', - roang: '\u27ED', - roarr: '\u21FE', - robrk: '\u27E7', - ropar: '\u2986', - Ropf: '\u211D', - ropf: '\uD835\uDD63', - roplus: '\u2A2E', - rotimes: '\u2A35', - RoundImplies: '\u2970', - rpar: '\u0029', - rpargt: '\u2994', - rppolint: '\u2A12', - rrarr: '\u21C9', - Rrightarrow: '\u21DB', - rsaquo: '\u203A', - Rscr: '\u211B', - rscr: '\uD835\uDCC7', - Rsh: '\u21B1', - rsh: '\u21B1', - rsqb: '\u005D', - rsquo: '\u2019', - rsquor: '\u2019', - rthree: '\u22CC', - rtimes: '\u22CA', - rtri: '\u25B9', - rtrie: '\u22B5', - rtrif: '\u25B8', - rtriltri: '\u29CE', - RuleDelayed: '\u29F4', - ruluhar: '\u2968', - rx: '\u211E', - Sacute: '\u015A', - sacute: '\u015B', - sbquo: '\u201A', - Sc: '\u2ABC', - sc: '\u227B', - scap: '\u2AB8', - Scaron: '\u0160', - scaron: '\u0161', - sccue: '\u227D', - scE: '\u2AB4', - sce: '\u2AB0', - Scedil: '\u015E', - scedil: '\u015F', - Scirc: '\u015C', - scirc: '\u015D', - scnap: '\u2ABA', - scnE: '\u2AB6', - scnsim: '\u22E9', - scpolint: '\u2A13', - scsim: '\u227F', - Scy: '\u0421', - scy: '\u0441', - sdot: '\u22C5', - sdotb: '\u22A1', - sdote: '\u2A66', - searhk: '\u2925', - seArr: '\u21D8', - searr: '\u2198', - searrow: '\u2198', - sect: '\u00A7', - semi: '\u003B', - seswar: '\u2929', - setminus: '\u2216', - setmn: '\u2216', - sext: '\u2736', - Sfr: '\uD835\uDD16', - sfr: '\uD835\uDD30', - sfrown: '\u2322', - sharp: '\u266F', - SHCHcy: '\u0429', - shchcy: '\u0449', - SHcy: '\u0428', - shcy: '\u0448', - ShortDownArrow: '\u2193', - ShortLeftArrow: '\u2190', - shortmid: '\u2223', - shortparallel: '\u2225', - ShortRightArrow: '\u2192', - ShortUpArrow: '\u2191', - shy: '\u00AD', - Sigma: '\u03A3', - sigma: '\u03C3', - sigmaf: '\u03C2', - sigmav: '\u03C2', - sim: '\u223C', - simdot: '\u2A6A', - sime: '\u2243', - simeq: '\u2243', - simg: '\u2A9E', - simgE: '\u2AA0', - siml: '\u2A9D', - simlE: '\u2A9F', - simne: '\u2246', - simplus: '\u2A24', - simrarr: '\u2972', - slarr: '\u2190', - SmallCircle: '\u2218', - smallsetminus: '\u2216', - smashp: '\u2A33', - smeparsl: '\u29E4', - smid: '\u2223', - smile: '\u2323', - smt: '\u2AAA', - smte: '\u2AAC', - smtes: '\u2AAC\uFE00', - SOFTcy: '\u042C', - softcy: '\u044C', - sol: '\u002F', - solb: '\u29C4', - solbar: '\u233F', - Sopf: '\uD835\uDD4A', - sopf: '\uD835\uDD64', - spades: '\u2660', - spadesuit: '\u2660', - spar: '\u2225', - sqcap: '\u2293', - sqcaps: '\u2293\uFE00', - sqcup: '\u2294', - sqcups: '\u2294\uFE00', - Sqrt: '\u221A', - sqsub: '\u228F', - sqsube: '\u2291', - sqsubset: '\u228F', - sqsubseteq: '\u2291', - sqsup: '\u2290', - sqsupe: '\u2292', - sqsupset: '\u2290', - sqsupseteq: '\u2292', - squ: '\u25A1', - Square: '\u25A1', - square: '\u25A1', - SquareIntersection: '\u2293', - SquareSubset: '\u228F', - SquareSubsetEqual: '\u2291', - SquareSuperset: '\u2290', - SquareSupersetEqual: '\u2292', - SquareUnion: '\u2294', - squarf: '\u25AA', - squf: '\u25AA', - srarr: '\u2192', - Sscr: '\uD835\uDCAE', - sscr: '\uD835\uDCC8', - ssetmn: '\u2216', - ssmile: '\u2323', - sstarf: '\u22C6', - Star: '\u22C6', - star: '\u2606', - starf: '\u2605', - straightepsilon: '\u03F5', - straightphi: '\u03D5', - strns: '\u00AF', - Sub: '\u22D0', - sub: '\u2282', - subdot: '\u2ABD', - subE: '\u2AC5', - sube: '\u2286', - subedot: '\u2AC3', - submult: '\u2AC1', - subnE: '\u2ACB', - subne: '\u228A', - subplus: '\u2ABF', - subrarr: '\u2979', - Subset: '\u22D0', - subset: '\u2282', - subseteq: '\u2286', - subseteqq: '\u2AC5', - SubsetEqual: '\u2286', - subsetneq: '\u228A', - subsetneqq: '\u2ACB', - subsim: '\u2AC7', - subsub: '\u2AD5', - subsup: '\u2AD3', - succ: '\u227B', - succapprox: '\u2AB8', - succcurlyeq: '\u227D', - Succeeds: '\u227B', - SucceedsEqual: '\u2AB0', - SucceedsSlantEqual: '\u227D', - SucceedsTilde: '\u227F', - succeq: '\u2AB0', - succnapprox: '\u2ABA', - succneqq: '\u2AB6', - succnsim: '\u22E9', - succsim: '\u227F', - SuchThat: '\u220B', - Sum: '\u2211', - sum: '\u2211', - sung: '\u266A', - Sup: '\u22D1', - sup: '\u2283', - sup1: '\u00B9', - sup2: '\u00B2', - sup3: '\u00B3', - supdot: '\u2ABE', - supdsub: '\u2AD8', - supE: '\u2AC6', - supe: '\u2287', - supedot: '\u2AC4', - Superset: '\u2283', - SupersetEqual: '\u2287', - suphsol: '\u27C9', - suphsub: '\u2AD7', - suplarr: '\u297B', - supmult: '\u2AC2', - supnE: '\u2ACC', - supne: '\u228B', - supplus: '\u2AC0', - Supset: '\u22D1', - supset: '\u2283', - supseteq: '\u2287', - supseteqq: '\u2AC6', - supsetneq: '\u228B', - supsetneqq: '\u2ACC', - supsim: '\u2AC8', - supsub: '\u2AD4', - supsup: '\u2AD6', - swarhk: '\u2926', - swArr: '\u21D9', - swarr: '\u2199', - swarrow: '\u2199', - swnwar: '\u292A', - szlig: '\u00DF', - Tab: '\u0009', - target: '\u2316', - Tau: '\u03A4', - tau: '\u03C4', - tbrk: '\u23B4', - Tcaron: '\u0164', - tcaron: '\u0165', - Tcedil: '\u0162', - tcedil: '\u0163', - Tcy: '\u0422', - tcy: '\u0442', - tdot: '\u20DB', - telrec: '\u2315', - Tfr: '\uD835\uDD17', - tfr: '\uD835\uDD31', - there4: '\u2234', - Therefore: '\u2234', - therefore: '\u2234', - Theta: '\u0398', - theta: '\u03B8', - thetasym: '\u03D1', - thetav: '\u03D1', - thickapprox: '\u2248', - thicksim: '\u223C', - ThickSpace: '\u205F\u200A', - thinsp: '\u2009', - ThinSpace: '\u2009', - thkap: '\u2248', - thksim: '\u223C', - THORN: '\u00DE', - thorn: '\u00FE', - Tilde: '\u223C', - tilde: '\u02DC', - TildeEqual: '\u2243', - TildeFullEqual: '\u2245', - TildeTilde: '\u2248', - times: '\u00D7', - timesb: '\u22A0', - timesbar: '\u2A31', - timesd: '\u2A30', - tint: '\u222D', - toea: '\u2928', - top: '\u22A4', - topbot: '\u2336', - topcir: '\u2AF1', - Topf: '\uD835\uDD4B', - topf: '\uD835\uDD65', - topfork: '\u2ADA', - tosa: '\u2929', - tprime: '\u2034', - TRADE: '\u2122', - trade: '\u2122', - triangle: '\u25B5', - triangledown: '\u25BF', - triangleleft: '\u25C3', - trianglelefteq: '\u22B4', - triangleq: '\u225C', - triangleright: '\u25B9', - trianglerighteq: '\u22B5', - tridot: '\u25EC', - trie: '\u225C', - triminus: '\u2A3A', - TripleDot: '\u20DB', - triplus: '\u2A39', - trisb: '\u29CD', - tritime: '\u2A3B', - trpezium: '\u23E2', - Tscr: '\uD835\uDCAF', - tscr: '\uD835\uDCC9', - TScy: '\u0426', - tscy: '\u0446', - TSHcy: '\u040B', - tshcy: '\u045B', - Tstrok: '\u0166', - tstrok: '\u0167', - twixt: '\u226C', - twoheadleftarrow: '\u219E', - twoheadrightarrow: '\u21A0', - Uacute: '\u00DA', - uacute: '\u00FA', - Uarr: '\u219F', - uArr: '\u21D1', - uarr: '\u2191', - Uarrocir: '\u2949', - Ubrcy: '\u040E', - ubrcy: '\u045E', - Ubreve: '\u016C', - ubreve: '\u016D', - Ucirc: '\u00DB', - ucirc: '\u00FB', - Ucy: '\u0423', - ucy: '\u0443', - udarr: '\u21C5', - Udblac: '\u0170', - udblac: '\u0171', - udhar: '\u296E', - ufisht: '\u297E', - Ufr: '\uD835\uDD18', - ufr: '\uD835\uDD32', - Ugrave: '\u00D9', - ugrave: '\u00F9', - uHar: '\u2963', - uharl: '\u21BF', - uharr: '\u21BE', - uhblk: '\u2580', - ulcorn: '\u231C', - ulcorner: '\u231C', - ulcrop: '\u230F', - ultri: '\u25F8', - Umacr: '\u016A', - umacr: '\u016B', - uml: '\u00A8', - UnderBar: '\u005F', - UnderBrace: '\u23DF', - UnderBracket: '\u23B5', - UnderParenthesis: '\u23DD', - Union: '\u22C3', - UnionPlus: '\u228E', - Uogon: '\u0172', - uogon: '\u0173', - Uopf: '\uD835\uDD4C', - uopf: '\uD835\uDD66', - UpArrow: '\u2191', - Uparrow: '\u21D1', - uparrow: '\u2191', - UpArrowBar: '\u2912', - UpArrowDownArrow: '\u21C5', - UpDownArrow: '\u2195', - Updownarrow: '\u21D5', - updownarrow: '\u2195', - UpEquilibrium: '\u296E', - upharpoonleft: '\u21BF', - upharpoonright: '\u21BE', - uplus: '\u228E', - UpperLeftArrow: '\u2196', - UpperRightArrow: '\u2197', - Upsi: '\u03D2', - upsi: '\u03C5', - upsih: '\u03D2', - Upsilon: '\u03A5', - upsilon: '\u03C5', - UpTee: '\u22A5', - UpTeeArrow: '\u21A5', - upuparrows: '\u21C8', - urcorn: '\u231D', - urcorner: '\u231D', - urcrop: '\u230E', - Uring: '\u016E', - uring: '\u016F', - urtri: '\u25F9', - Uscr: '\uD835\uDCB0', - uscr: '\uD835\uDCCA', - utdot: '\u22F0', - Utilde: '\u0168', - utilde: '\u0169', - utri: '\u25B5', - utrif: '\u25B4', - uuarr: '\u21C8', - Uuml: '\u00DC', - uuml: '\u00FC', - uwangle: '\u29A7', - vangrt: '\u299C', - varepsilon: '\u03F5', - varkappa: '\u03F0', - varnothing: '\u2205', - varphi: '\u03D5', - varpi: '\u03D6', - varpropto: '\u221D', - vArr: '\u21D5', - varr: '\u2195', - varrho: '\u03F1', - varsigma: '\u03C2', - varsubsetneq: '\u228A\uFE00', - varsubsetneqq: '\u2ACB\uFE00', - varsupsetneq: '\u228B\uFE00', - varsupsetneqq: '\u2ACC\uFE00', - vartheta: '\u03D1', - vartriangleleft: '\u22B2', - vartriangleright: '\u22B3', - Vbar: '\u2AEB', - vBar: '\u2AE8', - vBarv: '\u2AE9', - Vcy: '\u0412', - vcy: '\u0432', - VDash: '\u22AB', - Vdash: '\u22A9', - vDash: '\u22A8', - vdash: '\u22A2', - Vdashl: '\u2AE6', - Vee: '\u22C1', - vee: '\u2228', - veebar: '\u22BB', - veeeq: '\u225A', - vellip: '\u22EE', - Verbar: '\u2016', - verbar: '\u007C', - Vert: '\u2016', - vert: '\u007C', - VerticalBar: '\u2223', - VerticalLine: '\u007C', - VerticalSeparator: '\u2758', - VerticalTilde: '\u2240', - VeryThinSpace: '\u200A', - Vfr: '\uD835\uDD19', - vfr: '\uD835\uDD33', - vltri: '\u22B2', - vnsub: '\u2282\u20D2', - vnsup: '\u2283\u20D2', - Vopf: '\uD835\uDD4D', - vopf: '\uD835\uDD67', - vprop: '\u221D', - vrtri: '\u22B3', - Vscr: '\uD835\uDCB1', - vscr: '\uD835\uDCCB', - vsubnE: '\u2ACB\uFE00', - vsubne: '\u228A\uFE00', - vsupnE: '\u2ACC\uFE00', - vsupne: '\u228B\uFE00', - Vvdash: '\u22AA', - vzigzag: '\u299A', - Wcirc: '\u0174', - wcirc: '\u0175', - wedbar: '\u2A5F', - Wedge: '\u22C0', - wedge: '\u2227', - wedgeq: '\u2259', - weierp: '\u2118', - Wfr: '\uD835\uDD1A', - wfr: '\uD835\uDD34', - Wopf: '\uD835\uDD4E', - wopf: '\uD835\uDD68', - wp: '\u2118', - wr: '\u2240', - wreath: '\u2240', - Wscr: '\uD835\uDCB2', - wscr: '\uD835\uDCCC', - xcap: '\u22C2', - xcirc: '\u25EF', - xcup: '\u22C3', - xdtri: '\u25BD', - Xfr: '\uD835\uDD1B', - xfr: '\uD835\uDD35', - xhArr: '\u27FA', - xharr: '\u27F7', - Xi: '\u039E', - xi: '\u03BE', - xlArr: '\u27F8', - xlarr: '\u27F5', - xmap: '\u27FC', - xnis: '\u22FB', - xodot: '\u2A00', - Xopf: '\uD835\uDD4F', - xopf: '\uD835\uDD69', - xoplus: '\u2A01', - xotime: '\u2A02', - xrArr: '\u27F9', - xrarr: '\u27F6', - Xscr: '\uD835\uDCB3', - xscr: '\uD835\uDCCD', - xsqcup: '\u2A06', - xuplus: '\u2A04', - xutri: '\u25B3', - xvee: '\u22C1', - xwedge: '\u22C0', - Yacute: '\u00DD', - yacute: '\u00FD', - YAcy: '\u042F', - yacy: '\u044F', - Ycirc: '\u0176', - ycirc: '\u0177', - Ycy: '\u042B', - ycy: '\u044B', - yen: '\u00A5', - Yfr: '\uD835\uDD1C', - yfr: '\uD835\uDD36', - YIcy: '\u0407', - yicy: '\u0457', - Yopf: '\uD835\uDD50', - yopf: '\uD835\uDD6A', - Yscr: '\uD835\uDCB4', - yscr: '\uD835\uDCCE', - YUcy: '\u042E', - yucy: '\u044E', - Yuml: '\u0178', - yuml: '\u00FF', - Zacute: '\u0179', - zacute: '\u017A', - Zcaron: '\u017D', - zcaron: '\u017E', - Zcy: '\u0417', - zcy: '\u0437', - Zdot: '\u017B', - zdot: '\u017C', - zeetrf: '\u2128', - ZeroWidthSpace: '\u200B', - Zeta: '\u0396', - zeta: '\u03B6', - Zfr: '\u2128', - zfr: '\uD835\uDD37', - ZHcy: '\u0416', - zhcy: '\u0436', - zigrarr: '\u21DD', - Zopf: '\u2124', - zopf: '\uD835\uDD6B', - Zscr: '\uD835\uDCB5', - zscr: '\uD835\uDCCF', - zwj: '\u200D', - zwnj: '\u200C', -}); - -/** - * @deprecated use `HTML_ENTITIES` instead - * @see HTML_ENTITIES - */ -exports.entityMap = exports.HTML_ENTITIES; - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js": -/*!**************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var dom = __webpack_require__(/*! ./dom */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js") -exports.DOMImplementation = dom.DOMImplementation -exports.XMLSerializer = dom.XMLSerializer -exports.DOMParser = __webpack_require__(/*! ./dom-parser */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser - - -/***/ }), - -/***/ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js": -/*!************************************************************************!*\ - !*** ./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var NAMESPACE = (__webpack_require__(/*! ./conventions */ "./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE); - -//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] -//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] -//[5] Name ::= NameStartChar (NameChar)* -var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF -var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); -var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); -//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/ -//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') - -//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE -//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE -var S_TAG = 0;//tag name offerring -var S_ATTR = 1;//attr name offerring -var S_ATTR_SPACE=2;//attr name end and space offer -var S_EQ = 3;//=space? -var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only) -var S_ATTR_END = 5;//attr value end and no space(quot end) -var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer) -var S_TAG_CLOSE = 7;//closed el - -/** - * Creates an error that will not be caught by XMLReader aka the SAX parser. - * - * @param {string} message - * @param {any?} locator Optional, can provide details about the location in the source - * @constructor - */ -function ParseError(message, locator) { - this.message = message - this.locator = locator - if(Error.captureStackTrace) Error.captureStackTrace(this, ParseError); -} -ParseError.prototype = new Error(); -ParseError.prototype.name = ParseError.name - -function XMLReader(){ - -} - -XMLReader.prototype = { - parse:function(source,defaultNSMap,entityMap){ - var domBuilder = this.domBuilder; - domBuilder.startDocument(); - _copy(defaultNSMap ,defaultNSMap = {}) - parse(source,defaultNSMap,entityMap, - domBuilder,this.errorHandler); - domBuilder.endDocument(); - } -} -function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ - function fixedFromCharCode(code) { - // String.prototype.fromCharCode does not supports - // > 2 bytes unicode chars directly - if (code > 0xffff) { - code -= 0x10000; - var surrogate1 = 0xd800 + (code >> 10) - , surrogate2 = 0xdc00 + (code & 0x3ff); - - return String.fromCharCode(surrogate1, surrogate2); - } else { - return String.fromCharCode(code); - } - } - function entityReplacer(a){ - var k = a.slice(1,-1); - if (Object.hasOwnProperty.call(entityMap, k)) { - return entityMap[k]; - }else if(k.charAt(0) === '#'){ - return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) - }else{ - errorHandler.error('entity not found:'+a); - return a; - } - } - function appendText(end){//has some bugs - if(end>start){ - var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); - locator&&position(start); - domBuilder.characters(xt,0,end-start); - start = end - } - } - function position(p,m){ - while(p>=lineEnd && (m = linePattern.exec(source))){ - lineStart = m.index; - lineEnd = lineStart + m[0].length; - locator.lineNumber++; - //console.log('line++:',locator,startPos,endPos) - } - locator.columnNumber = p-lineStart+1; - } - var lineStart = 0; - var lineEnd = 0; - var linePattern = /.*(?:\r\n?|\n)|.*$/g - var locator = domBuilder.locator; - - var parseStack = [{currentNSMap:defaultNSMapCopy}] - var closeMap = {}; - var start = 0; - while(true){ - try{ - var tagStart = source.indexOf('<',start); - if(tagStart<0){ - if(!source.substr(start).match(/^\s*$/)){ - var doc = domBuilder.doc; - var text = doc.createTextNode(source.substr(start)); - doc.appendChild(text); - domBuilder.currentElement = text; - } - return; - } - if(tagStart>start){ - appendText(tagStart); - } - switch(source.charAt(tagStart+1)){ - case '/': - var end = source.indexOf('>',tagStart+3); - var tagName = source.substring(tagStart + 2, end).replace(/[ \t\n\r]+$/g, ''); - var config = parseStack.pop(); - if(end<0){ - - tagName = source.substring(tagStart+2).replace(/[\s<].*/,''); - errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName); - end = tagStart+1+tagName.length; - }else if(tagName.match(/\s - locator&&position(tagStart); - end = parseInstruction(source,tagStart,domBuilder); - break; - case '!':// start){ - start = end; - }else{ - //TODO: 这里有可能sax回退,有位置错误风险 - appendText(Math.max(tagStart,start)+1); - } - } -} -function copyLocator(f,t){ - t.lineNumber = f.lineNumber; - t.columnNumber = f.columnNumber; - return t; -} - -/** - * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack); - * @return end of the elementStartPart(end of elementEndPart for selfClosed el) - */ -function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){ - - /** - * @param {string} qname - * @param {string} value - * @param {number} startIndex - */ - function addAttribute(qname, value, startIndex) { - if (el.attributeNames.hasOwnProperty(qname)) { - errorHandler.fatalError('Attribute ' + qname + ' redefined') - } - el.addValue( - qname, - // @see https://www.w3.org/TR/xml/#AVNormalize - // since the xmldom sax parser does not "interpret" DTD the following is not implemented: - // - recursive replacement of (DTD) entity references - // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA - value.replace(/[\t\n\r]/g, ' ').replace(/&#?\w+;/g, entityReplacer), - startIndex - ) - } - var attrName; - var value; - var p = ++start; - var s = S_TAG;//status - while(true){ - var c = source.charAt(p); - switch(c){ - case '=': - if(s === S_ATTR){//attrName - attrName = source.slice(start,p); - s = S_EQ; - }else if(s === S_ATTR_SPACE){ - s = S_EQ; - }else{ - //fatalError: equal must after attrName or space after attrName - throw new Error('attribute equal must after attrName'); // No known test case - } - break; - case '\'': - case '"': - if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE - ){//equal - if(s === S_ATTR){ - errorHandler.warning('attribute value must after "="') - attrName = source.slice(start,p) - } - start = p+1; - p = source.indexOf(c,start) - if(p>0){ - value = source.slice(start, p); - addAttribute(attrName, value, start-1); - s = S_ATTR_END; - }else{ - //fatalError: no end quot match - throw new Error('attribute value no end \''+c+'\' match'); - } - }else if(s == S_ATTR_NOQUOT_VALUE){ - value = source.slice(start, p); - addAttribute(attrName, value, start); - errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); - start = p+1; - s = S_ATTR_END - }else{ - //fatalError: no equal before - throw new Error('attribute value must after "="'); // No known test case - } - break; - case '/': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - s =S_TAG_CLOSE; - el.closed = true; - case S_ATTR_NOQUOT_VALUE: - case S_ATTR: - break; - case S_ATTR_SPACE: - el.closed = true; - break; - //case S_EQ: - default: - throw new Error("attribute invalid close char('/')") // No known test case - } - break; - case ''://end document - errorHandler.error('unexpected end of input'); - if(s == S_TAG){ - el.setTagName(source.slice(start,p)); - } - return p; - case '>': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - break;//normal - case S_ATTR_NOQUOT_VALUE://Compatible state - case S_ATTR: - value = source.slice(start,p); - if(value.slice(-1) === '/'){ - el.closed = true; - value = value.slice(0,-1) - } - case S_ATTR_SPACE: - if(s === S_ATTR_SPACE){ - value = attrName; - } - if(s == S_ATTR_NOQUOT_VALUE){ - errorHandler.warning('attribute "'+value+'" missed quot(")!'); - addAttribute(attrName, value, start) - }else{ - if(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){ - errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') - } - addAttribute(value, value, start) - } - break; - case S_EQ: - throw new Error('attribute value missed!!'); - } -// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) - return p; - /*xml space '\x20' | #x9 | #xD | #xA; */ - case '\u0080': - c = ' '; - default: - if(c<= ' '){//space - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p));//tagName - s = S_TAG_SPACE; - break; - case S_ATTR: - attrName = source.slice(start,p) - s = S_ATTR_SPACE; - break; - case S_ATTR_NOQUOT_VALUE: - var value = source.slice(start, p); - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - addAttribute(attrName, value, start) - case S_ATTR_END: - s = S_TAG_SPACE; - break; - //case S_TAG_SPACE: - //case S_EQ: - //case S_ATTR_SPACE: - // void();break; - //case S_TAG_CLOSE: - //ignore warning - } - }else{//not space -//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE -//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE - switch(s){ - //case S_TAG:void();break; - //case S_ATTR:void();break; - //case S_ATTR_NOQUOT_VALUE:void();break; - case S_ATTR_SPACE: - var tagName = el.tagName; - if (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) { - errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!') - } - addAttribute(attrName, attrName, start); - start = p; - s = S_ATTR; - break; - case S_ATTR_END: - errorHandler.warning('attribute space is required"'+attrName+'"!!') - case S_TAG_SPACE: - s = S_ATTR; - start = p; - break; - case S_EQ: - s = S_ATTR_NOQUOT_VALUE; - start = p; - break; - case S_TAG_CLOSE: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - }//end outer switch - //console.log('p++',p) - p++; - } -} -/** - * @return true if has new namespace define - */ -function appendElement(el,domBuilder,currentNSMap){ - var tagName = el.tagName; - var localNSMap = null; - //var currentNSMap = parseStack[parseStack.length-1].currentNSMap; - var i = el.length; - while(i--){ - var a = el[i]; - var qName = a.qName; - var value = a.value; - var nsp = qName.indexOf(':'); - if(nsp>0){ - var prefix = a.prefix = qName.slice(0,nsp); - var localName = qName.slice(nsp+1); - var nsPrefix = prefix === 'xmlns' && localName - }else{ - localName = qName; - prefix = null - nsPrefix = qName === 'xmlns' && '' - } - //can not set prefix,because prefix !== '' - a.localName = localName ; - //prefix == null for no ns prefix attribute - if(nsPrefix !== false){//hack!! - if(localNSMap == null){ - localNSMap = {} - //console.log(currentNSMap,0) - _copy(currentNSMap,currentNSMap={}) - //console.log(currentNSMap,1) - } - currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; - a.uri = NAMESPACE.XMLNS - domBuilder.startPrefixMapping(nsPrefix, value) - } - } - var i = el.length; - while(i--){ - a = el[i]; - var prefix = a.prefix; - if(prefix){//no prefix attribute has no namespace - if(prefix === 'xml'){ - a.uri = NAMESPACE.XML; - }if(prefix !== 'xmlns'){ - a.uri = currentNSMap[prefix || ''] - - //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} - } - } - } - var nsp = tagName.indexOf(':'); - if(nsp>0){ - prefix = el.prefix = tagName.slice(0,nsp); - localName = el.localName = tagName.slice(nsp+1); - }else{ - prefix = null;//important!! - localName = el.localName = tagName; - } - //no prefix element has default namespace - var ns = el.uri = currentNSMap[prefix || '']; - domBuilder.startElement(ns,localName,tagName,el); - //endPrefixMapping and startPrefixMapping have not any help for dom builder - //localNSMap = null - if(el.closed){ - domBuilder.endElement(ns,localName,tagName); - if(localNSMap){ - for (prefix in localNSMap) { - if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) { - domBuilder.endPrefixMapping(prefix); - } - } - } - }else{ - el.currentNSMap = currentNSMap; - el.localNSMap = localNSMap; - //parseStack.push(el); - return true; - } -} -function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ - if(/^(?:script|textarea)$/i.test(tagName)){ - var elEndStart = source.indexOf('',elStartEnd); - var text = source.substring(elStartEnd+1,elEndStart); - if(/[&<]/.test(text)){ - if(/^script$/i.test(tagName)){ - //if(!/\]\]>/.test(text)){ - //lexHandler.startCDATA(); - domBuilder.characters(text,0,text.length); - //lexHandler.endCDATA(); - return elEndStart; - //} - }//}else{//text area - text = text.replace(/&#?\w+;/g,entityReplacer); - domBuilder.characters(text,0,text.length); - return elEndStart; - //} - - } - } - return elStartEnd+1; -} -function fixSelfClosed(source,elStartEnd,tagName,closeMap){ - //if(tagName in closeMap){ - var pos = closeMap[tagName]; - if(pos == null){ - //console.log(tagName) - pos = source.lastIndexOf('') - if(pos',start+4); - //append comment source.substring(4,end)//'; - if (frame.data[0] !== textEncodingDescriptionByte.Utf8) { - // ignore frames with unrecognized character encodings - return; - } // parsing fields [ID3v2.4.0 section 4.14.] - - mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i); - if (mimeTypeEndIndex < 0) { - // malformed frame - return; - } // parsing Mime type field (terminated with \0) - - frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex); - i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field - - frame.pictureType = frame.data[i]; - i++; - descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i); - if (descriptionEndIndex < 0) { - // malformed frame - return; - } // parsing Description field (terminated with \0) - - frame.description = parseUtf8(frame.data, i, descriptionEndIndex); - i = descriptionEndIndex + 1; - if (frame.mimeType === LINK_MIME_TYPE) { - // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.]) - frame.url = parseIso88591$1(frame.data, i, frame.data.length); - } else { - // parsing Picture Data field as binary data - frame.pictureData = frame.data.subarray(i, frame.data.length); - } - }, - 'T*': function (frame) { - if (frame.data[0] !== textEncodingDescriptionByte.Utf8) { - // ignore frames with unrecognized character encodings - return; - } // parse text field, do not include null terminator in the frame value - // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.] - - frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.] - - frame.values = frame.value.split('\0'); - }, - 'TXXX': function (frame) { - var descriptionEndIndex; - if (frame.data[0] !== textEncodingDescriptionByte.Utf8) { - // ignore frames with unrecognized character encodings - return; - } - descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1); - if (descriptionEndIndex === -1) { - return; - } // parse the text fields - - frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value - // frames that allow different types of encoding contain terminated text - // [ID3v2.4.0 section 4.] - - frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\0*$/, ''); - frame.data = frame.value; - }, - 'W*': function (frame) { - // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.] - // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3] - frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\0.*$/, ''); - }, - 'WXXX': function (frame) { - var descriptionEndIndex; - if (frame.data[0] !== textEncodingDescriptionByte.Utf8) { - // ignore frames with unrecognized character encodings - return; - } - descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1); - if (descriptionEndIndex === -1) { - return; - } // parse the description and URL fields - - frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.] - // if the value is followed by a string termination all the following information - // should be ignored [ID3v2.4.0 section 4.3] - - frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\0.*$/, ''); - }, - 'PRIV': function (frame) { - var i; - for (i = 0; i < frame.data.length; i++) { - if (frame.data[i] === 0) { - // parse the description and URL fields - frame.owner = parseIso88591$1(frame.data, 0, i); - break; - } - } - frame.privateData = frame.data.subarray(i + 1); - frame.data = frame.privateData; - } - }; - var parseId3Frames$1 = function (data) { - var frameSize, - frameHeader, - frameStart = 10, - tagSize = 0, - frames = []; // If we don't have enough data for a header, 10 bytes, - // or 'ID3' in the first 3 bytes this is not a valid ID3 tag. - - if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) { - return; - } // the frame size is transmitted as a 28-bit integer in the - // last four bytes of the ID3 header. - // The most significant bit of each byte is dropped and the - // results concatenated to recover the actual value. - - tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more - // convenient for our comparisons to include it - - tagSize += 10; // check bit 6 of byte 5 for the extended header flag. - - var hasExtendedHeader = data[5] & 0x40; - if (hasExtendedHeader) { - // advance the frame start past the extended header - frameStart += 4; // header size field - - frameStart += parseSyncSafeInteger$1(data.subarray(10, 14)); - tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end - } // parse one or more ID3 frames - // http://id3.org/id3v2.3.0#ID3v2_frame_overview - - do { - // determine the number of bytes in this frame - frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8)); - if (frameSize < 1) { - break; - } - frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]); - var frame = { - id: frameHeader, - data: data.subarray(frameStart + 10, frameStart + frameSize + 10) - }; - frame.key = frame.id; // parse frame values - - if (frameParsers[frame.id]) { - // use frame specific parser - frameParsers[frame.id](frame); - } else if (frame.id[0] === 'T') { - // use text frame generic parser - frameParsers['T*'](frame); - } else if (frame.id[0] === 'W') { - // use URL link frame generic parser - frameParsers['W*'](frame); - } - frames.push(frame); - frameStart += 10; // advance past the frame header - - frameStart += frameSize; // advance past the frame body - } while (frameStart < tagSize); - return frames; - }; - var parseId3 = { - parseId3Frames: parseId3Frames$1, - parseSyncSafeInteger: parseSyncSafeInteger$1, - frameParsers: frameParsers - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Accepts program elementary stream (PES) data events and parses out - * ID3 metadata from them, if present. - * @see http://id3.org/id3v2.3.0 - */ - - var Stream$5 = stream, - StreamTypes$3 = streamTypes, - id3 = parseId3, - MetadataStream; - MetadataStream = function (options) { - var settings = { - // the bytes of the program-level descriptor field in MP2T - // see ISO/IEC 13818-1:2013 (E), section 2.6 "Program and - // program element descriptors" - descriptor: options && options.descriptor - }, - // the total size in bytes of the ID3 tag being parsed - tagSize = 0, - // tag data that is not complete enough to be parsed - buffer = [], - // the total number of bytes currently in the buffer - bufferSize = 0, - i; - MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type - // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track - - this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16); - if (settings.descriptor) { - for (i = 0; i < settings.descriptor.length; i++) { - this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2); - } - } - this.push = function (chunk) { - var tag, frameStart, frameSize, frame, i, frameHeader; - if (chunk.type !== 'timed-metadata') { - return; - } // if data_alignment_indicator is set in the PES header, - // we must have the start of a new ID3 tag. Assume anything - // remaining in the buffer was malformed and throw it out - - if (chunk.dataAlignmentIndicator) { - bufferSize = 0; - buffer.length = 0; - } // ignore events that don't look like ID3 data - - if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) { - this.trigger('log', { - level: 'warn', - message: 'Skipping unrecognized metadata packet' - }); - return; - } // add this chunk to the data we've collected so far - - buffer.push(chunk); - bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header - - if (buffer.length === 1) { - // the frame size is transmitted as a 28-bit integer in the - // last four bytes of the ID3 header. - // The most significant bit of each byte is dropped and the - // results concatenated to recover the actual value. - tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more - // convenient for our comparisons to include it - - tagSize += 10; - } // if the entire frame has not arrived, wait for more data - - if (bufferSize < tagSize) { - return; - } // collect the entire frame so it can be parsed - - tag = { - data: new Uint8Array(tagSize), - frames: [], - pts: buffer[0].pts, - dts: buffer[0].dts - }; - for (i = 0; i < tagSize;) { - tag.data.set(buffer[0].data.subarray(0, tagSize - i), i); - i += buffer[0].data.byteLength; - bufferSize -= buffer[0].data.byteLength; - buffer.shift(); - } // find the start of the first frame and the end of the tag - - frameStart = 10; - if (tag.data[5] & 0x40) { - // advance the frame start past the extended header - frameStart += 4; // header size field - - frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end - - tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20)); - } // parse one or more ID3 frames - // http://id3.org/id3v2.3.0#ID3v2_frame_overview - - do { - // determine the number of bytes in this frame - frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8)); - if (frameSize < 1) { - this.trigger('log', { - level: 'warn', - message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.' - }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames - // to be sent along. - - break; - } - frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]); - frame = { - id: frameHeader, - data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10) - }; - frame.key = frame.id; // parse frame values - - if (id3.frameParsers[frame.id]) { - // use frame specific parser - id3.frameParsers[frame.id](frame); - } else if (frame.id[0] === 'T') { - // use text frame generic parser - id3.frameParsers['T*'](frame); - } else if (frame.id[0] === 'W') { - // use URL link frame generic parser - id3.frameParsers['W*'](frame); - } // handle the special PRIV frame used to indicate the start - // time for raw AAC data - - if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') { - var d = frame.data, - size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2; - size *= 4; - size += d[7] & 0x03; - frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based - // on the value of this frame - // we couldn't have known the appropriate pts and dts before - // parsing this ID3 tag so set those values now - - if (tag.pts === undefined && tag.dts === undefined) { - tag.pts = frame.timeStamp; - tag.dts = frame.timeStamp; - } - this.trigger('timestamp', frame); - } - tag.frames.push(frame); - frameStart += 10; // advance past the frame header - - frameStart += frameSize; // advance past the frame body - } while (frameStart < tagSize); - this.trigger('data', tag); - }; - }; - MetadataStream.prototype = new Stream$5(); - var metadataStream = MetadataStream; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * A stream-based mp2t to mp4 converter. This utility can be used to - * deliver mp4s to a SourceBuffer on platforms that support native - * Media Source Extensions. - */ - - var Stream$4 = stream, - CaptionStream$1 = captionStream, - StreamTypes$2 = streamTypes, - TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types - - var TransportPacketStream, TransportParseStream, ElementaryStream; // constants - - var MP2T_PACKET_LENGTH$1 = 188, - // bytes - SYNC_BYTE$1 = 0x47; - /** - * Splits an incoming stream of binary data into MPEG-2 Transport - * Stream packets. - */ - - TransportPacketStream = function () { - var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1), - bytesInBuffer = 0; - TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream. - - /** - * Split a stream of data into M2TS packets - **/ - - this.push = function (bytes) { - var startIndex = 0, - endIndex = MP2T_PACKET_LENGTH$1, - everything; // If there are bytes remaining from the last segment, prepend them to the - // bytes that were pushed in - - if (bytesInBuffer) { - everything = new Uint8Array(bytes.byteLength + bytesInBuffer); - everything.set(buffer.subarray(0, bytesInBuffer)); - everything.set(bytes, bytesInBuffer); - bytesInBuffer = 0; - } else { - everything = bytes; - } // While we have enough data for a packet - - while (endIndex < everything.byteLength) { - // Look for a pair of start and end sync bytes in the data.. - if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) { - // We found a packet so emit it and jump one whole packet forward in - // the stream - this.trigger('data', everything.subarray(startIndex, endIndex)); - startIndex += MP2T_PACKET_LENGTH$1; - endIndex += MP2T_PACKET_LENGTH$1; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex++; - endIndex++; - } // If there was some data left over at the end of the segment that couldn't - // possibly be a whole packet, keep it because it might be the start of a packet - // that continues in the next segment - - if (startIndex < everything.byteLength) { - buffer.set(everything.subarray(startIndex), 0); - bytesInBuffer = everything.byteLength - startIndex; - } - }; - /** - * Passes identified M2TS packets to the TransportParseStream to be parsed - **/ - - this.flush = function () { - // If the buffer contains a whole packet when we are being flushed, emit it - // and empty the buffer. Otherwise hold onto the data because it may be - // important for decoding the next segment - if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) { - this.trigger('data', buffer); - bytesInBuffer = 0; - } - this.trigger('done'); - }; - this.endTimeline = function () { - this.flush(); - this.trigger('endedtimeline'); - }; - this.reset = function () { - bytesInBuffer = 0; - this.trigger('reset'); - }; - }; - TransportPacketStream.prototype = new Stream$4(); - /** - * Accepts an MP2T TransportPacketStream and emits data events with parsed - * forms of the individual transport stream packets. - */ - - TransportParseStream = function () { - var parsePsi, parsePat, parsePmt, self; - TransportParseStream.prototype.init.call(this); - self = this; - this.packetsWaitingForPmt = []; - this.programMapTable = undefined; - parsePsi = function (payload, psi) { - var offset = 0; // PSI packets may be split into multiple sections and those - // sections may be split into multiple packets. If a PSI - // section starts in this packet, the payload_unit_start_indicator - // will be true and the first byte of the payload will indicate - // the offset from the current position to the start of the - // section. - - if (psi.payloadUnitStartIndicator) { - offset += payload[offset] + 1; - } - if (psi.type === 'pat') { - parsePat(payload.subarray(offset), psi); - } else { - parsePmt(payload.subarray(offset), psi); - } - }; - parsePat = function (payload, pat) { - pat.section_number = payload[7]; // eslint-disable-line camelcase - - pat.last_section_number = payload[8]; // eslint-disable-line camelcase - // skip the PSI header and parse the first PMT entry - - self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11]; - pat.pmtPid = self.pmtPid; - }; - /** - * Parse out the relevant fields of a Program Map Table (PMT). - * @param payload {Uint8Array} the PMT-specific portion of an MP2T - * packet. The first byte in this array should be the table_id - * field. - * @param pmt {object} the object that should be decorated with - * fields parsed from the PMT. - */ - - parsePmt = function (payload, pmt) { - var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually - // take effect. We don't believe this should ever be the case - // for HLS but we'll ignore "forward" PMT declarations if we see - // them. Future PMT declarations have the current_next_indicator - // set to zero. - - if (!(payload[5] & 0x01)) { - return; - } // overwrite any existing program map table - - self.programMapTable = { - video: null, - audio: null, - 'timed-metadata': {} - }; // the mapping table ends at the end of the current section - - sectionLength = (payload[1] & 0x0f) << 8 | payload[2]; - tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how - // long the program info descriptors are - - programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table - - offset = 12 + programInfoLength; - while (offset < tableEnd) { - var streamType = payload[offset]; - var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types - // TODO: should this be done for metadata too? for now maintain behavior of - // multiple metadata streams - - if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) { - self.programMapTable.video = pid; - } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) { - self.programMapTable.audio = pid; - } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) { - // map pid to stream type for metadata streams - self.programMapTable['timed-metadata'][pid] = streamType; - } // move to the next table entry - // skip past the elementary stream descriptors, if present - - offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5; - } // record the map on the packet as well - - pmt.programMapTable = self.programMapTable; - }; - /** - * Deliver a new MP2T packet to the next stream in the pipeline. - */ - - this.push = function (packet) { - var result = {}, - offset = 4; - result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1] - - result.pid = packet[1] & 0x1f; - result.pid <<= 8; - result.pid |= packet[2]; // if an adaption field is present, its length is specified by the - // fifth byte of the TS packet header. The adaptation field is - // used to add stuffing to PES packets that don't fill a complete - // TS packet, and to specify some forms of timing and control data - // that we do not currently use. - - if ((packet[3] & 0x30) >>> 4 > 0x01) { - offset += packet[offset] + 1; - } // parse the rest of the packet based on the type - - if (result.pid === 0) { - result.type = 'pat'; - parsePsi(packet.subarray(offset), result); - this.trigger('data', result); - } else if (result.pid === this.pmtPid) { - result.type = 'pmt'; - parsePsi(packet.subarray(offset), result); - this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now - - while (this.packetsWaitingForPmt.length) { - this.processPes_.apply(this, this.packetsWaitingForPmt.shift()); - } - } else if (this.programMapTable === undefined) { - // When we have not seen a PMT yet, defer further processing of - // PES packets until one has been parsed - this.packetsWaitingForPmt.push([packet, offset, result]); - } else { - this.processPes_(packet, offset, result); - } - }; - this.processPes_ = function (packet, offset, result) { - // set the appropriate stream type - if (result.pid === this.programMapTable.video) { - result.streamType = StreamTypes$2.H264_STREAM_TYPE; - } else if (result.pid === this.programMapTable.audio) { - result.streamType = StreamTypes$2.ADTS_STREAM_TYPE; - } else { - // if not video or audio, it is timed-metadata or unknown - // if unknown, streamType will be undefined - result.streamType = this.programMapTable['timed-metadata'][result.pid]; - } - result.type = 'pes'; - result.data = packet.subarray(offset); - this.trigger('data', result); - }; - }; - TransportParseStream.prototype = new Stream$4(); - TransportParseStream.STREAM_TYPES = { - h264: 0x1b, - adts: 0x0f - }; - /** - * Reconsistutes program elementary stream (PES) packets from parsed - * transport stream packets. That is, if you pipe an - * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output - * events will be events which capture the bytes for individual PES - * packets plus relevant metadata that has been extracted from the - * container. - */ - - ElementaryStream = function () { - var self = this, - segmentHadPmt = false, - // PES packet fragments - video = { - data: [], - size: 0 - }, - audio = { - data: [], - size: 0 - }, - timedMetadata = { - data: [], - size: 0 - }, - programMapTable, - parsePes = function (payload, pes) { - var ptsDtsFlags; - const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array - - pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets - // that are frame data that is continuing from the previous fragment. This - // is to check that the pes data is the start of a new pes payload - - if (startPrefix !== 1) { - return; - } // get the packet length, this will be 0 for video - - pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe - - pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value - // and a DTS value. Determine what combination of values is - // available to work with. - - ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript - // performs all bitwise operations on 32-bit integers but javascript - // supports a much greater range (52-bits) of integer using standard - // mathematical operations. - // We construct a 31-bit value using bitwise operators over the 31 - // most significant bits and then multiply by 4 (equal to a left-shift - // of 2) before we add the final 2 least significant bits of the - // timestamp (equal to an OR.) - - if (ptsDtsFlags & 0xC0) { - // the PTS and DTS are not written out directly. For information - // on how they are encoded, see - // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html - pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3; - pes.pts *= 4; // Left shift by 2 - - pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs - - pes.dts = pes.pts; - if (ptsDtsFlags & 0x40) { - pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3; - pes.dts *= 4; // Left shift by 2 - - pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs - } - } // the data section starts immediately after the PES header. - // pes_header_data_length specifies the number of header bytes - // that follow the last byte of the field. - - pes.data = payload.subarray(9 + payload[8]); - }, - /** - * Pass completely parsed PES packets to the next stream in the pipeline - **/ - flushStream = function (stream, type, forceFlush) { - var packetData = new Uint8Array(stream.size), - event = { - type: type - }, - i = 0, - offset = 0, - packetFlushable = false, - fragment; // do nothing if there is not enough buffered data for a complete - // PES header - - if (!stream.data.length || stream.size < 9) { - return; - } - event.trackId = stream.data[0].pid; // reassemble the packet - - for (i = 0; i < stream.data.length; i++) { - fragment = stream.data[i]; - packetData.set(fragment.data, offset); - offset += fragment.data.byteLength; - } // parse assembled packet's PES header - - parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length - // check that there is enough stream data to fill the packet - - packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right - - if (forceFlush || packetFlushable) { - stream.size = 0; - stream.data.length = 0; - } // only emit packets that are complete. this is to avoid assembling - // incomplete PES packets due to poor segmentation - - if (packetFlushable) { - self.trigger('data', event); - } - }; - ElementaryStream.prototype.init.call(this); - /** - * Identifies M2TS packet types and parses PES packets using metadata - * parsed from the PMT - **/ - - this.push = function (data) { - ({ - pat: function () {// we have to wait for the PMT to arrive as well before we - // have any meaningful metadata - }, - pes: function () { - var stream, streamType; - switch (data.streamType) { - case StreamTypes$2.H264_STREAM_TYPE: - stream = video; - streamType = 'video'; - break; - case StreamTypes$2.ADTS_STREAM_TYPE: - stream = audio; - streamType = 'audio'; - break; - case StreamTypes$2.METADATA_STREAM_TYPE: - stream = timedMetadata; - streamType = 'timed-metadata'; - break; - default: - // ignore unknown stream types - return; - } // if a new packet is starting, we can flush the completed - // packet - - if (data.payloadUnitStartIndicator) { - flushStream(stream, streamType, true); - } // buffer this fragment until we are sure we've received the - // complete payload - - stream.data.push(data); - stream.size += data.data.byteLength; - }, - pmt: function () { - var event = { - type: 'metadata', - tracks: [] - }; - programMapTable = data.programMapTable; // translate audio and video streams to tracks - - if (programMapTable.video !== null) { - event.tracks.push({ - timelineStartInfo: { - baseMediaDecodeTime: 0 - }, - id: +programMapTable.video, - codec: 'avc', - type: 'video' - }); - } - if (programMapTable.audio !== null) { - event.tracks.push({ - timelineStartInfo: { - baseMediaDecodeTime: 0 - }, - id: +programMapTable.audio, - codec: 'adts', - type: 'audio' - }); - } - segmentHadPmt = true; - self.trigger('data', event); - } - })[data.type](); - }; - this.reset = function () { - video.size = 0; - video.data.length = 0; - audio.size = 0; - audio.data.length = 0; - this.trigger('reset'); - }; - /** - * Flush any remaining input. Video PES packets may be of variable - * length. Normally, the start of a new video packet can trigger the - * finalization of the previous packet. That is not possible if no - * more video is forthcoming, however. In that case, some other - * mechanism (like the end of the file) has to be employed. When it is - * clear that no additional data is forthcoming, calling this method - * will flush the buffered packets. - */ - - this.flushStreams_ = function () { - // !!THIS ORDER IS IMPORTANT!! - // video first then audio - flushStream(video, 'video'); - flushStream(audio, 'audio'); - flushStream(timedMetadata, 'timed-metadata'); - }; - this.flush = function () { - // if on flush we haven't had a pmt emitted - // and we have a pmt to emit. emit the pmt - // so that we trigger a trackinfo downstream. - if (!segmentHadPmt && programMapTable) { - var pmt = { - type: 'metadata', - tracks: [] - }; // translate audio and video streams to tracks - - if (programMapTable.video !== null) { - pmt.tracks.push({ - timelineStartInfo: { - baseMediaDecodeTime: 0 - }, - id: +programMapTable.video, - codec: 'avc', - type: 'video' - }); - } - if (programMapTable.audio !== null) { - pmt.tracks.push({ - timelineStartInfo: { - baseMediaDecodeTime: 0 - }, - id: +programMapTable.audio, - codec: 'adts', - type: 'audio' - }); - } - self.trigger('data', pmt); - } - segmentHadPmt = false; - this.flushStreams_(); - this.trigger('done'); - }; - }; - ElementaryStream.prototype = new Stream$4(); - var m2ts$1 = { - PAT_PID: 0x0000, - MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1, - TransportPacketStream: TransportPacketStream, - TransportParseStream: TransportParseStream, - ElementaryStream: ElementaryStream, - TimestampRolloverStream: TimestampRolloverStream, - CaptionStream: CaptionStream$1.CaptionStream, - Cea608Stream: CaptionStream$1.Cea608Stream, - Cea708Stream: CaptionStream$1.Cea708Stream, - MetadataStream: metadataStream - }; - for (var type in StreamTypes$2) { - if (StreamTypes$2.hasOwnProperty(type)) { - m2ts$1[type] = StreamTypes$2[type]; - } - } - var m2ts_1 = m2ts$1; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - */ - - var Stream$3 = stream; - var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS; - var AdtsStream$1; - var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350]; - /* - * Accepts a ElementaryStream and emits data events with parsed - * AAC Audio Frames of the individual packets. Input audio in ADTS - * format is unpacked and re-emitted as AAC frames. - * - * @see http://wiki.multimedia.cx/index.php?title=ADTS - * @see http://wiki.multimedia.cx/?title=Understanding_AAC - */ - - AdtsStream$1 = function (handlePartialSegments) { - var buffer, - frameNum = 0; - AdtsStream$1.prototype.init.call(this); - this.skipWarn_ = function (start, end) { - this.trigger('log', { - level: 'warn', - message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword` - }); - }; - this.push = function (packet) { - var i = 0, - frameLength, - protectionSkipBytes, - oldBuffer, - sampleCount, - adtsFrameDuration; - if (!handlePartialSegments) { - frameNum = 0; - } - if (packet.type !== 'audio') { - // ignore non-audio data - return; - } // Prepend any data in the buffer to the input data so that we can parse - // aac frames the cross a PES packet boundary - - if (buffer && buffer.length) { - oldBuffer = buffer; - buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength); - buffer.set(oldBuffer); - buffer.set(packet.data, oldBuffer.byteLength); - } else { - buffer = packet.data; - } // unpack any ADTS frames which have been fully received - // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS - - var skip; // We use i + 7 here because we want to be able to parse the entire header. - // If we don't have enough bytes to do that, then we definitely won't have a full frame. - - while (i + 7 < buffer.length) { - // Look for the start of an ADTS header.. - if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) { - if (typeof skip !== 'number') { - skip = i; - } // If a valid header was not found, jump one forward and attempt to - // find a valid ADTS header starting at the next byte - - i++; - continue; - } - if (typeof skip === 'number') { - this.skipWarn_(skip, i); - skip = null; - } // The protection skip bit tells us if we have 2 bytes of CRC data at the - // end of the ADTS header - - protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the - // end of the sync sequence - // NOTE: frame length includes the size of the header - - frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5; - sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024; - adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame, - // then we have to wait for more data - - if (buffer.byteLength - i < frameLength) { - break; - } // Otherwise, deliver the complete AAC frame - - this.trigger('data', { - pts: packet.pts + frameNum * adtsFrameDuration, - dts: packet.dts + frameNum * adtsFrameDuration, - sampleCount: sampleCount, - audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1, - channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6, - samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2], - samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2, - // assume ISO/IEC 14496-12 AudioSampleEntry default of 16 - samplesize: 16, - // data is the frame without it's header - data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength) - }); - frameNum++; - i += frameLength; - } - if (typeof skip === 'number') { - this.skipWarn_(skip, i); - skip = null; - } // remove processed bytes from the buffer. - - buffer = buffer.subarray(i); - }; - this.flush = function () { - frameNum = 0; - this.trigger('done'); - }; - this.reset = function () { - buffer = void 0; - this.trigger('reset'); - }; - this.endTimeline = function () { - buffer = void 0; - this.trigger('endedtimeline'); - }; - }; - AdtsStream$1.prototype = new Stream$3(); - var adts = AdtsStream$1; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - */ - - var ExpGolomb$1; - /** - * Parser for exponential Golomb codes, a variable-bitwidth number encoding - * scheme used by h264. - */ - - ExpGolomb$1 = function (workingData) { - var - // the number of bytes left to examine in workingData - workingBytesAvailable = workingData.byteLength, - // the current word being examined - workingWord = 0, - // :uint - // the number of bits left to examine in the current word - workingBitsAvailable = 0; // :uint; - // ():uint - - this.length = function () { - return 8 * workingBytesAvailable; - }; // ():uint - - this.bitsAvailable = function () { - return 8 * workingBytesAvailable + workingBitsAvailable; - }; // ():void - - this.loadWord = function () { - var position = workingData.byteLength - workingBytesAvailable, - workingBytes = new Uint8Array(4), - availableBytes = Math.min(4, workingBytesAvailable); - if (availableBytes === 0) { - throw new Error('no bytes available'); - } - workingBytes.set(workingData.subarray(position, position + availableBytes)); - workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed - - workingBitsAvailable = availableBytes * 8; - workingBytesAvailable -= availableBytes; - }; // (count:int):void - - this.skipBits = function (count) { - var skipBytes; // :int - - if (workingBitsAvailable > count) { - workingWord <<= count; - workingBitsAvailable -= count; - } else { - count -= workingBitsAvailable; - skipBytes = Math.floor(count / 8); - count -= skipBytes * 8; - workingBytesAvailable -= skipBytes; - this.loadWord(); - workingWord <<= count; - workingBitsAvailable -= count; - } - }; // (size:int):uint - - this.readBits = function (size) { - var bits = Math.min(workingBitsAvailable, size), - // :uint - valu = workingWord >>> 32 - bits; // :uint - // if size > 31, handle error - - workingBitsAvailable -= bits; - if (workingBitsAvailable > 0) { - workingWord <<= bits; - } else if (workingBytesAvailable > 0) { - this.loadWord(); - } - bits = size - bits; - if (bits > 0) { - return valu << bits | this.readBits(bits); - } - return valu; - }; // ():uint - - this.skipLeadingZeros = function () { - var leadingZeroCount; // :uint - - for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) { - if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) { - // the first bit of working word is 1 - workingWord <<= leadingZeroCount; - workingBitsAvailable -= leadingZeroCount; - return leadingZeroCount; - } - } // we exhausted workingWord and still have not found a 1 - - this.loadWord(); - return leadingZeroCount + this.skipLeadingZeros(); - }; // ():void - - this.skipUnsignedExpGolomb = function () { - this.skipBits(1 + this.skipLeadingZeros()); - }; // ():void - - this.skipExpGolomb = function () { - this.skipBits(1 + this.skipLeadingZeros()); - }; // ():uint - - this.readUnsignedExpGolomb = function () { - var clz = this.skipLeadingZeros(); // :uint - - return this.readBits(clz + 1) - 1; - }; // ():int - - this.readExpGolomb = function () { - var valu = this.readUnsignedExpGolomb(); // :int - - if (0x01 & valu) { - // the number is odd if the low order bit is set - return 1 + valu >>> 1; // add 1 to make it even, and divide by 2 - } - - return -1 * (valu >>> 1); // divide by two then make it negative - }; // Some convenience functions - // :Boolean - - this.readBoolean = function () { - return this.readBits(1) === 1; - }; // ():int - - this.readUnsignedByte = function () { - return this.readBits(8); - }; - this.loadWord(); - }; - var expGolomb = ExpGolomb$1; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - */ - - var Stream$2 = stream; - var ExpGolomb = expGolomb; - var H264Stream$1, NalByteStream; - var PROFILES_WITH_OPTIONAL_SPS_DATA; - /** - * Accepts a NAL unit byte stream and unpacks the embedded NAL units. - */ - - NalByteStream = function () { - var syncPoint = 0, - i, - buffer; - NalByteStream.prototype.init.call(this); - /* - * Scans a byte stream and triggers a data event with the NAL units found. - * @param {Object} data Event received from H264Stream - * @param {Uint8Array} data.data The h264 byte stream to be scanned - * - * @see H264Stream.push - */ - - this.push = function (data) { - var swapBuffer; - if (!buffer) { - buffer = data.data; - } else { - swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength); - swapBuffer.set(buffer); - swapBuffer.set(data.data, buffer.byteLength); - buffer = swapBuffer; - } - var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B - // scan for NAL unit boundaries - // a match looks like this: - // 0 0 1 .. NAL .. 0 0 1 - // ^ sync point ^ i - // or this: - // 0 0 1 .. NAL .. 0 0 0 - // ^ sync point ^ i - // advance the sync point to a NAL start, if necessary - - for (; syncPoint < len - 3; syncPoint++) { - if (buffer[syncPoint + 2] === 1) { - // the sync point is properly aligned - i = syncPoint + 5; - break; - } - } - while (i < len) { - // look at the current byte to determine if we've hit the end of - // a NAL unit boundary - switch (buffer[i]) { - case 0: - // skip past non-sync sequences - if (buffer[i - 1] !== 0) { - i += 2; - break; - } else if (buffer[i - 2] !== 0) { - i++; - break; - } // deliver the NAL unit if it isn't empty - - if (syncPoint + 3 !== i - 2) { - this.trigger('data', buffer.subarray(syncPoint + 3, i - 2)); - } // drop trailing zeroes - - do { - i++; - } while (buffer[i] !== 1 && i < len); - syncPoint = i - 2; - i += 3; - break; - case 1: - // skip past non-sync sequences - if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) { - i += 3; - break; - } // deliver the NAL unit - - this.trigger('data', buffer.subarray(syncPoint + 3, i - 2)); - syncPoint = i - 2; - i += 3; - break; - default: - // the current byte isn't a one or zero, so it cannot be part - // of a sync sequence - i += 3; - break; - } - } // filter out the NAL units that were delivered - - buffer = buffer.subarray(syncPoint); - i -= syncPoint; - syncPoint = 0; - }; - this.reset = function () { - buffer = null; - syncPoint = 0; - this.trigger('reset'); - }; - this.flush = function () { - // deliver the last buffered NAL unit - if (buffer && buffer.byteLength > 3) { - this.trigger('data', buffer.subarray(syncPoint + 3)); - } // reset the stream state - - buffer = null; - syncPoint = 0; - this.trigger('done'); - }; - this.endTimeline = function () { - this.flush(); - this.trigger('endedtimeline'); - }; - }; - NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS - // see Recommendation ITU-T H.264 (4/2013), - // 7.3.2.1.1 Sequence parameter set data syntax - - PROFILES_WITH_OPTIONAL_SPS_DATA = { - 100: true, - 110: true, - 122: true, - 244: true, - 44: true, - 83: true, - 86: true, - 118: true, - 128: true, - // TODO: the three profiles below don't - // appear to have sps data in the specificiation anymore? - 138: true, - 139: true, - 134: true - }; - /** - * Accepts input from a ElementaryStream and produces H.264 NAL unit data - * events. - */ - - H264Stream$1 = function () { - var nalByteStream = new NalByteStream(), - self, - trackId, - currentPts, - currentDts, - discardEmulationPreventionBytes, - readSequenceParameterSet, - skipScalingList; - H264Stream$1.prototype.init.call(this); - self = this; - /* - * Pushes a packet from a stream onto the NalByteStream - * - * @param {Object} packet - A packet received from a stream - * @param {Uint8Array} packet.data - The raw bytes of the packet - * @param {Number} packet.dts - Decode timestamp of the packet - * @param {Number} packet.pts - Presentation timestamp of the packet - * @param {Number} packet.trackId - The id of the h264 track this packet came from - * @param {('video'|'audio')} packet.type - The type of packet - * - */ - - this.push = function (packet) { - if (packet.type !== 'video') { - return; - } - trackId = packet.trackId; - currentPts = packet.pts; - currentDts = packet.dts; - nalByteStream.push(packet); - }; - /* - * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps - * for the NALUs to the next stream component. - * Also, preprocess caption and sequence parameter NALUs. - * - * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push` - * @see NalByteStream.push - */ - - nalByteStream.on('data', function (data) { - var event = { - trackId: trackId, - pts: currentPts, - dts: currentDts, - data: data, - nalUnitTypeCode: data[0] & 0x1f - }; - switch (event.nalUnitTypeCode) { - case 0x05: - event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr'; - break; - case 0x06: - event.nalUnitType = 'sei_rbsp'; - event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1)); - break; - case 0x07: - event.nalUnitType = 'seq_parameter_set_rbsp'; - event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1)); - event.config = readSequenceParameterSet(event.escapedRBSP); - break; - case 0x08: - event.nalUnitType = 'pic_parameter_set_rbsp'; - break; - case 0x09: - event.nalUnitType = 'access_unit_delimiter_rbsp'; - break; - } // This triggers data on the H264Stream - - self.trigger('data', event); - }); - nalByteStream.on('done', function () { - self.trigger('done'); - }); - nalByteStream.on('partialdone', function () { - self.trigger('partialdone'); - }); - nalByteStream.on('reset', function () { - self.trigger('reset'); - }); - nalByteStream.on('endedtimeline', function () { - self.trigger('endedtimeline'); - }); - this.flush = function () { - nalByteStream.flush(); - }; - this.partialFlush = function () { - nalByteStream.partialFlush(); - }; - this.reset = function () { - nalByteStream.reset(); - }; - this.endTimeline = function () { - nalByteStream.endTimeline(); - }; - /** - * Advance the ExpGolomb decoder past a scaling list. The scaling - * list is optionally transmitted as part of a sequence parameter - * set and is not relevant to transmuxing. - * @param count {number} the number of entries in this scaling list - * @param expGolombDecoder {object} an ExpGolomb pointed to the - * start of a scaling list - * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1 - */ - - skipScalingList = function (count, expGolombDecoder) { - var lastScale = 8, - nextScale = 8, - j, - deltaScale; - for (j = 0; j < count; j++) { - if (nextScale !== 0) { - deltaScale = expGolombDecoder.readExpGolomb(); - nextScale = (lastScale + deltaScale + 256) % 256; - } - lastScale = nextScale === 0 ? lastScale : nextScale; - } - }; - /** - * Expunge any "Emulation Prevention" bytes from a "Raw Byte - * Sequence Payload" - * @param data {Uint8Array} the bytes of a RBSP from a NAL - * unit - * @return {Uint8Array} the RBSP without any Emulation - * Prevention Bytes - */ - - discardEmulationPreventionBytes = function (data) { - var length = data.byteLength, - emulationPreventionBytesPositions = [], - i = 1, - newLength, - newData; // Find all `Emulation Prevention Bytes` - - while (i < length - 2) { - if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) { - emulationPreventionBytesPositions.push(i + 2); - i += 2; - } else { - i++; - } - } // If no Emulation Prevention Bytes were found just return the original - // array - - if (emulationPreventionBytesPositions.length === 0) { - return data; - } // Create a new array to hold the NAL unit data - - newLength = length - emulationPreventionBytesPositions.length; - newData = new Uint8Array(newLength); - var sourceIndex = 0; - for (i = 0; i < newLength; sourceIndex++, i++) { - if (sourceIndex === emulationPreventionBytesPositions[0]) { - // Skip this byte - sourceIndex++; // Remove this position index - - emulationPreventionBytesPositions.shift(); - } - newData[i] = data[sourceIndex]; - } - return newData; - }; - /** - * Read a sequence parameter set and return some interesting video - * properties. A sequence parameter set is the H264 metadata that - * describes the properties of upcoming video frames. - * @param data {Uint8Array} the bytes of a sequence parameter set - * @return {object} an object with configuration parsed from the - * sequence parameter set, including the dimensions of the - * associated video frames. - */ - - readSequenceParameterSet = function (data) { - var frameCropLeftOffset = 0, - frameCropRightOffset = 0, - frameCropTopOffset = 0, - frameCropBottomOffset = 0, - expGolombDecoder, - profileIdc, - levelIdc, - profileCompatibility, - chromaFormatIdc, - picOrderCntType, - numRefFramesInPicOrderCntCycle, - picWidthInMbsMinus1, - picHeightInMapUnitsMinus1, - frameMbsOnlyFlag, - scalingListCount, - sarRatio = [1, 1], - aspectRatioIdc, - i; - expGolombDecoder = new ExpGolomb(data); - profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc - - profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag - - levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8) - - expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id - // some profiles have more optional data we don't need - - if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) { - chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb(); - if (chromaFormatIdc === 3) { - expGolombDecoder.skipBits(1); // separate_colour_plane_flag - } - - expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8 - - expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8 - - expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag - - if (expGolombDecoder.readBoolean()) { - // seq_scaling_matrix_present_flag - scalingListCount = chromaFormatIdc !== 3 ? 8 : 12; - for (i = 0; i < scalingListCount; i++) { - if (expGolombDecoder.readBoolean()) { - // seq_scaling_list_present_flag[ i ] - if (i < 6) { - skipScalingList(16, expGolombDecoder); - } else { - skipScalingList(64, expGolombDecoder); - } - } - } - } - } - expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4 - - picOrderCntType = expGolombDecoder.readUnsignedExpGolomb(); - if (picOrderCntType === 0) { - expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4 - } else if (picOrderCntType === 1) { - expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag - - expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic - - expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field - - numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb(); - for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) { - expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ] - } - } - - expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames - - expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag - - picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb(); - picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb(); - frameMbsOnlyFlag = expGolombDecoder.readBits(1); - if (frameMbsOnlyFlag === 0) { - expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag - } - - expGolombDecoder.skipBits(1); // direct_8x8_inference_flag - - if (expGolombDecoder.readBoolean()) { - // frame_cropping_flag - frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb(); - frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb(); - frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb(); - frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb(); - } - if (expGolombDecoder.readBoolean()) { - // vui_parameters_present_flag - if (expGolombDecoder.readBoolean()) { - // aspect_ratio_info_present_flag - aspectRatioIdc = expGolombDecoder.readUnsignedByte(); - switch (aspectRatioIdc) { - case 1: - sarRatio = [1, 1]; - break; - case 2: - sarRatio = [12, 11]; - break; - case 3: - sarRatio = [10, 11]; - break; - case 4: - sarRatio = [16, 11]; - break; - case 5: - sarRatio = [40, 33]; - break; - case 6: - sarRatio = [24, 11]; - break; - case 7: - sarRatio = [20, 11]; - break; - case 8: - sarRatio = [32, 11]; - break; - case 9: - sarRatio = [80, 33]; - break; - case 10: - sarRatio = [18, 11]; - break; - case 11: - sarRatio = [15, 11]; - break; - case 12: - sarRatio = [64, 33]; - break; - case 13: - sarRatio = [160, 99]; - break; - case 14: - sarRatio = [4, 3]; - break; - case 15: - sarRatio = [3, 2]; - break; - case 16: - sarRatio = [2, 1]; - break; - case 255: - { - sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()]; - break; - } - } - if (sarRatio) { - sarRatio[0] / sarRatio[1]; - } - } - } - return { - profileIdc: profileIdc, - levelIdc: levelIdc, - profileCompatibility: profileCompatibility, - width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2, - height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2, - // sar is sample aspect ratio - sarRatio: sarRatio - }; - }; - }; - H264Stream$1.prototype = new Stream$2(); - var h264 = { - H264Stream: H264Stream$1, - NalByteStream: NalByteStream - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Utilities to detect basic properties and metadata about Aac data. - */ - - var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350]; - var parseId3TagSize = function (header, byteIndex) { - var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9], - flags = header[byteIndex + 5], - footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0 - - returnSize = returnSize >= 0 ? returnSize : 0; - if (footerPresent) { - return returnSize + 20; - } - return returnSize + 10; - }; - var getId3Offset = function (data, offset) { - if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) { - return offset; - } - offset += parseId3TagSize(data, offset); - return getId3Offset(data, offset); - }; // TODO: use vhs-utils - - var isLikelyAacData$1 = function (data) { - var offset = getId3Offset(data, 0); - return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 && - // verify that the 2 layer bits are 0, aka this - // is not mp3 data but aac data. - (data[offset + 1] & 0x16) === 0x10; - }; - var parseSyncSafeInteger = function (data) { - return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3]; - }; // return a percent-encoded representation of the specified byte range - // @see http://en.wikipedia.org/wiki/Percent-encoding - - var percentEncode = function (bytes, start, end) { - var i, - result = ''; - for (i = start; i < end; i++) { - result += '%' + ('00' + bytes[i].toString(16)).slice(-2); - } - return result; - }; // return the string representation of the specified byte range, - // interpreted as ISO-8859-1. - - var parseIso88591 = function (bytes, start, end) { - return unescape(percentEncode(bytes, start, end)); // jshint ignore:line - }; - - var parseAdtsSize = function (header, byteIndex) { - var lowThree = (header[byteIndex + 5] & 0xE0) >> 5, - middle = header[byteIndex + 4] << 3, - highTwo = header[byteIndex + 3] & 0x3 << 11; - return highTwo | middle | lowThree; - }; - var parseType$4 = function (header, byteIndex) { - if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) { - return 'timed-metadata'; - } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) { - return 'audio'; - } - return null; - }; - var parseSampleRate = function (packet) { - var i = 0; - while (i + 5 < packet.length) { - if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) { - // If a valid header was not found, jump one forward and attempt to - // find a valid ADTS header starting at the next byte - i++; - continue; - } - return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2]; - } - return null; - }; - var parseAacTimestamp = function (packet) { - var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag - - frameStart = 10; - if (packet[5] & 0x40) { - // advance the frame start past the extended header - frameStart += 4; // header size field - - frameStart += parseSyncSafeInteger(packet.subarray(10, 14)); - } // parse one or more ID3 frames - // http://id3.org/id3v2.3.0#ID3v2_frame_overview - - do { - // determine the number of bytes in this frame - frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8)); - if (frameSize < 1) { - return null; - } - frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]); - if (frameHeader === 'PRIV') { - frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10); - for (var i = 0; i < frame.byteLength; i++) { - if (frame[i] === 0) { - var owner = parseIso88591(frame, 0, i); - if (owner === 'com.apple.streaming.transportStreamTimestamp') { - var d = frame.subarray(i + 1); - var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2; - size *= 4; - size += d[7] & 0x03; - return size; - } - break; - } - } - } - frameStart += 10; // advance past the frame header - - frameStart += frameSize; // advance past the frame body - } while (frameStart < packet.byteLength); - return null; - }; - var utils = { - isLikelyAacData: isLikelyAacData$1, - parseId3TagSize: parseId3TagSize, - parseAdtsSize: parseAdtsSize, - parseType: parseType$4, - parseSampleRate: parseSampleRate, - parseAacTimestamp: parseAacTimestamp - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * A stream-based aac to mp4 converter. This utility can be used to - * deliver mp4s to a SourceBuffer on platforms that support native - * Media Source Extensions. - */ - - var Stream$1 = stream; - var aacUtils = utils; // Constants - - var AacStream$1; - /** - * Splits an incoming stream of binary data into ADTS and ID3 Frames. - */ - - AacStream$1 = function () { - var everything = new Uint8Array(), - timeStamp = 0; - AacStream$1.prototype.init.call(this); - this.setTimestamp = function (timestamp) { - timeStamp = timestamp; - }; - this.push = function (bytes) { - var frameSize = 0, - byteIndex = 0, - bytesLeft, - chunk, - packet, - tempLength; // If there are bytes remaining from the last segment, prepend them to the - // bytes that were pushed in - - if (everything.length) { - tempLength = everything.length; - everything = new Uint8Array(bytes.byteLength + tempLength); - everything.set(everything.subarray(0, tempLength)); - everything.set(bytes, tempLength); - } else { - everything = bytes; - } - while (everything.length - byteIndex >= 3) { - if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) { - // Exit early because we don't have enough to parse - // the ID3 tag header - if (everything.length - byteIndex < 10) { - break; - } // check framesize - - frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer - // to emit a full packet - // Add to byteIndex to support multiple ID3 tags in sequence - - if (byteIndex + frameSize > everything.length) { - break; - } - chunk = { - type: 'timed-metadata', - data: everything.subarray(byteIndex, byteIndex + frameSize) - }; - this.trigger('data', chunk); - byteIndex += frameSize; - continue; - } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) { - // Exit early because we don't have enough to parse - // the ADTS frame header - if (everything.length - byteIndex < 7) { - break; - } - frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer - // to emit a full packet - - if (byteIndex + frameSize > everything.length) { - break; - } - packet = { - type: 'audio', - data: everything.subarray(byteIndex, byteIndex + frameSize), - pts: timeStamp, - dts: timeStamp - }; - this.trigger('data', packet); - byteIndex += frameSize; - continue; - } - byteIndex++; - } - bytesLeft = everything.length - byteIndex; - if (bytesLeft > 0) { - everything = everything.subarray(byteIndex); - } else { - everything = new Uint8Array(); - } - }; - this.reset = function () { - everything = new Uint8Array(); - this.trigger('reset'); - }; - this.endTimeline = function () { - everything = new Uint8Array(); - this.trigger('endedtimeline'); - }; - }; - AacStream$1.prototype = new Stream$1(); - var aac = AacStream$1; - var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize']; - var audioProperties = AUDIO_PROPERTIES$1; - var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio']; - var videoProperties = VIDEO_PROPERTIES$1; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * A stream-based mp2t to mp4 converter. This utility can be used to - * deliver mp4s to a SourceBuffer on platforms that support native - * Media Source Extensions. - */ - - var Stream = stream; - var mp4 = mp4Generator; - var frameUtils = frameUtils$1; - var audioFrameUtils = audioFrameUtils$1; - var trackDecodeInfo = trackDecodeInfo$1; - var m2ts = m2ts_1; - var clock = clock$2; - var AdtsStream = adts; - var H264Stream = h264.H264Stream; - var AacStream = aac; - var isLikelyAacData = utils.isLikelyAacData; - var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS; - var AUDIO_PROPERTIES = audioProperties; - var VIDEO_PROPERTIES = videoProperties; // object types - - var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream; - var retriggerForStream = function (key, event) { - event.stream = key; - this.trigger('log', event); - }; - var addPipelineLogRetriggers = function (transmuxer, pipeline) { - var keys = Object.keys(pipeline); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; // skip non-stream keys and headOfPipeline - // which is just a duplicate - - if (key === 'headOfPipeline' || !pipeline[key].on) { - continue; - } - pipeline[key].on('log', retriggerForStream.bind(transmuxer, key)); - } - }; - /** - * Compare two arrays (even typed) for same-ness - */ - - var arrayEquals = function (a, b) { - var i; - if (a.length !== b.length) { - return false; - } // compare the value of each element in the array - - for (i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false; - } - } - return true; - }; - var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) { - var ptsOffsetFromDts = startPts - startDts, - decodeDuration = endDts - startDts, - presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment, - // however, the player time values will reflect a start from the baseMediaDecodeTime. - // In order to provide relevant values for the player times, base timing info on the - // baseMediaDecodeTime and the DTS and PTS durations of the segment. - - return { - start: { - dts: baseMediaDecodeTime, - pts: baseMediaDecodeTime + ptsOffsetFromDts - }, - end: { - dts: baseMediaDecodeTime + decodeDuration, - pts: baseMediaDecodeTime + presentationDuration - }, - prependedContentDuration: prependedContentDuration, - baseMediaDecodeTime: baseMediaDecodeTime - }; - }; - /** - * Constructs a single-track, ISO BMFF media segment from AAC data - * events. The output of this stream can be fed to a SourceBuffer - * configured with a suitable initialization segment. - * @param track {object} track metadata configuration - * @param options {object} transmuxer options object - * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps - * in the source; false to adjust the first segment to start at 0. - */ - - AudioSegmentStream = function (track, options) { - var adtsFrames = [], - sequenceNumber, - earliestAllowedDts = 0, - audioAppendStartTs = 0, - videoBaseMediaDecodeTime = Infinity; - options = options || {}; - sequenceNumber = options.firstSequenceNumber || 0; - AudioSegmentStream.prototype.init.call(this); - this.push = function (data) { - trackDecodeInfo.collectDtsInfo(track, data); - if (track) { - AUDIO_PROPERTIES.forEach(function (prop) { - track[prop] = data[prop]; - }); - } // buffer audio data until end() is called - - adtsFrames.push(data); - }; - this.setEarliestDts = function (earliestDts) { - earliestAllowedDts = earliestDts; - }; - this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) { - videoBaseMediaDecodeTime = baseMediaDecodeTime; - }; - this.setAudioAppendStart = function (timestamp) { - audioAppendStartTs = timestamp; - }; - this.flush = function () { - var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed - - if (adtsFrames.length === 0) { - this.trigger('done', 'AudioSegmentStream'); - return; - } - frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts); - track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock - - videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to - // samples (that is, adts frames) in the audio data - - track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat - - mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames)); - adtsFrames = []; - moof = mp4.moof(sequenceNumber, [track]); - boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time - - sequenceNumber++; - boxes.set(moof); - boxes.set(mdat, moof.byteLength); - trackDecodeInfo.clearDtsInfo(track); - frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with - // tests) on adding the timingInfo event. However, it seems unlikely that there's a - // valid use-case where an init segment/data should be triggered without associated - // frames. Leaving for now, but should be looked into. - - if (frames.length) { - segmentDuration = frames.length * frameDuration; - this.trigger('segmentTimingInfo', generateSegmentTimingInfo( - // The audio track's baseMediaDecodeTime is in audio clock cycles, but the - // frame info is in video clock cycles. Convert to match expectation of - // listeners (that all timestamps will be based on video clock cycles). - clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate), - // frame times are already in video clock, as is segment duration - frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0)); - this.trigger('timingInfo', { - start: frames[0].pts, - end: frames[0].pts + segmentDuration - }); - } - this.trigger('data', { - track: track, - boxes: boxes - }); - this.trigger('done', 'AudioSegmentStream'); - }; - this.reset = function () { - trackDecodeInfo.clearDtsInfo(track); - adtsFrames = []; - this.trigger('reset'); - }; - }; - AudioSegmentStream.prototype = new Stream(); - /** - * Constructs a single-track, ISO BMFF media segment from H264 data - * events. The output of this stream can be fed to a SourceBuffer - * configured with a suitable initialization segment. - * @param track {object} track metadata configuration - * @param options {object} transmuxer options object - * @param options.alignGopsAtEnd {boolean} If true, start from the end of the - * gopsToAlignWith list when attempting to align gop pts - * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps - * in the source; false to adjust the first segment to start at 0. - */ - - VideoSegmentStream = function (track, options) { - var sequenceNumber, - nalUnits = [], - gopsToAlignWith = [], - config, - pps; - options = options || {}; - sequenceNumber = options.firstSequenceNumber || 0; - VideoSegmentStream.prototype.init.call(this); - delete track.minPTS; - this.gopCache_ = []; - /** - * Constructs a ISO BMFF segment given H264 nalUnits - * @param {Object} nalUnit A data event representing a nalUnit - * @param {String} nalUnit.nalUnitType - * @param {Object} nalUnit.config Properties for a mp4 track - * @param {Uint8Array} nalUnit.data The nalUnit bytes - * @see lib/codecs/h264.js - **/ - - this.push = function (nalUnit) { - trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config - - if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) { - config = nalUnit.config; - track.sps = [nalUnit.data]; - VIDEO_PROPERTIES.forEach(function (prop) { - track[prop] = config[prop]; - }, this); - } - if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) { - pps = nalUnit.data; - track.pps = [nalUnit.data]; - } // buffer video until flush() is called - - nalUnits.push(nalUnit); - }; - /** - * Pass constructed ISO BMFF track and boxes on to the - * next stream in the pipeline - **/ - - this.flush = function () { - var frames, - gopForFusion, - gops, - moof, - mdat, - boxes, - prependedContentDuration = 0, - firstGop, - lastGop; // Throw away nalUnits at the start of the byte stream until - // we find the first AUD - - while (nalUnits.length) { - if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') { - break; - } - nalUnits.shift(); - } // Return early if no video data has been observed - - if (nalUnits.length === 0) { - this.resetStream_(); - this.trigger('done', 'VideoSegmentStream'); - return; - } // Organize the raw nal-units into arrays that represent - // higher-level constructs such as frames and gops - // (group-of-pictures) - - frames = frameUtils.groupNalsIntoFrames(nalUnits); - gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have - // a problem since MSE (on Chrome) requires a leading keyframe. - // - // We have two approaches to repairing this situation: - // 1) GOP-FUSION: - // This is where we keep track of the GOPS (group-of-pictures) - // from previous fragments and attempt to find one that we can - // prepend to the current fragment in order to create a valid - // fragment. - // 2) KEYFRAME-PULLING: - // Here we search for the first keyframe in the fragment and - // throw away all the frames between the start of the fragment - // and that keyframe. We then extend the duration and pull the - // PTS of the keyframe forward so that it covers the time range - // of the frames that were disposed of. - // - // #1 is far prefereable over #2 which can cause "stuttering" but - // requires more things to be just right. - - if (!gops[0][0].keyFrame) { - // Search for a gop for fusion from our gopCache - gopForFusion = this.getGopForFusion_(nalUnits[0], track); - if (gopForFusion) { - // in order to provide more accurate timing information about the segment, save - // the number of seconds prepended to the original segment due to GOP fusion - prependedContentDuration = gopForFusion.duration; - gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the - // new gop at the beginning - - gops.byteLength += gopForFusion.byteLength; - gops.nalCount += gopForFusion.nalCount; - gops.pts = gopForFusion.pts; - gops.dts = gopForFusion.dts; - gops.duration += gopForFusion.duration; - } else { - // If we didn't find a candidate gop fall back to keyframe-pulling - gops = frameUtils.extendFirstKeyFrame(gops); - } - } // Trim gops to align with gopsToAlignWith - - if (gopsToAlignWith.length) { - var alignedGops; - if (options.alignGopsAtEnd) { - alignedGops = this.alignGopsAtEnd_(gops); - } else { - alignedGops = this.alignGopsAtStart_(gops); - } - if (!alignedGops) { - // save all the nals in the last GOP into the gop cache - this.gopCache_.unshift({ - gop: gops.pop(), - pps: track.pps, - sps: track.sps - }); // Keep a maximum of 6 GOPs in the cache - - this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits - - nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith - - this.resetStream_(); - this.trigger('done', 'VideoSegmentStream'); - return; - } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct - // when recalculated before sending off to CoalesceStream - - trackDecodeInfo.clearDtsInfo(track); - gops = alignedGops; - } - trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to - // samples (that is, frames) in the video data - - track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat - - mdat = mp4.mdat(frameUtils.concatenateNalData(gops)); - track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); - this.trigger('processedGopsInfo', gops.map(function (gop) { - return { - pts: gop.pts, - dts: gop.dts, - byteLength: gop.byteLength - }; - })); - firstGop = gops[0]; - lastGop = gops[gops.length - 1]; - this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration)); - this.trigger('timingInfo', { - start: gops[0].pts, - end: gops[gops.length - 1].pts + gops[gops.length - 1].duration - }); // save all the nals in the last GOP into the gop cache - - this.gopCache_.unshift({ - gop: gops.pop(), - pps: track.pps, - sps: track.sps - }); // Keep a maximum of 6 GOPs in the cache - - this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits - - nalUnits = []; - this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime); - this.trigger('timelineStartInfo', track.timelineStartInfo); - moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of - // throwing away hundreds of media segment fragments - - boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time - - sequenceNumber++; - boxes.set(moof); - boxes.set(mdat, moof.byteLength); - this.trigger('data', { - track: track, - boxes: boxes - }); - this.resetStream_(); // Continue with the flush process now - - this.trigger('done', 'VideoSegmentStream'); - }; - this.reset = function () { - this.resetStream_(); - nalUnits = []; - this.gopCache_.length = 0; - gopsToAlignWith.length = 0; - this.trigger('reset'); - }; - this.resetStream_ = function () { - trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments - // for instance, when we are rendition switching - - config = undefined; - pps = undefined; - }; // Search for a candidate Gop for gop-fusion from the gop cache and - // return it or return null if no good candidate was found - - this.getGopForFusion_ = function (nalUnit) { - var halfSecond = 45000, - // Half-a-second in a 90khz clock - allowableOverlap = 10000, - // About 3 frames @ 30fps - nearestDistance = Infinity, - dtsDistance, - nearestGopObj, - currentGop, - currentGopObj, - i; // Search for the GOP nearest to the beginning of this nal unit - - for (i = 0; i < this.gopCache_.length; i++) { - currentGopObj = this.gopCache_[i]; - currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS - - if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) { - continue; - } // Reject Gops that would require a negative baseMediaDecodeTime - - if (currentGop.dts < track.timelineStartInfo.dts) { - continue; - } // The distance between the end of the gop and the start of the nalUnit - - dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within - // a half-second of the nal unit - - if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) { - // Always use the closest GOP we found if there is more than - // one candidate - if (!nearestGopObj || nearestDistance > dtsDistance) { - nearestGopObj = currentGopObj; - nearestDistance = dtsDistance; - } - } - } - if (nearestGopObj) { - return nearestGopObj.gop; - } - return null; - }; // trim gop list to the first gop found that has a matching pts with a gop in the list - // of gopsToAlignWith starting from the START of the list - - this.alignGopsAtStart_ = function (gops) { - var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops; - byteLength = gops.byteLength; - nalCount = gops.nalCount; - duration = gops.duration; - alignIndex = gopIndex = 0; - while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) { - align = gopsToAlignWith[alignIndex]; - gop = gops[gopIndex]; - if (align.pts === gop.pts) { - break; - } - if (gop.pts > align.pts) { - // this current gop starts after the current gop we want to align on, so increment - // align index - alignIndex++; - continue; - } // current gop starts before the current gop we want to align on. so increment gop - // index - - gopIndex++; - byteLength -= gop.byteLength; - nalCount -= gop.nalCount; - duration -= gop.duration; - } - if (gopIndex === 0) { - // no gops to trim - return gops; - } - if (gopIndex === gops.length) { - // all gops trimmed, skip appending all gops - return null; - } - alignedGops = gops.slice(gopIndex); - alignedGops.byteLength = byteLength; - alignedGops.duration = duration; - alignedGops.nalCount = nalCount; - alignedGops.pts = alignedGops[0].pts; - alignedGops.dts = alignedGops[0].dts; - return alignedGops; - }; // trim gop list to the first gop found that has a matching pts with a gop in the list - // of gopsToAlignWith starting from the END of the list - - this.alignGopsAtEnd_ = function (gops) { - var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound; - alignIndex = gopsToAlignWith.length - 1; - gopIndex = gops.length - 1; - alignEndIndex = null; - matchFound = false; - while (alignIndex >= 0 && gopIndex >= 0) { - align = gopsToAlignWith[alignIndex]; - gop = gops[gopIndex]; - if (align.pts === gop.pts) { - matchFound = true; - break; - } - if (align.pts > gop.pts) { - alignIndex--; - continue; - } - if (alignIndex === gopsToAlignWith.length - 1) { - // gop.pts is greater than the last alignment candidate. If no match is found - // by the end of this loop, we still want to append gops that come after this - // point - alignEndIndex = gopIndex; - } - gopIndex--; - } - if (!matchFound && alignEndIndex === null) { - return null; - } - var trimIndex; - if (matchFound) { - trimIndex = gopIndex; - } else { - trimIndex = alignEndIndex; - } - if (trimIndex === 0) { - return gops; - } - var alignedGops = gops.slice(trimIndex); - var metadata = alignedGops.reduce(function (total, gop) { - total.byteLength += gop.byteLength; - total.duration += gop.duration; - total.nalCount += gop.nalCount; - return total; - }, { - byteLength: 0, - duration: 0, - nalCount: 0 - }); - alignedGops.byteLength = metadata.byteLength; - alignedGops.duration = metadata.duration; - alignedGops.nalCount = metadata.nalCount; - alignedGops.pts = alignedGops[0].pts; - alignedGops.dts = alignedGops[0].dts; - return alignedGops; - }; - this.alignGopsWith = function (newGopsToAlignWith) { - gopsToAlignWith = newGopsToAlignWith; - }; - }; - VideoSegmentStream.prototype = new Stream(); - /** - * A Stream that can combine multiple streams (ie. audio & video) - * into a single output segment for MSE. Also supports audio-only - * and video-only streams. - * @param options {object} transmuxer options object - * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps - * in the source; false to adjust the first segment to start at media timeline start. - */ - - CoalesceStream = function (options, metadataStream) { - // Number of Tracks per output segment - // If greater than 1, we combine multiple - // tracks into a single segment - this.numberOfTracks = 0; - this.metadataStream = metadataStream; - options = options || {}; - if (typeof options.remux !== 'undefined') { - this.remuxTracks = !!options.remux; - } else { - this.remuxTracks = true; - } - if (typeof options.keepOriginalTimestamps === 'boolean') { - this.keepOriginalTimestamps = options.keepOriginalTimestamps; - } else { - this.keepOriginalTimestamps = false; - } - this.pendingTracks = []; - this.videoTrack = null; - this.pendingBoxes = []; - this.pendingCaptions = []; - this.pendingMetadata = []; - this.pendingBytes = 0; - this.emittedTracks = 0; - CoalesceStream.prototype.init.call(this); // Take output from multiple - - this.push = function (output) { - // buffer incoming captions until the associated video segment - // finishes - if (output.content || output.text) { - return this.pendingCaptions.push(output); - } // buffer incoming id3 tags until the final flush - - if (output.frames) { - return this.pendingMetadata.push(output); - } // Add this track to the list of pending tracks and store - // important information required for the construction of - // the final segment - - this.pendingTracks.push(output.track); - this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome? - // We unshift audio and push video because - // as of Chrome 75 when switching from - // one init segment to another if the video - // mdat does not appear after the audio mdat - // only audio will play for the duration of our transmux. - - if (output.track.type === 'video') { - this.videoTrack = output.track; - this.pendingBoxes.push(output.boxes); - } - if (output.track.type === 'audio') { - this.audioTrack = output.track; - this.pendingBoxes.unshift(output.boxes); - } - }; - }; - CoalesceStream.prototype = new Stream(); - CoalesceStream.prototype.flush = function (flushSource) { - var offset = 0, - event = { - captions: [], - captionStreams: {}, - metadata: [], - info: {} - }, - caption, - id3, - initSegment, - timelineStartPts = 0, - i; - if (this.pendingTracks.length < this.numberOfTracks) { - if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') { - // Return because we haven't received a flush from a data-generating - // portion of the segment (meaning that we have only recieved meta-data - // or captions.) - return; - } else if (this.remuxTracks) { - // Return until we have enough tracks from the pipeline to remux (if we - // are remuxing audio and video into a single MP4) - return; - } else if (this.pendingTracks.length === 0) { - // In the case where we receive a flush without any data having been - // received we consider it an emitted track for the purposes of coalescing - // `done` events. - // We do this for the case where there is an audio and video track in the - // segment but no audio data. (seen in several playlists with alternate - // audio tracks and no audio present in the main TS segments.) - this.emittedTracks++; - if (this.emittedTracks >= this.numberOfTracks) { - this.trigger('done'); - this.emittedTracks = 0; - } - return; - } - } - if (this.videoTrack) { - timelineStartPts = this.videoTrack.timelineStartInfo.pts; - VIDEO_PROPERTIES.forEach(function (prop) { - event.info[prop] = this.videoTrack[prop]; - }, this); - } else if (this.audioTrack) { - timelineStartPts = this.audioTrack.timelineStartInfo.pts; - AUDIO_PROPERTIES.forEach(function (prop) { - event.info[prop] = this.audioTrack[prop]; - }, this); - } - if (this.videoTrack || this.audioTrack) { - if (this.pendingTracks.length === 1) { - event.type = this.pendingTracks[0].type; - } else { - event.type = 'combined'; - } - this.emittedTracks += this.pendingTracks.length; - initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment - - event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov - // and track definitions - - event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats - - event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together - - for (i = 0; i < this.pendingBoxes.length; i++) { - event.data.set(this.pendingBoxes[i], offset); - offset += this.pendingBoxes[i].byteLength; - } // Translate caption PTS times into second offsets to match the - // video timeline for the segment, and add track info - - for (i = 0; i < this.pendingCaptions.length; i++) { - caption = this.pendingCaptions[i]; - caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps); - caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps); - event.captionStreams[caption.stream] = true; - event.captions.push(caption); - } // Translate ID3 frame PTS times into second offsets to match the - // video timeline for the segment - - for (i = 0; i < this.pendingMetadata.length; i++) { - id3 = this.pendingMetadata[i]; - id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps); - event.metadata.push(id3); - } // We add this to every single emitted segment even though we only need - // it for the first - - event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state - - this.pendingTracks.length = 0; - this.videoTrack = null; - this.pendingBoxes.length = 0; - this.pendingCaptions.length = 0; - this.pendingBytes = 0; - this.pendingMetadata.length = 0; // Emit the built segment - // We include captions and ID3 tags for backwards compatibility, - // ideally we should send only video and audio in the data event - - this.trigger('data', event); // Emit each caption to the outside world - // Ideally, this would happen immediately on parsing captions, - // but we need to ensure that video data is sent back first - // so that caption timing can be adjusted to match video timing - - for (i = 0; i < event.captions.length; i++) { - caption = event.captions[i]; - this.trigger('caption', caption); - } // Emit each id3 tag to the outside world - // Ideally, this would happen immediately on parsing the tag, - // but we need to ensure that video data is sent back first - // so that ID3 frame timing can be adjusted to match video timing - - for (i = 0; i < event.metadata.length; i++) { - id3 = event.metadata[i]; - this.trigger('id3Frame', id3); - } - } // Only emit `done` if all tracks have been flushed and emitted - - if (this.emittedTracks >= this.numberOfTracks) { - this.trigger('done'); - this.emittedTracks = 0; - } - }; - CoalesceStream.prototype.setRemux = function (val) { - this.remuxTracks = val; - }; - /** - * A Stream that expects MP2T binary data as input and produces - * corresponding media segments, suitable for use with Media Source - * Extension (MSE) implementations that support the ISO BMFF byte - * stream format, like Chrome. - */ - - Transmuxer = function (options) { - var self = this, - hasFlushed = true, - videoTrack, - audioTrack; - Transmuxer.prototype.init.call(this); - options = options || {}; - this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0; - this.transmuxPipeline_ = {}; - this.setupAacPipeline = function () { - var pipeline = {}; - this.transmuxPipeline_ = pipeline; - pipeline.type = 'aac'; - pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline - - pipeline.aacStream = new AacStream(); - pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio'); - pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata'); - pipeline.adtsStream = new AdtsStream(); - pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream); - pipeline.headOfPipeline = pipeline.aacStream; - pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream); - pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); - pipeline.metadataStream.on('timestamp', function (frame) { - pipeline.aacStream.setTimestamp(frame.timeStamp); - }); - pipeline.aacStream.on('data', function (data) { - if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) { - return; - } - audioTrack = audioTrack || { - timelineStartInfo: { - baseMediaDecodeTime: self.baseMediaDecodeTime - }, - codec: 'adts', - type: 'audio' - }; // hook up the audio segment stream to the first track with aac data - - pipeline.coalesceStream.numberOfTracks++; - pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options); - pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream')); - pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline - - pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info - - self.trigger('trackinfo', { - hasAudio: !!audioTrack, - hasVideo: !!videoTrack - }); - }); // Re-emit any data coming from the coalesce stream to the outside world - - pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline - - pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done')); - addPipelineLogRetriggers(this, pipeline); - }; - this.setupTsPipeline = function () { - var pipeline = {}; - this.transmuxPipeline_ = pipeline; - pipeline.type = 'ts'; - pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline - - pipeline.packetStream = new m2ts.TransportPacketStream(); - pipeline.parseStream = new m2ts.TransportParseStream(); - pipeline.elementaryStream = new m2ts.ElementaryStream(); - pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream(); - pipeline.adtsStream = new AdtsStream(); - pipeline.h264Stream = new H264Stream(); - pipeline.captionStream = new m2ts.CaptionStream(options); - pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream); - pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams - - pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!! - // demux the streams - - pipeline.timestampRolloverStream.pipe(pipeline.h264Stream); - pipeline.timestampRolloverStream.pipe(pipeline.adtsStream); - pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream - - pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream); - pipeline.elementaryStream.on('data', function (data) { - var i; - if (data.type === 'metadata') { - i = data.tracks.length; // scan the tracks listed in the metadata - - while (i--) { - if (!videoTrack && data.tracks[i].type === 'video') { - videoTrack = data.tracks[i]; - videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime; - } else if (!audioTrack && data.tracks[i].type === 'audio') { - audioTrack = data.tracks[i]; - audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime; - } - } // hook up the video segment stream to the first track with h264 data - - if (videoTrack && !pipeline.videoSegmentStream) { - pipeline.coalesceStream.numberOfTracks++; - pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options); - pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream')); - pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) { - // When video emits timelineStartInfo data after a flush, we forward that - // info to the AudioSegmentStream, if it exists, because video timeline - // data takes precedence. Do not do this if keepOriginalTimestamps is set, - // because this is a particularly subtle form of timestamp alteration. - if (audioTrack && !options.keepOriginalTimestamps) { - audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the - // very earliest DTS we have seen in video because Chrome will - // interpret any video track with a baseMediaDecodeTime that is - // non-zero as a gap. - - pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime); - } - }); - pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo')); - pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo')); - pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) { - if (audioTrack) { - pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime); - } - }); - pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline - - pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream); - } - if (audioTrack && !pipeline.audioSegmentStream) { - // hook up the audio segment stream to the first track with aac data - pipeline.coalesceStream.numberOfTracks++; - pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options); - pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream')); - pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); - pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline - - pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); - } // emit pmt info - - self.trigger('trackinfo', { - hasAudio: !!audioTrack, - hasVideo: !!videoTrack - }); - } - }); // Re-emit any data coming from the coalesce stream to the outside world - - pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); - pipeline.coalesceStream.on('id3Frame', function (id3Frame) { - id3Frame.dispatchType = pipeline.metadataStream.dispatchType; - self.trigger('id3Frame', id3Frame); - }); - pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline - - pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done')); - addPipelineLogRetriggers(this, pipeline); - }; // hook up the segment streams once track metadata is delivered - - this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) { - var pipeline = this.transmuxPipeline_; - if (!options.keepOriginalTimestamps) { - this.baseMediaDecodeTime = baseMediaDecodeTime; - } - if (audioTrack) { - audioTrack.timelineStartInfo.dts = undefined; - audioTrack.timelineStartInfo.pts = undefined; - trackDecodeInfo.clearDtsInfo(audioTrack); - if (pipeline.audioTimestampRolloverStream) { - pipeline.audioTimestampRolloverStream.discontinuity(); - } - } - if (videoTrack) { - if (pipeline.videoSegmentStream) { - pipeline.videoSegmentStream.gopCache_ = []; - } - videoTrack.timelineStartInfo.dts = undefined; - videoTrack.timelineStartInfo.pts = undefined; - trackDecodeInfo.clearDtsInfo(videoTrack); - pipeline.captionStream.reset(); - } - if (pipeline.timestampRolloverStream) { - pipeline.timestampRolloverStream.discontinuity(); - } - }; - this.setAudioAppendStart = function (timestamp) { - if (audioTrack) { - this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp); - } - }; - this.setRemux = function (val) { - var pipeline = this.transmuxPipeline_; - options.remux = val; - if (pipeline && pipeline.coalesceStream) { - pipeline.coalesceStream.setRemux(val); - } - }; - this.alignGopsWith = function (gopsToAlignWith) { - if (videoTrack && this.transmuxPipeline_.videoSegmentStream) { - this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith); - } - }; - this.getLogTrigger_ = function (key) { - var self = this; - return function (event) { - event.stream = key; - self.trigger('log', event); - }; - }; // feed incoming data to the front of the parsing pipeline - - this.push = function (data) { - if (hasFlushed) { - var isAac = isLikelyAacData(data); - if (isAac && this.transmuxPipeline_.type !== 'aac') { - this.setupAacPipeline(); - } else if (!isAac && this.transmuxPipeline_.type !== 'ts') { - this.setupTsPipeline(); - } - hasFlushed = false; - } - this.transmuxPipeline_.headOfPipeline.push(data); - }; // flush any buffered data - - this.flush = function () { - hasFlushed = true; // Start at the top of the pipeline and flush all pending work - - this.transmuxPipeline_.headOfPipeline.flush(); - }; - this.endTimeline = function () { - this.transmuxPipeline_.headOfPipeline.endTimeline(); - }; - this.reset = function () { - if (this.transmuxPipeline_.headOfPipeline) { - this.transmuxPipeline_.headOfPipeline.reset(); - } - }; // Caption data has to be reset when seeking outside buffered range - - this.resetCaptions = function () { - if (this.transmuxPipeline_.captionStream) { - this.transmuxPipeline_.captionStream.reset(); - } - }; - }; - Transmuxer.prototype = new Stream(); - var transmuxer = { - Transmuxer: Transmuxer, - VideoSegmentStream: VideoSegmentStream, - AudioSegmentStream: AudioSegmentStream, - AUDIO_PROPERTIES: AUDIO_PROPERTIES, - VIDEO_PROPERTIES: VIDEO_PROPERTIES, - // exported for testing - generateSegmentTimingInfo: generateSegmentTimingInfo - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - */ - - var toUnsigned$3 = function (value) { - return value >>> 0; - }; - var toHexString$1 = function (value) { - return ('00' + value.toString(16)).slice(-2); - }; - var bin = { - toUnsigned: toUnsigned$3, - toHexString: toHexString$1 - }; - var parseType$3 = function (buffer) { - var result = ''; - result += String.fromCharCode(buffer[0]); - result += String.fromCharCode(buffer[1]); - result += String.fromCharCode(buffer[2]); - result += String.fromCharCode(buffer[3]); - return result; - }; - var parseType_1 = parseType$3; - var toUnsigned$2 = bin.toUnsigned; - var parseType$2 = parseType_1; - var findBox$2 = function (data, path) { - var results = [], - i, - size, - type, - end, - subresults; - if (!path.length) { - // short-circuit the search for empty paths - return null; - } - for (i = 0; i < data.byteLength;) { - size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]); - type = parseType$2(data.subarray(i + 4, i + 8)); - end = size > 1 ? i + size : data.byteLength; - if (type === path[0]) { - if (path.length === 1) { - // this is the end of the path and we've found the box we were - // looking for - results.push(data.subarray(i + 8, end)); - } else { - // recursively search for the next box along the path - subresults = findBox$2(data.subarray(i + 8, end), path.slice(1)); - if (subresults.length) { - results = results.concat(subresults); - } - } - } - i = end; - } // we've finished searching all of data - - return results; - }; - var findBox_1 = findBox$2; - var toUnsigned$1 = bin.toUnsigned; - var getUint64$2 = numbers.getUint64; - var tfdt = function (data) { - var result = { - version: data[0], - flags: new Uint8Array(data.subarray(1, 4)) - }; - if (result.version === 1) { - result.baseMediaDecodeTime = getUint64$2(data.subarray(4)); - } else { - result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]); - } - return result; - }; - var parseTfdt$2 = tfdt; - var parseSampleFlags$1 = function (flags) { - return { - isLeading: (flags[0] & 0x0c) >>> 2, - dependsOn: flags[0] & 0x03, - isDependedOn: (flags[1] & 0xc0) >>> 6, - hasRedundancy: (flags[1] & 0x30) >>> 4, - paddingValue: (flags[1] & 0x0e) >>> 1, - isNonSyncSample: flags[1] & 0x01, - degradationPriority: flags[2] << 8 | flags[3] - }; - }; - var parseSampleFlags_1 = parseSampleFlags$1; - var parseSampleFlags = parseSampleFlags_1; - var trun = function (data) { - var result = { - version: data[0], - flags: new Uint8Array(data.subarray(1, 4)), - samples: [] - }, - view = new DataView(data.buffer, data.byteOffset, data.byteLength), - // Flag interpretation - dataOffsetPresent = result.flags[2] & 0x01, - // compare with 2nd byte of 0x1 - firstSampleFlagsPresent = result.flags[2] & 0x04, - // compare with 2nd byte of 0x4 - sampleDurationPresent = result.flags[1] & 0x01, - // compare with 2nd byte of 0x100 - sampleSizePresent = result.flags[1] & 0x02, - // compare with 2nd byte of 0x200 - sampleFlagsPresent = result.flags[1] & 0x04, - // compare with 2nd byte of 0x400 - sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08, - // compare with 2nd byte of 0x800 - sampleCount = view.getUint32(4), - offset = 8, - sample; - if (dataOffsetPresent) { - // 32 bit signed integer - result.dataOffset = view.getInt32(offset); - offset += 4; - } // Overrides the flags for the first sample only. The order of - // optional values will be: duration, size, compositionTimeOffset - - if (firstSampleFlagsPresent && sampleCount) { - sample = { - flags: parseSampleFlags(data.subarray(offset, offset + 4)) - }; - offset += 4; - if (sampleDurationPresent) { - sample.duration = view.getUint32(offset); - offset += 4; - } - if (sampleSizePresent) { - sample.size = view.getUint32(offset); - offset += 4; - } - if (sampleCompositionTimeOffsetPresent) { - if (result.version === 1) { - sample.compositionTimeOffset = view.getInt32(offset); - } else { - sample.compositionTimeOffset = view.getUint32(offset); - } - offset += 4; - } - result.samples.push(sample); - sampleCount--; - } - while (sampleCount--) { - sample = {}; - if (sampleDurationPresent) { - sample.duration = view.getUint32(offset); - offset += 4; - } - if (sampleSizePresent) { - sample.size = view.getUint32(offset); - offset += 4; - } - if (sampleFlagsPresent) { - sample.flags = parseSampleFlags(data.subarray(offset, offset + 4)); - offset += 4; - } - if (sampleCompositionTimeOffsetPresent) { - if (result.version === 1) { - sample.compositionTimeOffset = view.getInt32(offset); - } else { - sample.compositionTimeOffset = view.getUint32(offset); - } - offset += 4; - } - result.samples.push(sample); - } - return result; - }; - var parseTrun$2 = trun; - var tfhd = function (data) { - var view = new DataView(data.buffer, data.byteOffset, data.byteLength), - result = { - version: data[0], - flags: new Uint8Array(data.subarray(1, 4)), - trackId: view.getUint32(4) - }, - baseDataOffsetPresent = result.flags[2] & 0x01, - sampleDescriptionIndexPresent = result.flags[2] & 0x02, - defaultSampleDurationPresent = result.flags[2] & 0x08, - defaultSampleSizePresent = result.flags[2] & 0x10, - defaultSampleFlagsPresent = result.flags[2] & 0x20, - durationIsEmpty = result.flags[0] & 0x010000, - defaultBaseIsMoof = result.flags[0] & 0x020000, - i; - i = 8; - if (baseDataOffsetPresent) { - i += 4; // truncate top 4 bytes - // FIXME: should we read the full 64 bits? - - result.baseDataOffset = view.getUint32(12); - i += 4; - } - if (sampleDescriptionIndexPresent) { - result.sampleDescriptionIndex = view.getUint32(i); - i += 4; - } - if (defaultSampleDurationPresent) { - result.defaultSampleDuration = view.getUint32(i); - i += 4; - } - if (defaultSampleSizePresent) { - result.defaultSampleSize = view.getUint32(i); - i += 4; - } - if (defaultSampleFlagsPresent) { - result.defaultSampleFlags = view.getUint32(i); - } - if (durationIsEmpty) { - result.durationIsEmpty = true; - } - if (!baseDataOffsetPresent && defaultBaseIsMoof) { - result.baseDataOffsetIsMoof = true; - } - return result; - }; - var parseTfhd$2 = tfhd; - var win; - if (typeof window !== "undefined") { - win = window; - } else if (typeof commonjsGlobal !== "undefined") { - win = commonjsGlobal; - } else if (typeof self !== "undefined") { - win = self; - } else { - win = {}; - } - var window_1 = win; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Reads in-band CEA-708 captions out of FMP4 segments. - * @see https://en.wikipedia.org/wiki/CEA-708 - */ - - var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes; - var CaptionStream = captionStream.CaptionStream; - var findBox$1 = findBox_1; - var parseTfdt$1 = parseTfdt$2; - var parseTrun$1 = parseTrun$2; - var parseTfhd$1 = parseTfhd$2; - var window$2 = window_1; - /** - * Maps an offset in the mdat to a sample based on the the size of the samples. - * Assumes that `parseSamples` has been called first. - * - * @param {Number} offset - The offset into the mdat - * @param {Object[]} samples - An array of samples, parsed using `parseSamples` - * @return {?Object} The matching sample, or null if no match was found. - * - * @see ISO-BMFF-12/2015, Section 8.8.8 - **/ - - var mapToSample = function (offset, samples) { - var approximateOffset = offset; - for (var i = 0; i < samples.length; i++) { - var sample = samples[i]; - if (approximateOffset < sample.size) { - return sample; - } - approximateOffset -= sample.size; - } - return null; - }; - /** - * Finds SEI nal units contained in a Media Data Box. - * Assumes that `parseSamples` has been called first. - * - * @param {Uint8Array} avcStream - The bytes of the mdat - * @param {Object[]} samples - The samples parsed out by `parseSamples` - * @param {Number} trackId - The trackId of this video track - * @return {Object[]} seiNals - the parsed SEI NALUs found. - * The contents of the seiNal should match what is expected by - * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts) - * - * @see ISO-BMFF-12/2015, Section 8.1.1 - * @see Rec. ITU-T H.264, 7.3.2.3.1 - **/ - - var findSeiNals = function (avcStream, samples, trackId) { - var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength), - result = { - logs: [], - seiNals: [] - }, - seiNal, - i, - length, - lastMatchedSample; - for (i = 0; i + 4 < avcStream.length; i += length) { - length = avcView.getUint32(i); - i += 4; // Bail if this doesn't appear to be an H264 stream - - if (length <= 0) { - continue; - } - switch (avcStream[i] & 0x1F) { - case 0x06: - var data = avcStream.subarray(i + 1, i + 1 + length); - var matchingSample = mapToSample(i, samples); - seiNal = { - nalUnitType: 'sei_rbsp', - size: length, - data: data, - escapedRBSP: discardEmulationPreventionBytes(data), - trackId: trackId - }; - if (matchingSample) { - seiNal.pts = matchingSample.pts; - seiNal.dts = matchingSample.dts; - lastMatchedSample = matchingSample; - } else if (lastMatchedSample) { - // If a matching sample cannot be found, use the last - // sample's values as they should be as close as possible - seiNal.pts = lastMatchedSample.pts; - seiNal.dts = lastMatchedSample.dts; - } else { - result.logs.push({ - level: 'warn', - message: 'We\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.' - }); - break; - } - result.seiNals.push(seiNal); - break; - } - } - return result; - }; - /** - * Parses sample information out of Track Run Boxes and calculates - * the absolute presentation and decode timestamps of each sample. - * - * @param {Array} truns - The Trun Run boxes to be parsed - * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt - @see ISO-BMFF-12/2015, Section 8.8.12 - * @param {Object} tfhd - The parsed Track Fragment Header - * @see inspect.parseTfhd - * @return {Object[]} the parsed samples - * - * @see ISO-BMFF-12/2015, Section 8.8.8 - **/ - - var parseSamples = function (truns, baseMediaDecodeTime, tfhd) { - var currentDts = baseMediaDecodeTime; - var defaultSampleDuration = tfhd.defaultSampleDuration || 0; - var defaultSampleSize = tfhd.defaultSampleSize || 0; - var trackId = tfhd.trackId; - var allSamples = []; - truns.forEach(function (trun) { - // Note: We currently do not parse the sample table as well - // as the trun. It's possible some sources will require this. - // moov > trak > mdia > minf > stbl - var trackRun = parseTrun$1(trun); - var samples = trackRun.samples; - samples.forEach(function (sample) { - if (sample.duration === undefined) { - sample.duration = defaultSampleDuration; - } - if (sample.size === undefined) { - sample.size = defaultSampleSize; - } - sample.trackId = trackId; - sample.dts = currentDts; - if (sample.compositionTimeOffset === undefined) { - sample.compositionTimeOffset = 0; - } - if (typeof currentDts === 'bigint') { - sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset); - currentDts += window$2.BigInt(sample.duration); - } else { - sample.pts = currentDts + sample.compositionTimeOffset; - currentDts += sample.duration; - } - }); - allSamples = allSamples.concat(samples); - }); - return allSamples; - }; - /** - * Parses out caption nals from an FMP4 segment's video tracks. - * - * @param {Uint8Array} segment - The bytes of a single segment - * @param {Number} videoTrackId - The trackId of a video track in the segment - * @return {Object.} A mapping of video trackId to - * a list of seiNals found in that track - **/ - - var parseCaptionNals = function (segment, videoTrackId) { - // To get the samples - var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units - - var mdats = findBox$1(segment, ['mdat']); - var captionNals = {}; - var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs - - mdats.forEach(function (mdat, index) { - var matchingTraf = trafs[index]; - mdatTrafPairs.push({ - mdat: mdat, - traf: matchingTraf - }); - }); - mdatTrafPairs.forEach(function (pair) { - var mdat = pair.mdat; - var traf = pair.traf; - var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf - - var headerInfo = parseTfhd$1(tfhd[0]); - var trackId = headerInfo.trackId; - var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf - - var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0; - var truns = findBox$1(traf, ['trun']); - var samples; - var result; // Only parse video data for the chosen video track - - if (videoTrackId === trackId && truns.length > 0) { - samples = parseSamples(truns, baseMediaDecodeTime, headerInfo); - result = findSeiNals(mdat, samples, trackId); - if (!captionNals[trackId]) { - captionNals[trackId] = { - seiNals: [], - logs: [] - }; - } - captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals); - captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs); - } - }); - return captionNals; - }; - /** - * Parses out inband captions from an MP4 container and returns - * caption objects that can be used by WebVTT and the TextTrack API. - * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue - * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack - * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first - * - * @param {Uint8Array} segment - The fmp4 segment containing embedded captions - * @param {Number} trackId - The id of the video track to parse - * @param {Number} timescale - The timescale for the video track from the init segment - * - * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks - * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds - * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds - * @return {Object[]} parsedCaptions[].content - A list of individual caption segments - * @return {String} parsedCaptions[].content.text - The visible content of the caption segment - * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment - * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80 - **/ - - var parseEmbeddedCaptions = function (segment, trackId, timescale) { - var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there - - if (trackId === null) { - return null; - } - captionNals = parseCaptionNals(segment, trackId); - var trackNals = captionNals[trackId] || {}; - return { - seiNals: trackNals.seiNals, - logs: trackNals.logs, - timescale: timescale - }; - }; - /** - * Converts SEI NALUs into captions that can be used by video.js - **/ - - var CaptionParser = function () { - var isInitialized = false; - var captionStream; // Stores segments seen before trackId and timescale are set - - var segmentCache; // Stores video track ID of the track being parsed - - var trackId; // Stores the timescale of the track being parsed - - var timescale; // Stores captions parsed so far - - var parsedCaptions; // Stores whether we are receiving partial data or not - - var parsingPartial; - /** - * A method to indicate whether a CaptionParser has been initalized - * @returns {Boolean} - **/ - - this.isInitialized = function () { - return isInitialized; - }; - /** - * Initializes the underlying CaptionStream, SEI NAL parsing - * and management, and caption collection - **/ - - this.init = function (options) { - captionStream = new CaptionStream(); - isInitialized = true; - parsingPartial = options ? options.isPartial : false; // Collect dispatched captions - - captionStream.on('data', function (event) { - // Convert to seconds in the source's timescale - event.startTime = event.startPts / timescale; - event.endTime = event.endPts / timescale; - parsedCaptions.captions.push(event); - parsedCaptions.captionStreams[event.stream] = true; - }); - captionStream.on('log', function (log) { - parsedCaptions.logs.push(log); - }); - }; - /** - * Determines if a new video track will be selected - * or if the timescale changed - * @return {Boolean} - **/ - - this.isNewInit = function (videoTrackIds, timescales) { - if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) { - return false; - } - return trackId !== videoTrackIds[0] || timescale !== timescales[trackId]; - }; - /** - * Parses out SEI captions and interacts with underlying - * CaptionStream to return dispatched captions - * - * @param {Uint8Array} segment - The fmp4 segment containing embedded captions - * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment - * @param {Object.} timescales - The timescales found in the init segment - * @see parseEmbeddedCaptions - * @see m2ts/caption-stream.js - **/ - - this.parse = function (segment, videoTrackIds, timescales) { - var parsedData; - if (!this.isInitialized()) { - return null; // This is not likely to be a video segment - } else if (!videoTrackIds || !timescales) { - return null; - } else if (this.isNewInit(videoTrackIds, timescales)) { - // Use the first video track only as there is no - // mechanism to switch to other video tracks - trackId = videoTrackIds[0]; - timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment - // data until we have one. - // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there - } else if (trackId === null || !timescale) { - segmentCache.push(segment); - return null; - } // Now that a timescale and trackId is set, parse cached segments - - while (segmentCache.length > 0) { - var cachedSegment = segmentCache.shift(); - this.parse(cachedSegment, videoTrackIds, timescales); - } - parsedData = parseEmbeddedCaptions(segment, trackId, timescale); - if (parsedData && parsedData.logs) { - parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs); - } - if (parsedData === null || !parsedData.seiNals) { - if (parsedCaptions.logs.length) { - return { - logs: parsedCaptions.logs, - captions: [], - captionStreams: [] - }; - } - return null; - } - this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched - - this.flushStream(); - return parsedCaptions; - }; - /** - * Pushes SEI NALUs onto CaptionStream - * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals` - * Assumes that `parseCaptionNals` has been called first - * @see m2ts/caption-stream.js - **/ - - this.pushNals = function (nals) { - if (!this.isInitialized() || !nals || nals.length === 0) { - return null; - } - nals.forEach(function (nal) { - captionStream.push(nal); - }); - }; - /** - * Flushes underlying CaptionStream to dispatch processed, displayable captions - * @see m2ts/caption-stream.js - **/ - - this.flushStream = function () { - if (!this.isInitialized()) { - return null; - } - if (!parsingPartial) { - captionStream.flush(); - } else { - captionStream.partialFlush(); - } - }; - /** - * Reset caption buckets for new data - **/ - - this.clearParsedCaptions = function () { - parsedCaptions.captions = []; - parsedCaptions.captionStreams = {}; - parsedCaptions.logs = []; - }; - /** - * Resets underlying CaptionStream - * @see m2ts/caption-stream.js - **/ - - this.resetCaptionStream = function () { - if (!this.isInitialized()) { - return null; - } - captionStream.reset(); - }; - /** - * Convenience method to clear all captions flushed from the - * CaptionStream and still being parsed - * @see m2ts/caption-stream.js - **/ - - this.clearAllCaptions = function () { - this.clearParsedCaptions(); - this.resetCaptionStream(); - }; - /** - * Reset caption parser - **/ - - this.reset = function () { - segmentCache = []; - trackId = null; - timescale = null; - if (!parsedCaptions) { - parsedCaptions = { - captions: [], - // CC1, CC2, CC3, CC4 - captionStreams: {}, - logs: [] - }; - } else { - this.clearParsedCaptions(); - } - this.resetCaptionStream(); - }; - this.reset(); - }; - var captionParser = CaptionParser; - /** - * Returns the first string in the data array ending with a null char '\0' - * @param {UInt8} data - * @returns the string with the null char - */ - - var uint8ToCString$1 = function (data) { - var index = 0; - var curChar = String.fromCharCode(data[index]); - var retString = ''; - while (curChar !== '\0') { - retString += curChar; - index++; - curChar = String.fromCharCode(data[index]); - } // Add nullChar - - retString += curChar; - return retString; - }; - var string = { - uint8ToCString: uint8ToCString$1 - }; - var uint8ToCString = string.uint8ToCString; - var getUint64$1 = numbers.getUint64; - /** - * Based on: ISO/IEC 23009 Section: 5.10.3.3 - * References: - * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format - * https://aomediacodec.github.io/id3-emsg/ - * - * Takes emsg box data as a uint8 array and returns a emsg box object - * @param {UInt8Array} boxData data from emsg box - * @returns A parsed emsg box object - */ - - var parseEmsgBox = function (boxData) { - // version + flags - var offset = 4; - var version = boxData[0]; - var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data; - if (version === 0) { - scheme_id_uri = uint8ToCString(boxData.subarray(offset)); - offset += scheme_id_uri.length; - value = uint8ToCString(boxData.subarray(offset)); - offset += value.length; - var dv = new DataView(boxData.buffer); - timescale = dv.getUint32(offset); - offset += 4; - presentation_time_delta = dv.getUint32(offset); - offset += 4; - event_duration = dv.getUint32(offset); - offset += 4; - id = dv.getUint32(offset); - offset += 4; - } else if (version === 1) { - var dv = new DataView(boxData.buffer); - timescale = dv.getUint32(offset); - offset += 4; - presentation_time = getUint64$1(boxData.subarray(offset)); - offset += 8; - event_duration = dv.getUint32(offset); - offset += 4; - id = dv.getUint32(offset); - offset += 4; - scheme_id_uri = uint8ToCString(boxData.subarray(offset)); - offset += scheme_id_uri.length; - value = uint8ToCString(boxData.subarray(offset)); - offset += value.length; - } - message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength)); - var emsgBox = { - scheme_id_uri, - value, - // if timescale is undefined or 0 set to 1 - timescale: timescale ? timescale : 1, - presentation_time, - presentation_time_delta, - event_duration, - id, - message_data - }; - return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined; - }; - /** - * Scales a presentation time or time delta with an offset with a provided timescale - * @param {number} presentationTime - * @param {number} timescale - * @param {number} timeDelta - * @param {number} offset - * @returns the scaled time as a number - */ - - var scaleTime = function (presentationTime, timescale, timeDelta, offset) { - return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale; - }; - /** - * Checks the emsg box data for validity based on the version - * @param {number} version of the emsg box to validate - * @param {Object} emsg the emsg data to validate - * @returns if the box is valid as a boolean - */ - - var isValidEmsgBox = function (version, emsg) { - var hasScheme = emsg.scheme_id_uri !== '\0'; - var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme; - var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1 - - return !(version > 1) && isValidV0Box || isValidV1Box; - }; // Utility function to check if an object is defined - - var isDefined = function (data) { - return data !== undefined || data !== null; - }; - var emsg$1 = { - parseEmsgBox: parseEmsgBox, - scaleTime: scaleTime - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Utilities to detect basic properties and metadata about MP4s. - */ - - var toUnsigned = bin.toUnsigned; - var toHexString = bin.toHexString; - var findBox = findBox_1; - var parseType$1 = parseType_1; - var emsg = emsg$1; - var parseTfhd = parseTfhd$2; - var parseTrun = parseTrun$2; - var parseTfdt = parseTfdt$2; - var getUint64 = numbers.getUint64; - var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3; - var window$1 = window_1; - var parseId3Frames = parseId3.parseId3Frames; - /** - * Parses an MP4 initialization segment and extracts the timescale - * values for any declared tracks. Timescale values indicate the - * number of clock ticks per second to assume for time-based values - * elsewhere in the MP4. - * - * To determine the start time of an MP4, you need two pieces of - * information: the timescale unit and the earliest base media decode - * time. Multiple timescales can be specified within an MP4 but the - * base media decode time is always expressed in the timescale from - * the media header box for the track: - * ``` - * moov > trak > mdia > mdhd.timescale - * ``` - * @param init {Uint8Array} the bytes of the init segment - * @return {object} a hash of track ids to timescale values or null if - * the init segment is malformed. - */ - - timescale = function (init) { - var result = {}, - traks = findBox(init, ['moov', 'trak']); // mdhd timescale - - return traks.reduce(function (result, trak) { - var tkhd, version, index, id, mdhd; - tkhd = findBox(trak, ['tkhd'])[0]; - if (!tkhd) { - return null; - } - version = tkhd[0]; - index = version === 0 ? 12 : 20; - id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]); - mdhd = findBox(trak, ['mdia', 'mdhd'])[0]; - if (!mdhd) { - return null; - } - version = mdhd[0]; - index = version === 0 ? 12 : 20; - result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]); - return result; - }, result); - }; - /** - * Determine the base media decode start time, in seconds, for an MP4 - * fragment. If multiple fragments are specified, the earliest time is - * returned. - * - * The base media decode time can be parsed from track fragment - * metadata: - * ``` - * moof > traf > tfdt.baseMediaDecodeTime - * ``` - * It requires the timescale value from the mdhd to interpret. - * - * @param timescale {object} a hash of track ids to timescale values. - * @return {number} the earliest base media decode start time for the - * fragment, in seconds - */ - - startTime = function (timescale, fragment) { - var trafs; // we need info from two childrend of each track fragment box - - trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track - - var lowestTime = trafs.reduce(function (acc, traf) { - var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd - - var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified - - var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt - - var tfdt = findBox(traf, ['tfdt'])[0]; - var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength); - var baseTime; // version 1 is 64 bit - - if (tfdt[0] === 1) { - baseTime = getUint64(tfdt.subarray(4, 12)); - } else { - baseTime = dv.getUint32(4); - } // convert base time to seconds if it is a valid number. - - let seconds; - if (typeof baseTime === 'bigint') { - seconds = baseTime / window$1.BigInt(scale); - } else if (typeof baseTime === 'number' && !isNaN(baseTime)) { - seconds = baseTime / scale; - } - if (seconds < Number.MAX_SAFE_INTEGER) { - seconds = Number(seconds); - } - if (seconds < acc) { - acc = seconds; - } - return acc; - }, Infinity); - return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0; - }; - /** - * Determine the composition start, in seconds, for an MP4 - * fragment. - * - * The composition start time of a fragment can be calculated using the base - * media decode time, composition time offset, and timescale, as follows: - * - * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale - * - * All of the aforementioned information is contained within a media fragment's - * `traf` box, except for timescale info, which comes from the initialization - * segment, so a track id (also contained within a `traf`) is also necessary to - * associate it with a timescale - * - * - * @param timescales {object} - a hash of track ids to timescale values. - * @param fragment {Unit8Array} - the bytes of a media segment - * @return {number} the composition start time for the fragment, in seconds - **/ - - compositionStartTime = function (timescales, fragment) { - var trafBoxes = findBox(fragment, ['moof', 'traf']); - var baseMediaDecodeTime = 0; - var compositionTimeOffset = 0; - var trackId; - if (trafBoxes && trafBoxes.length) { - // The spec states that track run samples contained within a `traf` box are contiguous, but - // it does not explicitly state whether the `traf` boxes themselves are contiguous. - // We will assume that they are, so we only need the first to calculate start time. - var tfhd = findBox(trafBoxes[0], ['tfhd'])[0]; - var trun = findBox(trafBoxes[0], ['trun'])[0]; - var tfdt = findBox(trafBoxes[0], ['tfdt'])[0]; - if (tfhd) { - var parsedTfhd = parseTfhd(tfhd); - trackId = parsedTfhd.trackId; - } - if (tfdt) { - var parsedTfdt = parseTfdt(tfdt); - baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime; - } - if (trun) { - var parsedTrun = parseTrun(trun); - if (parsedTrun.samples && parsedTrun.samples.length) { - compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0; - } - } - } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was - // specified. - - var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds - - if (typeof baseMediaDecodeTime === 'bigint') { - compositionTimeOffset = window$1.BigInt(compositionTimeOffset); - timescale = window$1.BigInt(timescale); - } - var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale; - if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) { - result = Number(result); - } - return result; - }; - /** - * Find the trackIds of the video tracks in this source. - * Found by parsing the Handler Reference and Track Header Boxes: - * moov > trak > mdia > hdlr - * moov > trak > tkhd - * - * @param {Uint8Array} init - The bytes of the init segment for this source - * @return {Number[]} A list of trackIds - * - * @see ISO-BMFF-12/2015, Section 8.4.3 - **/ - - getVideoTrackIds = function (init) { - var traks = findBox(init, ['moov', 'trak']); - var videoTrackIds = []; - traks.forEach(function (trak) { - var hdlrs = findBox(trak, ['mdia', 'hdlr']); - var tkhds = findBox(trak, ['tkhd']); - hdlrs.forEach(function (hdlr, index) { - var handlerType = parseType$1(hdlr.subarray(8, 12)); - var tkhd = tkhds[index]; - var view; - var version; - var trackId; - if (handlerType === 'vide') { - view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength); - version = view.getUint8(0); - trackId = version === 0 ? view.getUint32(12) : view.getUint32(20); - videoTrackIds.push(trackId); - } - }); - }); - return videoTrackIds; - }; - getTimescaleFromMediaHeader = function (mdhd) { - // mdhd is a FullBox, meaning it will have its own version as the first byte - var version = mdhd[0]; - var index = version === 0 ? 12 : 20; - return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]); - }; - /** - * Get all the video, audio, and hint tracks from a non fragmented - * mp4 segment - */ - - getTracks = function (init) { - var traks = findBox(init, ['moov', 'trak']); - var tracks = []; - traks.forEach(function (trak) { - var track = {}; - var tkhd = findBox(trak, ['tkhd'])[0]; - var view, tkhdVersion; // id - - if (tkhd) { - view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength); - tkhdVersion = view.getUint8(0); - track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20); - } - var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type - - if (hdlr) { - var type = parseType$1(hdlr.subarray(8, 12)); - if (type === 'vide') { - track.type = 'video'; - } else if (type === 'soun') { - track.type = 'audio'; - } else { - track.type = type; - } - } // codec - - var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0]; - if (stsd) { - var sampleDescriptions = stsd.subarray(8); // gives the codec type string - - track.codec = parseType$1(sampleDescriptions.subarray(4, 8)); - var codecBox = findBox(sampleDescriptions, [track.codec])[0]; - var codecConfig, codecConfigType; - if (codecBox) { - // https://tools.ietf.org/html/rfc6381#section-3.3 - if (/^[asm]vc[1-9]$/i.test(track.codec)) { - // we don't need anything but the "config" parameter of the - // avc1 codecBox - codecConfig = codecBox.subarray(78); - codecConfigType = parseType$1(codecConfig.subarray(4, 8)); - if (codecConfigType === 'avcC' && codecConfig.length > 11) { - track.codec += '.'; // left padded with zeroes for single digit hex - // profile idc - - track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags - - track.codec += toHexString(codecConfig[10]); // level idc - - track.codec += toHexString(codecConfig[11]); - } else { - // TODO: show a warning that we couldn't parse the codec - // and are using the default - track.codec = 'avc1.4d400d'; - } - } else if (/^mp4[a,v]$/i.test(track.codec)) { - // we do not need anything but the streamDescriptor of the mp4a codecBox - codecConfig = codecBox.subarray(28); - codecConfigType = parseType$1(codecConfig.subarray(4, 8)); - if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) { - track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit - - track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, ''); - } else { - // TODO: show a warning that we couldn't parse the codec - // and are using the default - track.codec = 'mp4a.40.2'; - } - } else { - // flac, opus, etc - track.codec = track.codec.toLowerCase(); - } - } - } - var mdhd = findBox(trak, ['mdia', 'mdhd'])[0]; - if (mdhd) { - track.timescale = getTimescaleFromMediaHeader(mdhd); - } - tracks.push(track); - }); - return tracks; - }; - /** - * Returns an array of emsg ID3 data from the provided segmentData. - * An offset can also be provided as the Latest Arrival Time to calculate - * the Event Start Time of v0 EMSG boxes. - * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing - * - * @param {Uint8Array} segmentData the segment byte array. - * @param {number} offset the segment start time or Latest Arrival Time, - * @return {Object[]} an array of ID3 parsed from EMSG boxes - */ - - getEmsgID3 = function (segmentData, offset = 0) { - var emsgBoxes = findBox(segmentData, ['emsg']); - return emsgBoxes.map(data => { - var parsedBox = emsg.parseEmsgBox(new Uint8Array(data)); - var parsedId3Frames = parseId3Frames(parsedBox.message_data); - return { - cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset), - duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale), - frames: parsedId3Frames - }; - }); - }; - var probe$2 = { - // export mp4 inspector's findBox and parseType for backwards compatibility - findBox: findBox, - parseType: parseType$1, - timescale: timescale, - startTime: startTime, - compositionStartTime: compositionStartTime, - videoTrackIds: getVideoTrackIds, - tracks: getTracks, - getTimescaleFromMediaHeader: getTimescaleFromMediaHeader, - getEmsgID3: getEmsgID3 - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Utilities to detect basic properties and metadata about TS Segments. - */ - - var StreamTypes$1 = streamTypes; - var parsePid = function (packet) { - var pid = packet[1] & 0x1f; - pid <<= 8; - pid |= packet[2]; - return pid; - }; - var parsePayloadUnitStartIndicator = function (packet) { - return !!(packet[1] & 0x40); - }; - var parseAdaptionField = function (packet) { - var offset = 0; // if an adaption field is present, its length is specified by the - // fifth byte of the TS packet header. The adaptation field is - // used to add stuffing to PES packets that don't fill a complete - // TS packet, and to specify some forms of timing and control data - // that we do not currently use. - - if ((packet[3] & 0x30) >>> 4 > 0x01) { - offset += packet[4] + 1; - } - return offset; - }; - var parseType = function (packet, pmtPid) { - var pid = parsePid(packet); - if (pid === 0) { - return 'pat'; - } else if (pid === pmtPid) { - return 'pmt'; - } else if (pmtPid) { - return 'pes'; - } - return null; - }; - var parsePat = function (packet) { - var pusi = parsePayloadUnitStartIndicator(packet); - var offset = 4 + parseAdaptionField(packet); - if (pusi) { - offset += packet[offset] + 1; - } - return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11]; - }; - var parsePmt = function (packet) { - var programMapTable = {}; - var pusi = parsePayloadUnitStartIndicator(packet); - var payloadOffset = 4 + parseAdaptionField(packet); - if (pusi) { - payloadOffset += packet[payloadOffset] + 1; - } // PMTs can be sent ahead of the time when they should actually - // take effect. We don't believe this should ever be the case - // for HLS but we'll ignore "forward" PMT declarations if we see - // them. Future PMT declarations have the current_next_indicator - // set to zero. - - if (!(packet[payloadOffset + 5] & 0x01)) { - return; - } - var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section - - sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2]; - tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how - // long the program info descriptors are - - programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table - - var offset = 12 + programInfoLength; - while (offset < tableEnd) { - var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type - - programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry - // skip past the elementary stream descriptors, if present - - offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5; - } - return programMapTable; - }; - var parsePesType = function (packet, programMapTable) { - var pid = parsePid(packet); - var type = programMapTable[pid]; - switch (type) { - case StreamTypes$1.H264_STREAM_TYPE: - return 'video'; - case StreamTypes$1.ADTS_STREAM_TYPE: - return 'audio'; - case StreamTypes$1.METADATA_STREAM_TYPE: - return 'timed-metadata'; - default: - return null; - } - }; - var parsePesTime = function (packet) { - var pusi = parsePayloadUnitStartIndicator(packet); - if (!pusi) { - return null; - } - var offset = 4 + parseAdaptionField(packet); - if (offset >= packet.byteLength) { - // From the H 222.0 MPEG-TS spec - // "For transport stream packets carrying PES packets, stuffing is needed when there - // is insufficient PES packet data to completely fill the transport stream packet - // payload bytes. Stuffing is accomplished by defining an adaptation field longer than - // the sum of the lengths of the data elements in it, so that the payload bytes - // remaining after the adaptation field exactly accommodates the available PES packet - // data." - // - // If the offset is >= the length of the packet, then the packet contains no data - // and instead is just adaption field stuffing bytes - return null; - } - var pes = null; - var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value - // and a DTS value. Determine what combination of values is - // available to work with. - - ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript - // performs all bitwise operations on 32-bit integers but javascript - // supports a much greater range (52-bits) of integer using standard - // mathematical operations. - // We construct a 31-bit value using bitwise operators over the 31 - // most significant bits and then multiply by 4 (equal to a left-shift - // of 2) before we add the final 2 least significant bits of the - // timestamp (equal to an OR.) - - if (ptsDtsFlags & 0xC0) { - pes = {}; // the PTS and DTS are not written out directly. For information - // on how they are encoded, see - // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html - - pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3; - pes.pts *= 4; // Left shift by 2 - - pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs - - pes.dts = pes.pts; - if (ptsDtsFlags & 0x40) { - pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3; - pes.dts *= 4; // Left shift by 2 - - pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs - } - } - - return pes; - }; - var parseNalUnitType = function (type) { - switch (type) { - case 0x05: - return 'slice_layer_without_partitioning_rbsp_idr'; - case 0x06: - return 'sei_rbsp'; - case 0x07: - return 'seq_parameter_set_rbsp'; - case 0x08: - return 'pic_parameter_set_rbsp'; - case 0x09: - return 'access_unit_delimiter_rbsp'; - default: - return null; - } - }; - var videoPacketContainsKeyFrame = function (packet) { - var offset = 4 + parseAdaptionField(packet); - var frameBuffer = packet.subarray(offset); - var frameI = 0; - var frameSyncPoint = 0; - var foundKeyFrame = false; - var nalType; // advance the sync point to a NAL start, if necessary - - for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) { - if (frameBuffer[frameSyncPoint + 2] === 1) { - // the sync point is properly aligned - frameI = frameSyncPoint + 5; - break; - } - } - while (frameI < frameBuffer.byteLength) { - // look at the current byte to determine if we've hit the end of - // a NAL unit boundary - switch (frameBuffer[frameI]) { - case 0: - // skip past non-sync sequences - if (frameBuffer[frameI - 1] !== 0) { - frameI += 2; - break; - } else if (frameBuffer[frameI - 2] !== 0) { - frameI++; - break; - } - if (frameSyncPoint + 3 !== frameI - 2) { - nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f); - if (nalType === 'slice_layer_without_partitioning_rbsp_idr') { - foundKeyFrame = true; - } - } // drop trailing zeroes - - do { - frameI++; - } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length); - frameSyncPoint = frameI - 2; - frameI += 3; - break; - case 1: - // skip past non-sync sequences - if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) { - frameI += 3; - break; - } - nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f); - if (nalType === 'slice_layer_without_partitioning_rbsp_idr') { - foundKeyFrame = true; - } - frameSyncPoint = frameI - 2; - frameI += 3; - break; - default: - // the current byte isn't a one or zero, so it cannot be part - // of a sync sequence - frameI += 3; - break; - } - } - frameBuffer = frameBuffer.subarray(frameSyncPoint); - frameI -= frameSyncPoint; - frameSyncPoint = 0; // parse the final nal - - if (frameBuffer && frameBuffer.byteLength > 3) { - nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f); - if (nalType === 'slice_layer_without_partitioning_rbsp_idr') { - foundKeyFrame = true; - } - } - return foundKeyFrame; - }; - var probe$1 = { - parseType: parseType, - parsePat: parsePat, - parsePmt: parsePmt, - parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator, - parsePesType: parsePesType, - parsePesTime: parsePesTime, - videoPacketContainsKeyFrame: videoPacketContainsKeyFrame - }; - /** - * mux.js - * - * Copyright (c) Brightcove - * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE - * - * Parse mpeg2 transport stream packets to extract basic timing information - */ - - var StreamTypes = streamTypes; - var handleRollover = timestampRolloverStream.handleRollover; - var probe = {}; - probe.ts = probe$1; - probe.aac = utils; - var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS; - var MP2T_PACKET_LENGTH = 188, - // bytes - SYNC_BYTE = 0x47; - /** - * walks through segment data looking for pat and pmt packets to parse out - * program map table information - */ - - var parsePsi_ = function (bytes, pmt) { - var startIndex = 0, - endIndex = MP2T_PACKET_LENGTH, - packet, - type; - while (endIndex < bytes.byteLength) { - // Look for a pair of start and end sync bytes in the data.. - if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) { - // We found a packet - packet = bytes.subarray(startIndex, endIndex); - type = probe.ts.parseType(packet, pmt.pid); - switch (type) { - case 'pat': - pmt.pid = probe.ts.parsePat(packet); - break; - case 'pmt': - var table = probe.ts.parsePmt(packet); - pmt.table = pmt.table || {}; - Object.keys(table).forEach(function (key) { - pmt.table[key] = table[key]; - }); - break; - } - startIndex += MP2T_PACKET_LENGTH; - endIndex += MP2T_PACKET_LENGTH; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex++; - endIndex++; - } - }; - /** - * walks through the segment data from the start and end to get timing information - * for the first and last audio pes packets - */ - - var parseAudioPes_ = function (bytes, pmt, result) { - var startIndex = 0, - endIndex = MP2T_PACKET_LENGTH, - packet, - type, - pesType, - pusi, - parsed; - var endLoop = false; // Start walking from start of segment to get first audio packet - - while (endIndex <= bytes.byteLength) { - // Look for a pair of start and end sync bytes in the data.. - if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) { - // We found a packet - packet = bytes.subarray(startIndex, endIndex); - type = probe.ts.parseType(packet, pmt.pid); - switch (type) { - case 'pes': - pesType = probe.ts.parsePesType(packet, pmt.table); - pusi = probe.ts.parsePayloadUnitStartIndicator(packet); - if (pesType === 'audio' && pusi) { - parsed = probe.ts.parsePesTime(packet); - if (parsed) { - parsed.type = 'audio'; - result.audio.push(parsed); - endLoop = true; - } - } - break; - } - if (endLoop) { - break; - } - startIndex += MP2T_PACKET_LENGTH; - endIndex += MP2T_PACKET_LENGTH; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex++; - endIndex++; - } // Start walking from end of segment to get last audio packet - - endIndex = bytes.byteLength; - startIndex = endIndex - MP2T_PACKET_LENGTH; - endLoop = false; - while (startIndex >= 0) { - // Look for a pair of start and end sync bytes in the data.. - if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) { - // We found a packet - packet = bytes.subarray(startIndex, endIndex); - type = probe.ts.parseType(packet, pmt.pid); - switch (type) { - case 'pes': - pesType = probe.ts.parsePesType(packet, pmt.table); - pusi = probe.ts.parsePayloadUnitStartIndicator(packet); - if (pesType === 'audio' && pusi) { - parsed = probe.ts.parsePesTime(packet); - if (parsed) { - parsed.type = 'audio'; - result.audio.push(parsed); - endLoop = true; - } - } - break; - } - if (endLoop) { - break; - } - startIndex -= MP2T_PACKET_LENGTH; - endIndex -= MP2T_PACKET_LENGTH; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex--; - endIndex--; - } - }; - /** - * walks through the segment data from the start and end to get timing information - * for the first and last video pes packets as well as timing information for the first - * key frame. - */ - - var parseVideoPes_ = function (bytes, pmt, result) { - var startIndex = 0, - endIndex = MP2T_PACKET_LENGTH, - packet, - type, - pesType, - pusi, - parsed, - frame, - i, - pes; - var endLoop = false; - var currentFrame = { - data: [], - size: 0 - }; // Start walking from start of segment to get first video packet - - while (endIndex < bytes.byteLength) { - // Look for a pair of start and end sync bytes in the data.. - if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) { - // We found a packet - packet = bytes.subarray(startIndex, endIndex); - type = probe.ts.parseType(packet, pmt.pid); - switch (type) { - case 'pes': - pesType = probe.ts.parsePesType(packet, pmt.table); - pusi = probe.ts.parsePayloadUnitStartIndicator(packet); - if (pesType === 'video') { - if (pusi && !endLoop) { - parsed = probe.ts.parsePesTime(packet); - if (parsed) { - parsed.type = 'video'; - result.video.push(parsed); - endLoop = true; - } - } - if (!result.firstKeyFrame) { - if (pusi) { - if (currentFrame.size !== 0) { - frame = new Uint8Array(currentFrame.size); - i = 0; - while (currentFrame.data.length) { - pes = currentFrame.data.shift(); - frame.set(pes, i); - i += pes.byteLength; - } - if (probe.ts.videoPacketContainsKeyFrame(frame)) { - var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting - // the keyframe seems to work fine with HLS playback - // and definitely preferable to a crash with TypeError... - - if (firstKeyFrame) { - result.firstKeyFrame = firstKeyFrame; - result.firstKeyFrame.type = 'video'; - } else { - // eslint-disable-next-line - console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.'); - } - } - currentFrame.size = 0; - } - } - currentFrame.data.push(packet); - currentFrame.size += packet.byteLength; - } - } - break; - } - if (endLoop && result.firstKeyFrame) { - break; - } - startIndex += MP2T_PACKET_LENGTH; - endIndex += MP2T_PACKET_LENGTH; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex++; - endIndex++; - } // Start walking from end of segment to get last video packet - - endIndex = bytes.byteLength; - startIndex = endIndex - MP2T_PACKET_LENGTH; - endLoop = false; - while (startIndex >= 0) { - // Look for a pair of start and end sync bytes in the data.. - if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) { - // We found a packet - packet = bytes.subarray(startIndex, endIndex); - type = probe.ts.parseType(packet, pmt.pid); - switch (type) { - case 'pes': - pesType = probe.ts.parsePesType(packet, pmt.table); - pusi = probe.ts.parsePayloadUnitStartIndicator(packet); - if (pesType === 'video' && pusi) { - parsed = probe.ts.parsePesTime(packet); - if (parsed) { - parsed.type = 'video'; - result.video.push(parsed); - endLoop = true; - } - } - break; - } - if (endLoop) { - break; - } - startIndex -= MP2T_PACKET_LENGTH; - endIndex -= MP2T_PACKET_LENGTH; - continue; - } // If we get here, we have somehow become de-synchronized and we need to step - // forward one byte at a time until we find a pair of sync bytes that denote - // a packet - - startIndex--; - endIndex--; - } - }; - /** - * Adjusts the timestamp information for the segment to account for - * rollover and convert to seconds based on pes packet timescale (90khz clock) - */ - - var adjustTimestamp_ = function (segmentInfo, baseTimestamp) { - if (segmentInfo.audio && segmentInfo.audio.length) { - var audioBaseTimestamp = baseTimestamp; - if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) { - audioBaseTimestamp = segmentInfo.audio[0].dts; - } - segmentInfo.audio.forEach(function (info) { - info.dts = handleRollover(info.dts, audioBaseTimestamp); - info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds - - info.dtsTime = info.dts / ONE_SECOND_IN_TS; - info.ptsTime = info.pts / ONE_SECOND_IN_TS; - }); - } - if (segmentInfo.video && segmentInfo.video.length) { - var videoBaseTimestamp = baseTimestamp; - if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) { - videoBaseTimestamp = segmentInfo.video[0].dts; - } - segmentInfo.video.forEach(function (info) { - info.dts = handleRollover(info.dts, videoBaseTimestamp); - info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds - - info.dtsTime = info.dts / ONE_SECOND_IN_TS; - info.ptsTime = info.pts / ONE_SECOND_IN_TS; - }); - if (segmentInfo.firstKeyFrame) { - var frame = segmentInfo.firstKeyFrame; - frame.dts = handleRollover(frame.dts, videoBaseTimestamp); - frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds - - frame.dtsTime = frame.dts / ONE_SECOND_IN_TS; - frame.ptsTime = frame.pts / ONE_SECOND_IN_TS; - } - } - }; - /** - * inspects the aac data stream for start and end time information - */ - - var inspectAac_ = function (bytes) { - var endLoop = false, - audioCount = 0, - sampleRate = null, - timestamp = null, - frameSize = 0, - byteIndex = 0, - packet; - while (bytes.length - byteIndex >= 3) { - var type = probe.aac.parseType(bytes, byteIndex); - switch (type) { - case 'timed-metadata': - // Exit early because we don't have enough to parse - // the ID3 tag header - if (bytes.length - byteIndex < 10) { - endLoop = true; - break; - } - frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer - // to emit a full packet - - if (frameSize > bytes.length) { - endLoop = true; - break; - } - if (timestamp === null) { - packet = bytes.subarray(byteIndex, byteIndex + frameSize); - timestamp = probe.aac.parseAacTimestamp(packet); - } - byteIndex += frameSize; - break; - case 'audio': - // Exit early because we don't have enough to parse - // the ADTS frame header - if (bytes.length - byteIndex < 7) { - endLoop = true; - break; - } - frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer - // to emit a full packet - - if (frameSize > bytes.length) { - endLoop = true; - break; - } - if (sampleRate === null) { - packet = bytes.subarray(byteIndex, byteIndex + frameSize); - sampleRate = probe.aac.parseSampleRate(packet); - } - audioCount++; - byteIndex += frameSize; - break; - default: - byteIndex++; - break; - } - if (endLoop) { - return null; - } - } - if (sampleRate === null || timestamp === null) { - return null; - } - var audioTimescale = ONE_SECOND_IN_TS / sampleRate; - var result = { - audio: [{ - type: 'audio', - dts: timestamp, - pts: timestamp - }, { - type: 'audio', - dts: timestamp + audioCount * 1024 * audioTimescale, - pts: timestamp + audioCount * 1024 * audioTimescale - }] - }; - return result; - }; - /** - * inspects the transport stream segment data for start and end time information - * of the audio and video tracks (when present) as well as the first key frame's - * start time. - */ - - var inspectTs_ = function (bytes) { - var pmt = { - pid: null, - table: null - }; - var result = {}; - parsePsi_(bytes, pmt); - for (var pid in pmt.table) { - if (pmt.table.hasOwnProperty(pid)) { - var type = pmt.table[pid]; - switch (type) { - case StreamTypes.H264_STREAM_TYPE: - result.video = []; - parseVideoPes_(bytes, pmt, result); - if (result.video.length === 0) { - delete result.video; - } - break; - case StreamTypes.ADTS_STREAM_TYPE: - result.audio = []; - parseAudioPes_(bytes, pmt, result); - if (result.audio.length === 0) { - delete result.audio; - } - break; - } - } - } - return result; - }; - /** - * Inspects segment byte data and returns an object with start and end timing information - * - * @param {Uint8Array} bytes The segment byte data - * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame - * timestamps for rollover. This value must be in 90khz clock. - * @return {Object} Object containing start and end frame timing info of segment. - */ - - var inspect = function (bytes, baseTimestamp) { - var isAacData = probe.aac.isLikelyAacData(bytes); - var result; - if (isAacData) { - result = inspectAac_(bytes); - } else { - result = inspectTs_(bytes); - } - if (!result || !result.audio && !result.video) { - return null; - } - adjustTimestamp_(result, baseTimestamp); - return result; - }; - var tsInspector = { - inspect: inspect, - parseAudioPes_: parseAudioPes_ - }; - /* global self */ - - /** - * Re-emits transmuxer events by converting them into messages to the - * world outside the worker. - * - * @param {Object} transmuxer the transmuxer to wire events on - * @private - */ - - const wireTransmuxerEvents = function (self, transmuxer) { - transmuxer.on('data', function (segment) { - // transfer ownership of the underlying ArrayBuffer - // instead of doing a copy to save memory - // ArrayBuffers are transferable but generic TypedArrays are not - // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects) - const initArray = segment.initSegment; - segment.initSegment = { - data: initArray.buffer, - byteOffset: initArray.byteOffset, - byteLength: initArray.byteLength - }; - const typedArray = segment.data; - segment.data = typedArray.buffer; - self.postMessage({ - action: 'data', - segment, - byteOffset: typedArray.byteOffset, - byteLength: typedArray.byteLength - }, [segment.data]); - }); - transmuxer.on('done', function (data) { - self.postMessage({ - action: 'done' - }); - }); - transmuxer.on('gopInfo', function (gopInfo) { - self.postMessage({ - action: 'gopInfo', - gopInfo - }); - }); - transmuxer.on('videoSegmentTimingInfo', function (timingInfo) { - const videoSegmentTimingInfo = { - start: { - decode: clock$2.videoTsToSeconds(timingInfo.start.dts), - presentation: clock$2.videoTsToSeconds(timingInfo.start.pts) - }, - end: { - decode: clock$2.videoTsToSeconds(timingInfo.end.dts), - presentation: clock$2.videoTsToSeconds(timingInfo.end.pts) - }, - baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime) - }; - if (timingInfo.prependedContentDuration) { - videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration); - } - self.postMessage({ - action: 'videoSegmentTimingInfo', - videoSegmentTimingInfo - }); - }); - transmuxer.on('audioSegmentTimingInfo', function (timingInfo) { - // Note that all times for [audio/video]SegmentTimingInfo events are in video clock - const audioSegmentTimingInfo = { - start: { - decode: clock$2.videoTsToSeconds(timingInfo.start.dts), - presentation: clock$2.videoTsToSeconds(timingInfo.start.pts) - }, - end: { - decode: clock$2.videoTsToSeconds(timingInfo.end.dts), - presentation: clock$2.videoTsToSeconds(timingInfo.end.pts) - }, - baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime) - }; - if (timingInfo.prependedContentDuration) { - audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration); - } - self.postMessage({ - action: 'audioSegmentTimingInfo', - audioSegmentTimingInfo - }); - }); - transmuxer.on('id3Frame', function (id3Frame) { - self.postMessage({ - action: 'id3Frame', - id3Frame - }); - }); - transmuxer.on('caption', function (caption) { - self.postMessage({ - action: 'caption', - caption - }); - }); - transmuxer.on('trackinfo', function (trackInfo) { - self.postMessage({ - action: 'trackinfo', - trackInfo - }); - }); - transmuxer.on('audioTimingInfo', function (audioTimingInfo) { - // convert to video TS since we prioritize video time over audio - self.postMessage({ - action: 'audioTimingInfo', - audioTimingInfo: { - start: clock$2.videoTsToSeconds(audioTimingInfo.start), - end: clock$2.videoTsToSeconds(audioTimingInfo.end) - } - }); - }); - transmuxer.on('videoTimingInfo', function (videoTimingInfo) { - self.postMessage({ - action: 'videoTimingInfo', - videoTimingInfo: { - start: clock$2.videoTsToSeconds(videoTimingInfo.start), - end: clock$2.videoTsToSeconds(videoTimingInfo.end) - } - }); - }); - transmuxer.on('log', function (log) { - self.postMessage({ - action: 'log', - log - }); - }); - }; - /** - * All incoming messages route through this hash. If no function exists - * to handle an incoming message, then we ignore the message. - * - * @class MessageHandlers - * @param {Object} options the options to initialize with - */ - - class MessageHandlers { - constructor(self, options) { - this.options = options || {}; - this.self = self; - this.init(); - } - /** - * initialize our web worker and wire all the events. - */ - - init() { - if (this.transmuxer) { - this.transmuxer.dispose(); - } - this.transmuxer = new transmuxer.Transmuxer(this.options); - wireTransmuxerEvents(this.self, this.transmuxer); - } - pushMp4Captions(data) { - if (!this.captionParser) { - this.captionParser = new captionParser(); - this.captionParser.init(); - } - const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength); - const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales); - this.self.postMessage({ - action: 'mp4Captions', - captions: parsed && parsed.captions || [], - logs: parsed && parsed.logs || [], - data: segment.buffer - }, [segment.buffer]); - } - probeMp4StartTime({ - timescales, - data - }) { - const startTime = probe$2.startTime(timescales, data); - this.self.postMessage({ - action: 'probeMp4StartTime', - startTime, - data - }, [data.buffer]); - } - probeMp4Tracks({ - data - }) { - const tracks = probe$2.tracks(data); - this.self.postMessage({ - action: 'probeMp4Tracks', - tracks, - data - }, [data.buffer]); - } - /** - * Probes an mp4 segment for EMSG boxes containing ID3 data. - * https://aomediacodec.github.io/id3-emsg/ - * - * @param {Uint8Array} data segment data - * @param {number} offset segment start time - * @return {Object[]} an array of ID3 frames - */ - - probeEmsgID3({ - data, - offset - }) { - const id3Frames = probe$2.getEmsgID3(data, offset); - this.self.postMessage({ - action: 'probeEmsgID3', - id3Frames, - emsgData: data - }, [data.buffer]); - } - /** - * Probe an mpeg2-ts segment to determine the start time of the segment in it's - * internal "media time," as well as whether it contains video and/or audio. - * - * @private - * @param {Uint8Array} bytes - segment bytes - * @param {number} baseStartTime - * Relative reference timestamp used when adjusting frame timestamps for rollover. - * This value should be in seconds, as it's converted to a 90khz clock within the - * function body. - * @return {Object} The start time of the current segment in "media time" as well as - * whether it contains video and/or audio - */ - - probeTs({ - data, - baseStartTime - }) { - const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0; - const timeInfo = tsInspector.inspect(data, tsStartTime); - let result = null; - if (timeInfo) { - result = { - // each type's time info comes back as an array of 2 times, start and end - hasVideo: timeInfo.video && timeInfo.video.length === 2 || false, - hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false - }; - if (result.hasVideo) { - result.videoStart = timeInfo.video[0].ptsTime; - } - if (result.hasAudio) { - result.audioStart = timeInfo.audio[0].ptsTime; - } - } - this.self.postMessage({ - action: 'probeTs', - result, - data - }, [data.buffer]); - } - clearAllMp4Captions() { - if (this.captionParser) { - this.captionParser.clearAllCaptions(); - } - } - clearParsedMp4Captions() { - if (this.captionParser) { - this.captionParser.clearParsedCaptions(); - } - } - /** - * Adds data (a ts segment) to the start of the transmuxer pipeline for - * processing. - * - * @param {ArrayBuffer} data data to push into the muxer - */ - - push(data) { - // Cast array buffer to correct type for transmuxer - const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength); - this.transmuxer.push(segment); - } - /** - * Recreate the transmuxer so that the next segment added via `push` - * start with a fresh transmuxer. - */ - - reset() { - this.transmuxer.reset(); - } - /** - * Set the value that will be used as the `baseMediaDecodeTime` time for the - * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime` - * set relative to the first based on the PTS values. - * - * @param {Object} data used to set the timestamp offset in the muxer - */ - - setTimestampOffset(data) { - const timestampOffset = data.timestampOffset || 0; - this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset))); - } - setAudioAppendStart(data) { - this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart))); - } - setRemux(data) { - this.transmuxer.setRemux(data.remux); - } - /** - * Forces the pipeline to finish processing the last segment and emit it's - * results. - * - * @param {Object} data event data, not really used - */ - - flush(data) { - this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed - - self.postMessage({ - action: 'done', - type: 'transmuxed' - }); - } - endTimeline() { - this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their - // timelines - - self.postMessage({ - action: 'endedtimeline', - type: 'transmuxed' - }); - } - alignGopsWith(data) { - this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice()); - } - } - /** - * Our web worker interface so that things can talk to mux.js - * that will be running in a web worker. the scope is passed to this by - * webworkify. - * - * @param {Object} self the scope for the web worker - */ - - self.onmessage = function (event) { - if (event.data.action === 'init' && event.data.options) { - this.messageHandlers = new MessageHandlers(self, event.data.options); - return; - } - if (!this.messageHandlers) { - this.messageHandlers = new MessageHandlers(self); - } - if (event.data && event.data.action && event.data.action !== 'init') { - if (this.messageHandlers[event.data.action]) { - this.messageHandlers[event.data.action](event.data); - } - } - }; -})); -var TransmuxWorker = factory(workerCode$1); -/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */ - -const handleData_ = (event, transmuxedData, callback) => { - const { - type, - initSegment, - captions, - captionStreams, - metadata, - videoFrameDtsTime, - videoFramePtsTime - } = event.data.segment; - transmuxedData.buffer.push({ - captions, - captionStreams, - metadata - }); - const boxes = event.data.segment.boxes || { - data: event.data.segment.data - }; - const result = { - type, - // cast ArrayBuffer to TypedArray - data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength), - initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength) - }; - if (typeof videoFrameDtsTime !== 'undefined') { - result.videoFrameDtsTime = videoFrameDtsTime; - } - if (typeof videoFramePtsTime !== 'undefined') { - result.videoFramePtsTime = videoFramePtsTime; - } - callback(result); -}; -const handleDone_ = ({ - transmuxedData, - callback -}) => { - // Previously we only returned data on data events, - // not on done events. Clear out the buffer to keep that consistent. - transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we - // have received - - callback(transmuxedData); -}; -const handleGopInfo_ = (event, transmuxedData) => { - transmuxedData.gopInfo = event.data.gopInfo; -}; -const processTransmux = options => { - const { - transmuxer, - bytes, - audioAppendStart, - gopsToAlignWith, - remux, - onData, - onTrackInfo, - onAudioTimingInfo, - onVideoTimingInfo, - onVideoSegmentTimingInfo, - onAudioSegmentTimingInfo, - onId3, - onCaptions, - onDone, - onEndedTimeline, - onTransmuxerLog, - isEndOfTimeline - } = options; - const transmuxedData = { - buffer: [] - }; - let waitForEndedTimelineEvent = isEndOfTimeline; - const handleMessage = event => { - if (transmuxer.currentTransmux !== options) { - // disposed - return; - } - if (event.data.action === 'data') { - handleData_(event, transmuxedData, onData); - } - if (event.data.action === 'trackinfo') { - onTrackInfo(event.data.trackInfo); - } - if (event.data.action === 'gopInfo') { - handleGopInfo_(event, transmuxedData); - } - if (event.data.action === 'audioTimingInfo') { - onAudioTimingInfo(event.data.audioTimingInfo); - } - if (event.data.action === 'videoTimingInfo') { - onVideoTimingInfo(event.data.videoTimingInfo); - } - if (event.data.action === 'videoSegmentTimingInfo') { - onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo); - } - if (event.data.action === 'audioSegmentTimingInfo') { - onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo); - } - if (event.data.action === 'id3Frame') { - onId3([event.data.id3Frame], event.data.id3Frame.dispatchType); - } - if (event.data.action === 'caption') { - onCaptions(event.data.caption); - } - if (event.data.action === 'endedtimeline') { - waitForEndedTimelineEvent = false; - onEndedTimeline(); - } - if (event.data.action === 'log') { - onTransmuxerLog(event.data.log); - } // wait for the transmuxed event since we may have audio and video - - if (event.data.type !== 'transmuxed') { - return; - } // If the "endedtimeline" event has not yet fired, and this segment represents the end - // of a timeline, that means there may still be data events before the segment - // processing can be considerred complete. In that case, the final event should be - // an "endedtimeline" event with the type "transmuxed." - - if (waitForEndedTimelineEvent) { - return; - } - transmuxer.onmessage = null; - handleDone_({ - transmuxedData, - callback: onDone - }); - /* eslint-disable no-use-before-define */ - - dequeue(transmuxer); - /* eslint-enable */ - }; - - transmuxer.onmessage = handleMessage; - if (audioAppendStart) { - transmuxer.postMessage({ - action: 'setAudioAppendStart', - appendStart: audioAppendStart - }); - } // allow empty arrays to be passed to clear out GOPs - - if (Array.isArray(gopsToAlignWith)) { - transmuxer.postMessage({ - action: 'alignGopsWith', - gopsToAlignWith - }); - } - if (typeof remux !== 'undefined') { - transmuxer.postMessage({ - action: 'setRemux', - remux - }); - } - if (bytes.byteLength) { - const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer; - const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset; - transmuxer.postMessage({ - action: 'push', - // Send the typed-array of data as an ArrayBuffer so that - // it can be sent as a "Transferable" and avoid the costly - // memory copy - data: buffer, - // To recreate the original typed-array, we need information - // about what portion of the ArrayBuffer it was a view into - byteOffset, - byteLength: bytes.byteLength - }, [buffer]); - } - if (isEndOfTimeline) { - transmuxer.postMessage({ - action: 'endTimeline' - }); - } // even if we didn't push any bytes, we have to make sure we flush in case we reached - // the end of the segment - - transmuxer.postMessage({ - action: 'flush' - }); -}; -const dequeue = transmuxer => { - transmuxer.currentTransmux = null; - if (transmuxer.transmuxQueue.length) { - transmuxer.currentTransmux = transmuxer.transmuxQueue.shift(); - if (typeof transmuxer.currentTransmux === 'function') { - transmuxer.currentTransmux(); - } else { - processTransmux(transmuxer.currentTransmux); - } - } -}; -const processAction = (transmuxer, action) => { - transmuxer.postMessage({ - action - }); - dequeue(transmuxer); -}; -const enqueueAction = (action, transmuxer) => { - if (!transmuxer.currentTransmux) { - transmuxer.currentTransmux = action; - processAction(transmuxer, action); - return; - } - transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action)); -}; -const reset = transmuxer => { - enqueueAction('reset', transmuxer); -}; -const endTimeline = transmuxer => { - enqueueAction('endTimeline', transmuxer); -}; -const transmux = options => { - if (!options.transmuxer.currentTransmux) { - options.transmuxer.currentTransmux = options; - processTransmux(options); - return; - } - options.transmuxer.transmuxQueue.push(options); -}; -const createTransmuxer = options => { - const transmuxer = new TransmuxWorker(); - transmuxer.currentTransmux = null; - transmuxer.transmuxQueue = []; - const term = transmuxer.terminate; - transmuxer.terminate = () => { - transmuxer.currentTransmux = null; - transmuxer.transmuxQueue.length = 0; - return term.call(transmuxer); - }; - transmuxer.postMessage({ - action: 'init', - options - }); - return transmuxer; -}; -var segmentTransmuxer = { - reset, - endTimeline, - transmux, - createTransmuxer -}; -const workerCallback = function (options) { - const transmuxer = options.transmuxer; - const endAction = options.endAction || options.action; - const callback = options.callback; - const message = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7__["default"])({}, options, { - endAction: null, - transmuxer: null, - callback: null - }); - const listenForEndEvent = event => { - if (event.data.action !== endAction) { - return; - } - transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us. - - if (event.data.data) { - event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength); - if (options.data) { - options.data = event.data.data; - } - } - callback(event.data); - }; - transmuxer.addEventListener('message', listenForEndEvent); - if (options.data) { - const isArrayBuffer = options.data instanceof ArrayBuffer; - message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset; - message.byteLength = options.data.byteLength; - const transfers = [isArrayBuffer ? options.data : options.data.buffer]; - transmuxer.postMessage(message, transfers); - } else { - transmuxer.postMessage(message); - } -}; -const REQUEST_ERRORS = { - FAILURE: 2, - TIMEOUT: -101, - ABORTED: -102 -}; -/** - * Abort all requests - * - * @param {Object} activeXhrs - an object that tracks all XHR requests - */ - -const abortAll = activeXhrs => { - activeXhrs.forEach(xhr => { - xhr.abort(); - }); -}; -/** - * Gather important bandwidth stats once a request has completed - * - * @param {Object} request - the XHR request from which to gather stats - */ - -const getRequestStats = request => { - return { - bandwidth: request.bandwidth, - bytesReceived: request.bytesReceived || 0, - roundTripTime: request.roundTripTime || 0 - }; -}; -/** - * If possible gather bandwidth stats as a request is in - * progress - * - * @param {Event} progressEvent - an event object from an XHR's progress event - */ - -const getProgressStats = progressEvent => { - const request = progressEvent.target; - const roundTripTime = Date.now() - request.requestTime; - const stats = { - bandwidth: Infinity, - bytesReceived: 0, - roundTripTime: roundTripTime || 0 - }; - stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok - // because we should only use bandwidth stats on progress to determine when - // abort a request early due to insufficient bandwidth - - stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000); - return stats; -}; -/** - * Handle all error conditions in one place and return an object - * with all the information - * - * @param {Error|null} error - if non-null signals an error occured with the XHR - * @param {Object} request - the XHR request that possibly generated the error - */ - -const handleErrors = (error, request) => { - if (request.timedout) { - return { - status: request.status, - message: 'HLS request timed-out at URL: ' + request.uri, - code: REQUEST_ERRORS.TIMEOUT, - xhr: request - }; - } - if (request.aborted) { - return { - status: request.status, - message: 'HLS request aborted at URL: ' + request.uri, - code: REQUEST_ERRORS.ABORTED, - xhr: request - }; - } - if (error) { - return { - status: request.status, - message: 'HLS request errored at URL: ' + request.uri, - code: REQUEST_ERRORS.FAILURE, - xhr: request - }; - } - if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) { - return { - status: request.status, - message: 'Empty HLS response at URL: ' + request.uri, - code: REQUEST_ERRORS.FAILURE, - xhr: request - }; - } - return null; -}; -/** - * Handle responses for key data and convert the key data to the correct format - * for the decryption step later - * - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Array} objects - objects to add the key bytes to. - * @param {Function} finishProcessingFn - a callback to execute to continue processing - * this request - */ - -const handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => { - const response = request.response; - const errorObj = handleErrors(error, request); - if (errorObj) { - return finishProcessingFn(errorObj, segment); - } - if (response.byteLength !== 16) { - return finishProcessingFn({ - status: request.status, - message: 'Invalid HLS key at URL: ' + request.uri, - code: REQUEST_ERRORS.FAILURE, - xhr: request - }, segment); - } - const view = new DataView(response); - const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]); - for (let i = 0; i < objects.length; i++) { - objects[i].bytes = bytes; - } - return finishProcessingFn(null, segment); -}; -const parseInitSegment = (segment, callback) => { - const type = (0,_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_15__.detectContainerForBytes)(segment.map.bytes); // TODO: We should also handle ts init segments here, but we - // only know how to parse mp4 init segments at the moment - - if (type !== 'mp4') { - const uri = segment.map.resolvedUri || segment.map.uri; - return callback({ - internal: true, - message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`, - code: REQUEST_ERRORS.FAILURE - }); - } - workerCallback({ - action: 'probeMp4Tracks', - data: segment.map.bytes, - transmuxer: segment.transmuxer, - callback: ({ - tracks, - data - }) => { - // transfer bytes back to us - segment.map.bytes = data; - tracks.forEach(function (track) { - segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now - - if (segment.map.tracks[track.type]) { - return; - } - segment.map.tracks[track.type] = track; - if (typeof track.id === 'number' && track.timescale) { - segment.map.timescales = segment.map.timescales || {}; - segment.map.timescales[track.id] = track.timescale; - } - }); - return callback(null); - } - }); -}; -/** - * Handle init-segment responses - * - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Function} finishProcessingFn - a callback to execute to continue processing - * this request - */ - -const handleInitSegmentResponse = ({ - segment, - finishProcessingFn -}) => (error, request) => { - const errorObj = handleErrors(error, request); - if (errorObj) { - return finishProcessingFn(errorObj, segment); - } - const bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait - // until the key request is done to decrypt. - - if (segment.map.key) { - segment.map.encryptedBytes = bytes; - return finishProcessingFn(null, segment); - } - segment.map.bytes = bytes; - parseInitSegment(segment, function (parseError) { - if (parseError) { - parseError.xhr = request; - parseError.status = request.status; - return finishProcessingFn(parseError, segment); - } - finishProcessingFn(null, segment); - }); -}; -/** - * Response handler for segment-requests being sure to set the correct - * property depending on whether the segment is encryped or not - * Also records and keeps track of stats that are used for ABR purposes - * - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Function} finishProcessingFn - a callback to execute to continue processing - * this request - */ - -const handleSegmentResponse = ({ - segment, - finishProcessingFn, - responseType -}) => (error, request) => { - const errorObj = handleErrors(error, request); - if (errorObj) { - return finishProcessingFn(errorObj, segment); - } - const newBytes = - // although responseText "should" exist, this guard serves to prevent an error being - // thrown for two primary cases: - // 1. the mime type override stops working, or is not implemented for a specific - // browser - // 2. when using mock XHR libraries like sinon that do not allow the override behavior - responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0)); - segment.stats = getRequestStats(request); - if (segment.key) { - segment.encryptedBytes = new Uint8Array(newBytes); - } else { - segment.bytes = new Uint8Array(newBytes); - } - return finishProcessingFn(null, segment); -}; -const transmuxAndNotify = ({ - segment, - bytes, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog -}) => { - const fmp4Tracks = segment.map && segment.map.tracks || {}; - const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them. - // One reason for this is that in the case of full segments, we want to trust start - // times from the probe, rather than the transmuxer. - - let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start'); - const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end'); - let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start'); - const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end'); - const finish = () => transmux({ - bytes, - transmuxer: segment.transmuxer, - audioAppendStart: segment.audioAppendStart, - gopsToAlignWith: segment.gopsToAlignWith, - remux: isMuxed, - onData: result => { - result.type = result.type === 'combined' ? 'video' : result.type; - dataFn(segment, result); - }, - onTrackInfo: trackInfo => { - if (trackInfoFn) { - if (isMuxed) { - trackInfo.isMuxed = true; - } - trackInfoFn(segment, trackInfo); - } - }, - onAudioTimingInfo: audioTimingInfo => { - // we only want the first start value we encounter - if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') { - audioStartFn(audioTimingInfo.start); - audioStartFn = null; - } // we want to continually update the end time - - if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') { - audioEndFn(audioTimingInfo.end); - } - }, - onVideoTimingInfo: videoTimingInfo => { - // we only want the first start value we encounter - if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') { - videoStartFn(videoTimingInfo.start); - videoStartFn = null; - } // we want to continually update the end time - - if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') { - videoEndFn(videoTimingInfo.end); - } - }, - onVideoSegmentTimingInfo: videoSegmentTimingInfo => { - videoSegmentTimingInfoFn(videoSegmentTimingInfo); - }, - onAudioSegmentTimingInfo: audioSegmentTimingInfo => { - audioSegmentTimingInfoFn(audioSegmentTimingInfo); - }, - onId3: (id3Frames, dispatchType) => { - id3Fn(segment, id3Frames, dispatchType); - }, - onCaptions: captions => { - captionsFn(segment, [captions]); - }, - isEndOfTimeline, - onEndedTimeline: () => { - endedTimelineFn(); - }, - onTransmuxerLog, - onDone: result => { - if (!doneFn) { - return; - } - result.type = result.type === 'combined' ? 'video' : result.type; - doneFn(null, segment, result); - } - }); // In the transmuxer, we don't yet have the ability to extract a "proper" start time. - // Meaning cached frame data may corrupt our notion of where this segment - // really starts. To get around this, probe for the info needed. - - workerCallback({ - action: 'probeTs', - transmuxer: segment.transmuxer, - data: bytes, - baseStartTime: segment.baseStartTime, - callback: data => { - segment.bytes = bytes = data.data; - const probeResult = data.result; - if (probeResult) { - trackInfoFn(segment, { - hasAudio: probeResult.hasAudio, - hasVideo: probeResult.hasVideo, - isMuxed - }); - trackInfoFn = null; - } - finish(); - } - }); -}; -const handleSegmentBytes = ({ - segment, - bytes, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog -}) => { - let bytesAsUint8Array = new Uint8Array(bytes); // TODO: - // We should have a handler that fetches the number of bytes required - // to check if something is fmp4. This will allow us to save bandwidth - // because we can only exclude a playlist and abort requests - // by codec after trackinfo triggers. - - if ((0,_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_15__.isLikelyFmp4MediaSegment)(bytesAsUint8Array)) { - segment.isFmp4 = true; - const { - tracks - } = segment.map; - const trackInfo = { - isFmp4: true, - hasVideo: !!tracks.video, - hasAudio: !!tracks.audio - }; // if we have a audio track, with a codec that is not set to - // encrypted audio - - if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') { - trackInfo.audioCodec = tracks.audio.codec; - } // if we have a video track, with a codec that is not set to - // encrypted video - - if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') { - trackInfo.videoCodec = tracks.video.codec; - } - if (tracks.video && tracks.audio) { - trackInfo.isMuxed = true; - } // since we don't support appending fmp4 data on progress, we know we have the full - // segment here - - trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start - // time. The end time can be roughly calculated by the receiver using the duration. - // - // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as - // that is the true start of the segment (where the playback engine should begin - // decoding). - - const finishLoading = (captions, id3Frames) => { - // if the track still has audio at this point it is only possible - // for it to be audio only. See `tracks.video && tracks.audio` if statement - // above. - // we make sure to use segment.bytes here as that - dataFn(segment, { - data: bytesAsUint8Array, - type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video' - }); - if (id3Frames && id3Frames.length) { - id3Fn(segment, id3Frames); - } - if (captions && captions.length) { - captionsFn(segment, captions); - } - doneFn(null, segment, {}); - }; - workerCallback({ - action: 'probeMp4StartTime', - timescales: segment.map.timescales, - data: bytesAsUint8Array, - transmuxer: segment.transmuxer, - callback: ({ - data, - startTime - }) => { - // transfer bytes back to us - bytes = data.buffer; - segment.bytes = bytesAsUint8Array = data; - if (trackInfo.hasAudio && !trackInfo.isMuxed) { - timingInfoFn(segment, 'audio', 'start', startTime); - } - if (trackInfo.hasVideo) { - timingInfoFn(segment, 'video', 'start', startTime); - } - workerCallback({ - action: 'probeEmsgID3', - data: bytesAsUint8Array, - transmuxer: segment.transmuxer, - offset: startTime, - callback: ({ - emsgData, - id3Frames - }) => { - // transfer bytes back to us - bytes = emsgData.buffer; - segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions. - // Initialize CaptionParser if it hasn't been yet - - if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) { - finishLoading(undefined, id3Frames); - return; - } - workerCallback({ - action: 'pushMp4Captions', - endAction: 'mp4Captions', - transmuxer: segment.transmuxer, - data: bytesAsUint8Array, - timescales: segment.map.timescales, - trackIds: [tracks.video.id], - callback: message => { - // transfer bytes back to us - bytes = message.data.buffer; - segment.bytes = bytesAsUint8Array = message.data; - message.logs.forEach(function (log) { - onTransmuxerLog(merge(log, { - stream: 'mp4CaptionParser' - })); - }); - finishLoading(message.captions, id3Frames); - } - }); - } - }); - } - }); - return; - } // VTT or other segments that don't need processing - - if (!segment.transmuxer) { - doneFn(null, segment, {}); - return; - } - if (typeof segment.container === 'undefined') { - segment.container = (0,_videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_15__.detectContainerForBytes)(bytesAsUint8Array); - } - if (segment.container !== 'ts' && segment.container !== 'aac') { - trackInfoFn(segment, { - hasAudio: false, - hasVideo: false - }); - doneFn(null, segment, {}); - return; - } // ts or aac - - transmuxAndNotify({ - segment, - bytes, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog - }); -}; -const decrypt = function ({ - id, - key, - encryptedBytes, - decryptionWorker -}, callback) { - const decryptionHandler = event => { - if (event.data.source === id) { - decryptionWorker.removeEventListener('message', decryptionHandler); - const decrypted = event.data.decrypted; - callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength)); - } - }; - decryptionWorker.addEventListener('message', decryptionHandler); - let keyBytes; - if (key.bytes.slice) { - keyBytes = key.bytes.slice(); - } else { - keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes)); - } // incrementally decrypt the bytes - - decryptionWorker.postMessage(createTransferableMessage({ - source: id, - encrypted: encryptedBytes, - key: keyBytes, - iv: key.iv - }), [encryptedBytes.buffer, keyBytes.buffer]); -}; -/** - * Decrypt the segment via the decryption web worker - * - * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption - * routines - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Function} trackInfoFn - a callback that receives track info - * @param {Function} timingInfoFn - a callback that receives timing info - * @param {Function} videoSegmentTimingInfoFn - * a callback that receives video timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} audioSegmentTimingInfoFn - * a callback that receives audio timing info based on media times and - * any adjustments made by the transmuxer - * @param {boolean} isEndOfTimeline - * true if this segment represents the last segment in a timeline - * @param {Function} endedTimelineFn - * a callback made when a timeline is ended, will only be called if - * isEndOfTimeline is true - * @param {Function} dataFn - a callback that is executed when segment bytes are available - * and ready to use - * @param {Function} doneFn - a callback that is executed after decryption has completed - */ - -const decryptSegment = ({ - decryptionWorker, - segment, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog -}) => { - decrypt({ - id: segment.requestId, - key: segment.key, - encryptedBytes: segment.encryptedBytes, - decryptionWorker - }, decryptedBytes => { - segment.bytes = decryptedBytes; - handleSegmentBytes({ - segment, - bytes: segment.bytes, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog - }); - }); -}; -/** - * This function waits for all XHRs to finish (with either success or failure) - * before continueing processing via it's callback. The function gathers errors - * from each request into a single errors array so that the error status for - * each request can be examined later. - * - * @param {Object} activeXhrs - an object that tracks all XHR requests - * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption - * routines - * @param {Function} trackInfoFn - a callback that receives track info - * @param {Function} timingInfoFn - a callback that receives timing info - * @param {Function} videoSegmentTimingInfoFn - * a callback that receives video timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} audioSegmentTimingInfoFn - * a callback that receives audio timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} id3Fn - a callback that receives ID3 metadata - * @param {Function} captionsFn - a callback that receives captions - * @param {boolean} isEndOfTimeline - * true if this segment represents the last segment in a timeline - * @param {Function} endedTimelineFn - * a callback made when a timeline is ended, will only be called if - * isEndOfTimeline is true - * @param {Function} dataFn - a callback that is executed when segment bytes are available - * and ready to use - * @param {Function} doneFn - a callback that is executed after all resources have been - * downloaded and any decryption completed - */ - -const waitForCompletion = ({ - activeXhrs, - decryptionWorker, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog -}) => { - let count = 0; - let didError = false; - return (error, segment) => { - if (didError) { - return; - } - if (error) { - didError = true; // If there are errors, we have to abort any outstanding requests - - abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we - // handle the aborted events from those requests, there are some cases where we may - // never get an aborted event. For instance, if the network connection is lost and - // there were two requests, the first may have triggered an error immediately, while - // the second request remains unsent. In that case, the aborted algorithm will not - // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method - // - // We also can't rely on the ready state of the XHR, since the request that - // triggered the connection error may also show as a ready state of 0 (unsent). - // Therefore, we have to finish this group of requests immediately after the first - // seen error. - - return doneFn(error, segment); - } - count += 1; - if (count === activeXhrs.length) { - const segmentFinish = function () { - if (segment.encryptedBytes) { - return decryptSegment({ - decryptionWorker, - segment, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog - }); - } // Otherwise, everything is ready just continue - - handleSegmentBytes({ - segment, - bytes: segment.bytes, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog - }); - }; // Keep track of when *all* of the requests have completed - - segment.endOfAllRequests = Date.now(); - if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) { - return decrypt({ - decryptionWorker, - // add -init to the "id" to differentiate between segment - // and init segment decryption, just in case they happen - // at the same time at some point in the future. - id: segment.requestId + '-init', - encryptedBytes: segment.map.encryptedBytes, - key: segment.map.key - }, decryptedBytes => { - segment.map.bytes = decryptedBytes; - parseInitSegment(segment, parseError => { - if (parseError) { - abortAll(activeXhrs); - return doneFn(parseError, segment); - } - segmentFinish(); - }); - }); - } - segmentFinish(); - } - }; -}; -/** - * Calls the abort callback if any request within the batch was aborted. Will only call - * the callback once per batch of requests, even if multiple were aborted. - * - * @param {Object} loadendState - state to check to see if the abort function was called - * @param {Function} abortFn - callback to call for abort - */ - -const handleLoadEnd = ({ - loadendState, - abortFn -}) => event => { - const request = event.target; - if (request.aborted && abortFn && !loadendState.calledAbortFn) { - abortFn(); - loadendState.calledAbortFn = true; - } -}; -/** - * Simple progress event callback handler that gathers some stats before - * executing a provided callback with the `segment` object - * - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Function} progressFn - a callback that is executed each time a progress event - * is received - * @param {Function} trackInfoFn - a callback that receives track info - * @param {Function} timingInfoFn - a callback that receives timing info - * @param {Function} videoSegmentTimingInfoFn - * a callback that receives video timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} audioSegmentTimingInfoFn - * a callback that receives audio timing info based on media times and - * any adjustments made by the transmuxer - * @param {boolean} isEndOfTimeline - * true if this segment represents the last segment in a timeline - * @param {Function} endedTimelineFn - * a callback made when a timeline is ended, will only be called if - * isEndOfTimeline is true - * @param {Function} dataFn - a callback that is executed when segment bytes are available - * and ready to use - * @param {Event} event - the progress event object from XMLHttpRequest - */ - -const handleProgress = ({ - segment, - progressFn, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn -}) => event => { - const request = event.target; - if (request.aborted) { - return; - } - segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data - - if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) { - segment.stats.firstBytesReceivedAt = Date.now(); - } - return progressFn(event, segment); -}; -/** - * Load all resources and does any processing necessary for a media-segment - * - * Features: - * decrypts the media-segment if it has a key uri and an iv - * aborts *all* requests if *any* one request fails - * - * The segment object, at minimum, has the following format: - * { - * resolvedUri: String, - * [transmuxer]: Object, - * [byterange]: { - * offset: Number, - * length: Number - * }, - * [key]: { - * resolvedUri: String - * [byterange]: { - * offset: Number, - * length: Number - * }, - * iv: { - * bytes: Uint32Array - * } - * }, - * [map]: { - * resolvedUri: String, - * [byterange]: { - * offset: Number, - * length: Number - * }, - * [bytes]: Uint8Array - * } - * } - * ...where [name] denotes optional properties - * - * @param {Function} xhr - an instance of the xhr wrapper in xhr.js - * @param {Object} xhrOptions - the base options to provide to all xhr requests - * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 - * decryption routines - * @param {Object} segment - a simplified copy of the segmentInfo object - * from SegmentLoader - * @param {Function} abortFn - a callback called (only once) if any piece of a request was - * aborted - * @param {Function} progressFn - a callback that receives progress events from the main - * segment's xhr request - * @param {Function} trackInfoFn - a callback that receives track info - * @param {Function} timingInfoFn - a callback that receives timing info - * @param {Function} videoSegmentTimingInfoFn - * a callback that receives video timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} audioSegmentTimingInfoFn - * a callback that receives audio timing info based on media times and - * any adjustments made by the transmuxer - * @param {Function} id3Fn - a callback that receives ID3 metadata - * @param {Function} captionsFn - a callback that receives captions - * @param {boolean} isEndOfTimeline - * true if this segment represents the last segment in a timeline - * @param {Function} endedTimelineFn - * a callback made when a timeline is ended, will only be called if - * isEndOfTimeline is true - * @param {Function} dataFn - a callback that receives data from the main segment's xhr - * request, transmuxed if needed - * @param {Function} doneFn - a callback that is executed only once all requests have - * succeeded or failed - * @return {Function} a function that, when invoked, immediately aborts all - * outstanding requests - */ - -const mediaSegmentRequest = ({ - xhr, - xhrOptions, - decryptionWorker, - segment, - abortFn, - progressFn, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog -}) => { - const activeXhrs = []; - const finishProcessingFn = waitForCompletion({ - activeXhrs, - decryptionWorker, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn, - doneFn, - onTransmuxerLog - }); // optionally, request the decryption key - - if (segment.key && !segment.key.bytes) { - const objects = [segment.key]; - if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) { - objects.push(segment.map.key); - } - const keyRequestOptions = merge(xhrOptions, { - uri: segment.key.resolvedUri, - responseType: 'arraybuffer' - }); - const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn); - const keyXhr = xhr(keyRequestOptions, keyRequestCallback); - activeXhrs.push(keyXhr); - } // optionally, request the associated media init segment - - if (segment.map && !segment.map.bytes) { - const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri); - if (differentMapKey) { - const mapKeyRequestOptions = merge(xhrOptions, { - uri: segment.map.key.resolvedUri, - responseType: 'arraybuffer' - }); - const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn); - const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback); - activeXhrs.push(mapKeyXhr); - } - const initSegmentOptions = merge(xhrOptions, { - uri: segment.map.resolvedUri, - responseType: 'arraybuffer', - headers: segmentXhrHeaders(segment.map) - }); - const initSegmentRequestCallback = handleInitSegmentResponse({ - segment, - finishProcessingFn - }); - const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback); - activeXhrs.push(initSegmentXhr); - } - const segmentRequestOptions = merge(xhrOptions, { - uri: segment.part && segment.part.resolvedUri || segment.resolvedUri, - responseType: 'arraybuffer', - headers: segmentXhrHeaders(segment) - }); - const segmentRequestCallback = handleSegmentResponse({ - segment, - finishProcessingFn, - responseType: segmentRequestOptions.responseType - }); - const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback); - segmentXhr.addEventListener('progress', handleProgress({ - segment, - progressFn, - trackInfoFn, - timingInfoFn, - videoSegmentTimingInfoFn, - audioSegmentTimingInfoFn, - id3Fn, - captionsFn, - isEndOfTimeline, - endedTimelineFn, - dataFn - })); - activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks - // multiple times, provide a shared state object - - const loadendState = {}; - activeXhrs.forEach(activeXhr => { - activeXhr.addEventListener('loadend', handleLoadEnd({ - loadendState, - abortFn - })); - }); - return () => abortAll(activeXhrs); -}; - -/** - * @file - codecs.js - Handles tasks regarding codec strings such as translating them to - * codec strings, or translating codec strings into objects that can be examined. - */ -const logFn$1 = logger('CodecUtils'); -/** - * Returns a set of codec strings parsed from the playlist or the default - * codec strings if no codecs were specified in the playlist - * - * @param {Playlist} media the current media playlist - * @return {Object} an object with the video and audio codecs - */ - -const getCodecs = function (media) { - // if the codecs were explicitly specified, use them instead of the - // defaults - const mediaAttributes = media.attributes || {}; - if (mediaAttributes.CODECS) { - return (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(mediaAttributes.CODECS); - } -}; -const isMaat = (main, media) => { - const mediaAttributes = media.attributes || {}; - return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO]; -}; -const isMuxed = (main, media) => { - if (!isMaat(main, media)) { - return true; - } - const mediaAttributes = media.attributes || {}; - const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO]; - for (const groupId in audioGroup) { - // If an audio group has a URI (the case for HLS, as HLS will use external playlists), - // or there are listed playlists (the case for DASH, as the manifest will have already - // provided all of the details necessary to generate the audio playlist, as opposed to - // HLS' externally requested playlists), then the content is demuxed. - if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) { - return true; - } - } - return false; -}; -const unwrapCodecList = function (codecList) { - const codecs = {}; - codecList.forEach(({ - mediaType, - type, - details - }) => { - codecs[mediaType] = codecs[mediaType] || []; - codecs[mediaType].push((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.translateLegacyCodec)(`${type}${details}`)); - }); - Object.keys(codecs).forEach(function (mediaType) { - if (codecs[mediaType].length > 1) { - logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`); - codecs[mediaType] = null; - return; - } - codecs[mediaType] = codecs[mediaType][0]; - }); - return codecs; -}; -const codecCount = function (codecObj) { - let count = 0; - if (codecObj.audio) { - count++; - } - if (codecObj.video) { - count++; - } - return count; -}; -/** - * Calculates the codec strings for a working configuration of - * SourceBuffers to play variant streams in a main playlist. If - * there is no possible working configuration, an empty object will be - * returned. - * - * @param main {Object} the m3u8 object for the main playlist - * @param media {Object} the m3u8 object for the variant playlist - * @return {Object} the codec strings. - * - * @private - */ - -const codecsForPlaylist = function (main, media) { - const mediaAttributes = media.attributes || {}; - const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec. - // Put another way, there is no way to have a video-only multiple-audio HLS! - - if (isMaat(main, media) && !codecInfo.audio) { - if (!isMuxed(main, media)) { - // It is possible for codecs to be specified on the audio media group playlist but - // not on the rendition playlist. This is mostly the case for DASH, where audio and - // video are always separate (and separately specified). - const defaultCodecs = unwrapCodecList((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.codecsFromDefault)(main, mediaAttributes.AUDIO) || []); - if (defaultCodecs.audio) { - codecInfo.audio = defaultCodecs.audio; - } - } - } - return codecInfo; -}; -const logFn = logger('PlaylistSelector'); -const representationToString = function (representation) { - if (!representation || !representation.playlist) { - return; - } - const playlist = representation.playlist; - return JSON.stringify({ - id: playlist.id, - bandwidth: representation.bandwidth, - width: representation.width, - height: representation.height, - codecs: playlist.attributes && playlist.attributes.CODECS || '' - }); -}; // Utilities - -/** - * Returns the CSS value for the specified property on an element - * using `getComputedStyle`. Firefox has a long-standing issue where - * getComputedStyle() may return null when running in an iframe with - * `display: none`. - * - * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - * @param {HTMLElement} el the htmlelement to work on - * @param {string} the proprety to get the style for - */ - -const safeGetComputedStyle = function (el, property) { - if (!el) { - return ''; - } - const result = global_window__WEBPACK_IMPORTED_MODULE_0___default().getComputedStyle(el); - if (!result) { - return ''; - } - return result[property]; -}; -/** - * Resuable stable sort function - * - * @param {Playlists} array - * @param {Function} sortFn Different comparators - * @function stableSort - */ - -const stableSort = function (array, sortFn) { - const newArray = array.slice(); - array.sort(function (left, right) { - const cmp = sortFn(left, right); - if (cmp === 0) { - return newArray.indexOf(left) - newArray.indexOf(right); - } - return cmp; - }); -}; -/** - * A comparator function to sort two playlist object by bandwidth. - * - * @param {Object} left a media playlist object - * @param {Object} right a media playlist object - * @return {number} Greater than zero if the bandwidth attribute of - * left is greater than the corresponding attribute of right. Less - * than zero if the bandwidth of right is greater than left and - * exactly zero if the two are equal. - */ - -const comparePlaylistBandwidth = function (left, right) { - let leftBandwidth; - let rightBandwidth; - if (left.attributes.BANDWIDTH) { - leftBandwidth = left.attributes.BANDWIDTH; - } - leftBandwidth = leftBandwidth || (global_window__WEBPACK_IMPORTED_MODULE_0___default().Number).MAX_VALUE; - if (right.attributes.BANDWIDTH) { - rightBandwidth = right.attributes.BANDWIDTH; - } - rightBandwidth = rightBandwidth || (global_window__WEBPACK_IMPORTED_MODULE_0___default().Number).MAX_VALUE; - return leftBandwidth - rightBandwidth; -}; -/** - * A comparator function to sort two playlist object by resolution (width). - * - * @param {Object} left a media playlist object - * @param {Object} right a media playlist object - * @return {number} Greater than zero if the resolution.width attribute of - * left is greater than the corresponding attribute of right. Less - * than zero if the resolution.width of right is greater than left and - * exactly zero if the two are equal. - */ - -const comparePlaylistResolution = function (left, right) { - let leftWidth; - let rightWidth; - if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) { - leftWidth = left.attributes.RESOLUTION.width; - } - leftWidth = leftWidth || (global_window__WEBPACK_IMPORTED_MODULE_0___default().Number).MAX_VALUE; - if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) { - rightWidth = right.attributes.RESOLUTION.width; - } - rightWidth = rightWidth || (global_window__WEBPACK_IMPORTED_MODULE_0___default().Number).MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions - // have the same media dimensions/ resolution - - if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) { - return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH; - } - return leftWidth - rightWidth; -}; -/** - * Chooses the appropriate media playlist based on bandwidth and player size - * - * @param {Object} main - * Object representation of the main manifest - * @param {number} playerBandwidth - * Current calculated bandwidth of the player - * @param {number} playerWidth - * Current width of the player element (should account for the device pixel ratio) - * @param {number} playerHeight - * Current height of the player element (should account for the device pixel ratio) - * @param {boolean} limitRenditionByPlayerDimensions - * True if the player width and height should be used during the selection, false otherwise - * @param {Object} playlistController - * the current playlistController object - * @return {Playlist} the highest bitrate playlist less than the - * currently detected bandwidth, accounting for some amount of - * bandwidth variance - */ - -let simpleSelector = function (main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) { - // If we end up getting called before `main` is available, exit early - if (!main) { - return; - } - const options = { - bandwidth: playerBandwidth, - width: playerWidth, - height: playerHeight, - limitRenditionByPlayerDimensions - }; - let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists. - - if (Playlist.isAudioOnly(main)) { - playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true - // at the buttom of this function for debugging. - - options.audioOnly = true; - } // convert the playlists to an intermediary representation to make comparisons easier - - let sortedPlaylistReps = playlists.map(playlist => { - let bandwidth; - const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width; - const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height; - bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH; - bandwidth = bandwidth || (global_window__WEBPACK_IMPORTED_MODULE_0___default().Number).MAX_VALUE; - return { - bandwidth, - width, - height, - playlist - }; - }); - stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to - // incompatible configurations - - sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations - // api or excluded temporarily due to playback errors. - - let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist)); - if (!enabledPlaylistReps.length) { - // if there are no enabled playlists, then they have all been excluded or disabled - // by the user through the representations api. In this case, ignore exclusion and - // fallback to what the user wants by using playlists the user has not disabled. - enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist)); - } // filter out any variant that has greater effective bitrate - // than the current estimated bandwidth - - const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth); - let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth - // and then taking the very first element - - const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision. - - if (limitRenditionByPlayerDimensions === false) { - const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0]; - if (chosenRep && chosenRep.playlist) { - let type = 'sortedPlaylistReps'; - if (bandwidthBestRep) { - type = 'bandwidthBestRep'; - } - if (enabledPlaylistReps[0]) { - type = 'enabledPlaylistReps'; - } - logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options); - return chosenRep.playlist; - } - logFn('could not choose a playlist with options', options); - return null; - } // filter out playlists without resolution information - - const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution - - stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it - - const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight); - highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution - - const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; - let resolutionPlusOneList; - let resolutionPlusOneSmallest; - let resolutionPlusOneRep; // find the smallest variant that is larger than the player - // if there is no match of exact resolution - - if (!resolutionBestRep) { - resolutionPlusOneList = haveResolution.filter(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution - - resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that - // is just-larger-than the video player - - highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1]; - resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; - } - let leastPixelDiffRep; // If this selector proves to be better than others, - // resolutionPlusOneRep and resolutionBestRep and all - // the code involving them should be removed. - - if (playlistController.leastPixelDiffSelector) { - // find the variant that is closest to the player's pixel size - const leastPixelDiffList = haveResolution.map(rep => { - rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight); - return rep; - }); // get the highest bandwidth, closest resolution playlist - - stableSort(leastPixelDiffList, (left, right) => { - // sort by highest bandwidth if pixelDiff is the same - if (left.pixelDiff === right.pixelDiff) { - return right.bandwidth - left.bandwidth; - } - return left.pixelDiff - right.pixelDiff; - }); - leastPixelDiffRep = leastPixelDiffList[0]; - } // fallback chain of variants - - const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0]; - if (chosenRep && chosenRep.playlist) { - let type = 'sortedPlaylistReps'; - if (leastPixelDiffRep) { - type = 'leastPixelDiffRep'; - } else if (resolutionPlusOneRep) { - type = 'resolutionPlusOneRep'; - } else if (resolutionBestRep) { - type = 'resolutionBestRep'; - } else if (bandwidthBestRep) { - type = 'bandwidthBestRep'; - } else if (enabledPlaylistReps[0]) { - type = 'enabledPlaylistReps'; - } - logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options); - return chosenRep.playlist; - } - logFn('could not choose a playlist with options', options); - return null; -}; - -/** - * Chooses the appropriate media playlist based on the most recent - * bandwidth estimate and the player size. - * - * Expects to be called within the context of an instance of VhsHandler - * - * @return {Playlist} the highest bitrate playlist less than the - * currently detected bandwidth, accounting for some amount of - * bandwidth variance - */ - -const lastBandwidthSelector = function () { - const pixelRatio = this.useDevicePixelRatio ? (global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio) || 1 : 1; - return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_); -}; -/** - * Chooses the appropriate media playlist based on an - * exponential-weighted moving average of the bandwidth after - * filtering for player size. - * - * Expects to be called within the context of an instance of VhsHandler - * - * @param {number} decay - a number between 0 and 1. Higher values of - * this parameter will cause previous bandwidth estimates to lose - * significance more quickly. - * @return {Function} a function which can be invoked to create a new - * playlist selector function. - * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average - */ - -const movingAverageBandwidthSelector = function (decay) { - let average = -1; - let lastSystemBandwidth = -1; - if (decay < 0 || decay > 1) { - throw new Error('Moving average bandwidth decay must be between 0 and 1.'); - } - return function () { - const pixelRatio = this.useDevicePixelRatio ? (global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio) || 1 : 1; - if (average < 0) { - average = this.systemBandwidth; - lastSystemBandwidth = this.systemBandwidth; - } // stop the average value from decaying for every 250ms - // when the systemBandwidth is constant - // and - // stop average from setting to a very low value when the - // systemBandwidth becomes 0 in case of chunk cancellation - - if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) { - average = decay * this.systemBandwidth + (1 - decay) * average; - lastSystemBandwidth = this.systemBandwidth; - } - return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_); - }; -}; -/** - * Chooses the appropriate media playlist based on the potential to rebuffer - * - * @param {Object} settings - * Object of information required to use this selector - * @param {Object} settings.main - * Object representation of the main manifest - * @param {number} settings.currentTime - * The current time of the player - * @param {number} settings.bandwidth - * Current measured bandwidth - * @param {number} settings.duration - * Duration of the media - * @param {number} settings.segmentDuration - * Segment duration to be used in round trip time calculations - * @param {number} settings.timeUntilRebuffer - * Time left in seconds until the player has to rebuffer - * @param {number} settings.currentTimeline - * The current timeline segments are being loaded from - * @param {SyncController} settings.syncController - * SyncController for determining if we have a sync point for a given playlist - * @return {Object|null} - * {Object} return.playlist - * The highest bandwidth playlist with the least amount of rebuffering - * {Number} return.rebufferingImpact - * The amount of time in seconds switching to this playlist will rebuffer. A - * negative value means that switching will cause zero rebuffering. - */ - -const minRebufferMaxBandwidthSelector = function (settings) { - const { - main, - currentTime, - bandwidth, - duration, - segmentDuration, - timeUntilRebuffer, - currentTimeline, - syncController - } = settings; // filter out any playlists that have been excluded due to - // incompatible configurations - - const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations - // api or excluded temporarily due to playback errors. - - let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled); - if (!enabledPlaylists.length) { - // if there are no enabled playlists, then they have all been excluded or disabled - // by the user through the representations api. In this case, ignore exclusion and - // fallback to what the user wants by using playlists the user has not disabled. - enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist)); - } - const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH')); - const rebufferingEstimates = bandwidthPlaylists.map(playlist => { - const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a - // sync request first. This will double the request time - - const numRequests = syncPoint ? 1 : 2; - const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist); - const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer; - return { - playlist, - rebufferingImpact - }; - }); - const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC - - stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist)); - if (noRebufferingPlaylists.length) { - return noRebufferingPlaylists[0]; - } - stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact); - return rebufferingEstimates[0] || null; -}; -/** - * Chooses the appropriate media playlist, which in this case is the lowest bitrate - * one with video. If no renditions with video exist, return the lowest audio rendition. - * - * Expects to be called within the context of an instance of VhsHandler - * - * @return {Object|null} - * {Object} return.playlist - * The lowest bitrate playlist that contains a video codec. If no such rendition - * exists pick the lowest audio rendition. - */ - -const lowestBitrateCompatibleVariantSelector = function () { - // filter out any playlists that have been excluded due to - // incompatible configurations or playback errors - const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate - - stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video - // (this is not necessarily true, although it is generally true). - // - // If an entire manifest has no valid videos everything will get filtered - // out. - - const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video); - return playlistsWithVideo[0] || null; -}; - -/** - * Combine all segments into a single Uint8Array - * - * @param {Object} segmentObj - * @return {Uint8Array} concatenated bytes - * @private - */ -const concatSegments = segmentObj => { - let offset = 0; - let tempBuffer; - if (segmentObj.bytes) { - tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array - - segmentObj.segments.forEach(segment => { - tempBuffer.set(segment, offset); - offset += segment.byteLength; - }); - } - return tempBuffer; -}; - -/** - * @file text-tracks.js - */ -/** - * Create captions text tracks on video.js if they do not exist - * - * @param {Object} inbandTextTracks a reference to current inbandTextTracks - * @param {Object} tech the video.js tech - * @param {Object} captionStream the caption stream to create - * @private - */ - -const createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) { - if (!inbandTextTracks[captionStream]) { - tech.trigger({ - type: 'usage', - name: 'vhs-608' - }); - let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them - - if (/^cc708_/.test(captionStream)) { - instreamId = 'SERVICE' + captionStream.split('_')[1]; - } - const track = tech.textTracks().getTrackById(instreamId); - if (track) { - // Resuse an existing track with a CC# id because this was - // very likely created by videojs-contrib-hls from information - // in the m3u8 for us to use - inbandTextTracks[captionStream] = track; - } else { - // This section gets called when we have caption services that aren't specified in the manifest. - // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS. - const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {}; - let label = captionStream; - let language = captionStream; - let def = false; - const captionService = captionServices[instreamId]; - if (captionService) { - label = captionService.label; - language = captionService.language; - def = captionService.default; - } // Otherwise, create a track with the default `CC#` label and - // without a language - - inbandTextTracks[captionStream] = tech.addRemoteTextTrack({ - kind: 'captions', - id: instreamId, - // TODO: investigate why this doesn't seem to turn the caption on by default - default: def, - label, - language - }, false).track; - } - } -}; -/** - * Add caption text track data to a source handler given an array of captions - * - * @param {Object} - * @param {Object} inbandTextTracks the inband text tracks - * @param {number} timestampOffset the timestamp offset of the source buffer - * @param {Array} captionArray an array of caption data - * @private - */ - -const addCaptionData = function ({ - inbandTextTracks, - captionArray, - timestampOffset -}) { - if (!captionArray) { - return; - } - const Cue = (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebKitDataCue) || (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue); - captionArray.forEach(caption => { - const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array - // with positioning data - - if (caption.content) { - caption.content.forEach(value => { - const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text); - cue.line = value.line; - cue.align = 'left'; - cue.position = value.position; - cue.positionAlign = 'line-left'; - inbandTextTracks[track].addCue(cue); - }); - } else { - // otherwise, a text value with combined captions is sent - inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text)); - } - }); -}; -/** - * Define properties on a cue for backwards compatability, - * but warn the user that the way that they are using it - * is depricated and will be removed at a later date. - * - * @param {Cue} cue the cue to add the properties on - * @private - */ - -const deprecateOldCue = function (cue) { - Object.defineProperties(cue.frame, { - id: { - get() { - videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.'); - return cue.value.key; - } - }, - value: { - get() { - videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.'); - return cue.value.data; - } - }, - privateData: { - get() { - videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.'); - return cue.value.data; - } - } - }); -}; -/** - * Add metadata text track data to a source handler given an array of metadata - * - * @param {Object} - * @param {Object} inbandTextTracks the inband text tracks - * @param {Array} metadataArray an array of meta data - * @param {number} timestampOffset the timestamp offset of the source buffer - * @param {number} videoDuration the duration of the video - * @private - */ - -const addMetadata = ({ - inbandTextTracks, - metadataArray, - timestampOffset, - videoDuration -}) => { - if (!metadataArray) { - return; - } - const Cue = (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebKitDataCue) || (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue); - const metadataTrack = inbandTextTracks.metadataTrack_; - if (!metadataTrack) { - return; - } - metadataArray.forEach(metadata => { - const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN, - // ignore this bit of metadata. - // This likely occurs when you have an non-timed ID3 tag like TIT2, - // which is the "Title/Songname/Content description" frame - - if (typeof time !== 'number' || global_window__WEBPACK_IMPORTED_MODULE_0___default().isNaN(time) || time < 0 || !(time < Infinity)) { - return; - } // If we have no frames, we can't create a cue. - - if (!metadata.frames || !metadata.frames.length) { - return; - } - metadata.frames.forEach(frame => { - const cue = new Cue(time, time, frame.value || frame.url || frame.data || ''); - cue.frame = frame; - cue.value = frame; - deprecateOldCue(cue); - metadataTrack.addCue(cue); - }); - }); - if (!metadataTrack.cues || !metadataTrack.cues.length) { - return; - } // Updating the metadeta cues so that - // the endTime of each cue is the startTime of the next cue - // the endTime of last cue is the duration of the video - - const cues = metadataTrack.cues; - const cuesArray = []; // Create a copy of the TextTrackCueList... - // ...disregarding cues with a falsey value - - for (let i = 0; i < cues.length; i++) { - if (cues[i]) { - cuesArray.push(cues[i]); - } - } // Group cues by their startTime value - - const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => { - const timeSlot = obj[cue.startTime] || []; - timeSlot.push(cue); - obj[cue.startTime] = timeSlot; - return obj; - }, {}); // Sort startTimes by ascending order - - const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime - - sortedStartTimes.forEach((startTime, idx) => { - const cueGroup = cuesGroupedByStartTime[startTime]; - const finiteDuration = isFinite(videoDuration) ? videoDuration : 0; - const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime - - cueGroup.forEach(cue => { - cue.endTime = nextTime; - }); - }); -}; // object for mapping daterange attributes - -const dateRangeAttr = { - id: 'ID', - class: 'CLASS', - startDate: 'START-DATE', - duration: 'DURATION', - endDate: 'END-DATE', - endOnNext: 'END-ON-NEXT', - plannedDuration: 'PLANNED-DURATION', - scte35Out: 'SCTE35-OUT', - scte35In: 'SCTE35-IN' -}; -const dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']); -/** - * Add DateRange metadata text track to a source handler given an array of metadata - * - * @param {Object} - * @param {Object} inbandTextTracks the inband text tracks - * @param {Array} dateRanges parsed media playlist - * @private - */ - -const addDateRangeMetadata = ({ - inbandTextTracks, - dateRanges -}) => { - const metadataTrack = inbandTextTracks.metadataTrack_; - if (!metadataTrack) { - return; - } - const Cue = (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebKitDataCue) || (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue); - dateRanges.forEach(dateRange => { - // we generate multiple cues for each date range with different attributes - for (const key of Object.keys(dateRange)) { - if (dateRangeKeysToOmit.has(key)) { - continue; - } - const cue = new Cue(dateRange.startTime, dateRange.endTime, ''); - cue.id = dateRange.id; - cue.type = 'com.apple.quicktime.HLS'; - cue.value = { - key: dateRangeAttr[key], - data: dateRange[key] - }; - if (key === 'scte35Out' || key === 'scte35In') { - cue.value.data = new Uint8Array(cue.value.data.match(/[\da-f]{2}/gi)).buffer; - } - metadataTrack.addCue(cue); - } - dateRange.processDateRange(); - }); -}; -/** - * Create metadata text track on video.js if it does not exist - * - * @param {Object} inbandTextTracks a reference to current inbandTextTracks - * @param {string} dispatchType the inband metadata track dispatch type - * @param {Object} tech the video.js tech - * @private - */ - -const createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => { - if (inbandTextTracks.metadataTrack_) { - return; - } - inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({ - kind: 'metadata', - label: 'Timed Metadata' - }, false).track; - if (!videojs.browser.IS_ANY_SAFARI) { - inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType; - } -}; -/** - * Remove cues from a track on video.js. - * - * @param {Double} start start of where we should remove the cue - * @param {Double} end end of where the we should remove the cue - * @param {Object} track the text track to remove the cues from - * @private - */ - -const removeCuesFromTrack = function (start, end, track) { - let i; - let cue; - if (!track) { - return; - } - if (!track.cues) { - return; - } - i = track.cues.length; - while (i--) { - cue = track.cues[i]; // Remove any cue within the provided start and end time - - if (cue.startTime >= start && cue.endTime <= end) { - track.removeCue(cue); - } - } -}; -/** - * Remove duplicate cues from a track on video.js (a cue is considered a - * duplicate if it has the same time interval and text as another) - * - * @param {Object} track the text track to remove the duplicate cues from - * @private - */ - -const removeDuplicateCuesFromTrack = function (track) { - const cues = track.cues; - if (!cues) { - return; - } - const uniqueCues = {}; - for (let i = cues.length - 1; i >= 0; i--) { - const cue = cues[i]; - const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`; - if (uniqueCues[cueKey]) { - track.removeCue(cue); - } else { - uniqueCues[cueKey] = cue; - } - } -}; - -/** - * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in - * front of current time. - * - * @param {Array} buffer - * The current buffer of gop information - * @param {number} currentTime - * The current time - * @param {Double} mapping - * Offset to map display time to stream presentation time - * @return {Array} - * List of gops considered safe to append over - */ - -const gopsSafeToAlignWith = (buffer, currentTime, mapping) => { - if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) { - return []; - } // pts value for current time + 3 seconds to give a bit more wiggle room - - const currentTimePts = Math.ceil((currentTime - mapping + 3) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__.ONE_SECOND_IN_TS); - let i; - for (i = 0; i < buffer.length; i++) { - if (buffer[i].pts > currentTimePts) { - break; - } - } - return buffer.slice(i); -}; -/** - * Appends gop information (timing and byteLength) received by the transmuxer for the - * gops appended in the last call to appendBuffer - * - * @param {Array} buffer - * The current buffer of gop information - * @param {Array} gops - * List of new gop information - * @param {boolean} replace - * If true, replace the buffer with the new gop information. If false, append the - * new gop information to the buffer in the right location of time. - * @return {Array} - * Updated list of gop information - */ - -const updateGopBuffer = (buffer, gops, replace) => { - if (!gops.length) { - return buffer; - } - if (replace) { - // If we are in safe append mode, then completely overwrite the gop buffer - // with the most recent appeneded data. This will make sure that when appending - // future segments, we only try to align with gops that are both ahead of current - // time and in the last segment appended. - return gops.slice(); - } - const start = gops[0].pts; - let i = 0; - for (i; i < buffer.length; i++) { - if (buffer[i].pts >= start) { - break; - } - } - return buffer.slice(0, i).concat(gops); -}; -/** - * Removes gop information in buffer that overlaps with provided start and end - * - * @param {Array} buffer - * The current buffer of gop information - * @param {Double} start - * position to start the remove at - * @param {Double} end - * position to end the remove at - * @param {Double} mapping - * Offset to map display time to stream presentation time - */ - -const removeGopBuffer = (buffer, start, end, mapping) => { - const startPts = Math.ceil((start - mapping) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__.ONE_SECOND_IN_TS); - const endPts = Math.ceil((end - mapping) * mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__.ONE_SECOND_IN_TS); - const updatedBuffer = buffer.slice(); - let i = buffer.length; - while (i--) { - if (buffer[i].pts <= endPts) { - break; - } - } - if (i === -1) { - // no removal because end of remove range is before start of buffer - return updatedBuffer; - } - let j = i + 1; - while (j--) { - if (buffer[j].pts <= startPts) { - break; - } - } // clamp remove range start to 0 index - - j = Math.max(j, 0); - updatedBuffer.splice(j, i - j + 1); - return updatedBuffer; -}; -const shallowEqual = function (a, b) { - // if both are undefined - // or one or the other is undefined - // they are not equal - if (!a && !b || !a && b || a && !b) { - return false; - } // they are the same object and thus, equal - - if (a === b) { - return true; - } // sort keys so we can make sure they have - // all the same keys later. - - const akeys = Object.keys(a).sort(); - const bkeys = Object.keys(b).sort(); // different number of keys, not equal - - if (akeys.length !== bkeys.length) { - return false; - } - for (let i = 0; i < akeys.length; i++) { - const key = akeys[i]; // different sorted keys, not equal - - if (key !== bkeys[i]) { - return false; - } // different values, not equal - - if (a[key] !== b[key]) { - return false; - } - } - return true; -}; - -// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror -const QUOTA_EXCEEDED_ERR = 22; - -/** - * The segment loader has no recourse except to fetch a segment in the - * current playlist and use the internal timestamps in that segment to - * generate a syncPoint. This function returns a good candidate index - * for that process. - * - * @param {Array} segments - the segments array from a playlist. - * @return {number} An index of a segment from the playlist to load - */ - -const getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) { - segments = segments || []; - const timelineSegments = []; - let time = 0; - for (let i = 0; i < segments.length; i++) { - const segment = segments[i]; - if (currentTimeline === segment.timeline) { - timelineSegments.push(i); - time += segment.duration; - if (time > targetTime) { - return i; - } - } - } - if (timelineSegments.length === 0) { - return 0; - } // default to the last timeline segment - - return timelineSegments[timelineSegments.length - 1]; -}; // In the event of a quota exceeded error, keep at least one second of back buffer. This -// number was arbitrarily chosen and may be updated in the future, but seemed reasonable -// as a start to prevent any potential issues with removing content too close to the -// playhead. - -const MIN_BACK_BUFFER = 1; // in ms - -const CHECK_BUFFER_DELAY = 500; -const finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half -// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will -// not accurately reflect the rest of the content. - -const MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60; -const illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => { - // Although these checks should most likely cover non 'main' types, for now it narrows - // the scope of our checks. - if (loaderType !== 'main' || !startingMedia || !trackInfo) { - return null; - } - if (!trackInfo.hasAudio && !trackInfo.hasVideo) { - return 'Neither audio nor video found in segment.'; - } - if (startingMedia.hasVideo && !trackInfo.hasVideo) { - return 'Only audio found in segment when we expected video.' + ' We can\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.'; - } - if (!startingMedia.hasVideo && trackInfo.hasVideo) { - return 'Video found in segment when we expected only audio.' + ' We can\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.'; - } - return null; -}; -/** - * Calculates a time value that is safe to remove from the back buffer without interrupting - * playback. - * - * @param {TimeRange} seekable - * The current seekable range - * @param {number} currentTime - * The current time of the player - * @param {number} targetDuration - * The target duration of the current playlist - * @return {number} - * Time that is safe to remove from the back buffer without interrupting playback - */ - -const safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => { - // 30 seconds before the playhead provides a safe default for trimming. - // - // Choosing a reasonable default is particularly important for high bitrate content and - // VOD videos/live streams with large windows, as the buffer may end up overfilled and - // throw an APPEND_BUFFER_ERR. - let trimTime = currentTime - Config.BACK_BUFFER_LENGTH; - if (seekable.length) { - // Some live playlists may have a shorter window of content than the full allowed back - // buffer. For these playlists, don't save content that's no longer within the window. - trimTime = Math.max(trimTime, seekable.start(0)); - } // Don't remove within target duration of the current time to avoid the possibility of - // removing the GOP currently being played, as removing it can cause playback stalls. - - const maxTrimTime = currentTime - targetDuration; - return Math.min(maxTrimTime, trimTime); -}; -const segmentInfoString = segmentInfo => { - const { - startOfSegment, - duration, - segment, - part, - playlist: { - mediaSequence: seq, - id, - segments = [] - }, - mediaIndex: index, - partIndex, - timeline - } = segmentInfo; - const segmentLen = segments.length - 1; - let selection = 'mediaIndex/partIndex increment'; - if (segmentInfo.getMediaInfoForTime) { - selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`; - } else if (segmentInfo.isSyncRequest) { - selection = 'getSyncSegmentCandidate (isSyncRequest)'; - } - if (segmentInfo.independent) { - selection += ` with independent ${segmentInfo.independent}`; - } - const hasPartIndex = typeof partIndex === 'number'; - const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment'; - const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({ - preloadSegment: segment - }) - 1 : 0; - return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`; -}; -const timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`; -const getBufferedEndOrFallback = (buffered, fallback) => buffered.length ? buffered.end(buffered.length - 1) : fallback; -/** - * Returns the timestamp offset to use for the segment. - * - * @param {number} segmentTimeline - * The timeline of the segment - * @param {number} currentTimeline - * The timeline currently being followed by the loader - * @param {number} startOfSegment - * The estimated segment start - * @param {TimeRange[]} buffered - * The loader's buffer - * @param {boolean} calculateTimestampOffsetForEachSegment - * Feature flag to always calculate timestampOffset - * @param {boolean} overrideCheck - * If true, no checks are made to see if the timestamp offset value should be set, - * but sets it directly to a value. - * - * @return {number|null} - * Either a number representing a new timestamp offset, or null if the segment is - * part of the same timeline - */ - -const timestampOffsetForSegment = ({ - segmentTimeline, - currentTimeline, - startOfSegment, - buffered, - calculateTimestampOffsetForEachSegment, - overrideCheck -}) => { - if (calculateTimestampOffsetForEachSegment) { - return getBufferedEndOrFallback(buffered, startOfSegment); - } // Check to see if we are crossing a discontinuity to see if we need to set the - // timestamp offset on the transmuxer and source buffer. - // - // Previously, we changed the timestampOffset if the start of this segment was less than - // the currently set timestampOffset, but this isn't desirable as it can produce bad - // behavior, especially around long running live streams. - - if (!overrideCheck && segmentTimeline === currentTimeline) { - return null; - } // When changing renditions, it's possible to request a segment on an older timeline. For - // instance, given two renditions with the following: - // - // #EXTINF:10 - // segment1 - // #EXT-X-DISCONTINUITY - // #EXTINF:10 - // segment2 - // #EXTINF:10 - // segment3 - // - // And the current player state: - // - // current time: 8 - // buffer: 0 => 20 - // - // The next segment on the current rendition would be segment3, filling the buffer from - // 20s onwards. However, if a rendition switch happens after segment2 was requested, - // then the next segment to be requested will be segment1 from the new rendition in - // order to fill time 8 and onwards. Using the buffered end would result in repeated - // content (since it would position segment1 of the new rendition starting at 20s). This - // case can be identified when the new segment's timeline is a prior value. Instead of - // using the buffered end, the startOfSegment can be used, which, hopefully, will be - // more accurate to the actual start time of the segment. - - if (segmentTimeline < currentTimeline) { - return startOfSegment; - } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that - // value uses the end of the last segment if it is available. While this value - // should often be correct, it's better to rely on the buffered end, as the new - // content post discontinuity should line up with the buffered end as if it were - // time 0 for the new content. - - return getBufferedEndOrFallback(buffered, startOfSegment); -}; -/** - * Returns whether or not the loader should wait for a timeline change from the timeline - * change controller before processing the segment. - * - * Primary timing in VHS goes by video. This is different from most media players, as - * audio is more often used as the primary timing source. For the foreseeable future, VHS - * will continue to use video as the primary timing source, due to the current logic and - * expectations built around it. - - * Since the timing follows video, in order to maintain sync, the video loader is - * responsible for setting both audio and video source buffer timestamp offsets. - * - * Setting different values for audio and video source buffers could lead to - * desyncing. The following examples demonstrate some of the situations where this - * distinction is important. Note that all of these cases involve demuxed content. When - * content is muxed, the audio and video are packaged together, therefore syncing - * separate media playlists is not an issue. - * - * CASE 1: Audio prepares to load a new timeline before video: - * - * Timeline: 0 1 - * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Audio Loader: ^ - * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Video Loader ^ - * - * In the above example, the audio loader is preparing to load the 6th segment, the first - * after a discontinuity, while the video loader is still loading the 5th segment, before - * the discontinuity. - * - * If the audio loader goes ahead and loads and appends the 6th segment before the video - * loader crosses the discontinuity, then when appended, the 6th audio segment will use - * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition, - * the audio loader must provide the audioAppendStart value to trim the content in the - * transmuxer, and that value relies on the audio timestamp offset. Since the audio - * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the - * segment until that value is provided. - * - * CASE 2: Video prepares to load a new timeline before audio: - * - * Timeline: 0 1 - * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Audio Loader: ^ - * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Video Loader ^ - * - * In the above example, the video loader is preparing to load the 6th segment, the first - * after a discontinuity, while the audio loader is still loading the 5th segment, before - * the discontinuity. - * - * If the video loader goes ahead and loads and appends the 6th segment, then once the - * segment is loaded and processed, both the video and audio timestamp offsets will be - * set, since video is used as the primary timing source. This is to ensure content lines - * up appropriately, as any modifications to the video timing are reflected by audio when - * the video loader sets the audio and video timestamp offsets to the same value. However, - * setting the timestamp offset for audio before audio has had a chance to change - * timelines will likely lead to desyncing, as the audio loader will append segment 5 with - * a timestamp intended to apply to segments from timeline 1 rather than timeline 0. - * - * CASE 3: When seeking, audio prepares to load a new timeline before video - * - * Timeline: 0 1 - * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Audio Loader: ^ - * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9 - * Video Loader ^ - * - * In the above example, both audio and video loaders are loading segments from timeline - * 0, but imagine that the seek originated from timeline 1. - * - * When seeking to a new timeline, the timestamp offset will be set based on the expected - * segment start of the loaded video segment. In order to maintain sync, the audio loader - * must wait for the video loader to load its segment and update both the audio and video - * timestamp offsets before it may load and append its own segment. This is the case - * whether the seek results in a mismatched segment request (e.g., the audio loader - * chooses to load segment 3 and the video loader chooses to load segment 4) or the - * loaders choose to load the same segment index from each playlist, as the segments may - * not be aligned perfectly, even for matching segment indexes. - * - * @param {Object} timelinechangeController - * @param {number} currentTimeline - * The timeline currently being followed by the loader - * @param {number} segmentTimeline - * The timeline of the segment being loaded - * @param {('main'|'audio')} loaderType - * The loader type - * @param {boolean} audioDisabled - * Whether the audio is disabled for the loader. This should only be true when the - * loader may have muxed audio in its segment, but should not append it, e.g., for - * the main loader when an alternate audio playlist is active. - * - * @return {boolean} - * Whether the loader should wait for a timeline change from the timeline change - * controller before processing the segment - */ - -const shouldWaitForTimelineChange = ({ - timelineChangeController, - currentTimeline, - segmentTimeline, - loaderType, - audioDisabled -}) => { - if (currentTimeline === segmentTimeline) { - return false; - } - if (loaderType === 'audio') { - const lastMainTimelineChange = timelineChangeController.lastTimelineChange({ - type: 'main' - }); // Audio loader should wait if: - // - // * main hasn't had a timeline change yet (thus has not loaded its first segment) - // * main hasn't yet changed to the timeline audio is looking to load - - return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline; - } // The main loader only needs to wait for timeline changes if there's demuxed audio. - // Otherwise, there's nothing to wait for, since audio would be muxed into the main - // loader's segments (or the content is audio/video only and handled by the main - // loader). - - if (loaderType === 'main' && audioDisabled) { - const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({ - type: 'audio' - }); // Main loader should wait for the audio loader if audio is not pending a timeline - // change to the current timeline. - // - // Since the main loader is responsible for setting the timestamp offset for both - // audio and video, the main loader must wait for audio to be about to change to its - // timeline before setting the offset, otherwise, if audio is behind in loading, - // segments from the previous timeline would be adjusted by the new timestamp offset. - // - // This requirement means that video will not cross a timeline until the audio is - // about to cross to it, so that way audio and video will always cross the timeline - // together. - // - // In addition to normal timeline changes, these rules also apply to the start of a - // stream (going from a non-existent timeline, -1, to timeline 0). It's important - // that these rules apply to the first timeline change because if they did not, it's - // possible that the main loader will cross two timelines before the audio loader has - // crossed one. Logic may be implemented to handle the startup as a special case, but - // it's easier to simply treat all timeline changes the same. - - if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) { - return false; - } - return true; - } - return false; -}; -const mediaDuration = timingInfos => { - let maxDuration = 0; - ['video', 'audio'].forEach(function (type) { - const typeTimingInfo = timingInfos[`${type}TimingInfo`]; - if (!typeTimingInfo) { - return; - } - const { - start, - end - } = typeTimingInfo; - let duration; - if (typeof start === 'bigint' || typeof end === 'bigint') { - duration = global_window__WEBPACK_IMPORTED_MODULE_0___default().BigInt(end) - global_window__WEBPACK_IMPORTED_MODULE_0___default().BigInt(start); - } else if (typeof start === 'number' && typeof end === 'number') { - duration = end - start; - } - if (typeof duration !== 'undefined' && duration > maxDuration) { - maxDuration = duration; - } - }); // convert back to a number if it is lower than MAX_SAFE_INTEGER - // as we only need BigInt when we are above that. - - if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) { - maxDuration = Number(maxDuration); - } - return maxDuration; -}; -const segmentTooLong = ({ - segmentDuration, - maxDuration -}) => { - // 0 duration segments are most likely due to metadata only segments or a lack of - // information. - if (!segmentDuration) { - return false; - } // For HLS: - // - // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1 - // The EXTINF duration of each Media Segment in the Playlist - // file, when rounded to the nearest integer, MUST be less than or equal - // to the target duration; longer segments can trigger playback stalls - // or other errors. - // - // For DASH, the mpd-parser uses the largest reported segment duration as the target - // duration. Although that reported duration is occasionally approximate (i.e., not - // exact), a strict check may report that a segment is too long more often in DASH. - - return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR; -}; -const getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => { - // Right now we aren't following DASH's timing model exactly, so only perform - // this check for HLS content. - if (sourceType !== 'hls') { - return null; - } - const segmentDuration = mediaDuration({ - audioTimingInfo: segmentInfo.audioTimingInfo, - videoTimingInfo: segmentInfo.videoTimingInfo - }); // Don't report if we lack information. - // - // If the segment has a duration of 0 it is either a lack of information or a - // metadata only segment and shouldn't be reported here. - - if (!segmentDuration) { - return null; - } - const targetDuration = segmentInfo.playlist.targetDuration; - const isSegmentWayTooLong = segmentTooLong({ - segmentDuration, - maxDuration: targetDuration * 2 - }); - const isSegmentSlightlyTooLong = segmentTooLong({ - segmentDuration, - maxDuration: targetDuration - }); - const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1'; - if (isSegmentWayTooLong || isSegmentSlightlyTooLong) { - return { - severity: isSegmentWayTooLong ? 'warn' : 'info', - message: segmentTooLongMessage - }; - } - return null; -}; -/** - * An object that manages segment loading and appending. - * - * @class SegmentLoader - * @param {Object} options required and optional options - * @extends videojs.EventTarget - */ - -class SegmentLoader extends videojs.EventTarget { - constructor(settings, options = {}) { - super(); // check pre-conditions - - if (!settings) { - throw new TypeError('Initialization settings are required'); - } - if (typeof settings.currentTime !== 'function') { - throw new TypeError('No currentTime getter specified'); - } - if (!settings.mediaSource) { - throw new TypeError('No MediaSource specified'); - } // public properties - - this.bandwidth = settings.bandwidth; - this.throughput = { - rate: 0, - count: 0 - }; - this.roundTrip = NaN; - this.resetStats_(); - this.mediaIndex = null; - this.partIndex = null; // private settings - - this.hasPlayed_ = settings.hasPlayed; - this.currentTime_ = settings.currentTime; - this.seekable_ = settings.seekable; - this.seeking_ = settings.seeking; - this.duration_ = settings.duration; - this.mediaSource_ = settings.mediaSource; - this.vhs_ = settings.vhs; - this.loaderType_ = settings.loaderType; - this.currentMediaInfo_ = void 0; - this.startingMediaInfo_ = void 0; - this.segmentMetadataTrack_ = settings.segmentMetadataTrack; - this.goalBufferLength_ = settings.goalBufferLength; - this.sourceType_ = settings.sourceType; - this.sourceUpdater_ = settings.sourceUpdater; - this.inbandTextTracks_ = settings.inbandTextTracks; - this.state_ = 'INIT'; - this.timelineChangeController_ = settings.timelineChangeController; - this.shouldSaveSegmentTimingInfo_ = true; - this.parse708captions_ = settings.parse708captions; - this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset; - this.calculateTimestampOffsetForEachSegment_ = settings.calculateTimestampOffsetForEachSegment; - this.captionServices_ = settings.captionServices; - this.exactManifestTimings = settings.exactManifestTimings; - this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables - - this.checkBufferTimeout_ = null; - this.error_ = void 0; - this.currentTimeline_ = -1; - this.pendingSegment_ = null; - this.xhrOptions_ = null; - this.pendingSegments_ = []; - this.audioDisabled_ = false; - this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller - - this.gopBuffer_ = []; - this.timeMapping_ = 0; - this.safeAppend_ = false; - this.appendInitSegment_ = { - audio: true, - video: true - }; - this.playlistOfLastInitSegment_ = { - audio: null, - video: null - }; - this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough - // information yet to start the loading process (e.g., if the audio loader wants to - // load a segment from the next timeline but the main loader hasn't yet crossed that - // timeline), then the load call will be added to the queue until it is ready to be - // processed. - - this.loadQueue_ = []; - this.metadataQueue_ = { - id3: [], - caption: [] - }; - this.waitingOnRemove_ = false; - this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback - - this.activeInitSegmentId_ = null; - this.initSegments_ = {}; // HLSe playback - - this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys; - this.keyCache_ = {}; - this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings - // between a time in the display time and a segment index within - // a playlist - - this.syncController_ = settings.syncController; - this.syncPoint_ = { - segmentIndex: 0, - time: 0 - }; - this.transmuxer_ = this.createTransmuxer_(); - this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate'); - this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_); - this.mediaSource_.addEventListener('sourceopen', () => { - if (!this.isEndOfStream_()) { - this.ended_ = false; - } - }); // ...for determining the fetch location - - this.fetchAtBuffer_ = false; // For comparing with currentTime when overwriting segments on fastQualityChange_ changes. Use -1 as the inactive flag. - - this.replaceSegmentsUntil_ = -1; - this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`); - Object.defineProperty(this, 'state', { - get() { - return this.state_; - }, - set(newState) { - if (newState !== this.state_) { - this.logger_(`${this.state_} -> ${newState}`); - this.state_ = newState; - this.trigger('statechange'); - } - } - }); - this.sourceUpdater_.on('ready', () => { - if (this.hasEnoughInfoToAppend_()) { - this.processCallQueue_(); - } - }); // Only the main loader needs to listen for pending timeline changes, as the main - // loader should wait for audio to be ready to change its timeline so that both main - // and audio timelines change together. For more details, see the - // shouldWaitForTimelineChange function. - - if (this.loaderType_ === 'main') { - this.timelineChangeController_.on('pendingtimelinechange', () => { - if (this.hasEnoughInfoToAppend_()) { - this.processCallQueue_(); - } - }); - } // The main loader only listens on pending timeline changes, but the audio loader, - // since its loads follow main, needs to listen on timeline changes. For more details, - // see the shouldWaitForTimelineChange function. - - if (this.loaderType_ === 'audio') { - this.timelineChangeController_.on('timelinechange', () => { - if (this.hasEnoughInfoToLoad_()) { - this.processLoadQueue_(); - } - if (this.hasEnoughInfoToAppend_()) { - this.processCallQueue_(); - } - }); - } - } - createTransmuxer_() { - return segmentTransmuxer.createTransmuxer({ - remux: false, - alignGopsAtEnd: this.safeAppend_, - keepOriginalTimestamps: true, - parse708captions: this.parse708captions_, - captionServices: this.captionServices_ - }); - } - /** - * reset all of our media stats - * - * @private - */ - - resetStats_() { - this.mediaBytesTransferred = 0; - this.mediaRequests = 0; - this.mediaRequestsAborted = 0; - this.mediaRequestsTimedout = 0; - this.mediaRequestsErrored = 0; - this.mediaTransferDuration = 0; - this.mediaSecondsLoaded = 0; - this.mediaAppends = 0; - } - /** - * dispose of the SegmentLoader and reset to the default state - */ - - dispose() { - this.trigger('dispose'); - this.state = 'DISPOSED'; - this.pause(); - this.abort_(); - if (this.transmuxer_) { - this.transmuxer_.terminate(); - } - this.resetStats_(); - if (this.checkBufferTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_); - } - if (this.syncController_ && this.triggerSyncInfoUpdate_) { - this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_); - } - this.off(); - } - setAudio(enable) { - this.audioDisabled_ = !enable; - if (enable) { - this.appendInitSegment_.audio = true; - } else { - // remove current track audio if it gets disabled - this.sourceUpdater_.removeAudio(0, this.duration_()); - } - } - /** - * abort anything that is currently doing on with the SegmentLoader - * and reset to a default state - */ - - abort() { - if (this.state !== 'WAITING') { - if (this.pendingSegment_) { - this.pendingSegment_ = null; - } - return; - } - this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY - // since we are no longer "waiting" on any requests. XHR callback is not always run - // when the request is aborted. This will prevent the loader from being stuck in the - // WAITING state indefinitely. - - this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the - // next segment - - if (!this.paused()) { - this.monitorBuffer_(); - } - } - /** - * abort all pending xhr requests and null any pending segements - * - * @private - */ - - abort_() { - if (this.pendingSegment_ && this.pendingSegment_.abortRequests) { - this.pendingSegment_.abortRequests(); - } // clear out the segment being processed - - this.pendingSegment_ = null; - this.callQueue_ = []; - this.loadQueue_ = []; - this.metadataQueue_.id3 = []; - this.metadataQueue_.caption = []; - this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_); - this.waitingOnRemove_ = false; - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.quotaExceededErrorRetryTimeout_); - this.quotaExceededErrorRetryTimeout_ = null; - } - checkForAbort_(requestId) { - // If the state is APPENDING, then aborts will not modify the state, meaning the first - // callback that happens should reset the state to READY so that loading can continue. - if (this.state === 'APPENDING' && !this.pendingSegment_) { - this.state = 'READY'; - return true; - } - if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) { - return true; - } - return false; - } - /** - * set an error on the segment loader and null out any pending segements - * - * @param {Error} error the error to set on the SegmentLoader - * @return {Error} the error that was set or that is currently set - */ - - error(error) { - if (typeof error !== 'undefined') { - this.logger_('error occurred:', error); - this.error_ = error; - } - this.pendingSegment_ = null; - return this.error_; - } - endOfStream() { - this.ended_ = true; - if (this.transmuxer_) { - // need to clear out any cached data to prepare for the new segment - segmentTransmuxer.reset(this.transmuxer_); - } - this.gopBuffer_.length = 0; - this.pause(); - this.trigger('ended'); - } - /** - * Indicates which time ranges are buffered - * - * @return {TimeRange} - * TimeRange object representing the current buffered ranges - */ - - buffered_() { - const trackInfo = this.getMediaInfo_(); - if (!this.sourceUpdater_ || !trackInfo) { - return createTimeRanges(); - } - if (this.loaderType_ === 'main') { - const { - hasAudio, - hasVideo, - isMuxed - } = trackInfo; - if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) { - return this.sourceUpdater_.buffered(); - } - if (hasVideo) { - return this.sourceUpdater_.videoBuffered(); - } - } // One case that can be ignored for now is audio only with alt audio, - // as we don't yet have proper support for that. - - return this.sourceUpdater_.audioBuffered(); - } - /** - * Gets and sets init segment for the provided map - * - * @param {Object} map - * The map object representing the init segment to get or set - * @param {boolean=} set - * If true, the init segment for the provided map should be saved - * @return {Object} - * map object for desired init segment - */ - - initSegmentForMap(map, set = false) { - if (!map) { - return null; - } - const id = initSegmentId(map); - let storedMap = this.initSegments_[id]; - if (set && !storedMap && map.bytes) { - this.initSegments_[id] = storedMap = { - resolvedUri: map.resolvedUri, - byterange: map.byterange, - bytes: map.bytes, - tracks: map.tracks, - timescales: map.timescales - }; - } - return storedMap || map; - } - /** - * Gets and sets key for the provided key - * - * @param {Object} key - * The key object representing the key to get or set - * @param {boolean=} set - * If true, the key for the provided key should be saved - * @return {Object} - * Key object for desired key - */ - - segmentKey(key, set = false) { - if (!key) { - return null; - } - const id = segmentKeyId(key); - let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per - // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3 - - if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) { - this.keyCache_[id] = storedKey = { - resolvedUri: key.resolvedUri, - bytes: key.bytes - }; - } - const result = { - resolvedUri: (storedKey || key).resolvedUri - }; - if (storedKey) { - result.bytes = storedKey.bytes; - } - return result; - } - /** - * Returns true if all configuration required for loading is present, otherwise false. - * - * @return {boolean} True if the all configuration is ready for loading - * @private - */ - - couldBeginLoading_() { - return this.playlist_ && !this.paused(); - } - /** - * load a playlist and start to fill the buffer - */ - - load() { - // un-pause - this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be - // specified - - if (!this.playlist_) { - return; - } // if all the configuration is ready, initialize and begin loading - - if (this.state === 'INIT' && this.couldBeginLoading_()) { - return this.init_(); - } // if we're in the middle of processing a segment already, don't - // kick off an additional segment request - - if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') { - return; - } - this.state = 'READY'; - } - /** - * Once all the starting parameters have been specified, begin - * operation. This method should only be invoked from the INIT - * state. - * - * @private - */ - - init_() { - this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old - // audio data from the muxed content should be removed - - this.resetEverything(); - return this.monitorBuffer_(); - } - /** - * set a playlist on the segment loader - * - * @param {PlaylistLoader} media the playlist to set on the segment loader - */ - - playlist(newPlaylist, options = {}) { - if (!newPlaylist) { - return; - } - const oldPlaylist = this.playlist_; - const segmentInfo = this.pendingSegment_; - this.playlist_ = newPlaylist; - this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist - // is always our zero-time so force a sync update each time the playlist - // is refreshed from the server - // - // Use the INIT state to determine if playback has started, as the playlist sync info - // should be fixed once requests begin (as sync points are generated based on sync - // info), but not before then. - - if (this.state === 'INIT') { - newPlaylist.syncInfo = { - mediaSequence: newPlaylist.mediaSequence, - time: 0 - }; // Setting the date time mapping means mapping the program date time (if available) - // to time 0 on the player's timeline. The playlist's syncInfo serves a similar - // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can - // be updated as the playlist is refreshed before the loader starts loading, the - // program date time mapping needs to be updated as well. - // - // This mapping is only done for the main loader because a program date time should - // map equivalently between playlists. - - if (this.loaderType_ === 'main') { - this.syncController_.setDateTimeMappingForStart(newPlaylist); - } - } - let oldId = null; - if (oldPlaylist) { - if (oldPlaylist.id) { - oldId = oldPlaylist.id; - } else if (oldPlaylist.uri) { - oldId = oldPlaylist.uri; - } - } - this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`); // in VOD, this is always a rendition switch (or we updated our syncInfo above) - // in LIVE, we always want to update with new playlists (including refreshes) - - this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start - // buffering now - - if (this.state === 'INIT' && this.couldBeginLoading_()) { - return this.init_(); - } - if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) { - if (this.mediaIndex !== null) { - // we must reset/resync the segment loader when we switch renditions and - // the segment loader is already synced to the previous rendition - // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_ - // to false, resulting in fetching segments at currentTime and causing repeated - // same-segment requests on playlist change. This erroneously drives up the playback watcher - // stalled segment count, as re-requesting segments at the currentTime or browser cached segments - // will not change the buffer. - // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201 - const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number'; - if (isLLHLS) { - this.resetLoader(); - } else { - this.resyncLoader(); - } - } - this.currentMediaInfo_ = void 0; - this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined - - return; - } // we reloaded the same playlist so we are in a live scenario - // and we will likely need to adjust the mediaIndex - - const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; - this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader - // this is important because we can abort a request and this value must be - // equal to the last appended mediaIndex - - if (this.mediaIndex !== null) { - this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist - // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the - // new playlist was incremented by 1. - - if (this.mediaIndex < 0) { - this.mediaIndex = null; - this.partIndex = null; - } else { - const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment - // unless parts fell off of the playlist for this segment. - // In that case we need to reset partIndex and resync - - if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) { - const mediaIndex = this.mediaIndex; - this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`); - this.resetLoader(); // We want to throw away the partIndex and the data associated with it, - // as the part was dropped from our current playlists segment. - // The mediaIndex will still be valid so keep that around. - - this.mediaIndex = mediaIndex; - } - } - } // update the mediaIndex on the SegmentInfo object - // this is important because we will update this.mediaIndex with this value - // in `handleAppendsDone_` after the segment has been successfully appended - - if (segmentInfo) { - segmentInfo.mediaIndex -= mediaSequenceDiff; - if (segmentInfo.mediaIndex < 0) { - segmentInfo.mediaIndex = null; - segmentInfo.partIndex = null; - } else { - // we need to update the referenced segment so that timing information is - // saved for the new playlist's segment, however, if the segment fell off the - // playlist, we can leave the old reference and just lose the timing info - if (segmentInfo.mediaIndex >= 0) { - segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex]; - } - if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) { - segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex]; - } - } - } - this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist); - } - /** - * Prevent the loader from fetching additional segments. If there - * is a segment request outstanding, it will finish processing - * before the loader halts. A segment loader can be unpaused by - * calling load(). - */ - - pause() { - if (this.checkBufferTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_); - this.checkBufferTimeout_ = null; - } - } - /** - * Returns whether the segment loader is fetching additional - * segments when given the opportunity. This property can be - * modified through calls to pause() and load(). - */ - - paused() { - return this.checkBufferTimeout_ === null; - } - /** - * Resets the segment loader ended and init properties. - */ - - resetLoaderProperties() { - this.ended_ = false; - this.activeInitSegmentId_ = null; - this.appendInitSegment_ = { - audio: true, - video: true - }; - } - /** - * Delete all the buffered data and reset the SegmentLoader - * - * @param {Function} [done] an optional callback to be executed when the remove - * operation is complete - */ - - resetEverything(done) { - this.resetLoaderProperties(); - this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything. - // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader, - // we then clamp the value to duration if necessary. - - this.remove(0, Infinity, done); // clears fmp4 captions - - if (this.transmuxer_) { - this.transmuxer_.postMessage({ - action: 'clearAllMp4Captions' - }); // reset the cache in the transmuxer - - this.transmuxer_.postMessage({ - action: 'reset' - }); - } - } - /** - * Force the SegmentLoader to resync and start loading around the currentTime instead - * of starting at the end of the buffer - * - * Useful for fast quality changes - */ - - resetLoader() { - this.fetchAtBuffer_ = false; - this.resyncLoader(); - } - /** - * Force the SegmentLoader to restart synchronization and make a conservative guess - * before returning to the simple walk-forward method - */ - - resyncLoader() { - if (this.transmuxer_) { - // need to clear out any cached data to prepare for the new segment - segmentTransmuxer.reset(this.transmuxer_); - } - this.mediaIndex = null; - this.partIndex = null; - this.syncPoint_ = null; - this.isPendingTimestampOffset_ = false; - this.callQueue_ = []; - this.loadQueue_ = []; - this.metadataQueue_.id3 = []; - this.metadataQueue_.caption = []; - this.abort(); - if (this.transmuxer_) { - this.transmuxer_.postMessage({ - action: 'clearParsedMp4Captions' - }); - } - } - /** - * Remove any data in the source buffer between start and end times - * - * @param {number} start - the start time of the region to remove from the buffer - * @param {number} end - the end time of the region to remove from the buffer - * @param {Function} [done] - an optional callback to be executed when the remove - * @param {boolean} force - force all remove operations to happen - * operation is complete - */ - - remove(start, end, done = () => {}, force = false) { - // clamp end to duration if we need to remove everything. - // This is due to a browser bug that causes issues if we remove to Infinity. - // videojs/videojs-contrib-hls#1225 - if (end === Infinity) { - end = this.duration_(); - } // skip removes that would throw an error - // commonly happens during a rendition switch at the start of a video - // from start 0 to end 0 - - if (end <= start) { - this.logger_('skipping remove because end ${end} is <= start ${start}'); - return; - } - if (!this.sourceUpdater_ || !this.getMediaInfo_()) { - this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media - - return; - } // set it to one to complete this function's removes - - let removesRemaining = 1; - const removeFinished = () => { - removesRemaining--; - if (removesRemaining === 0) { - done(); - } - }; - if (force || !this.audioDisabled_) { - removesRemaining++; - this.sourceUpdater_.removeAudio(start, end, removeFinished); - } // While it would be better to only remove video if the main loader has video, this - // should be safe with audio only as removeVideo will call back even if there's no - // video buffer. - // - // In theory we can check to see if there's video before calling the remove, but in - // the event that we're switching between renditions and from video to audio only - // (when we add support for that), we may need to clear the video contents despite - // what the new media will contain. - - if (force || this.loaderType_ === 'main') { - this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_); - removesRemaining++; - this.sourceUpdater_.removeVideo(start, end, removeFinished); - } // remove any captions and ID3 tags - - for (const track in this.inbandTextTracks_) { - removeCuesFromTrack(start, end, this.inbandTextTracks_[track]); - } - removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes - - removeFinished(); - } - /** - * (re-)schedule monitorBufferTick_ to run as soon as possible - * - * @private - */ - - monitorBuffer_() { - if (this.checkBufferTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_); - } - this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorBufferTick_.bind(this), 1); - } - /** - * As long as the SegmentLoader is in the READY state, periodically - * invoke fillBuffer_(). - * - * @private - */ - - monitorBufferTick_() { - if (this.state === 'READY') { - this.fillBuffer_(); - } - if (this.checkBufferTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_); - } - this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY); - } - /** - * fill the buffer with segements unless the sourceBuffers are - * currently updating - * - * Note: this function should only ever be called by monitorBuffer_ - * and never directly - * - * @private - */ - - fillBuffer_() { - // TODO since the source buffer maintains a queue, and we shouldn't call this function - // except when we're ready for the next segment, this check can most likely be removed - if (this.sourceUpdater_.updating()) { - return; - } // see if we need to begin loading immediately - - const segmentInfo = this.chooseNextRequest_(); - if (!segmentInfo) { - return; - } - if (typeof segmentInfo.timestampOffset === 'number') { - this.isPendingTimestampOffset_ = false; - this.timelineChangeController_.pendingTimelineChange({ - type: this.loaderType_, - from: this.currentTimeline_, - to: segmentInfo.timeline - }); - } - this.loadSegment_(segmentInfo); - } - /** - * Determines if we should call endOfStream on the media source based - * on the state of the buffer or if appened segment was the final - * segment in the playlist. - * - * @param {number} [mediaIndex] the media index of segment we last appended - * @param {Object} [playlist] a media playlist object - * @return {boolean} do we need to call endOfStream on the MediaSource - */ - - isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) { - if (!playlist || !this.mediaSource_) { - return false; - } - const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based - - const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part. - - const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream - // so that MediaSources can trigger the `ended` event when it runs out of - // buffered data instead of waiting for me - - return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart; - } - /** - * Determines what request should be made given current segment loader state. - * - * @return {Object} a request object that describes the segment/part to load - */ - - chooseNextRequest_() { - const buffered = this.buffered_(); - const bufferedEnd = lastBufferedEnd(buffered) || 0; - const bufferedTime = timeAheadOf(buffered, this.currentTime_()); - const preloaded = !this.hasPlayed_() && bufferedTime >= 1; - const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_(); - const segments = this.playlist_.segments; // return no segment if: - // 1. we don't have segments - // 2. The video has not yet played and we already downloaded a segment - // 3. we already have enough buffered time - - if (!segments.length || preloaded || haveEnoughBuffer) { - return null; - } - this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_()); - const next = { - partIndex: null, - mediaIndex: null, - startOfSegment: null, - playlist: this.playlist_, - isSyncRequest: Boolean(!this.syncPoint_) - }; - if (next.isSyncRequest) { - next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd); - } else if (this.mediaIndex !== null) { - const segment = segments[this.mediaIndex]; - const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1; - next.startOfSegment = segment.end ? segment.end : bufferedEnd; - if (segment.parts && segment.parts[partIndex + 1]) { - next.mediaIndex = this.mediaIndex; - next.partIndex = partIndex + 1; - } else { - next.mediaIndex = this.mediaIndex + 1; - } - } else { - // Find the segment containing the end of the buffer or current time. - const { - segmentIndex, - startTime, - partIndex - } = Playlist.getMediaInfoForTime({ - exactManifestTimings: this.exactManifestTimings, - playlist: this.playlist_, - currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(), - startingPartIndex: this.syncPoint_.partIndex, - startingSegmentIndex: this.syncPoint_.segmentIndex, - startTime: this.syncPoint_.time - }); - next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`; - next.mediaIndex = segmentIndex; - next.startOfSegment = startTime; - next.partIndex = partIndex; - } - const nextSegment = segments[next.mediaIndex]; - let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or - // the next partIndex is invalid do not choose a next segment. - - if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) { - return null; - } // if the next segment has parts, and we don't have a partIndex. - // Set partIndex to 0 - - if (typeof next.partIndex !== 'number' && nextSegment.parts) { - next.partIndex = 0; - nextPart = nextSegment.parts[0]; - } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist, - // it applies to each segment in each media playlist. - // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1 - - const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure - // that the next part we append is "independent" if possible. - // So we check if the previous part is independent, and request - // it if it is. - - if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) { - if (next.partIndex === 0) { - const lastSegment = segments[next.mediaIndex - 1]; - const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1]; - if (lastSegmentLastPart && lastSegmentLastPart.independent) { - next.mediaIndex -= 1; - next.partIndex = lastSegment.parts.length - 1; - next.independent = 'previous segment'; - } - } else if (nextSegment.parts[next.partIndex - 1].independent) { - next.partIndex -= 1; - next.independent = 'previous part'; - } - } - const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following: - // 1. this is the last segment in the playlist - // 2. end of stream has been called on the media source already - // 3. the player is not seeking - - if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) { - return null; - } - return this.generateSegmentInfo_(next); - } - generateSegmentInfo_(options) { - const { - independent, - playlist, - mediaIndex, - startOfSegment, - isSyncRequest, - partIndex, - forceTimestampOffset, - getMediaInfoForTime - } = options; - const segment = playlist.segments[mediaIndex]; - const part = typeof partIndex === 'number' && segment.parts[partIndex]; - const segmentInfo = { - requestId: 'segment-loader-' + Math.random(), - // resolve the segment URL relative to the playlist - uri: part && part.resolvedUri || segment.resolvedUri, - // the segment's mediaIndex at the time it was requested - mediaIndex, - partIndex: part ? partIndex : null, - // whether or not to update the SegmentLoader's state with this - // segment's mediaIndex - isSyncRequest, - startOfSegment, - // the segment's playlist - playlist, - // unencrypted bytes of the segment - bytes: null, - // when a key is defined for this segment, the encrypted bytes - encryptedBytes: null, - // The target timestampOffset for this segment when we append it - // to the source buffer - timestampOffset: null, - // The timeline that the segment is in - timeline: segment.timeline, - // The expected duration of the segment in seconds - duration: part && part.duration || segment.duration, - // retain the segment in case the playlist updates while doing an async process - segment, - part, - byteLength: 0, - transmuxer: this.transmuxer_, - // type of getMediaInfoForTime that was used to get this segment - getMediaInfoForTime, - independent - }; - const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_; - segmentInfo.timestampOffset = this.timestampOffsetForSegment_({ - segmentTimeline: segment.timeline, - currentTimeline: this.currentTimeline_, - startOfSegment, - buffered: this.buffered_(), - calculateTimestampOffsetForEachSegment: this.calculateTimestampOffsetForEachSegment_, - overrideCheck - }); - const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered()); - if (typeof audioBufferedEnd === 'number') { - // since the transmuxer is using the actual timing values, but the buffer is - // adjusted by the timestamp offset, we must adjust the value here - segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset(); - } - if (this.sourceUpdater_.videoBuffered().length) { - segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_, - // since the transmuxer is using the actual timing values, but the time is - // adjusted by the timestmap offset, we must adjust the value here - this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_); - } - return segmentInfo; - } // get the timestampoffset for a segment, - // added so that vtt segment loader can override and prevent - // adding timestamp offsets. - - timestampOffsetForSegment_(options) { - return timestampOffsetForSegment(options); - } - /** - * Determines if the network has enough bandwidth to complete the current segment - * request in a timely manner. If not, the request will be aborted early and bandwidth - * updated to trigger a playlist switch. - * - * @param {Object} stats - * Object containing stats about the request timing and size - * @private - */ - - earlyAbortWhenNeeded_(stats) { - if (this.vhs_.tech_.paused() || - // Don't abort if the current playlist is on the lowestEnabledRendition - // TODO: Replace using timeout with a boolean indicating whether this playlist is - // the lowestEnabledRendition. - !this.xhrOptions_.timeout || - // Don't abort if we have no bandwidth information to estimate segment sizes - !this.playlist_.attributes.BANDWIDTH) { - return; - } // Wait at least 1 second since the first byte of data has been received before - // using the calculated bandwidth from the progress event to allow the bitrate - // to stabilize - - if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) { - return; - } - const currentTime = this.currentTime_(); - const measuredBandwidth = stats.bandwidth; - const segmentDuration = this.pendingSegment_.duration; - const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort - // if we are only left with less than 1 second when the request completes. - // A negative timeUntilRebuffering indicates we are already rebuffering - - const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download - // is larger than the estimated time until the player runs out of forward buffer - - if (requestTimeRemaining <= timeUntilRebuffer$1) { - return; - } - const switchCandidate = minRebufferMaxBandwidthSelector({ - main: this.vhs_.playlists.main, - currentTime, - bandwidth: measuredBandwidth, - duration: this.duration_(), - segmentDuration, - timeUntilRebuffer: timeUntilRebuffer$1, - currentTimeline: this.currentTimeline_, - syncController: this.syncController_ - }); - if (!switchCandidate) { - return; - } - const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1; - const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact; - let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the - // potential round trip time of the new request so that we are not too aggressive - // with switching to a playlist that might save us a fraction of a second. - - if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) { - minimumTimeSaving = 1; - } - if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) { - return; - } // set the bandwidth to that of the desired playlist being sure to scale by - // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it - // don't trigger a bandwidthupdate as the bandwidth is artifial - - this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1; - this.trigger('earlyabort'); - } - handleAbort_(segmentInfo) { - this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`); - this.mediaRequestsAborted += 1; - } - /** - * XHR `progress` event handler - * - * @param {Event} - * The XHR `progress` event - * @param {Object} simpleSegment - * A simplified segment object copy - * @private - */ - - handleProgress_(event, simpleSegment) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } - this.trigger('progress'); - } - handleTrackInfo_(simpleSegment, trackInfo) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } - if (this.checkForIllegalMediaSwitch(trackInfo)) { - return; - } - trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with. - // Guard against cases where we're not getting track info at all until we are - // certain that all streams will provide it. - - if (!shallowEqual(this.currentMediaInfo_, trackInfo)) { - this.appendInitSegment_ = { - audio: true, - video: true - }; - this.startingMediaInfo_ = trackInfo; - this.currentMediaInfo_ = trackInfo; - this.logger_('trackinfo update', trackInfo); - this.trigger('trackinfo'); - } // trackinfo may cause an abort if the trackinfo - // causes a codec change to an unsupported codec. - - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } // set trackinfo on the pending segment so that - // it can append. - - this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info - - if (this.hasEnoughInfoToAppend_()) { - this.processCallQueue_(); - } - } - handleTimingInfo_(simpleSegment, mediaType, timeType, time) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } - const segmentInfo = this.pendingSegment_; - const timingInfoProperty = timingInfoPropertyForMedia(mediaType); - segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {}; - segmentInfo[timingInfoProperty][timeType] = time; - this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info - - if (this.hasEnoughInfoToAppend_()) { - this.processCallQueue_(); - } - } - handleCaptions_(simpleSegment, captionData) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } // This could only happen with fmp4 segments, but - // should still not happen in general - - if (captionData.length === 0) { - this.logger_('SegmentLoader received no captions from a caption event'); - return; - } - const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing - // can be adjusted by the timestamp offset - - if (!segmentInfo.hasAppendedData_) { - this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData)); - return; - } - const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset(); - const captionTracks = {}; // get total start/end and captions for each track/stream - - captionData.forEach(caption => { - // caption.stream is actually a track name... - // set to the existing values in tracks or default values - captionTracks[caption.stream] = captionTracks[caption.stream] || { - // Infinity, as any other value will be less than this - startTime: Infinity, - captions: [], - // 0 as an other value will be more than this - endTime: 0 - }; - const captionTrack = captionTracks[caption.stream]; - captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset); - captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset); - captionTrack.captions.push(caption); - }); - Object.keys(captionTracks).forEach(trackName => { - const { - startTime, - endTime, - captions - } = captionTracks[trackName]; - const inbandTextTracks = this.inbandTextTracks_; - this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`); - createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track. - // We do this because a rendition change that also changes the timescale for captions - // will result in captions being re-parsed for certain segments. If we add them again - // without clearing we will have two of the same captions visible. - - removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]); - addCaptionData({ - captionArray: captions, - inbandTextTracks, - timestampOffset - }); - }); // Reset stored captions since we added parsed - // captions to a text track at this point - - if (this.transmuxer_) { - this.transmuxer_.postMessage({ - action: 'clearParsedMp4Captions' - }); - } - } - handleId3_(simpleSegment, id3Frames, dispatchType) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } - const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set - - if (!segmentInfo.hasAppendedData_) { - this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType)); - return; - } - this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_()); - } - processMetadataQueue_() { - this.metadataQueue_.id3.forEach(fn => fn()); - this.metadataQueue_.caption.forEach(fn => fn()); - this.metadataQueue_.id3 = []; - this.metadataQueue_.caption = []; - } - processCallQueue_() { - const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the - // functions may check the length of the load queue and default to pushing themselves - // back onto the queue. - - this.callQueue_ = []; - callQueue.forEach(fun => fun()); - } - processLoadQueue_() { - const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the - // functions may check the length of the load queue and default to pushing themselves - // back onto the queue. - - this.loadQueue_ = []; - loadQueue.forEach(fun => fun()); - } - /** - * Determines whether the loader has enough info to load the next segment. - * - * @return {boolean} - * Whether or not the loader has enough info to load the next segment - */ - - hasEnoughInfoToLoad_() { - // Since primary timing goes by video, only the audio loader potentially needs to wait - // to load. - if (this.loaderType_ !== 'audio') { - return true; - } - const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's - // enough info to load. - - if (!segmentInfo) { - return false; - } // The first segment can and should be loaded immediately so that source buffers are - // created together (before appending). Source buffer creation uses the presence of - // audio and video data to determine whether to create audio/video source buffers, and - // uses processed (transmuxed or parsed) media to determine the types required. - - if (!this.getCurrentMediaInfo_()) { - return true; - } - if ( - // Technically, instead of waiting to load a segment on timeline changes, a segment - // can be requested and downloaded and only wait before it is transmuxed or parsed. - // But in practice, there are a few reasons why it is better to wait until a loader - // is ready to append that segment before requesting and downloading: - // - // 1. Because audio and main loaders cross discontinuities together, if this loader - // is waiting for the other to catch up, then instead of requesting another - // segment and using up more bandwidth, by not yet loading, more bandwidth is - // allotted to the loader currently behind. - // 2. media-segment-request doesn't have to have logic to consider whether a segment - // is ready to be processed or not, isolating the queueing behavior to the loader. - // 3. The audio loader bases some of its segment properties on timing information - // provided by the main loader, meaning that, if the logic for waiting on - // processing was in media-segment-request, then it would also need to know how - // to re-generate the segment information after the main loader caught up. - shouldWaitForTimelineChange({ - timelineChangeController: this.timelineChangeController_, - currentTimeline: this.currentTimeline_, - segmentTimeline: segmentInfo.timeline, - loaderType: this.loaderType_, - audioDisabled: this.audioDisabled_ - })) { - return false; - } - return true; - } - getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) { - return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_; - } - getMediaInfo_(segmentInfo = this.pendingSegment_) { - return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_; - } - getPendingSegmentPlaylist() { - return this.pendingSegment_ ? this.pendingSegment_.playlist : null; - } - hasEnoughInfoToAppend_() { - if (!this.sourceUpdater_.ready()) { - return false; - } // If content needs to be removed or the loader is waiting on an append reattempt, - // then no additional content should be appended until the prior append is resolved. - - if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) { - return false; - } - const segmentInfo = this.pendingSegment_; - const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or - // we do not have information on this specific - // segment yet - - if (!segmentInfo || !trackInfo) { - return false; - } - const { - hasAudio, - hasVideo, - isMuxed - } = trackInfo; - if (hasVideo && !segmentInfo.videoTimingInfo) { - return false; - } // muxed content only relies on video timing information for now. - - if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) { - return false; - } - if (shouldWaitForTimelineChange({ - timelineChangeController: this.timelineChangeController_, - currentTimeline: this.currentTimeline_, - segmentTimeline: segmentInfo.timeline, - loaderType: this.loaderType_, - audioDisabled: this.audioDisabled_ - })) { - return false; - } - return true; - } - handleData_(simpleSegment, result) { - this.earlyAbortWhenNeeded_(simpleSegment.stats); - if (this.checkForAbort_(simpleSegment.requestId)) { - return; - } // If there's anything in the call queue, then this data came later and should be - // executed after the calls currently queued. - - if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) { - this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result)); - return; - } - const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time - - this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats - - this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort - // logic may change behavior depending on the state, and changing state too early may - // inflate our estimates of bandwidth. In the future this should be re-examined to - // note more granular states. - // don't process and append data if the mediaSource is closed - - if (this.mediaSource_.readyState === 'closed') { - return; - } // if this request included an initialization segment, save that data - // to the initSegment cache - - if (simpleSegment.map) { - simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request - - segmentInfo.segment.map = simpleSegment.map; - } // if this request included a segment key, save that data in the cache - - if (simpleSegment.key) { - this.segmentKey(simpleSegment.key, true); - } - segmentInfo.isFmp4 = simpleSegment.isFmp4; - segmentInfo.timingInfo = segmentInfo.timingInfo || {}; - if (segmentInfo.isFmp4) { - this.trigger('fmp4'); - segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start; - } else { - const trackInfo = this.getCurrentMediaInfo_(); - const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo; - let firstVideoFrameTimeForData; - if (useVideoTimingInfo) { - firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start; - } // Segment loader knows more about segment timing than the transmuxer (in certain - // aspects), so make any changes required for a more accurate start time. - // Don't set the end time yet, as the segment may not be finished processing. - - segmentInfo.timingInfo.start = this.trueSegmentStart_({ - currentStart: segmentInfo.timingInfo.start, - playlist: segmentInfo.playlist, - mediaIndex: segmentInfo.mediaIndex, - currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(), - useVideoTimingInfo, - firstVideoFrameTimeForData, - videoTimingInfo: segmentInfo.videoTimingInfo, - audioTimingInfo: segmentInfo.audioTimingInfo - }); - } // Init segments for audio and video only need to be appended in certain cases. Now - // that data is about to be appended, we can check the final cases to determine - // whether we should append an init segment. - - this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info, - // as we use the start of the segment to offset the best guess (playlist provided) - // timestamp offset. - - this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should - // be appended or not. - - if (segmentInfo.isSyncRequest) { - // first save/update our timing info for this segment. - // this is what allows us to choose an accurate segment - // and the main reason we make a sync request. - this.updateTimingInfoEnd_(segmentInfo); - this.syncController_.saveSegmentTimingInfo({ - segmentInfo, - shouldSaveTimelineMapping: this.loaderType_ === 'main' - }); - const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next - // after taking into account its timing info, do not append it. - - if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) { - this.logger_('sync segment was incorrect, not appending'); - return; - } // otherwise append it like any other segment as our guess was correct. - - this.logger_('sync segment was correct, appending'); - } // Save some state so that in the future anything waiting on first append (and/or - // timestamp offset(s)) can process immediately. While the extra state isn't optimal, - // we need some notion of whether the timestamp offset or other relevant information - // has had a chance to be set. - - segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags. - - this.processMetadataQueue_(); - this.appendData_(segmentInfo, result); - } - updateAppendInitSegmentStatus(segmentInfo, type) { - // alt audio doesn't manage timestamp offset - if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' && - // in the case that we're handling partial data, we don't want to append an init - // segment for each chunk - !segmentInfo.changedTimestampOffset) { - // if the timestamp offset changed, the timeline may have changed, so we have to re- - // append init segments - this.appendInitSegment_ = { - audio: true, - video: true - }; - } - if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) { - // make sure we append init segment on playlist changes, in case the media config - // changed - this.appendInitSegment_[type] = true; - } - } - getInitSegmentAndUpdateState_({ - type, - initSegment, - map, - playlist - }) { - // "The EXT-X-MAP tag specifies how to obtain the Media Initialization Section - // (Section 3) required to parse the applicable Media Segments. It applies to every - // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag - // or until the end of the playlist." - // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5 - if (map) { - const id = initSegmentId(map); - if (this.activeInitSegmentId_ === id) { - // don't need to re-append the init segment if the ID matches - return null; - } // a map-specified init segment takes priority over any transmuxed (or otherwise - // obtained) init segment - // - // this also caches the init segment for later use - - initSegment = this.initSegmentForMap(map, true).bytes; - this.activeInitSegmentId_ = id; - } // We used to always prepend init segments for video, however, that shouldn't be - // necessary. Instead, we should only append on changes, similar to what we've always - // done for audio. This is more important (though may not be that important) for - // frame-by-frame appending for LHLS, simply because of the increased quantity of - // appends. - - if (initSegment && this.appendInitSegment_[type]) { - // Make sure we track the playlist that we last used for the init segment, so that - // we can re-append the init segment in the event that we get data from a new - // playlist. Discontinuities and track changes are handled in other sections. - this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary. - - this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since - // we are appending the muxer init segment - - this.activeInitSegmentId_ = null; - return initSegment; - } - return null; - } - handleQuotaExceededError_({ - segmentInfo, - type, - bytes - }, error) { - const audioBuffered = this.sourceUpdater_.audioBuffered(); - const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory, - // should be cleared out during the buffer removals. However, log in case it helps - // debug. - - if (audioBuffered.length > 1) { - this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', ')); - } - if (videoBuffered.length > 1) { - this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', ')); - } - const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0; - const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0; - const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0; - const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0; - if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) { - // Can't remove enough buffer to make room for new segment (or the browser doesn't - // allow for appends of segments this size). In the future, it may be possible to - // split up the segment and append in pieces, but for now, error out this playlist - // in an attempt to switch to a more manageable rendition. - this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `); - this.error({ - message: 'Quota exceeded error with append of a single segment of content', - excludeUntil: Infinity - }); - this.trigger('error'); - return; - } // To try to resolve the quota exceeded error, clear back buffer and retry. This means - // that the segment-loader should block on future events until this one is handled, so - // that it doesn't keep moving onto further segments. Adding the call to the call - // queue will prevent further appends until waitingOnRemove_ and - // quotaExceededErrorRetryTimeout_ are cleared. - // - // Note that this will only block the current loader. In the case of demuxed content, - // the other load may keep filling as fast as possible. In practice, this should be - // OK, as it is a rare case when either audio has a high enough bitrate to fill up a - // source buffer, or video fills without enough room for audio to append (and without - // the availability of clearing out seconds of back buffer to make room for audio). - // But it might still be good to handle this case in the future as a TODO. - - this.waitingOnRemove_ = true; - this.callQueue_.push(this.appendToSourceBuffer_.bind(this, { - segmentInfo, - type, - bytes - })); - const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content - // before retrying. - - const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER; - this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`); - this.remove(0, timeToRemoveUntil, () => { - this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`); - this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted - // attempts (since we can't clear less than the minimum) - - this.quotaExceededErrorRetryTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(() => { - this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue'); - this.quotaExceededErrorRetryTimeout_ = null; - this.processCallQueue_(); - }, MIN_BACK_BUFFER * 1000); - }, true); - } - handleAppendError_({ - segmentInfo, - type, - bytes - }, error) { - // if there's no error, nothing to do - if (!error) { - return; - } - if (error.code === QUOTA_EXCEEDED_ERR) { - this.handleQuotaExceededError_({ - segmentInfo, - type, - bytes - }); // A quota exceeded error should be recoverable with a future re-append, so no need - // to trigger an append error. - - return; - } - this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error); - this.error(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`); // If an append errors, we often can't recover. - // (see https://w3c.github.io/media-source/#sourcebuffer-append-error). - // - // Trigger a special error so that it can be handled separately from normal, - // recoverable errors. - - this.trigger('appenderror'); - } - appendToSourceBuffer_({ - segmentInfo, - type, - initSegment, - data, - bytes - }) { - // If this is a re-append, bytes were already created and don't need to be recreated - if (!bytes) { - const segments = [data]; - let byteLength = data.byteLength; - if (initSegment) { - // if the media initialization segment is changing, append it before the content - // segment - segments.unshift(initSegment); - byteLength += initSegment.byteLength; - } // Technically we should be OK appending the init segment separately, however, we - // haven't yet tested that, and prepending is how we have always done things. - - bytes = concatSegments({ - bytes: byteLength, - segments - }); - } - this.sourceUpdater_.appendBuffer({ - segmentInfo, - type, - bytes - }, this.handleAppendError_.bind(this, { - segmentInfo, - type, - bytes - })); - } - handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) { - if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) { - return; - } - const segment = this.pendingSegment_.segment; - const timingInfoProperty = `${type}TimingInfo`; - if (!segment[timingInfoProperty]) { - segment[timingInfoProperty] = {}; - } - segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0; - segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation; - segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode; - segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation; - segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging - - segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime; - } - appendData_(segmentInfo, result) { - const { - type, - data - } = result; - if (!data || !data.byteLength) { - return; - } - if (type === 'audio' && this.audioDisabled_) { - return; - } - const initSegment = this.getInitSegmentAndUpdateState_({ - type, - initSegment: result.initSegment, - playlist: segmentInfo.playlist, - map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null - }); - this.appendToSourceBuffer_({ - segmentInfo, - type, - initSegment, - data - }); - } - /** - * load a specific segment from a request into the buffer - * - * @private - */ - - loadSegment_(segmentInfo) { - this.state = 'WAITING'; - this.pendingSegment_ = segmentInfo; - this.trimBackBuffer_(segmentInfo); - if (typeof segmentInfo.timestampOffset === 'number') { - if (this.transmuxer_) { - this.transmuxer_.postMessage({ - action: 'clearAllMp4Captions' - }); - } - } - if (!this.hasEnoughInfoToLoad_()) { - this.loadQueue_.push(() => { - // regenerate the audioAppendStart, timestampOffset, etc as they - // may have changed since this function was added to the queue. - const options = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7__["default"])({}, segmentInfo, { - forceTimestampOffset: true - }); - (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_7__["default"])(segmentInfo, this.generateSegmentInfo_(options)); - this.isPendingTimestampOffset_ = false; - this.updateTransmuxerAndRequestSegment_(segmentInfo); - }); - return; - } - this.updateTransmuxerAndRequestSegment_(segmentInfo); - } - updateTransmuxerAndRequestSegment_(segmentInfo) { - // We'll update the source buffer's timestamp offset once we have transmuxed data, but - // the transmuxer still needs to be updated before then. - // - // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp - // offset must be passed to the transmuxer for stream correcting adjustments. - if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) { - this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared - - segmentInfo.gopsToAlignWith = []; - this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh - - this.transmuxer_.postMessage({ - action: 'reset' - }); - this.transmuxer_.postMessage({ - action: 'setTimestampOffset', - timestampOffset: segmentInfo.timestampOffset - }); - } - const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo); - const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex); - const isWalkingForward = this.mediaIndex !== null; - const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ && - // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0, - // the first timeline - segmentInfo.timeline > 0; - const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity; - this.logger_(`Requesting ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes), - // then this init segment has never been seen before and should be appended. - // - // At this point the content type (audio/video or both) is not yet known, but it should be safe to set - // both to true and leave the decision of whether to append the init segment to append time. - - if (simpleSegment.map && !simpleSegment.map.bytes) { - this.logger_('going to request init segment.'); - this.appendInitSegment_ = { - video: true, - audio: true - }; - } - segmentInfo.abortRequests = mediaSegmentRequest({ - xhr: this.vhs_.xhr, - xhrOptions: this.xhrOptions_, - decryptionWorker: this.decrypter_, - segment: simpleSegment, - abortFn: this.handleAbort_.bind(this, segmentInfo), - progressFn: this.handleProgress_.bind(this), - trackInfoFn: this.handleTrackInfo_.bind(this), - timingInfoFn: this.handleTimingInfo_.bind(this), - videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId), - audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId), - captionsFn: this.handleCaptions_.bind(this), - isEndOfTimeline, - endedTimelineFn: () => { - this.logger_('received endedtimeline callback'); - }, - id3Fn: this.handleId3_.bind(this), - dataFn: this.handleData_.bind(this), - doneFn: this.segmentRequestFinished_.bind(this), - onTransmuxerLog: ({ - message, - level, - stream - }) => { - this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`); - } - }); - } - /** - * trim the back buffer so that we don't have too much data - * in the source buffer - * - * @private - * - * @param {Object} segmentInfo - the current segment - */ - - trimBackBuffer_(segmentInfo) { - const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of - // buffer and a very conservative "garbage collector" - // We manually clear out the old buffer to ensure - // we don't trigger the QuotaExceeded error - // on the source buffer during subsequent appends - - if (removeToTime > 0) { - this.remove(0, removeToTime); - } - } - /** - * created a simplified copy of the segment object with just the - * information necessary to perform the XHR and decryption - * - * @private - * - * @param {Object} segmentInfo - the current segment - * @return {Object} a simplified segment object copy - */ - - createSimplifiedSegmentObj_(segmentInfo) { - const segment = segmentInfo.segment; - const part = segmentInfo.part; - const simpleSegment = { - resolvedUri: part ? part.resolvedUri : segment.resolvedUri, - byterange: part ? part.byterange : segment.byterange, - requestId: segmentInfo.requestId, - transmuxer: segmentInfo.transmuxer, - audioAppendStart: segmentInfo.audioAppendStart, - gopsToAlignWith: segmentInfo.gopsToAlignWith, - part: segmentInfo.part - }; - const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1]; - if (previousSegment && previousSegment.timeline === segment.timeline) { - // The baseStartTime of a segment is used to handle rollover when probing the TS - // segment to retrieve timing information. Since the probe only looks at the media's - // times (e.g., PTS and DTS values of the segment), and doesn't consider the - // player's time (e.g., player.currentTime()), baseStartTime should reflect the - // media time as well. transmuxedDecodeEnd represents the end time of a segment, in - // seconds of media time, so should be used here. The previous segment is used since - // the end of the previous segment should represent the beginning of the current - // segment, so long as they are on the same timeline. - if (previousSegment.videoTimingInfo) { - simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd; - } else if (previousSegment.audioTimingInfo) { - simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd; - } - } - if (segment.key) { - // if the media sequence is greater than 2^32, the IV will be incorrect - // assuming 10s segments, that would be about 1300 years - const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]); - simpleSegment.key = this.segmentKey(segment.key); - simpleSegment.key.iv = iv; - } - if (segment.map) { - simpleSegment.map = this.initSegmentForMap(segment.map); - } - return simpleSegment; - } - saveTransferStats_(stats) { - // every request counts as a media request even if it has been aborted - // or canceled due to a timeout - this.mediaRequests += 1; - if (stats) { - this.mediaBytesTransferred += stats.bytesReceived; - this.mediaTransferDuration += stats.roundTripTime; - } - } - saveBandwidthRelatedStats_(duration, stats) { - // byteLength will be used for throughput, and should be based on bytes receieved, - // which we only know at the end of the request and should reflect total bytes - // downloaded rather than just bytes processed from components of the segment - this.pendingSegment_.byteLength = stats.bytesReceived; - if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) { - this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`); - return; - } - this.bandwidth = stats.bandwidth; - this.roundTrip = stats.roundTripTime; - } - handleTimeout_() { - // although the VTT segment loader bandwidth isn't really used, it's good to - // maintain functinality between segment loaders - this.mediaRequestsTimedout += 1; - this.bandwidth = 1; - this.roundTrip = NaN; - this.trigger('bandwidthupdate'); - this.trigger('timeout'); - } - /** - * Handle the callback from the segmentRequest function and set the - * associated SegmentLoader state and errors if necessary - * - * @private - */ - - segmentRequestFinished_(error, simpleSegment, result) { - // TODO handle special cases, e.g., muxed audio/video but only audio in the segment - // check the call queue directly since this function doesn't need to deal with any - // data, and can continue even if the source buffers are not set up and we didn't get - // any data from the segment - if (this.callQueue_.length) { - this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result)); - return; - } - this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset - - if (!this.pendingSegment_) { - return; - } // the request was aborted and the SegmentLoader has already started - // another request. this can happen when the timeout for an aborted - // request triggers due to a limitation in the XHR library - // do not count this as any sort of request or we risk double-counting - - if (simpleSegment.requestId !== this.pendingSegment_.requestId) { - return; - } // an error occurred from the active pendingSegment_ so reset everything - - if (error) { - this.pendingSegment_ = null; - this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done - - if (error.code === REQUEST_ERRORS.ABORTED) { - return; - } - this.pause(); // the error is really just that at least one of the requests timed-out - // set the bandwidth to a very low value and trigger an ABR switch to - // take emergency action - - if (error.code === REQUEST_ERRORS.TIMEOUT) { - this.handleTimeout_(); - return; - } // if control-flow has arrived here, then the error is real - // emit an error event to exclude the current playlist - - this.mediaRequestsErrored += 1; - this.error(error); - this.trigger('error'); - return; - } - const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request - // generated for ABR purposes - - this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); - segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests; - if (result.gopInfo) { - this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_); - } // Although we may have already started appending on progress, we shouldn't switch the - // state away from loading until we are officially done loading the segment data. - - this.state = 'APPENDING'; // used for testing - - this.trigger('appending'); - this.waitForAppendsToComplete_(segmentInfo); - } - setTimeMapping_(timeline) { - const timelineMapping = this.syncController_.mappingForTimeline(timeline); - if (timelineMapping !== null) { - this.timeMapping_ = timelineMapping; - } - } - updateMediaSecondsLoaded_(segment) { - if (typeof segment.start === 'number' && typeof segment.end === 'number') { - this.mediaSecondsLoaded += segment.end - segment.start; - } else { - this.mediaSecondsLoaded += segment.duration; - } - } - shouldUpdateTransmuxerTimestampOffset_(timestampOffset) { - if (timestampOffset === null) { - return false; - } // note that we're potentially using the same timestamp offset for both video and - // audio - - if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) { - return true; - } - if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) { - return true; - } - return false; - } - trueSegmentStart_({ - currentStart, - playlist, - mediaIndex, - firstVideoFrameTimeForData, - currentVideoTimestampOffset, - useVideoTimingInfo, - videoTimingInfo, - audioTimingInfo - }) { - if (typeof currentStart !== 'undefined') { - // if start was set once, keep using it - return currentStart; - } - if (!useVideoTimingInfo) { - return audioTimingInfo.start; - } - const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained - // within that segment. Since the transmuxer maintains a cache of incomplete data - // from and/or the last frame seen, the start time may reflect a frame that starts - // in the previous segment. Check for that case and ensure the start time is - // accurate for the segment. - - if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) { - return firstVideoFrameTimeForData; - } - return videoTimingInfo.start; - } - waitForAppendsToComplete_(segmentInfo) { - const trackInfo = this.getCurrentMediaInfo_(segmentInfo); - if (!trackInfo) { - this.error({ - message: 'No starting media returned, likely due to an unsupported media format.', - playlistExclusionDuration: Infinity - }); - this.trigger('error'); - return; - } // Although transmuxing is done, appends may not yet be finished. Throw a marker - // on each queue this loader is responsible for to ensure that the appends are - // complete. - - const { - hasAudio, - hasVideo, - isMuxed - } = trackInfo; - const waitForVideo = this.loaderType_ === 'main' && hasVideo; - const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed; - segmentInfo.waitingOnAppends = 0; // segments with no data - - if (!segmentInfo.hasAppendedData_) { - if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') { - // When there's no audio or video data in the segment, there's no audio or video - // timing information. - // - // If there's no audio or video timing information, then the timestamp offset - // can't be adjusted to the appropriate value for the transmuxer and source - // buffers. - // - // Therefore, the next segment should be used to set the timestamp offset. - this.isPendingTimestampOffset_ = true; - } // override settings for metadata only segments - - segmentInfo.timingInfo = { - start: 0 - }; - segmentInfo.waitingOnAppends++; - if (!this.isPendingTimestampOffset_) { - // update the timestampoffset - this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have - // no video/audio data. - - this.processMetadataQueue_(); - } // append is "done" instantly with no data. - - this.checkAppendsDone_(segmentInfo); - return; - } // Since source updater could call back synchronously, do the increments first. - - if (waitForVideo) { - segmentInfo.waitingOnAppends++; - } - if (waitForAudio) { - segmentInfo.waitingOnAppends++; - } - if (waitForVideo) { - this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo)); - } - if (waitForAudio) { - this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo)); - } - } - checkAppendsDone_(segmentInfo) { - if (this.checkForAbort_(segmentInfo.requestId)) { - return; - } - segmentInfo.waitingOnAppends--; - if (segmentInfo.waitingOnAppends === 0) { - this.handleAppendsDone_(); - } - } - checkForIllegalMediaSwitch(trackInfo) { - const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo); - if (illegalMediaSwitchError) { - this.error({ - message: illegalMediaSwitchError, - playlistExclusionDuration: Infinity - }); - this.trigger('error'); - return true; - } - return false; - } - updateSourceBufferTimestampOffset_(segmentInfo) { - if (segmentInfo.timestampOffset === null || - // we don't yet have the start for whatever media type (video or audio) has - // priority, timing-wise, so we must wait - typeof segmentInfo.timingInfo.start !== 'number' || - // already updated the timestamp offset for this segment - segmentInfo.changedTimestampOffset || - // the alt audio loader should not be responsible for setting the timestamp offset - this.loaderType_ !== 'main') { - return; - } - let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that - // the timing info here comes from video. In the event that the audio is longer than - // the video, this will trim the start of the audio. - // This also trims any offset from 0 at the beginning of the media - - segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({ - videoTimingInfo: segmentInfo.segment.videoTimingInfo, - audioTimingInfo: segmentInfo.segment.audioTimingInfo, - timingInfo: segmentInfo.timingInfo - }); // In the event that there are part segment downloads, each will try to update the - // timestamp offset. Retaining this bit of state prevents us from updating in the - // future (within the same segment), however, there may be a better way to handle it. - - segmentInfo.changedTimestampOffset = true; - if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) { - this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset); - didChange = true; - } - if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) { - this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset); - didChange = true; - } - if (didChange) { - this.trigger('timestampoffset'); - } - } - getSegmentStartTimeForTimestampOffsetCalculation_({ - videoTimingInfo, - audioTimingInfo, - timingInfo - }) { - if (!this.useDtsForTimestampOffset_) { - return timingInfo.start; - } - if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') { - return videoTimingInfo.transmuxedDecodeStart; - } // handle audio only - - if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') { - return audioTimingInfo.transmuxedDecodeStart; - } // handle content not transmuxed (e.g., MP4) - - return timingInfo.start; - } - updateTimingInfoEnd_(segmentInfo) { - segmentInfo.timingInfo = segmentInfo.timingInfo || {}; - const trackInfo = this.getMediaInfo_(); - const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo; - const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo; - if (!prioritizedTimingInfo) { - return; - } - segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ? - // End time may not exist in a case where we aren't parsing the full segment (one - // current example is the case of fmp4), so use the rough duration to calculate an - // end time. - prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration; - } - /** - * callback to run when appendBuffer is finished. detects if we are - * in a good state to do things with the data we got, or if we need - * to wait for more - * - * @private - */ - - handleAppendsDone_() { - // appendsdone can cause an abort - if (this.pendingSegment_) { - this.trigger('appendsdone'); - } - if (!this.pendingSegment_) { - this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in - // all appending cases? - - if (!this.paused()) { - this.monitorBuffer_(); - } - return; - } - const segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's - // best to wait until all appends are done so we're sure that the primary media is - // finished (and we have its end time). - - this.updateTimingInfoEnd_(segmentInfo); - if (this.shouldSaveSegmentTimingInfo_) { - // Timeline mappings should only be saved for the main loader. This is for multiple - // reasons: - // - // 1) Only one mapping is saved per timeline, meaning that if both the audio loader - // and the main loader try to save the timeline mapping, whichever comes later - // will overwrite the first. In theory this is OK, as the mappings should be the - // same, however, it breaks for (2) - // 2) In the event of a live stream, the initial live point will make for a somewhat - // arbitrary mapping. If audio and video streams are not perfectly in-sync, then - // the mapping will be off for one of the streams, dependent on which one was - // first saved (see (1)). - // 3) Primary timing goes by video in VHS, so the mapping should be video. - // - // Since the audio loader will wait for the main loader to load the first segment, - // the main loader will save the first timeline mapping, and ensure that there won't - // be a case where audio loads two segments without saving a mapping (thus leading - // to missing segment timing info). - this.syncController_.saveSegmentTimingInfo({ - segmentInfo, - shouldSaveTimelineMapping: this.loaderType_ === 'main' - }); - } - const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_); - if (segmentDurationMessage) { - if (segmentDurationMessage.severity === 'warn') { - videojs.log.warn(segmentDurationMessage.message); - } else { - this.logger_(segmentDurationMessage.message); - } - } - this.recordThroughput_(segmentInfo); - this.pendingSegment_ = null; - this.state = 'READY'; - if (segmentInfo.isSyncRequest) { - this.trigger('syncinfoupdate'); // if the sync request was not appended - // then it was not the correct segment. - // throw it away and use the data it gave us - // to get the correct one. - - if (!segmentInfo.hasAppendedData_) { - this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`); - return; - } - } - this.logger_(`Appended ${segmentInfoString(segmentInfo)}`); - this.addSegmentMetadataCue_(segmentInfo); - if (this.currentTime_() >= this.replaceSegmentsUntil_) { - this.replaceSegmentsUntil_ = -1; - this.fetchAtBuffer_ = true; - } - if (this.currentTimeline_ !== segmentInfo.timeline) { - this.timelineChangeController_.lastTimelineChange({ - type: this.loaderType_, - from: this.currentTimeline_, - to: segmentInfo.timeline - }); // If audio is not disabled, the main segment loader is responsible for updating - // the audio timeline as well. If the content is video only, this won't have any - // impact. - - if (this.loaderType_ === 'main' && !this.audioDisabled_) { - this.timelineChangeController_.lastTimelineChange({ - type: 'audio', - from: this.currentTimeline_, - to: segmentInfo.timeline - }); - } - } - this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before - // the following conditional otherwise it may consider this a bad "guess" - // and attempt to resync when the post-update seekable window and live - // point would mean that this was the perfect segment to fetch - - this.trigger('syncinfoupdate'); - const segment = segmentInfo.segment; - const part = segmentInfo.part; - const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3; - const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before - // the currentTime_ that means that our conservative guess was too conservative. - // In that case, reset the loader state so that we try to use any information gained - // from the previous request to create a new, more accurate, sync-point. - - if (badSegmentGuess || badPartGuess) { - this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`); - this.resetEverything(); - return; - } - const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment - // and conservatively guess - - if (isWalkingForward) { - this.trigger('bandwidthupdate'); - } - this.trigger('progress'); - this.mediaIndex = segmentInfo.mediaIndex; - this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the - // buffer, end the stream. this ensures the "ended" event will - // fire if playback reaches that point. - - if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) { - this.endOfStream(); - } // used for testing - - this.trigger('appended'); - if (segmentInfo.hasAppendedData_) { - this.mediaAppends++; - } - if (!this.paused()) { - this.monitorBuffer_(); - } - } - /** - * Records the current throughput of the decrypt, transmux, and append - * portion of the semgment pipeline. `throughput.rate` is a the cumulative - * moving average of the throughput. `throughput.count` is the number of - * data points in the average. - * - * @private - * @param {Object} segmentInfo the object returned by loadSegment - */ - - recordThroughput_(segmentInfo) { - if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) { - this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`); - return; - } - const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide - // by zero in the case where the throughput is ridiculously high - - const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second - - const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation: - // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1) - - this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count; - } - /** - * Adds a cue to the segment-metadata track with some metadata information about the - * segment - * - * @private - * @param {Object} segmentInfo - * the object returned by loadSegment - * @method addSegmentMetadataCue_ - */ - - addSegmentMetadataCue_(segmentInfo) { - if (!this.segmentMetadataTrack_) { - return; - } - const segment = segmentInfo.segment; - const start = segment.start; - const end = segment.end; // Do not try adding the cue if the start and end times are invalid. - - if (!finite(start) || !finite(end)) { - return; - } - removeCuesFromTrack(start, end, this.segmentMetadataTrack_); - const Cue = (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebKitDataCue) || (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue); - const value = { - custom: segment.custom, - dateTimeObject: segment.dateTimeObject, - dateTimeString: segment.dateTimeString, - programDateTime: segment.programDateTime, - bandwidth: segmentInfo.playlist.attributes.BANDWIDTH, - resolution: segmentInfo.playlist.attributes.RESOLUTION, - codecs: segmentInfo.playlist.attributes.CODECS, - byteLength: segmentInfo.byteLength, - uri: segmentInfo.uri, - timeline: segmentInfo.timeline, - playlist: segmentInfo.playlist.id, - start, - end - }; - const data = JSON.stringify(value); - const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between - // the differences of WebKitDataCue in safari and VTTCue in other browsers - - cue.value = value; - this.segmentMetadataTrack_.addCue(cue); - } - /** - * Public setter for defining the private replaceSegmentsUntil_ property, which - * determines when we can return fetchAtBuffer to true if overwriting the buffer. - * - * @param {number} bufferedEnd the end of the buffered range to replace segments - * until currentTime reaches this time. - */ - - set replaceSegmentsUntil(bufferedEnd) { - this.logger_(`Replacing currently buffered segments until ${bufferedEnd}`); - this.replaceSegmentsUntil_ = bufferedEnd; - } -} -function noop() {} -const toTitleCase = function (string) { - if (typeof string !== 'string') { - return string; - } - return string.replace(/./, w => w.toUpperCase()); -}; - -/** - * @file source-updater.js - */ -const bufferTypes = ['video', 'audio']; -const updating = (type, sourceUpdater) => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; - return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type]; -}; -const nextQueueIndexOfType = (type, queue) => { - for (let i = 0; i < queue.length; i++) { - const queueEntry = queue[i]; - if (queueEntry.type === 'mediaSource') { - // If the next entry is a media source entry (uses multiple source buffers), block - // processing to allow it to go through first. - return null; - } - if (queueEntry.type === type) { - return i; - } - } - return null; -}; -const shiftQueue = (type, sourceUpdater) => { - if (sourceUpdater.queue.length === 0) { - return; - } - let queueIndex = 0; - let queueEntry = sourceUpdater.queue[queueIndex]; - if (queueEntry.type === 'mediaSource') { - if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') { - sourceUpdater.queue.shift(); - queueEntry.action(sourceUpdater); - if (queueEntry.doneFn) { - queueEntry.doneFn(); - } // Only specific source buffer actions must wait for async updateend events. Media - // Source actions process synchronously. Therefore, both audio and video source - // buffers are now clear to process the next queue entries. - - shiftQueue('audio', sourceUpdater); - shiftQueue('video', sourceUpdater); - } // Media Source actions require both source buffers, so if the media source action - // couldn't process yet (because one or both source buffers are busy), block other - // queue actions until both are available and the media source action can process. - - return; - } - if (type === 'mediaSource') { - // If the queue was shifted by a media source action (this happens when pushing a - // media source action onto the queue), then it wasn't from an updateend event from an - // audio or video source buffer, so there's no change from previous state, and no - // processing should be done. - return; - } // Media source queue entries don't need to consider whether the source updater is - // started (i.e., source buffers are created) as they don't need the source buffers, but - // source buffer queue entries do. - - if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) { - return; - } - if (queueEntry.type !== type) { - queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue); - if (queueIndex === null) { - // Either there's no queue entry that uses this source buffer type in the queue, or - // there's a media source queue entry before the next entry of this type, in which - // case wait for that action to process first. - return; - } - queueEntry = sourceUpdater.queue[queueIndex]; - } - sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use. - // - // The queue pending operation must be set before the action is performed in the event - // that the action results in a synchronous event that is acted upon. For instance, if - // an exception is thrown that can be handled, it's possible that new actions will be - // appended to an empty queue and immediately executed, but would not have the correct - // pending information if this property was set after the action was performed. - - sourceUpdater.queuePending[type] = queueEntry; - queueEntry.action(type, sourceUpdater); - if (!queueEntry.doneFn) { - // synchronous operation, process next entry - sourceUpdater.queuePending[type] = null; - shiftQueue(type, sourceUpdater); - return; - } -}; -const cleanupBuffer = (type, sourceUpdater) => { - const buffer = sourceUpdater[`${type}Buffer`]; - const titleType = toTitleCase(type); - if (!buffer) { - return; - } - buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]); - buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]); - sourceUpdater.codecs[type] = null; - sourceUpdater[`${type}Buffer`] = null; -}; -const inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1; -const actions = { - appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } - sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`); - try { - sourceBuffer.appendBuffer(bytes); - } catch (e) { - sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`); - sourceUpdater.queuePending[type] = null; - onError(e); - } - }, - remove: (start, end) => (type, sourceUpdater) => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } - sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`); - try { - sourceBuffer.remove(start, end); - } catch (e) { - sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`); - } - }, - timestampOffset: offset => (type, sourceUpdater) => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } - sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`); - sourceBuffer.timestampOffset = offset; - }, - callback: callback => (type, sourceUpdater) => { - callback(); - }, - endOfStream: error => sourceUpdater => { - if (sourceUpdater.mediaSource.readyState !== 'open') { - return; - } - sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`); - try { - sourceUpdater.mediaSource.endOfStream(error); - } catch (e) { - videojs.log.warn('Failed to call media source endOfStream', e); - } - }, - duration: duration => sourceUpdater => { - sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`); - try { - sourceUpdater.mediaSource.duration = duration; - } catch (e) { - videojs.log.warn('Failed to set media source duration', e); - } - }, - abort: () => (type, sourceUpdater) => { - if (sourceUpdater.mediaSource.readyState !== 'open') { - return; - } - const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } - sourceUpdater.logger_(`calling abort on ${type}Buffer`); - try { - sourceBuffer.abort(); - } catch (e) { - videojs.log.warn(`Failed to abort on ${type}Buffer`, e); - } - }, - addSourceBuffer: (type, codec) => sourceUpdater => { - const titleType = toTitleCase(type); - const mime = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codec); - sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`); - const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime); - sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]); - sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]); - sourceUpdater.codecs[type] = codec; - sourceUpdater[`${type}Buffer`] = sourceBuffer; - }, - removeSourceBuffer: type => sourceUpdater => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; - cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } - sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`); - try { - sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer); - } catch (e) { - videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e); - } - }, - changeType: codec => (type, sourceUpdater) => { - const sourceBuffer = sourceUpdater[`${type}Buffer`]; - const mime = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codec); // can't do anything if the media source / source buffer is null - // or the media source does not contain this source buffer. - - if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { - return; - } // do not update codec if we don't need to. - - if (sourceUpdater.codecs[type] === codec) { - return; - } - sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`); - sourceBuffer.changeType(mime); - sourceUpdater.codecs[type] = codec; - } -}; -const pushQueue = ({ - type, - sourceUpdater, - action, - doneFn, - name -}) => { - sourceUpdater.queue.push({ - type, - action, - doneFn, - name - }); - shiftQueue(type, sourceUpdater); -}; -const onUpdateend = (type, sourceUpdater) => e => { - const buffered = sourceUpdater[`${type}Buffered`](); - const bufferedAsString = prettyBuffered(buffered); - sourceUpdater.logger_(`${type} source buffer update end. Buffered: \n`, bufferedAsString); // Although there should, in theory, be a pending action for any updateend receieved, - // there are some actions that may trigger updateend events without set definitions in - // the w3c spec. For instance, setting the duration on the media source may trigger - // updateend events on source buffers. This does not appear to be in the spec. As such, - // if we encounter an updateend without a corresponding pending action from our queue - // for that source buffer type, process the next action. - - if (sourceUpdater.queuePending[type]) { - const doneFn = sourceUpdater.queuePending[type].doneFn; - sourceUpdater.queuePending[type] = null; - if (doneFn) { - // if there's an error, report it - doneFn(sourceUpdater[`${type}Error_`]); - } - } - shiftQueue(type, sourceUpdater); -}; -/** - * A queue of callbacks to be serialized and applied when a - * MediaSource and its associated SourceBuffers are not in the - * updating state. It is used by the segment loader to update the - * underlying SourceBuffers when new data is loaded, for instance. - * - * @class SourceUpdater - * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from - * @param {string} mimeType the desired MIME type of the underlying SourceBuffer - */ - -class SourceUpdater extends videojs.EventTarget { - constructor(mediaSource) { - super(); - this.mediaSource = mediaSource; - this.sourceopenListener_ = () => shiftQueue('mediaSource', this); - this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_); - this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0 - - this.audioTimestampOffset_ = 0; - this.videoTimestampOffset_ = 0; - this.queue = []; - this.queuePending = { - audio: null, - video: null - }; - this.delayedAudioAppendQueue_ = []; - this.videoAppendQueued_ = false; - this.codecs = {}; - this.onVideoUpdateEnd_ = onUpdateend('video', this); - this.onAudioUpdateEnd_ = onUpdateend('audio', this); - this.onVideoError_ = e => { - // used for debugging - this.videoError_ = e; - }; - this.onAudioError_ = e => { - // used for debugging - this.audioError_ = e; - }; - this.createdSourceBuffers_ = false; - this.initializedEme_ = false; - this.triggeredReady_ = false; - } - initializedEme() { - this.initializedEme_ = true; - this.triggerReady(); - } - hasCreatedSourceBuffers() { - // if false, likely waiting on one of the segment loaders to get enough data to create - // source buffers - return this.createdSourceBuffers_; - } - hasInitializedAnyEme() { - return this.initializedEme_; - } - ready() { - return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme(); - } - createSourceBuffers(codecs) { - if (this.hasCreatedSourceBuffers()) { - // already created them before - return; - } // the intial addOrChangeSourceBuffers will always be - // two add buffers. - - this.addOrChangeSourceBuffers(codecs); - this.createdSourceBuffers_ = true; - this.trigger('createdsourcebuffers'); - this.triggerReady(); - } - triggerReady() { - // only allow ready to be triggered once, this prevents the case - // where: - // 1. we trigger createdsourcebuffers - // 2. ie 11 synchronously initializates eme - // 3. the synchronous initialization causes us to trigger ready - // 4. We go back to the ready check in createSourceBuffers and ready is triggered again. - if (this.ready() && !this.triggeredReady_) { - this.triggeredReady_ = true; - this.trigger('ready'); - } - } - /** - * Add a type of source buffer to the media source. - * - * @param {string} type - * The type of source buffer to add. - * - * @param {string} codec - * The codec to add the source buffer with. - */ - - addSourceBuffer(type, codec) { - pushQueue({ - type: 'mediaSource', - sourceUpdater: this, - action: actions.addSourceBuffer(type, codec), - name: 'addSourceBuffer' - }); - } - /** - * call abort on a source buffer. - * - * @param {string} type - * The type of source buffer to call abort on. - */ - - abort(type) { - pushQueue({ - type, - sourceUpdater: this, - action: actions.abort(type), - name: 'abort' - }); - } - /** - * Call removeSourceBuffer and remove a specific type - * of source buffer on the mediaSource. - * - * @param {string} type - * The type of source buffer to remove. - */ - - removeSourceBuffer(type) { - if (!this.canRemoveSourceBuffer()) { - videojs.log.error('removeSourceBuffer is not supported!'); - return; - } - pushQueue({ - type: 'mediaSource', - sourceUpdater: this, - action: actions.removeSourceBuffer(type), - name: 'removeSourceBuffer' - }); - } - /** - * Whether or not the removeSourceBuffer function is supported - * on the mediaSource. - * - * @return {boolean} - * if removeSourceBuffer can be called. - */ - - canRemoveSourceBuffer() { - // As of Firefox 83 removeSourceBuffer - // throws errors, so we report that it does not support this. - return !videojs.browser.IS_FIREFOX && (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource) && (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource).prototype && typeof (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource).prototype.removeSourceBuffer === 'function'; - } - /** - * Whether or not the changeType function is supported - * on our SourceBuffers. - * - * @return {boolean} - * if changeType can be called. - */ - - static canChangeType() { - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer) && (global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer).prototype && typeof (global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer).prototype.changeType === 'function'; - } - /** - * Whether or not the changeType function is supported - * on our SourceBuffers. - * - * @return {boolean} - * if changeType can be called. - */ - - canChangeType() { - return this.constructor.canChangeType(); - } - /** - * Call the changeType function on a source buffer, given the code and type. - * - * @param {string} type - * The type of source buffer to call changeType on. - * - * @param {string} codec - * The codec string to change type with on the source buffer. - */ - - changeType(type, codec) { - if (!this.canChangeType()) { - videojs.log.error('changeType is not supported!'); - return; - } - pushQueue({ - type, - sourceUpdater: this, - action: actions.changeType(codec), - name: 'changeType' - }); - } - /** - * Add source buffers with a codec or, if they are already created, - * call changeType on source buffers using changeType. - * - * @param {Object} codecs - * Codecs to switch to - */ - - addOrChangeSourceBuffers(codecs) { - if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) { - throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs'); - } - Object.keys(codecs).forEach(type => { - const codec = codecs[type]; - if (!this.hasCreatedSourceBuffers()) { - return this.addSourceBuffer(type, codec); - } - if (this.canChangeType()) { - this.changeType(type, codec); - } - }); - } - /** - * Queue an update to append an ArrayBuffer. - * - * @param {MediaObject} object containing audioBytes and/or videoBytes - * @param {Function} done the function to call when done - * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data - */ - - appendBuffer(options, doneFn) { - const { - segmentInfo, - type, - bytes - } = options; - this.processedAppend_ = true; - if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) { - this.delayedAudioAppendQueue_.push([options, doneFn]); - this.logger_(`delayed audio append of ${bytes.length} until video append`); - return; - } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will - // not be fired. This means that the queue will be blocked until the next action - // taken by the segment-loader. Provide a mechanism for segment-loader to handle - // these errors by calling the doneFn with the specific error. - - const onError = doneFn; - pushQueue({ - type, - sourceUpdater: this, - action: actions.appendBuffer(bytes, segmentInfo || { - mediaIndex: -1 - }, onError), - doneFn, - name: 'appendBuffer' - }); - if (type === 'video') { - this.videoAppendQueued_ = true; - if (!this.delayedAudioAppendQueue_.length) { - return; - } - const queue = this.delayedAudioAppendQueue_.slice(); - this.logger_(`queuing delayed audio ${queue.length} appendBuffers`); - this.delayedAudioAppendQueue_.length = 0; - queue.forEach(que => { - this.appendBuffer.apply(this, que); - }); - } - } - /** - * Get the audio buffer's buffered timerange. - * - * @return {TimeRange} - * The audio buffer's buffered time range - */ - - audioBuffered() { - // no media source/source buffer or it isn't in the media sources - // source buffer list - if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) { - return createTimeRanges(); - } - return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges(); - } - /** - * Get the video buffer's buffered timerange. - * - * @return {TimeRange} - * The video buffer's buffered time range - */ - - videoBuffered() { - // no media source/source buffer or it isn't in the media sources - // source buffer list - if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) { - return createTimeRanges(); - } - return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges(); - } - /** - * Get a combined video/audio buffer's buffered timerange. - * - * @return {TimeRange} - * the combined time range - */ - - buffered() { - const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null; - const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null; - if (audio && !video) { - return this.audioBuffered(); - } - if (video && !audio) { - return this.videoBuffered(); - } - return bufferIntersection(this.audioBuffered(), this.videoBuffered()); - } - /** - * Add a callback to the queue that will set duration on the mediaSource. - * - * @param {number} duration - * The duration to set - * - * @param {Function} [doneFn] - * function to run after duration has been set. - */ - - setDuration(duration, doneFn = noop) { - // In order to set the duration on the media source, it's necessary to wait for all - // source buffers to no longer be updating. "If the updating attribute equals true on - // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and - // abort these steps." (source: https://www.w3.org/TR/media-source/#attributes). - pushQueue({ - type: 'mediaSource', - sourceUpdater: this, - action: actions.duration(duration), - name: 'duration', - doneFn - }); - } - /** - * Add a mediaSource endOfStream call to the queue - * - * @param {Error} [error] - * Call endOfStream with an error - * - * @param {Function} [doneFn] - * A function that should be called when the - * endOfStream call has finished. - */ - - endOfStream(error = null, doneFn = noop) { - if (typeof error !== 'string') { - error = undefined; - } // In order to set the duration on the media source, it's necessary to wait for all - // source buffers to no longer be updating. "If the updating attribute equals true on - // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and - // abort these steps." (source: https://www.w3.org/TR/media-source/#attributes). - - pushQueue({ - type: 'mediaSource', - sourceUpdater: this, - action: actions.endOfStream(error), - name: 'endOfStream', - doneFn - }); - } - /** - * Queue an update to remove a time range from the buffer. - * - * @param {number} start where to start the removal - * @param {number} end where to end the removal - * @param {Function} [done=noop] optional callback to be executed when the remove - * operation is complete - * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end - */ - - removeAudio(start, end, done = noop) { - if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) { - done(); - return; - } - pushQueue({ - type: 'audio', - sourceUpdater: this, - action: actions.remove(start, end), - doneFn: done, - name: 'remove' - }); - } - /** - * Queue an update to remove a time range from the buffer. - * - * @param {number} start where to start the removal - * @param {number} end where to end the removal - * @param {Function} [done=noop] optional callback to be executed when the remove - * operation is complete - * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end - */ - - removeVideo(start, end, done = noop) { - if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) { - done(); - return; - } - pushQueue({ - type: 'video', - sourceUpdater: this, - action: actions.remove(start, end), - doneFn: done, - name: 'remove' - }); - } - /** - * Whether the underlying sourceBuffer is updating or not - * - * @return {boolean} the updating status of the SourceBuffer - */ - - updating() { - // the audio/video source buffer is updating - if (updating('audio', this) || updating('video', this)) { - return true; - } - return false; - } - /** - * Set/get the timestampoffset on the audio SourceBuffer - * - * @return {number} the timestamp offset - */ - - audioTimestampOffset(offset) { - if (typeof offset !== 'undefined' && this.audioBuffer && - // no point in updating if it's the same - this.audioTimestampOffset_ !== offset) { - pushQueue({ - type: 'audio', - sourceUpdater: this, - action: actions.timestampOffset(offset), - name: 'timestampOffset' - }); - this.audioTimestampOffset_ = offset; - } - return this.audioTimestampOffset_; - } - /** - * Set/get the timestampoffset on the video SourceBuffer - * - * @return {number} the timestamp offset - */ - - videoTimestampOffset(offset) { - if (typeof offset !== 'undefined' && this.videoBuffer && - // no point in updating if it's the same - this.videoTimestampOffset !== offset) { - pushQueue({ - type: 'video', - sourceUpdater: this, - action: actions.timestampOffset(offset), - name: 'timestampOffset' - }); - this.videoTimestampOffset_ = offset; - } - return this.videoTimestampOffset_; - } - /** - * Add a function to the queue that will be called - * when it is its turn to run in the audio queue. - * - * @param {Function} callback - * The callback to queue. - */ - - audioQueueCallback(callback) { - if (!this.audioBuffer) { - return; - } - pushQueue({ - type: 'audio', - sourceUpdater: this, - action: actions.callback(callback), - name: 'callback' - }); - } - /** - * Add a function to the queue that will be called - * when it is its turn to run in the video queue. - * - * @param {Function} callback - * The callback to queue. - */ - - videoQueueCallback(callback) { - if (!this.videoBuffer) { - return; - } - pushQueue({ - type: 'video', - sourceUpdater: this, - action: actions.callback(callback), - name: 'callback' - }); - } - /** - * dispose of the source updater and the underlying sourceBuffer - */ - - dispose() { - this.trigger('dispose'); - bufferTypes.forEach(type => { - this.abort(type); - if (this.canRemoveSourceBuffer()) { - this.removeSourceBuffer(type); - } else { - this[`${type}QueueCallback`](() => cleanupBuffer(type, this)); - } - }); - this.videoAppendQueued_ = false; - this.delayedAudioAppendQueue_.length = 0; - if (this.sourceopenListener_) { - this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_); - } - this.off(); - } -} -const uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray))); - -/** - * @file vtt-segment-loader.js - */ -const VTT_LINE_TERMINATORS = new Uint8Array('\n\n'.split('').map(char => char.charCodeAt(0))); -class NoVttJsError extends Error { - constructor() { - super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.'); - } -} -/** - * An object that manages segment loading and appending. - * - * @class VTTSegmentLoader - * @param {Object} options required and optional options - * @extends videojs.EventTarget - */ - -class VTTSegmentLoader extends SegmentLoader { - constructor(settings, options = {}) { - super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error; - // however, VTTSegmentLoader has no need of a media source, so delete the reference - - this.mediaSource_ = null; - this.subtitlesTrack_ = null; - this.loaderType_ = 'subtitle'; - this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks; - this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in - // the sync controller leads to improper behavior. - - this.shouldSaveSegmentTimingInfo_ = false; - } - createTransmuxer_() { - // don't need to transmux any subtitles - return null; - } - /** - * Indicates which time ranges are buffered - * - * @return {TimeRange} - * TimeRange object representing the current buffered ranges - */ - - buffered_() { - if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) { - return createTimeRanges(); - } - const cues = this.subtitlesTrack_.cues; - const start = cues[0].startTime; - const end = cues[cues.length - 1].startTime; - return createTimeRanges([[start, end]]); - } - /** - * Gets and sets init segment for the provided map - * - * @param {Object} map - * The map object representing the init segment to get or set - * @param {boolean=} set - * If true, the init segment for the provided map should be saved - * @return {Object} - * map object for desired init segment - */ - - initSegmentForMap(map, set = false) { - if (!map) { - return null; - } - const id = initSegmentId(map); - let storedMap = this.initSegments_[id]; - if (set && !storedMap && map.bytes) { - // append WebVTT line terminators to the media initialization segment if it exists - // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that - // requires two or more WebVTT line terminators between the WebVTT header and the - // rest of the file - const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength; - const combinedSegment = new Uint8Array(combinedByteLength); - combinedSegment.set(map.bytes); - combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength); - this.initSegments_[id] = storedMap = { - resolvedUri: map.resolvedUri, - byterange: map.byterange, - bytes: combinedSegment - }; - } - return storedMap || map; - } - /** - * Returns true if all configuration required for loading is present, otherwise false. - * - * @return {boolean} True if the all configuration is ready for loading - * @private - */ - - couldBeginLoading_() { - return this.playlist_ && this.subtitlesTrack_ && !this.paused(); - } - /** - * Once all the starting parameters have been specified, begin - * operation. This method should only be invoked from the INIT - * state. - * - * @private - */ - - init_() { - this.state = 'READY'; - this.resetEverything(); - return this.monitorBuffer_(); - } - /** - * Set a subtitle track on the segment loader to add subtitles to - * - * @param {TextTrack=} track - * The text track to add loaded subtitles to - * @return {TextTrack} - * Returns the subtitles track - */ - - track(track) { - if (typeof track === 'undefined') { - return this.subtitlesTrack_; - } - this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start - // buffering now - - if (this.state === 'INIT' && this.couldBeginLoading_()) { - this.init_(); - } - return this.subtitlesTrack_; - } - /** - * Remove any data in the source buffer between start and end times - * - * @param {number} start - the start time of the region to remove from the buffer - * @param {number} end - the end time of the region to remove from the buffer - */ - - remove(start, end) { - removeCuesFromTrack(start, end, this.subtitlesTrack_); - } - /** - * fill the buffer with segements unless the sourceBuffers are - * currently updating - * - * Note: this function should only ever be called by monitorBuffer_ - * and never directly - * - * @private - */ - - fillBuffer_() { - // see if we need to begin loading immediately - const segmentInfo = this.chooseNextRequest_(); - if (!segmentInfo) { - return; - } - if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) { - // We don't have the timestamp offset that we need to sync subtitles. - // Rerun on a timestamp offset or user interaction. - const checkTimestampOffset = () => { - this.state = 'READY'; - if (!this.paused()) { - // if not paused, queue a buffer check as soon as possible - this.monitorBuffer_(); - } - }; - this.syncController_.one('timestampoffset', checkTimestampOffset); - this.state = 'WAITING_ON_TIMELINE'; - return; - } - this.loadSegment_(segmentInfo); - } // never set a timestamp offset for vtt segments. - - timestampOffsetForSegment_() { - return null; - } - chooseNextRequest_() { - return this.skipEmptySegments_(super.chooseNextRequest_()); - } - /** - * Prevents the segment loader from requesting segments we know contain no subtitles - * by walking forward until we find the next segment that we don't know whether it is - * empty or not. - * - * @param {Object} segmentInfo - * a segment info object that describes the current segment - * @return {Object} - * a segment info object that describes the current segment - */ - - skipEmptySegments_(segmentInfo) { - while (segmentInfo && segmentInfo.segment.empty) { - // stop at the last possible segmentInfo - if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) { - segmentInfo = null; - break; - } - segmentInfo = this.generateSegmentInfo_({ - playlist: segmentInfo.playlist, - mediaIndex: segmentInfo.mediaIndex + 1, - startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration, - isSyncRequest: segmentInfo.isSyncRequest - }); - } - return segmentInfo; - } - stopForError(error) { - this.error(error); - this.state = 'READY'; - this.pause(); - this.trigger('error'); - } - /** - * append a decrypted segement to the SourceBuffer through a SourceUpdater - * - * @private - */ - - segmentRequestFinished_(error, simpleSegment, result) { - if (!this.subtitlesTrack_) { - this.state = 'READY'; - return; - } - this.saveTransferStats_(simpleSegment.stats); // the request was aborted - - if (!this.pendingSegment_) { - this.state = 'READY'; - this.mediaRequestsAborted += 1; - return; - } - if (error) { - if (error.code === REQUEST_ERRORS.TIMEOUT) { - this.handleTimeout_(); - } - if (error.code === REQUEST_ERRORS.ABORTED) { - this.mediaRequestsAborted += 1; - } else { - this.mediaRequestsErrored += 1; - } - this.stopForError(error); - return; - } - const segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to - // maintain functionality between segment loaders - - this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache - - if (simpleSegment.key) { - this.segmentKey(simpleSegment.key, true); - } - this.state = 'APPENDING'; // used for tests - - this.trigger('appending'); - const segment = segmentInfo.segment; - if (segment.map) { - segment.map.bytes = simpleSegment.map.bytes; - } - segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading - - if (typeof (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT) !== 'function' && typeof this.loadVttJs === 'function') { - this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times - // script will be loaded once but multiple listeners will be added to the queue, which is expected. - - this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({ - message: 'Error loading vtt.js' - })); - return; - } - segment.requested = true; - try { - this.parseVTTCues_(segmentInfo); - } catch (e) { - this.stopForError({ - message: e.message - }); - return; - } - this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_); - if (segmentInfo.cues.length) { - segmentInfo.timingInfo = { - start: segmentInfo.cues[0].startTime, - end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime - }; - } else { - segmentInfo.timingInfo = { - start: segmentInfo.startOfSegment, - end: segmentInfo.startOfSegment + segmentInfo.duration - }; - } - if (segmentInfo.isSyncRequest) { - this.trigger('syncinfoupdate'); - this.pendingSegment_ = null; - this.state = 'READY'; - return; - } - segmentInfo.byteLength = segmentInfo.bytes.byteLength; - this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to - // the subtitle track - - segmentInfo.cues.forEach(cue => { - this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue)(cue.startTime, cue.endTime, cue.text) : cue); - }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows - // cues to have identical time-intervals, but if the text is also identical - // we can safely assume it is a duplicate that can be removed (ex. when a cue - // "overlaps" VTT segments) - - removeDuplicateCuesFromTrack(this.subtitlesTrack_); - this.handleAppendsDone_(); - } - handleData_() {// noop as we shouldn't be getting video/audio data captions - // that we do not support here. - } - updateTimingInfoEnd_() {// noop - } - /** - * Uses the WebVTT parser to parse the segment response - * - * @throws NoVttJsError - * - * @param {Object} segmentInfo - * a segment info object that describes the current segment - * @private - */ - - parseVTTCues_(segmentInfo) { - let decoder; - let decodeBytesToString = false; - if (typeof (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT) !== 'function') { - // caller is responsible for exception handling. - throw new NoVttJsError(); - } - if (typeof (global_window__WEBPACK_IMPORTED_MODULE_0___default().TextDecoder) === 'function') { - decoder = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().TextDecoder)('utf8'); - } else { - decoder = global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT.StringDecoder(); - decodeBytesToString = true; - } - const parser = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT).Parser((global_window__WEBPACK_IMPORTED_MODULE_0___default()), (global_window__WEBPACK_IMPORTED_MODULE_0___default().vttjs), decoder); - segmentInfo.cues = []; - segmentInfo.timestampmap = { - MPEGTS: 0, - LOCAL: 0 - }; - parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues); - parser.ontimestampmap = map => { - segmentInfo.timestampmap = map; - }; - parser.onparsingerror = error => { - videojs.log.warn('Error encountered when parsing cues: ' + error.message); - }; - if (segmentInfo.segment.map) { - let mapData = segmentInfo.segment.map.bytes; - if (decodeBytesToString) { - mapData = uint8ToUtf8(mapData); - } - parser.parse(mapData); - } - let segmentData = segmentInfo.bytes; - if (decodeBytesToString) { - segmentData = uint8ToUtf8(segmentData); - } - parser.parse(segmentData); - parser.flush(); - } - /** - * Updates the start and end times of any cues parsed by the WebVTT parser using - * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping - * from the SyncController - * - * @param {Object} segmentInfo - * a segment info object that describes the current segment - * @param {Object} mappingObj - * object containing a mapping from TS to media time - * @param {Object} playlist - * the playlist object containing the segment - * @private - */ - - updateTimeMapping_(segmentInfo, mappingObj, playlist) { - const segment = segmentInfo.segment; - if (!mappingObj) { - // If the sync controller does not have a mapping of TS to Media Time for the - // timeline, then we don't have enough information to update the cue - // start/end times - return; - } - if (!segmentInfo.cues.length) { - // If there are no cues, we also do not have enough information to figure out - // segment timing. Mark that the segment contains no cues so we don't re-request - // an empty segment. - segment.empty = true; - return; - } - const timestampmap = segmentInfo.timestampmap; - const diff = timestampmap.MPEGTS / mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_16__.ONE_SECOND_IN_TS - timestampmap.LOCAL + mappingObj.mapping; - segmentInfo.cues.forEach(cue => { - // First convert cue time to TS time using the timestamp-map provided within the vtt - cue.startTime += diff; - cue.endTime += diff; - }); - if (!playlist.syncInfo) { - const firstStart = segmentInfo.cues[0].startTime; - const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime; - playlist.syncInfo = { - mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex, - time: Math.min(firstStart, lastStart - segment.duration) - }; - } - } -} - -/** - * @file ad-cue-tags.js - */ -/** - * Searches for an ad cue that overlaps with the given mediaTime - * - * @param {Object} track - * the track to find the cue for - * - * @param {number} mediaTime - * the time to find the cue at - * - * @return {Object|null} - * the found cue or null - */ - -const findAdCue = function (track, mediaTime) { - const cues = track.cues; - for (let i = 0; i < cues.length; i++) { - const cue = cues[i]; - if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) { - return cue; - } - } - return null; -}; -const updateAdCues = function (media, track, offset = 0) { - if (!media.segments) { - return; - } - let mediaTime = offset; - let cue; - for (let i = 0; i < media.segments.length; i++) { - const segment = media.segments[i]; - if (!cue) { - // Since the cues will span for at least the segment duration, adding a fudge - // factor of half segment duration will prevent duplicate cues from being - // created when timing info is not exact (e.g. cue start time initialized - // at 10.006677, but next call mediaTime is 10.003332 ) - cue = findAdCue(track, mediaTime + segment.duration / 2); - } - if (cue) { - if ('cueIn' in segment) { - // Found a CUE-IN so end the cue - cue.endTime = mediaTime; - cue.adEndTime = mediaTime; - mediaTime += segment.duration; - cue = null; - continue; - } - if (mediaTime < cue.endTime) { - // Already processed this mediaTime for this cue - mediaTime += segment.duration; - continue; - } // otherwise extend cue until a CUE-IN is found - - cue.endTime += segment.duration; - } else { - if ('cueOut' in segment) { - cue = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue)(mediaTime, mediaTime + segment.duration, segment.cueOut); - cue.adStartTime = mediaTime; // Assumes tag format to be - // #EXT-X-CUE-OUT:30 - - cue.adEndTime = mediaTime + parseFloat(segment.cueOut); - track.addCue(cue); - } - if ('cueOutCont' in segment) { - // Entered into the middle of an ad cue - // Assumes tag formate to be - // #EXT-X-CUE-OUT-CONT:10/30 - const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat); - cue = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().VTTCue)(mediaTime, mediaTime + segment.duration, ''); - cue.adStartTime = mediaTime - adOffset; - cue.adEndTime = cue.adStartTime + adTotal; - track.addCue(cue); - } - } - mediaTime += segment.duration; - } -}; - -/** - * @file sync-controller.js - */ -// synchronize expired playlist segments. -// the max media sequence diff is 48 hours of live stream -// content with two second segments. Anything larger than that -// will likely be invalid. - -const MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400; -const syncPointStrategies = [ -// Stategy "VOD": Handle the VOD-case where the sync-point is *always* -// the equivalence display-time 0 === segment-index 0 -{ - name: 'VOD', - run: (syncController, playlist, duration, currentTimeline, currentTime) => { - if (duration !== Infinity) { - const syncPoint = { - time: 0, - segmentIndex: 0, - partIndex: null - }; - return syncPoint; - } - return null; - } -}, -// Stategy "ProgramDateTime": We have a program-date-time tag in this playlist -{ - name: 'ProgramDateTime', - run: (syncController, playlist, duration, currentTimeline, currentTime) => { - if (!Object.keys(syncController.timelineToDatetimeMappings).length) { - return null; - } - let syncPoint = null; - let lastDistance = null; - const partsAndSegments = getPartsAndSegments(playlist); - currentTime = currentTime || 0; - for (let i = 0; i < partsAndSegments.length; i++) { - // start from the end and loop backwards for live - // or start from the front and loop forwards for non-live - const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1); - const partAndSegment = partsAndSegments[index]; - const segment = partAndSegment.segment; - const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline]; - if (!datetimeMapping || !segment.dateTimeObject) { - continue; - } - const segmentTime = segment.dateTimeObject.getTime() / 1000; - let start = segmentTime + datetimeMapping; // take part duration into account. - - if (segment.parts && typeof partAndSegment.partIndex === 'number') { - for (let z = 0; z < partAndSegment.partIndex; z++) { - start += segment.parts[z].duration; - } - } - const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed - // currentTime and can stop looking for better candidates - - if (lastDistance !== null && (distance === 0 || lastDistance < distance)) { - break; - } - lastDistance = distance; - syncPoint = { - time: start, - segmentIndex: partAndSegment.segmentIndex, - partIndex: partAndSegment.partIndex - }; - } - return syncPoint; - } -}, -// Stategy "Segment": We have a known time mapping for a timeline and a -// segment in the current timeline with timing data -{ - name: 'Segment', - run: (syncController, playlist, duration, currentTimeline, currentTime) => { - let syncPoint = null; - let lastDistance = null; - currentTime = currentTime || 0; - const partsAndSegments = getPartsAndSegments(playlist); - for (let i = 0; i < partsAndSegments.length; i++) { - // start from the end and loop backwards for live - // or start from the front and loop forwards for non-live - const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1); - const partAndSegment = partsAndSegments[index]; - const segment = partAndSegment.segment; - const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start; - if (segment.timeline === currentTimeline && typeof start !== 'undefined') { - const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed - // currentTime and can stop looking for better candidates - - if (lastDistance !== null && lastDistance < distance) { - break; - } - if (!syncPoint || lastDistance === null || lastDistance >= distance) { - lastDistance = distance; - syncPoint = { - time: start, - segmentIndex: partAndSegment.segmentIndex, - partIndex: partAndSegment.partIndex - }; - } - } - } - return syncPoint; - } -}, -// Stategy "Discontinuity": We have a discontinuity with a known -// display-time -{ - name: 'Discontinuity', - run: (syncController, playlist, duration, currentTimeline, currentTime) => { - let syncPoint = null; - currentTime = currentTime || 0; - if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) { - let lastDistance = null; - for (let i = 0; i < playlist.discontinuityStarts.length; i++) { - const segmentIndex = playlist.discontinuityStarts[i]; - const discontinuity = playlist.discontinuitySequence + i + 1; - const discontinuitySync = syncController.discontinuities[discontinuity]; - if (discontinuitySync) { - const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed - // currentTime and can stop looking for better candidates - - if (lastDistance !== null && lastDistance < distance) { - break; - } - if (!syncPoint || lastDistance === null || lastDistance >= distance) { - lastDistance = distance; - syncPoint = { - time: discontinuitySync.time, - segmentIndex, - partIndex: null - }; - } - } - } - } - return syncPoint; - } -}, -// Stategy "Playlist": We have a playlist with a known mapping of -// segment index to display time -{ - name: 'Playlist', - run: (syncController, playlist, duration, currentTimeline, currentTime) => { - if (playlist.syncInfo) { - const syncPoint = { - time: playlist.syncInfo.time, - segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence, - partIndex: null - }; - return syncPoint; - } - return null; - } -}]; -class SyncController extends videojs.EventTarget { - constructor(options = {}) { - super(); // ...for synching across variants - - this.timelines = []; - this.discontinuities = []; - this.timelineToDatetimeMappings = {}; - this.logger_ = logger('SyncController'); - } - /** - * Find a sync-point for the playlist specified - * - * A sync-point is defined as a known mapping from display-time to - * a segment-index in the current playlist. - * - * @param {Playlist} playlist - * The playlist that needs a sync-point - * @param {number} duration - * Duration of the MediaSource (Infinite if playing a live source) - * @param {number} currentTimeline - * The last timeline from which a segment was loaded - * @return {Object} - * A sync-point object - */ - - getSyncPoint(playlist, duration, currentTimeline, currentTime) { - const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime); - if (!syncPoints.length) { - // Signal that we need to attempt to get a sync-point manually - // by fetching a segment in the playlist and constructing - // a sync-point from that information - return null; - } // Now find the sync-point that is closest to the currentTime because - // that should result in the most accurate guess about which segment - // to fetch - - return this.selectSyncPoint_(syncPoints, { - key: 'time', - value: currentTime - }); - } - /** - * Calculate the amount of time that has expired off the playlist during playback - * - * @param {Playlist} playlist - * Playlist object to calculate expired from - * @param {number} duration - * Duration of the MediaSource (Infinity if playling a live source) - * @return {number|null} - * The amount of time that has expired off the playlist during playback. Null - * if no sync-points for the playlist can be found. - */ - - getExpiredTime(playlist, duration) { - if (!playlist || !playlist.segments) { - return null; - } - const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time - - if (!syncPoints.length) { - return null; - } - const syncPoint = this.selectSyncPoint_(syncPoints, { - key: 'segmentIndex', - value: 0 - }); // If the sync-point is beyond the start of the playlist, we want to subtract the - // duration from index 0 to syncPoint.segmentIndex instead of adding. - - if (syncPoint.segmentIndex > 0) { - syncPoint.time *= -1; - } - return Math.abs(syncPoint.time + sumDurations({ - defaultDuration: playlist.targetDuration, - durationList: playlist.segments, - startIndex: syncPoint.segmentIndex, - endIndex: 0 - })); - } - /** - * Runs each sync-point strategy and returns a list of sync-points returned by the - * strategies - * - * @private - * @param {Playlist} playlist - * The playlist that needs a sync-point - * @param {number} duration - * Duration of the MediaSource (Infinity if playing a live source) - * @param {number} currentTimeline - * The last timeline from which a segment was loaded - * @return {Array} - * A list of sync-point objects - */ - - runStrategies_(playlist, duration, currentTimeline, currentTime) { - const syncPoints = []; // Try to find a sync-point in by utilizing various strategies... - - for (let i = 0; i < syncPointStrategies.length; i++) { - const strategy = syncPointStrategies[i]; - const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime); - if (syncPoint) { - syncPoint.strategy = strategy.name; - syncPoints.push({ - strategy: strategy.name, - syncPoint - }); - } - } - return syncPoints; - } - /** - * Selects the sync-point nearest the specified target - * - * @private - * @param {Array} syncPoints - * List of sync-points to select from - * @param {Object} target - * Object specifying the property and value we are targeting - * @param {string} target.key - * Specifies the property to target. Must be either 'time' or 'segmentIndex' - * @param {number} target.value - * The value to target for the specified key. - * @return {Object} - * The sync-point nearest the target - */ - - selectSyncPoint_(syncPoints, target) { - let bestSyncPoint = syncPoints[0].syncPoint; - let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value); - let bestStrategy = syncPoints[0].strategy; - for (let i = 1; i < syncPoints.length; i++) { - const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value); - if (newDistance < bestDistance) { - bestDistance = newDistance; - bestSyncPoint = syncPoints[i].syncPoint; - bestStrategy = syncPoints[i].strategy; - } - } - this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']'); - return bestSyncPoint; - } - /** - * Save any meta-data present on the segments when segments leave - * the live window to the playlist to allow for synchronization at the - * playlist level later. - * - * @param {Playlist} oldPlaylist - The previous active playlist - * @param {Playlist} newPlaylist - The updated and most current playlist - */ - - saveExpiredSegmentInfo(oldPlaylist, newPlaylist) { - const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps - - if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) { - videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`); - return; - } // When a segment expires from the playlist and it has a start time - // save that information as a possible sync-point reference in future - - for (let i = mediaSequenceDiff - 1; i >= 0; i--) { - const lastRemovedSegment = oldPlaylist.segments[i]; - if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') { - newPlaylist.syncInfo = { - mediaSequence: oldPlaylist.mediaSequence + i, - time: lastRemovedSegment.start - }; - this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`); - this.trigger('syncinfoupdate'); - break; - } - } - } - /** - * Save the mapping from playlist's ProgramDateTime to display. This should only happen - * before segments start to load. - * - * @param {Playlist} playlist - The currently active playlist - */ - - setDateTimeMappingForStart(playlist) { - // It's possible for the playlist to be updated before playback starts, meaning time - // zero is not yet set. If, during these playlist refreshes, a discontinuity is - // crossed, then the old time zero mapping (for the prior timeline) would be retained - // unless the mappings are cleared. - this.timelineToDatetimeMappings = {}; - if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) { - const firstSegment = playlist.segments[0]; - const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000; - this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp; - } - } - /** - * Calculates and saves timeline mappings, playlist sync info, and segment timing values - * based on the latest timing information. - * - * @param {Object} options - * Options object - * @param {SegmentInfo} options.segmentInfo - * The current active request information - * @param {boolean} options.shouldSaveTimelineMapping - * If there's a timeline change, determines if the timeline mapping should be - * saved for timeline mapping and program date time mappings. - */ - - saveSegmentTimingInfo({ - segmentInfo, - shouldSaveTimelineMapping - }) { - const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping); - const segment = segmentInfo.segment; - if (didCalculateSegmentTimeMapping) { - this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information - // now with segment timing information - - if (!segmentInfo.playlist.syncInfo) { - segmentInfo.playlist.syncInfo = { - mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex, - time: segment.start - }; - } - } - const dateTime = segment.dateTimeObject; - if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) { - this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000); - } - } - timestampOffsetForTimeline(timeline) { - if (typeof this.timelines[timeline] === 'undefined') { - return null; - } - return this.timelines[timeline].time; - } - mappingForTimeline(timeline) { - if (typeof this.timelines[timeline] === 'undefined') { - return null; - } - return this.timelines[timeline].mapping; - } - /** - * Use the "media time" for a segment to generate a mapping to "display time" and - * save that display time to the segment. - * - * @private - * @param {SegmentInfo} segmentInfo - * The current active request information - * @param {Object} timingInfo - * The start and end time of the current segment in "media time" - * @param {boolean} shouldSaveTimelineMapping - * If there's a timeline change, determines if the timeline mapping should be - * saved in timelines. - * @return {boolean} - * Returns false if segment time mapping could not be calculated - */ - - calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) { - // TODO: remove side effects - const segment = segmentInfo.segment; - const part = segmentInfo.part; - let mappingObj = this.timelines[segmentInfo.timeline]; - let start; - let end; - if (typeof segmentInfo.timestampOffset === 'number') { - mappingObj = { - time: segmentInfo.startOfSegment, - mapping: segmentInfo.startOfSegment - timingInfo.start - }; - if (shouldSaveTimelineMapping) { - this.timelines[segmentInfo.timeline] = mappingObj; - this.trigger('timestampoffset'); - this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`); - } - start = segmentInfo.startOfSegment; - end = timingInfo.end + mappingObj.mapping; - } else if (mappingObj) { - start = timingInfo.start + mappingObj.mapping; - end = timingInfo.end + mappingObj.mapping; - } else { - return false; - } - if (part) { - part.start = start; - part.end = end; - } // If we don't have a segment start yet or the start value we got - // is less than our current segment.start value, save a new start value. - // We have to do this because parts will have segment timing info saved - // multiple times and we want segment start to be the earliest part start - // value for that segment. - - if (!segment.start || start < segment.start) { - segment.start = start; - } - segment.end = end; - return true; - } - /** - * Each time we have discontinuity in the playlist, attempt to calculate the location - * in display of the start of the discontinuity and save that. We also save an accuracy - * value so that we save values with the most accuracy (closest to 0.) - * - * @private - * @param {SegmentInfo} segmentInfo - The current active request information - */ - - saveDiscontinuitySyncInfo_(segmentInfo) { - const playlist = segmentInfo.playlist; - const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where - // the start of the range and it's accuracy is 0 (greater accuracy values - // mean more approximation) - - if (segment.discontinuity) { - this.discontinuities[segment.timeline] = { - time: segment.start, - accuracy: 0 - }; - } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) { - // Search for future discontinuities that we can provide better timing - // information for and save that information for sync purposes - for (let i = 0; i < playlist.discontinuityStarts.length; i++) { - const segmentIndex = playlist.discontinuityStarts[i]; - const discontinuity = playlist.discontinuitySequence + i + 1; - const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex; - const accuracy = Math.abs(mediaIndexDiff); - if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) { - let time; - if (mediaIndexDiff < 0) { - time = segment.start - sumDurations({ - defaultDuration: playlist.targetDuration, - durationList: playlist.segments, - startIndex: segmentInfo.mediaIndex, - endIndex: segmentIndex - }); - } else { - time = segment.end + sumDurations({ - defaultDuration: playlist.targetDuration, - durationList: playlist.segments, - startIndex: segmentInfo.mediaIndex + 1, - endIndex: segmentIndex - }); - } - this.discontinuities[discontinuity] = { - time, - accuracy - }; - } - } - } - } - dispose() { - this.trigger('dispose'); - this.off(); - } -} - -/** - * The TimelineChangeController acts as a source for segment loaders to listen for and - * keep track of latest and pending timeline changes. This is useful to ensure proper - * sync, as each loader may need to make a consideration for what timeline the other - * loader is on before making changes which could impact the other loader's media. - * - * @class TimelineChangeController - * @extends videojs.EventTarget - */ - -class TimelineChangeController extends videojs.EventTarget { - constructor() { - super(); - this.pendingTimelineChanges_ = {}; - this.lastTimelineChanges_ = {}; - } - clearPendingTimelineChange(type) { - this.pendingTimelineChanges_[type] = null; - this.trigger('pendingtimelinechange'); - } - pendingTimelineChange({ - type, - from, - to - }) { - if (typeof from === 'number' && typeof to === 'number') { - this.pendingTimelineChanges_[type] = { - type, - from, - to - }; - this.trigger('pendingtimelinechange'); - } - return this.pendingTimelineChanges_[type]; - } - lastTimelineChange({ - type, - from, - to - }) { - if (typeof from === 'number' && typeof to === 'number') { - this.lastTimelineChanges_[type] = { - type, - from, - to - }; - delete this.pendingTimelineChanges_[type]; - this.trigger('timelinechange'); - } - return this.lastTimelineChanges_[type]; - } - dispose() { - this.trigger('dispose'); - this.pendingTimelineChanges_ = {}; - this.lastTimelineChanges_ = {}; - this.off(); - } -} - -/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */ -const workerCode = transform(getWorkerString(function () { - /** - * @file stream.js - */ - - /** - * A lightweight readable stream implemention that handles event dispatching. - * - * @class Stream - */ - - var Stream = /*#__PURE__*/function () { - function Stream() { - this.listeners = {}; - } - /** - * Add a listener for a specified event type. - * - * @param {string} type the event name - * @param {Function} listener the callback to be invoked when an event of - * the specified type occurs - */ - - var _proto = Stream.prototype; - _proto.on = function on(type, listener) { - if (!this.listeners[type]) { - this.listeners[type] = []; - } - this.listeners[type].push(listener); - } - /** - * Remove a listener for a specified event type. - * - * @param {string} type the event name - * @param {Function} listener a function previously registered for this - * type of event through `on` - * @return {boolean} if we could turn it off or not - */; - - _proto.off = function off(type, listener) { - if (!this.listeners[type]) { - return false; - } - var index = this.listeners[type].indexOf(listener); // TODO: which is better? - // In Video.js we slice listener functions - // on trigger so that it does not mess up the order - // while we loop through. - // - // Here we slice on off so that the loop in trigger - // can continue using it's old reference to loop without - // messing up the order. - - this.listeners[type] = this.listeners[type].slice(0); - this.listeners[type].splice(index, 1); - return index > -1; - } - /** - * Trigger an event of the specified type on this stream. Any additional - * arguments to this function are passed as parameters to event listeners. - * - * @param {string} type the event name - */; - - _proto.trigger = function trigger(type) { - var callbacks = this.listeners[type]; - if (!callbacks) { - return; - } // Slicing the arguments on every invocation of this method - // can add a significant amount of overhead. Avoid the - // intermediate object creation for the common case of a - // single callback argument - - if (arguments.length === 2) { - var length = callbacks.length; - for (var i = 0; i < length; ++i) { - callbacks[i].call(this, arguments[1]); - } - } else { - var args = Array.prototype.slice.call(arguments, 1); - var _length = callbacks.length; - for (var _i = 0; _i < _length; ++_i) { - callbacks[_i].apply(this, args); - } - } - } - /** - * Destroys the stream and cleans up. - */; - - _proto.dispose = function dispose() { - this.listeners = {}; - } - /** - * Forwards all `data` events on this stream to the destination stream. The - * destination stream should provide a method `push` to receive the data - * events as they arrive. - * - * @param {Stream} destination the stream that will receive all `data` events - * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options - */; - - _proto.pipe = function pipe(destination) { - this.on('data', function (data) { - destination.push(data); - }); - }; - return Stream; - }(); - /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */ - - /** - * Returns the subarray of a Uint8Array without PKCS#7 padding. - * - * @param padded {Uint8Array} unencrypted bytes that have been padded - * @return {Uint8Array} the unpadded bytes - * @see http://tools.ietf.org/html/rfc5652 - */ - - function unpad(padded) { - return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]); - } - /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */ - - /** - * @file aes.js - * - * This file contains an adaptation of the AES decryption algorithm - * from the Standford Javascript Cryptography Library. That work is - * covered by the following copyright and permissions notice: - * - * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation - * are those of the authors and should not be interpreted as representing - * official policies, either expressed or implied, of the authors. - */ - - /** - * Expand the S-box tables. - * - * @private - */ - - const precompute = function () { - const tables = [[[], [], [], [], []], [[], [], [], [], []]]; - const encTable = tables[0]; - const decTable = tables[1]; - const sbox = encTable[4]; - const sboxInv = decTable[4]; - let i; - let x; - let xInv; - const d = []; - const th = []; - let x2; - let x4; - let x8; - let s; - let tEnc; - let tDec; // Compute double and third tables - - for (i = 0; i < 256; i++) { - th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i; - } - for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) { - // Compute sbox - s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4; - s = s >> 8 ^ s & 255 ^ 99; - sbox[x] = s; - sboxInv[s] = x; // Compute MixColumns - - x8 = d[x4 = d[x2 = d[x]]]; - tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100; - tEnc = d[s] * 0x101 ^ s * 0x1010100; - for (i = 0; i < 4; i++) { - encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8; - decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8; - } - } // Compactify. Considerable speedup on Firefox. - - for (i = 0; i < 5; i++) { - encTable[i] = encTable[i].slice(0); - decTable[i] = decTable[i].slice(0); - } - return tables; - }; - let aesTables = null; - /** - * Schedule out an AES key for both encryption and decryption. This - * is a low-level class. Use a cipher mode to do bulk encryption. - * - * @class AES - * @param key {Array} The key as an array of 4, 6 or 8 words. - */ - - class AES { - constructor(key) { - /** - * The expanded S-box and inverse S-box tables. These will be computed - * on the client so that we don't have to send them down the wire. - * - * There are two tables, _tables[0] is for encryption and - * _tables[1] is for decryption. - * - * The first 4 sub-tables are the expanded S-box with MixColumns. The - * last (_tables[01][4]) is the S-box itself. - * - * @private - */ - // if we have yet to precompute the S-box tables - // do so now - if (!aesTables) { - aesTables = precompute(); - } // then make a copy of that object for use - - this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]]; - let i; - let j; - let tmp; - const sbox = this._tables[0][4]; - const decTable = this._tables[1]; - const keyLen = key.length; - let rcon = 1; - if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) { - throw new Error('Invalid aes key size'); - } - const encKey = key.slice(0); - const decKey = []; - this._key = [encKey, decKey]; // schedule encryption keys - - for (i = keyLen; i < 4 * keyLen + 28; i++) { - tmp = encKey[i - 1]; // apply sbox - - if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) { - tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon - - if (i % keyLen === 0) { - tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24; - rcon = rcon << 1 ^ (rcon >> 7) * 283; - } - } - encKey[i] = encKey[i - keyLen] ^ tmp; - } // schedule decryption keys - - for (j = 0; i; j++, i--) { - tmp = encKey[j & 3 ? i : i - 4]; - if (i <= 4 || j < 4) { - decKey[j] = tmp; - } else { - decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]]; - } - } - } - /** - * Decrypt 16 bytes, specified as four 32-bit words. - * - * @param {number} encrypted0 the first word to decrypt - * @param {number} encrypted1 the second word to decrypt - * @param {number} encrypted2 the third word to decrypt - * @param {number} encrypted3 the fourth word to decrypt - * @param {Int32Array} out the array to write the decrypted words - * into - * @param {number} offset the offset into the output array to start - * writing results - * @return {Array} The plaintext. - */ - - decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) { - const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data - - let a = encrypted0 ^ key[0]; - let b = encrypted3 ^ key[1]; - let c = encrypted2 ^ key[2]; - let d = encrypted1 ^ key[3]; - let a2; - let b2; - let c2; // key.length === 2 ? - - const nInnerRounds = key.length / 4 - 2; - let i; - let kIndex = 4; - const table = this._tables[1]; // load up the tables - - const table0 = table[0]; - const table1 = table[1]; - const table2 = table[2]; - const table3 = table[3]; - const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL. - - for (i = 0; i < nInnerRounds; i++) { - a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex]; - b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1]; - c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2]; - d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3]; - kIndex += 4; - a = a2; - b = b2; - c = c2; - } // Last round. - - for (i = 0; i < 4; i++) { - out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++]; - a2 = a; - a = b; - b = c; - c = d; - d = a2; - } - } - } - /** - * @file async-stream.js - */ - - /** - * A wrapper around the Stream class to use setTimeout - * and run stream "jobs" Asynchronously - * - * @class AsyncStream - * @extends Stream - */ - - class AsyncStream extends Stream { - constructor() { - super(Stream); - this.jobs = []; - this.delay = 1; - this.timeout_ = null; - } - /** - * process an async job - * - * @private - */ - - processJob_() { - this.jobs.shift()(); - if (this.jobs.length) { - this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay); - } else { - this.timeout_ = null; - } - } - /** - * push a job into the stream - * - * @param {Function} job the job to push into the stream - */ - - push(job) { - this.jobs.push(job); - if (!this.timeout_) { - this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay); - } - } - } - /** - * @file decrypter.js - * - * An asynchronous implementation of AES-128 CBC decryption with - * PKCS#7 padding. - */ - - /** - * Convert network-order (big-endian) bytes into their little-endian - * representation. - */ - - const ntoh = function (word) { - return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24; - }; - /** - * Decrypt bytes using AES-128 with CBC and PKCS#7 padding. - * - * @param {Uint8Array} encrypted the encrypted bytes - * @param {Uint32Array} key the bytes of the decryption key - * @param {Uint32Array} initVector the initialization vector (IV) to - * use for the first round of CBC. - * @return {Uint8Array} the decrypted bytes - * - * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard - * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29 - * @see https://tools.ietf.org/html/rfc2315 - */ - - const decrypt = function (encrypted, key, initVector) { - // word-level access to the encrypted bytes - const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2); - const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output - - const decrypted = new Uint8Array(encrypted.byteLength); - const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and - // decrypted data - - let init0; - let init1; - let init2; - let init3; - let encrypted0; - let encrypted1; - let encrypted2; - let encrypted3; // iteration variable - - let wordIx; // pull out the words of the IV to ensure we don't modify the - // passed-in reference and easier access - - init0 = initVector[0]; - init1 = initVector[1]; - init2 = initVector[2]; - init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC) - // to each decrypted block - - for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) { - // convert big-endian (network order) words into little-endian - // (javascript order) - encrypted0 = ntoh(encrypted32[wordIx]); - encrypted1 = ntoh(encrypted32[wordIx + 1]); - encrypted2 = ntoh(encrypted32[wordIx + 2]); - encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block - - decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the - // plaintext - - decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0); - decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1); - decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2); - decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round - - init0 = encrypted0; - init1 = encrypted1; - init2 = encrypted2; - init3 = encrypted3; - } - return decrypted; - }; - /** - * The `Decrypter` class that manages decryption of AES - * data through `AsyncStream` objects and the `decrypt` - * function - * - * @param {Uint8Array} encrypted the encrypted bytes - * @param {Uint32Array} key the bytes of the decryption key - * @param {Uint32Array} initVector the initialization vector (IV) to - * @param {Function} done the function to run when done - * @class Decrypter - */ - - class Decrypter { - constructor(encrypted, key, initVector, done) { - const step = Decrypter.STEP; - const encrypted32 = new Int32Array(encrypted.buffer); - const decrypted = new Uint8Array(encrypted.byteLength); - let i = 0; - this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously - - this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted)); - for (i = step; i < encrypted32.length; i += step) { - initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]); - this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted)); - } // invoke the done() callback when everything is finished - - this.asyncStream_.push(function () { - // remove pkcs#7 padding from the decrypted bytes - done(null, unpad(decrypted)); - }); - } - /** - * a getter for step the maximum number of bytes to process at one time - * - * @return {number} the value of step 32000 - */ - - static get STEP() { - // 4 * 8000; - return 32000; - } - /** - * @private - */ - - decryptChunk_(encrypted, key, initVector, decrypted) { - return function () { - const bytes = decrypt(encrypted, key, initVector); - decrypted.set(bytes, encrypted.byteOffset); - }; - } - } - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {}; - var win; - if (typeof window !== "undefined") { - win = window; - } else if (typeof commonjsGlobal !== "undefined") { - win = commonjsGlobal; - } else if (typeof self !== "undefined") { - win = self; - } else { - win = {}; - } - var window_1 = win; - var isArrayBufferView = function isArrayBufferView(obj) { - if (ArrayBuffer.isView === 'function') { - return ArrayBuffer.isView(obj); - } - return obj && obj.buffer instanceof ArrayBuffer; - }; - var BigInt = window_1.BigInt || Number; - [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')]; - (function () { - var a = new Uint16Array([0xFFCC]); - var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength); - if (b[0] === 0xFF) { - return 'big'; - } - if (b[0] === 0xCC) { - return 'little'; - } - return 'unknown'; - })(); - /** - * Creates an object for sending to a web worker modifying properties that are TypedArrays - * into a new object with seperated properties for the buffer, byteOffset, and byteLength. - * - * @param {Object} message - * Object of properties and values to send to the web worker - * @return {Object} - * Modified message with TypedArray values expanded - * @function createTransferableMessage - */ - - const createTransferableMessage = function (message) { - const transferable = {}; - Object.keys(message).forEach(key => { - const value = message[key]; - if (isArrayBufferView(value)) { - transferable[key] = { - bytes: value.buffer, - byteOffset: value.byteOffset, - byteLength: value.byteLength - }; - } else { - transferable[key] = value; - } - }); - return transferable; - }; - /* global self */ - - /** - * Our web worker interface so that things can talk to aes-decrypter - * that will be running in a web worker. the scope is passed to this by - * webworkify. - */ - - self.onmessage = function (event) { - const data = event.data; - const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength); - const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4); - const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4); - /* eslint-disable no-new, handle-callback-err */ - - new Decrypter(encrypted, key, iv, function (err, bytes) { - self.postMessage(createTransferableMessage({ - source: data.source, - decrypted: bytes - }), [bytes.buffer]); - }); - /* eslint-enable */ - }; -})); - -var Decrypter = factory(workerCode); -/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */ - -/** - * Convert the properties of an HLS track into an audioTrackKind. - * - * @private - */ - -const audioTrackKind_ = properties => { - let kind = properties.default ? 'main' : 'alternative'; - if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) { - kind = 'main-desc'; - } - return kind; -}; -/** - * Pause provided segment loader and playlist loader if active - * - * @param {SegmentLoader} segmentLoader - * SegmentLoader to pause - * @param {Object} mediaType - * Active media type - * @function stopLoaders - */ - -const stopLoaders = (segmentLoader, mediaType) => { - segmentLoader.abort(); - segmentLoader.pause(); - if (mediaType && mediaType.activePlaylistLoader) { - mediaType.activePlaylistLoader.pause(); - mediaType.activePlaylistLoader = null; - } -}; -/** - * Start loading provided segment loader and playlist loader - * - * @param {PlaylistLoader} playlistLoader - * PlaylistLoader to start loading - * @param {Object} mediaType - * Active media type - * @function startLoaders - */ - -const startLoaders = (playlistLoader, mediaType) => { - // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the - // playlist loader - mediaType.activePlaylistLoader = playlistLoader; - playlistLoader.load(); -}; -/** - * Returns a function to be called when the media group changes. It performs a - * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a - * change of group is merely a rendition switch of the same content at another encoding, - * rather than a change of content, such as switching audio from English to Spanish. - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Handler for a non-destructive resync of SegmentLoader when the active media - * group changes. - * @function onGroupChanged - */ - -const onGroupChanged = (type, settings) => () => { - const { - segmentLoaders: { - [type]: segmentLoader, - main: mainSegmentLoader - }, - mediaTypes: { - [type]: mediaType - } - } = settings; - const activeTrack = mediaType.activeTrack(); - const activeGroup = mediaType.getActiveGroup(); - const previousActiveLoader = mediaType.activePlaylistLoader; - const lastGroup = mediaType.lastGroup_; // the group did not change do nothing - - if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) { - return; - } - mediaType.lastGroup_ = activeGroup; - mediaType.lastTrack_ = activeTrack; - stopLoaders(segmentLoader, mediaType); - if (!activeGroup || activeGroup.isMainPlaylist) { - // there is no group active or active group is a main playlist and won't change - return; - } - if (!activeGroup.playlistLoader) { - if (previousActiveLoader) { - // The previous group had a playlist loader but the new active group does not - // this means we are switching from demuxed to muxed audio. In this case we want to - // do a destructive reset of the main segment loader and not restart the audio - // loaders. - mainSegmentLoader.resetEverything(); - } - return; - } // Non-destructive resync - - segmentLoader.resyncLoader(); - startLoaders(activeGroup.playlistLoader, mediaType); -}; -const onGroupChanging = (type, settings) => () => { - const { - segmentLoaders: { - [type]: segmentLoader - }, - mediaTypes: { - [type]: mediaType - } - } = settings; - mediaType.lastGroup_ = null; - segmentLoader.abort(); - segmentLoader.pause(); -}; -/** - * Returns a function to be called when the media track changes. It performs a - * destructive reset of the SegmentLoader to ensure we start loading as close to - * currentTime as possible. - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Handler for a destructive reset of SegmentLoader when the active media - * track changes. - * @function onTrackChanged - */ - -const onTrackChanged = (type, settings) => () => { - const { - mainPlaylistLoader, - segmentLoaders: { - [type]: segmentLoader, - main: mainSegmentLoader - }, - mediaTypes: { - [type]: mediaType - } - } = settings; - const activeTrack = mediaType.activeTrack(); - const activeGroup = mediaType.getActiveGroup(); - const previousActiveLoader = mediaType.activePlaylistLoader; - const lastTrack = mediaType.lastTrack_; // track did not change, do nothing - - if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) { - return; - } - mediaType.lastGroup_ = activeGroup; - mediaType.lastTrack_ = activeTrack; - stopLoaders(segmentLoader, mediaType); - if (!activeGroup) { - // there is no group active so we do not want to restart loaders - return; - } - if (activeGroup.isMainPlaylist) { - // track did not change, do nothing - if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) { - return; - } - const pc = settings.vhs.playlistController_; - const newPlaylist = pc.selectPlaylist(); // media will not change do nothing - - if (pc.media() === newPlaylist) { - return; - } - mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`); - mainPlaylistLoader.pause(); - mainSegmentLoader.resetEverything(); - pc.fastQualityChange_(newPlaylist); - return; - } - if (type === 'AUDIO') { - if (!activeGroup.playlistLoader) { - // when switching from demuxed audio/video to muxed audio/video (noted by no - // playlist loader for the audio group), we want to do a destructive reset of the - // main segment loader and not restart the audio loaders - mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since - // it should be stopped - - mainSegmentLoader.resetEverything(); - return; - } // although the segment loader is an audio segment loader, call the setAudio - // function to ensure it is prepared to re-append the init segment (or handle other - // config changes) - - segmentLoader.setAudio(true); - mainSegmentLoader.setAudio(false); - } - if (previousActiveLoader === activeGroup.playlistLoader) { - // Nothing has actually changed. This can happen because track change events can fire - // multiple times for a "single" change. One for enabling the new active track, and - // one for disabling the track that was active - startLoaders(activeGroup.playlistLoader, mediaType); - return; - } - if (segmentLoader.track) { - // For WebVTT, set the new text track in the segmentloader - segmentLoader.track(activeTrack); - } // destructive reset - - segmentLoader.resetEverything(); - startLoaders(activeGroup.playlistLoader, mediaType); -}; -const onError = { - /** - * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters - * an error. - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Error handler. Logs warning (or error if the playlist is excluded) to - * console and switches back to default audio track. - * @function onError.AUDIO - */ - AUDIO: (type, settings) => () => { - const { - mediaTypes: { - [type]: mediaType - }, - excludePlaylist - } = settings; // switch back to default audio track - - const activeTrack = mediaType.activeTrack(); - const activeGroup = mediaType.activeGroup(); - const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id; - const defaultTrack = mediaType.tracks[id]; - if (activeTrack === defaultTrack) { - // Default track encountered an error. All we can do now is exclude the current - // rendition and hope another will switch audio groups - excludePlaylist({ - error: { - message: 'Problem encountered loading the default audio track.' - } - }); - return; - } - videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.'); - for (const trackId in mediaType.tracks) { - mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack; - } - mediaType.onTrackChanged(); - }, - /** - * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters - * an error. - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Error handler. Logs warning to console and disables the active subtitle track - * @function onError.SUBTITLES - */ - SUBTITLES: (type, settings) => () => { - const { - mediaTypes: { - [type]: mediaType - } - } = settings; - videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.'); - const track = mediaType.activeTrack(); - if (track) { - track.mode = 'disabled'; - } - mediaType.onTrackChanged(); - } -}; -const setupListeners = { - /** - * Setup event listeners for audio playlist loader - * - * @param {string} type - * MediaGroup type - * @param {PlaylistLoader|null} playlistLoader - * PlaylistLoader to register listeners on - * @param {Object} settings - * Object containing required information for media groups - * @function setupListeners.AUDIO - */ - AUDIO: (type, playlistLoader, settings) => { - if (!playlistLoader) { - // no playlist loader means audio will be muxed with the video - return; - } - const { - tech, - requestOptions, - segmentLoaders: { - [type]: segmentLoader - } - } = settings; - playlistLoader.on('loadedmetadata', () => { - const media = playlistLoader.media(); - segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload - // permits, start downloading segments - - if (!tech.paused() || media.endList && tech.preload() !== 'none') { - segmentLoader.load(); - } - }); - playlistLoader.on('loadedplaylist', () => { - segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running - - if (!tech.paused()) { - segmentLoader.load(); - } - }); - playlistLoader.on('error', onError[type](type, settings)); - }, - /** - * Setup event listeners for subtitle playlist loader - * - * @param {string} type - * MediaGroup type - * @param {PlaylistLoader|null} playlistLoader - * PlaylistLoader to register listeners on - * @param {Object} settings - * Object containing required information for media groups - * @function setupListeners.SUBTITLES - */ - SUBTITLES: (type, playlistLoader, settings) => { - const { - tech, - requestOptions, - segmentLoaders: { - [type]: segmentLoader - }, - mediaTypes: { - [type]: mediaType - } - } = settings; - playlistLoader.on('loadedmetadata', () => { - const media = playlistLoader.media(); - segmentLoader.playlist(media, requestOptions); - segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload - // permits, start downloading segments - - if (!tech.paused() || media.endList && tech.preload() !== 'none') { - segmentLoader.load(); - } - }); - playlistLoader.on('loadedplaylist', () => { - segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running - - if (!tech.paused()) { - segmentLoader.load(); - } - }); - playlistLoader.on('error', onError[type](type, settings)); - } -}; -const initialize = { - /** - * Setup PlaylistLoaders and AudioTracks for the audio groups - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @function initialize.AUDIO - */ - 'AUDIO': (type, settings) => { - const { - vhs, - sourceType, - segmentLoaders: { - [type]: segmentLoader - }, - requestOptions, - main: { - mediaGroups - }, - mediaTypes: { - [type]: { - groups, - tracks, - logger_ - } - }, - mainPlaylistLoader - } = settings; - const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none - - if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) { - mediaGroups[type] = { - main: { - default: { - default: true - } - } - }; - if (audioOnlyMain) { - mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists; - } - } - for (const groupId in mediaGroups[type]) { - if (!groups[groupId]) { - groups[groupId] = []; - } - for (const variantLabel in mediaGroups[type][groupId]) { - let properties = mediaGroups[type][groupId][variantLabel]; - let playlistLoader; - if (audioOnlyMain) { - logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`); - properties.isMainPlaylist = true; - playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved, - // use the resolved media playlist object - } else if (sourceType === 'vhs-json' && properties.playlists) { - playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions); - } else if (properties.resolvedUri) { - playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists - // should we even have properties.playlists in this check. - } else if (properties.playlists && sourceType === 'dash') { - playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader); - } else { - // no resolvedUri means the audio is muxed with the video when using this - // audio track - playlistLoader = null; - } - properties = merge({ - id: variantLabel, - playlistLoader - }, properties); - setupListeners[type](type, properties.playlistLoader, settings); - groups[groupId].push(properties); - if (typeof tracks[variantLabel] === 'undefined') { - const track = new videojs.AudioTrack({ - id: variantLabel, - kind: audioTrackKind_(properties), - enabled: false, - language: properties.language, - default: properties.default, - label: variantLabel - }); - tracks[variantLabel] = track; - } - } - } // setup single error event handler for the segment loader - - segmentLoader.on('error', onError[type](type, settings)); - }, - /** - * Setup PlaylistLoaders and TextTracks for the subtitle groups - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @function initialize.SUBTITLES - */ - 'SUBTITLES': (type, settings) => { - const { - tech, - vhs, - sourceType, - segmentLoaders: { - [type]: segmentLoader - }, - requestOptions, - main: { - mediaGroups - }, - mediaTypes: { - [type]: { - groups, - tracks - } - }, - mainPlaylistLoader - } = settings; - for (const groupId in mediaGroups[type]) { - if (!groups[groupId]) { - groups[groupId] = []; - } - for (const variantLabel in mediaGroups[type][groupId]) { - if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) { - // Subtitle playlists with the forced attribute are not selectable in Safari. - // According to Apple's HLS Authoring Specification: - // If content has forced subtitles and regular subtitles in a given language, - // the regular subtitles track in that language MUST contain both the forced - // subtitles and the regular subtitles for that language. - // Because of this requirement and that Safari does not add forced subtitles, - // forced subtitles are skipped here to maintain consistent experience across - // all platforms - continue; - } - let properties = mediaGroups[type][groupId][variantLabel]; - let playlistLoader; - if (sourceType === 'hls') { - playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); - } else if (sourceType === 'dash') { - const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity); - if (!playlists.length) { - return; - } - playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader); - } else if (sourceType === 'vhs-json') { - playlistLoader = new PlaylistLoader( - // if the vhs-json object included the media playlist, use the media playlist - // as provided, otherwise use the resolved URI to load the playlist - properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions); - } - properties = merge({ - id: variantLabel, - playlistLoader - }, properties); - setupListeners[type](type, properties.playlistLoader, settings); - groups[groupId].push(properties); - if (typeof tracks[variantLabel] === 'undefined') { - const track = tech.addRemoteTextTrack({ - id: variantLabel, - kind: 'subtitles', - default: properties.default && properties.autoselect, - language: properties.language, - label: variantLabel - }, false).track; - tracks[variantLabel] = track; - } - } - } // setup single error event handler for the segment loader - - segmentLoader.on('error', onError[type](type, settings)); - }, - /** - * Setup TextTracks for the closed-caption groups - * - * @param {String} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @function initialize['CLOSED-CAPTIONS'] - */ - 'CLOSED-CAPTIONS': (type, settings) => { - const { - tech, - main: { - mediaGroups - }, - mediaTypes: { - [type]: { - groups, - tracks - } - } - } = settings; - for (const groupId in mediaGroups[type]) { - if (!groups[groupId]) { - groups[groupId] = []; - } - for (const variantLabel in mediaGroups[type][groupId]) { - const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services - - if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) { - continue; - } - const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {}; - let newProps = { - label: variantLabel, - language: properties.language, - instreamId: properties.instreamId, - default: properties.default && properties.autoselect - }; - if (captionServices[newProps.instreamId]) { - newProps = merge(newProps, captionServices[newProps.instreamId]); - } - if (newProps.default === undefined) { - delete newProps.default; - } // No PlaylistLoader is required for Closed-Captions because the captions are - // embedded within the video stream - - groups[groupId].push(merge({ - id: variantLabel - }, properties)); - if (typeof tracks[variantLabel] === 'undefined') { - const track = tech.addRemoteTextTrack({ - id: newProps.instreamId, - kind: 'captions', - default: newProps.default, - language: newProps.language, - label: newProps.label - }, false).track; - tracks[variantLabel] = track; - } - } - } - } -}; -const groupMatch = (list, media) => { - for (let i = 0; i < list.length; i++) { - if (playlistMatch(media, list[i])) { - return true; - } - if (list[i].playlists && groupMatch(list[i].playlists, media)) { - return true; - } - } - return false; -}; -/** - * Returns a function used to get the active group of the provided type - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Function that returns the active media group for the provided type. Takes an - * optional parameter {TextTrack} track. If no track is provided, a list of all - * variants in the group, otherwise the variant corresponding to the provided - * track is returned. - * @function activeGroup - */ - -const activeGroup = (type, settings) => track => { - const { - mainPlaylistLoader, - mediaTypes: { - [type]: { - groups - } - } - } = settings; - const media = mainPlaylistLoader.media(); - if (!media) { - return null; - } - let variants = null; // set to variants to main media active group - - if (media.attributes[type]) { - variants = groups[media.attributes[type]]; - } - const groupKeys = Object.keys(groups); - if (!variants) { - // find the mainPlaylistLoader media - // that is in a media group if we are dealing - // with audio only - if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) { - for (let i = 0; i < groupKeys.length; i++) { - const groupPropertyList = groups[groupKeys[i]]; - if (groupMatch(groupPropertyList, media)) { - variants = groupPropertyList; - break; - } - } // use the main group if it exists - } else if (groups.main) { - variants = groups.main; // only one group, use that one - } else if (groupKeys.length === 1) { - variants = groups[groupKeys[0]]; - } - } - if (typeof track === 'undefined') { - return variants; - } - if (track === null || !variants) { - // An active track was specified so a corresponding group is expected. track === null - // means no track is currently active so there is no corresponding group - return null; - } - return variants.filter(props => props.id === track.id)[0] || null; -}; -const activeTrack = { - /** - * Returns a function used to get the active track of type provided - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Function that returns the active media track for the provided type. Returns - * null if no track is active - * @function activeTrack.AUDIO - */ - AUDIO: (type, settings) => () => { - const { - mediaTypes: { - [type]: { - tracks - } - } - } = settings; - for (const id in tracks) { - if (tracks[id].enabled) { - return tracks[id]; - } - } - return null; - }, - /** - * Returns a function used to get the active track of type provided - * - * @param {string} type - * MediaGroup type - * @param {Object} settings - * Object containing required information for media groups - * @return {Function} - * Function that returns the active media track for the provided type. Returns - * null if no track is active - * @function activeTrack.SUBTITLES - */ - SUBTITLES: (type, settings) => () => { - const { - mediaTypes: { - [type]: { - tracks - } - } - } = settings; - for (const id in tracks) { - if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') { - return tracks[id]; - } - } - return null; - } -}; -const getActiveGroup = (type, { - mediaTypes -}) => () => { - const activeTrack_ = mediaTypes[type].activeTrack(); - if (!activeTrack_) { - return null; - } - return mediaTypes[type].activeGroup(activeTrack_); -}; -/** - * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles, - * Closed-Captions) specified in the main manifest. - * - * @param {Object} settings - * Object containing required information for setting up the media groups - * @param {Tech} settings.tech - * The tech of the player - * @param {Object} settings.requestOptions - * XHR request options used by the segment loaders - * @param {PlaylistLoader} settings.mainPlaylistLoader - * PlaylistLoader for the main source - * @param {VhsHandler} settings.vhs - * VHS SourceHandler - * @param {Object} settings.main - * The parsed main manifest - * @param {Object} settings.mediaTypes - * Object to store the loaders, tracks, and utility methods for each media type - * @param {Function} settings.excludePlaylist - * Excludes the current rendition and forces a rendition switch. - * @function setupMediaGroups - */ - -const setupMediaGroups = settings => { - ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => { - initialize[type](type, settings); - }); - const { - mediaTypes, - mainPlaylistLoader, - tech, - vhs, - segmentLoaders: { - ['AUDIO']: audioSegmentLoader, - main: mainSegmentLoader - } - } = settings; // setup active group and track getters and change event handlers - - ['AUDIO', 'SUBTITLES'].forEach(type => { - mediaTypes[type].activeGroup = activeGroup(type, settings); - mediaTypes[type].activeTrack = activeTrack[type](type, settings); - mediaTypes[type].onGroupChanged = onGroupChanged(type, settings); - mediaTypes[type].onGroupChanging = onGroupChanging(type, settings); - mediaTypes[type].onTrackChanged = onTrackChanged(type, settings); - mediaTypes[type].getActiveGroup = getActiveGroup(type, settings); - }); // DO NOT enable the default subtitle or caption track. - // DO enable the default audio track - - const audioGroup = mediaTypes.AUDIO.activeGroup(); - if (audioGroup) { - const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id; - mediaTypes.AUDIO.tracks[groupId].enabled = true; - mediaTypes.AUDIO.onGroupChanged(); - mediaTypes.AUDIO.onTrackChanged(); - const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the - // track is changed, but needs to be handled here since the track may not be considered - // changed on the first call to onTrackChanged - - if (!activeAudioGroup.playlistLoader) { - // either audio is muxed with video or the stream is audio only - mainSegmentLoader.setAudio(true); - } else { - // audio is demuxed - mainSegmentLoader.setAudio(false); - audioSegmentLoader.setAudio(true); - } - } - mainPlaylistLoader.on('mediachange', () => { - ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged()); - }); - mainPlaylistLoader.on('mediachanging', () => { - ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging()); - }); // custom audio track change event handler for usage event - - const onAudioTrackChanged = () => { - mediaTypes.AUDIO.onTrackChanged(); - tech.trigger({ - type: 'usage', - name: 'vhs-audio-change' - }); - }; - tech.audioTracks().addEventListener('change', onAudioTrackChanged); - tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged); - vhs.on('dispose', () => { - tech.audioTracks().removeEventListener('change', onAudioTrackChanged); - tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged); - }); // clear existing audio tracks and add the ones we just created - - tech.clearTracks('audio'); - for (const id in mediaTypes.AUDIO.tracks) { - tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]); - } -}; -/** - * Creates skeleton object used to store the loaders, tracks, and utility methods for each - * media type - * - * @return {Object} - * Object to store the loaders, tracks, and utility methods for each media type - * @function createMediaTypes - */ - -const createMediaTypes = () => { - const mediaTypes = {}; - ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => { - mediaTypes[type] = { - groups: {}, - tracks: {}, - activePlaylistLoader: null, - activeGroup: noop, - activeTrack: noop, - getActiveGroup: noop, - onGroupChanged: noop, - onTrackChanged: noop, - lastTrack_: null, - logger_: logger(`MediaGroups[${type}]`) - }; - }); - return mediaTypes; -}; - -/** - * A utility class for setting properties and maintaining the state of the content steering manifest. - * - * Content Steering manifest format: - * VERSION: number (required) currently only version 1 is supported. - * TTL: number in seconds (optional) until the next content steering manifest reload. - * RELOAD-URI: string (optional) uri to fetch the next content steering manifest. - * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values. - */ - -class SteeringManifest { - constructor() { - this.priority_ = []; - } - set version(number) { - // Only version 1 is currently supported for both DASH and HLS. - if (number === 1) { - this.version_ = number; - } - } - set ttl(seconds) { - // TTL = time-to-live, default = 300 seconds. - this.ttl_ = seconds || 300; - } - set reloadUri(uri) { - if (uri) { - // reload URI can be relative to the previous reloadUri. - this.reloadUri_ = resolveUrl(this.reloadUri_, uri); - } - } - set priority(array) { - // priority must be non-empty and unique values. - if (array && array.length) { - this.priority_ = array; - } - } - get version() { - return this.version_; - } - get ttl() { - return this.ttl_; - } - get reloadUri() { - return this.reloadUri_; - } - get priority() { - return this.priority_; - } -} -/** - * This class represents a content steering manifest and associated state. See both HLS and DASH specifications. - * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and - * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6. - * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf - * - * @param {function} xhr for making a network request from the browser. - * @param {function} bandwidth for fetching the current bandwidth from the main segment loader. - */ - -class ContentSteeringController extends videojs.EventTarget { - constructor(xhr, bandwidth) { - super(); - this.currentPathway = null; - this.defaultPathway = null; - this.queryBeforeStart = null; - this.availablePathways_ = new Set(); - this.excludedPathways_ = new Set(); - this.steeringManifest = new SteeringManifest(); - this.proxyServerUrl_ = null; - this.manifestType_ = null; - this.ttlTimeout_ = null; - this.request_ = null; - this.excludedSteeringManifestURLs = new Set(); - this.logger_ = logger('Content Steering'); - this.xhr_ = xhr; - this.getBandwidth_ = bandwidth; - } - /** - * Assigns the content steering tag properties to the steering controller - * - * @param {string} baseUrl the baseURL from the manifest for resolving the steering manifest url - * @param {Object} steeringTag the content steering tag from the main manifest - */ - - assignTagProperties(baseUrl, steeringTag) { - this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH - - const steeringUri = steeringTag.serverUri || steeringTag.serverURL; - if (!steeringUri) { - this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`); - this.trigger('error'); - return; - } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case. - - if (steeringUri.startsWith('data:')) { - this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1)); - return; - } // With DASH queryBeforeStart, we want to use the steeringUri as soon as possible for the request. - - this.steeringManifest.reloadUri = this.queryBeforeStart ? steeringUri : resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH - - this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on tags. - - this.queryBeforeStart = steeringTag.queryBeforeStart || false; - this.proxyServerUrl_ = steeringTag.proxyServerURL || null; // trigger a steering event if we have a pathway from the content steering tag. - // this tells VHS which segment pathway to start with. - // If queryBeforeStart is true we need to wait for the steering manifest response. - - if (this.defaultPathway && !this.queryBeforeStart) { - this.trigger('content-steering'); - } - if (this.queryBeforeStart) { - this.requestSteeringManifest(this.steeringManifest.reloadUri); - } - } - /** - * Requests the content steering manifest and parse the response. This should only be called after - * assignTagProperties was called with a content steering tag. - * - * @param {string} initialUri The optional uri to make the request with. - * If set, the request should be made with exactly what is passed in this variable. - * This scenario is specific to DASH when the queryBeforeStart parameter is true. - * This scenario should only happen once on initalization. - */ - - requestSteeringManifest(initialUri) { - const reloadUri = this.steeringManifest.reloadUri; - if (!initialUri && !reloadUri) { - return; - } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires - // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1. - // This request URI accounts for manifest URIs that have been excluded. - - const uri = initialUri || this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering. - - if (!uri) { - this.logger_('No valid content steering manifest URIs. Stopping content steering.'); - this.trigger('error'); - this.dispose(); - return; - } - this.request_ = this.xhr_({ - uri - }, (error, errorInfo) => { - if (error) { - // If the client receives HTTP 410 Gone in response to a manifest request, - // it MUST NOT issue another request for that URI for the remainder of the - // playback session. It MAY continue to use the most-recently obtained set - // of Pathways. - if (errorInfo.status === 410) { - this.logger_(`manifest request 410 ${error}.`); - this.logger_(`There will be no more content steering requests to ${uri} this session.`); - this.excludedSteeringManifestURLs.add(uri); - return; - } // If the client receives HTTP 429 Too Many Requests with a Retry-After - // header in response to a manifest request, it SHOULD wait until the time - // specified by the Retry-After header to reissue the request. - - if (errorInfo.status === 429) { - const retrySeconds = errorInfo.responseHeaders['retry-after']; - this.logger_(`manifest request 429 ${error}.`); - this.logger_(`content steering will retry in ${retrySeconds} seconds.`); - this.startTTLTimeout_(parseInt(retrySeconds, 10)); - return; - } // If the Steering Manifest cannot be loaded and parsed correctly, the - // client SHOULD continue to use the previous values and attempt to reload - // it after waiting for the previously-specified TTL (or 5 minutes if - // none). - - this.logger_(`manifest failed to load ${error}.`); - this.startTTLTimeout_(); - return; - } - const steeringManifestJson = JSON.parse(this.request_.responseText); - this.startTTLTimeout_(); - this.assignSteeringProperties_(steeringManifestJson); - }); - } - /** - * Set the proxy server URL and add the steering manifest url as a URI encoded parameter. - * - * @param {string} steeringUrl the steering manifest url - * @return the steering manifest url to a proxy server with all parameters set - */ - - setProxyServerUrl_(steeringUrl) { - const steeringUrlObject = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL)(steeringUrl); - const proxyServerUrlObject = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL)(this.proxyServerUrl_); - proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString())); - return this.setSteeringParams_(proxyServerUrlObject.toString()); - } - /** - * Decodes and parses the data uri encoded steering manifest - * - * @param {string} dataUri the data uri to be decoded and parsed. - */ - - decodeDataUriManifest_(dataUri) { - const steeringManifestJson = JSON.parse(global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(dataUri)); - this.assignSteeringProperties_(steeringManifestJson); - } - /** - * Set the HLS or DASH content steering manifest request query parameters. For example: - * _HLS_pathway="" and _HLS_throughput= - * _DASH_pathway and _DASH_throughput - * - * @param {string} uri to add content steering server parameters to. - * @return a new uri as a string with the added steering query parameters. - */ - - setSteeringParams_(url) { - const urlObject = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL)(url); - const path = this.getPathway(); - const networkThroughput = this.getBandwidth_(); - if (path) { - const pathwayKey = `_${this.manifestType_}_pathway`; - urlObject.searchParams.set(pathwayKey, path); - } - if (networkThroughput) { - const throughputKey = `_${this.manifestType_}_throughput`; - urlObject.searchParams.set(throughputKey, networkThroughput); - } - return urlObject.toString(); - } - /** - * Assigns the current steering manifest properties and to the SteeringManifest object - * - * @param {Object} steeringJson the raw JSON steering manifest - */ - - assignSteeringProperties_(steeringJson) { - this.steeringManifest.version = steeringJson.VERSION; - if (!this.steeringManifest.version) { - this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`); - this.trigger('error'); - return; - } - this.steeringManifest.ttl = steeringJson.TTL; - this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional - - this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // TODO: HLS handle PATHWAY-CLONES. See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ - // 1. apply first pathway from the array. - // 2. if first pathway doesn't exist in manifest, try next pathway. - // a. if all pathways are exhausted, ignore the steering manifest priority. - // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway. - // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response, - // the excluded pathway will be ignored. - // See excludePathway usage in excludePlaylist(). - // If there are no available pathways, we need to stop content steering. - - if (!this.availablePathways_.size) { - this.logger_('There are no available pathways for content steering. Ending content steering.'); - this.trigger('error'); - this.dispose(); - } - const chooseNextPathway = pathwaysByPriority => { - for (const path of pathwaysByPriority) { - if (this.availablePathways_.has(path)) { - return path; - } - } // If no pathway matches, ignore the manifest and choose the first available. - - return [...this.availablePathways_][0]; - }; - const nextPathway = chooseNextPathway(this.steeringManifest.priority); - if (this.currentPathway !== nextPathway) { - this.currentPathway = nextPathway; - this.trigger('content-steering'); - } - } - /** - * Returns the pathway to use for steering decisions - * - * @return {string} returns the current pathway or the default - */ - - getPathway() { - return this.currentPathway || this.defaultPathway; - } - /** - * Chooses the manifest request URI based on proxy URIs and server URLs. - * Also accounts for exclusion on certain manifest URIs. - * - * @param {string} reloadUri the base uri before parameters - * - * @return {string} the final URI for the request to the manifest server. - */ - - getRequestURI(reloadUri) { - if (!reloadUri) { - return null; - } - const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri); - if (this.proxyServerUrl_) { - const proxyURI = this.setProxyServerUrl_(reloadUri); - if (!isExcluded(proxyURI)) { - return proxyURI; - } - } - const steeringURI = this.setSteeringParams_(reloadUri); - if (!isExcluded(steeringURI)) { - return steeringURI; - } // Return nothing if all valid manifest URIs are excluded. - - return null; - } - /** - * Start the timeout for re-requesting the steering manifest at the TTL interval. - * - * @param {number} ttl time in seconds of the timeout. Defaults to the - * ttl interval in the steering manifest - */ - - startTTLTimeout_(ttl = this.steeringManifest.ttl) { - // 300 (5 minutes) is the default value. - const ttlMS = ttl * 1000; - this.ttlTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(() => { - this.requestSteeringManifest(); - }, ttlMS); - } - /** - * Clear the TTL timeout if necessary. - */ - - clearTTLTimeout_() { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.ttlTimeout_); - this.ttlTimeout_ = null; - } - /** - * aborts any current steering xhr and sets the current request object to null - */ - - abort() { - if (this.request_) { - this.request_.abort(); - } - this.request_ = null; - } - /** - * aborts steering requests clears the ttl timeout and resets all properties. - */ - - dispose() { - this.off('content-steering'); - this.off('error'); - this.abort(); - this.clearTTLTimeout_(); - this.currentPathway = null; - this.defaultPathway = null; - this.queryBeforeStart = null; - this.proxyServerUrl_ = null; - this.manifestType_ = null; - this.ttlTimeout_ = null; - this.request_ = null; - this.excludedSteeringManifestURLs = new Set(); - this.availablePathways_ = new Set(); - this.excludedPathways_ = new Set(); - this.steeringManifest = new SteeringManifest(); - } - /** - * adds a pathway to the available pathways set - * - * @param {string} pathway the pathway string to add - */ - - addAvailablePathway(pathway) { - if (pathway) { - this.availablePathways_.add(pathway); - } - } - /** - * clears all pathways from the available pathways set - */ - - clearAvailablePathways() { - this.availablePathways_.clear(); - } - excludePathway(pathway) { - return this.availablePathways_.delete(pathway); - } -} - -/** - * @file playlist-controller.js - */ -const ABORT_EARLY_EXCLUSION_SECONDS = 10; -let Vhs$1; // SegmentLoader stats that need to have each loader's -// values summed to calculate the final value - -const loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends']; -const sumLoaderStat = function (stat) { - return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat]; -}; -const shouldSwitchToMedia = function ({ - currentPlaylist, - buffered, - currentTime, - nextPlaylist, - bufferLowWaterLine, - bufferHighWaterLine, - duration, - bufferBasedABR, - log -}) { - // we have no other playlist to switch to - if (!nextPlaylist) { - videojs.log.warn('We received no playlist to switch to. Please check your stream.'); - return false; - } - const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`; - if (!currentPlaylist) { - log(`${sharedLogLine} as current playlist is not set`); - return true; - } // no need to switch if playlist is the same - - if (nextPlaylist.id === currentPlaylist.id) { - return false; - } // determine if current time is in a buffered range. - - const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account. - // This is because in LIVE, the player plays 3 segments from the end of the - // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble - // in those segments, a viewer will never experience a rendition upswitch. - - if (!currentPlaylist.endList) { - // For LLHLS live streams, don't switch renditions before playback has started, as it almost - // doubles the time to first playback. - if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') { - log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`); - return false; - } - log(`${sharedLogLine} as current playlist is live`); - return true; - } - const forwardBuffer = timeAheadOf(buffered, currentTime); - const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD - // duration is below the max potential low water line - - if (duration < maxBufferLowWaterLine) { - log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`); - return true; - } - const nextBandwidth = nextPlaylist.attributes.BANDWIDTH; - const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line, - // we can switch down - - if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) { - let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`; - if (bufferBasedABR) { - logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`; - } - log(logLine); - return true; - } // and if our buffer is higher than the low water line, - // we can switch up - - if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) { - let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`; - if (bufferBasedABR) { - logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`; - } - log(logLine); - return true; - } - log(`not ${sharedLogLine} as no switching criteria met`); - return false; -}; -/** - * the main playlist controller controller all interactons - * between playlists and segmentloaders. At this time this mainly - * involves a main playlist and a series of audio playlists - * if they are available - * - * @class PlaylistController - * @extends videojs.EventTarget - */ - -class PlaylistController extends videojs.EventTarget { - constructor(options) { - super(); - const { - src, - withCredentials, - tech, - bandwidth, - externVhs, - useCueTags, - playlistExclusionDuration, - enableLowInitialPlaylist, - sourceType, - cacheEncryptionKeys, - bufferBasedABR, - leastPixelDiffSelector, - captionServices - } = options; - if (!src) { - throw new Error('A non-empty playlist URL or JSON manifest string is required'); - } - let { - maxPlaylistRetries - } = options; - if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') { - maxPlaylistRetries = Infinity; - } - Vhs$1 = externVhs; - this.bufferBasedABR = Boolean(bufferBasedABR); - this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector); - this.withCredentials = withCredentials; - this.tech_ = tech; - this.vhs_ = tech.vhs; - this.sourceType_ = sourceType; - this.useCueTags_ = useCueTags; - this.playlistExclusionDuration = playlistExclusionDuration; - this.maxPlaylistRetries = maxPlaylistRetries; - this.enableLowInitialPlaylist = enableLowInitialPlaylist; - if (this.useCueTags_) { - this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues'); - this.cueTagsTrack_.inBandMetadataTrackDispatchType = ''; - } - this.requestOptions_ = { - withCredentials, - maxPlaylistRetries, - timeout: null - }; - this.on('error', this.pauseLoading); - this.mediaTypes_ = createMediaTypes(); - this.mediaSource = new (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource)(); - this.handleDurationChange_ = this.handleDurationChange_.bind(this); - this.handleSourceOpen_ = this.handleSourceOpen_.bind(this); - this.handleSourceEnded_ = this.handleSourceEnded_.bind(this); - this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player - - this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_); - this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of - // everything, and the MediaSource should not be detached without a proper disposal - - this.seekable_ = createTimeRanges(); - this.hasPlayed_ = false; - this.syncController_ = new SyncController(options); - this.segmentMetadataTrack_ = tech.addRemoteTextTrack({ - kind: 'metadata', - label: 'segment-metadata' - }, false).track; - this.decrypter_ = new Decrypter(); - this.sourceUpdater_ = new SourceUpdater(this.mediaSource); - this.inbandTextTracks_ = {}; - this.timelineChangeController_ = new TimelineChangeController(); - const segmentLoaderSettings = { - vhs: this.vhs_, - parse708captions: options.parse708captions, - useDtsForTimestampOffset: options.useDtsForTimestampOffset, - calculateTimestampOffsetForEachSegment: options.calculateTimestampOffsetForEachSegment, - captionServices, - mediaSource: this.mediaSource, - currentTime: this.tech_.currentTime.bind(this.tech_), - seekable: () => this.seekable(), - seeking: () => this.tech_.seeking(), - duration: () => this.duration(), - hasPlayed: () => this.hasPlayed_, - goalBufferLength: () => this.goalBufferLength(), - bandwidth, - syncController: this.syncController_, - decrypter: this.decrypter_, - sourceType: this.sourceType_, - inbandTextTracks: this.inbandTextTracks_, - cacheEncryptionKeys, - sourceUpdater: this.sourceUpdater_, - timelineChangeController: this.timelineChangeController_, - exactManifestTimings: options.exactManifestTimings, - addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this) - }; // The source type check not only determines whether a special DASH playlist loader - // should be used, but also covers the case where the provided src is a vhs-json - // manifest object (instead of a URL). In the case of vhs-json, the default - // PlaylistLoader should be used. - - this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, { - addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this) - })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, { - addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this) - })); - this.setupMainPlaylistLoaderListeners_(); // setup segment loaders - // combined audio/video or just video when alternate audio track is selected - - this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, { - segmentMetadataTrack: this.segmentMetadataTrack_, - loaderType: 'main' - }), options); // alternate audio track - - this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, { - loaderType: 'audio' - }), options); - this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, { - loaderType: 'vtt', - featuresNativeTextTracks: this.tech_.featuresNativeTextTracks, - loadVttJs: () => new Promise((resolve, reject) => { - function onLoad() { - tech.off('vttjserror', onError); - resolve(); - } - function onError() { - tech.off('vttjsloaded', onLoad); - reject(); - } - tech.one('vttjsloaded', onLoad); - tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once: - - tech.addWebVttScript_(); - }) - }), options); - const getBandwidth = () => { - return this.mainSegmentLoader_.bandwidth; - }; - this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth); - this.setupSegmentLoaderListeners_(); - if (this.bufferBasedABR) { - this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_()); - this.tech_.on('pause', () => this.stopABRTimer_()); - this.tech_.on('play', () => this.startABRTimer_()); - } // Create SegmentLoader stat-getters - // mediaRequests_ - // mediaRequestsAborted_ - // mediaRequestsTimedout_ - // mediaRequestsErrored_ - // mediaTransferDuration_ - // mediaBytesTransferred_ - // mediaAppends_ - - loaderStats.forEach(stat => { - this[stat + '_'] = sumLoaderStat.bind(this, stat); - }); - this.logger_ = logger('pc'); - this.triggeredFmp4Usage = false; - if (this.tech_.preload() === 'none') { - this.loadOnPlay_ = () => { - this.loadOnPlay_ = null; - this.mainPlaylistLoader_.load(); - }; - this.tech_.one('play', this.loadOnPlay_); - } else { - this.mainPlaylistLoader_.load(); - } - this.timeToLoadedData__ = -1; - this.mainAppendsToLoadedData__ = -1; - this.audioAppendsToLoadedData__ = -1; - const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none) - - this.tech_.one(event, () => { - const timeToLoadedDataStart = Date.now(); - this.tech_.one('loadeddata', () => { - this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart; - this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends; - this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends; - }); - }); - } - mainAppendsToLoadedData_() { - return this.mainAppendsToLoadedData__; - } - audioAppendsToLoadedData_() { - return this.audioAppendsToLoadedData__; - } - appendsToLoadedData_() { - const main = this.mainAppendsToLoadedData_(); - const audio = this.audioAppendsToLoadedData_(); - if (main === -1 || audio === -1) { - return -1; - } - return main + audio; - } - timeToLoadedData_() { - return this.timeToLoadedData__; - } - /** - * Run selectPlaylist and switch to the new playlist if we should - * - * @param {string} [reason=abr] a reason for why the ABR check is made - * @private - */ - - checkABR_(reason = 'abr') { - const nextPlaylist = this.selectPlaylist(); - if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) { - this.switchMedia_(nextPlaylist, reason); - } - } - switchMedia_(playlist, cause, delay) { - const oldMedia = this.media(); - const oldId = oldMedia && (oldMedia.id || oldMedia.uri); - const newId = playlist.id || playlist.uri; - if (oldId && oldId !== newId) { - this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`); - this.tech_.trigger({ - type: 'usage', - name: `vhs-rendition-change-${cause}` - }); - } - this.mainPlaylistLoader_.media(playlist, delay); - } - /** - * A function that ensures we switch our playlists inside of `mediaTypes` - * to match the current `serviceLocation` provided by the contentSteering controller. - * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`. - * - * This should only be called on a DASH playback scenario while using content steering. - * This is necessary due to differences in how media in HLS manifests are generally tied to - * a video playlist, where in DASH that is not always the case. - */ - - switchMediaForDASHContentSteering_() { - ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => { - const mediaType = this.mediaTypes_[type]; - const activeGroup = mediaType ? mediaType.activeGroup() : null; - const pathway = this.contentSteeringController_.getPathway(); - if (activeGroup && pathway) { - // activeGroup can be an array or a single group - const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists; - const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN - - if (dashMediaPlaylists.length) { - this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]); - } - } - }); - } - /** - * Start a timer that periodically calls checkABR_ - * - * @private - */ - - startABRTimer_() { - this.stopABRTimer_(); - this.abrTimer_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setInterval(() => this.checkABR_(), 250); - } - /** - * Stop the timer that periodically calls checkABR_ - * - * @private - */ - - stopABRTimer_() { - // if we're scrubbing, we don't need to pause. - // This getter will be added to Video.js in version 7.11. - if (this.tech_.scrubbing && this.tech_.scrubbing()) { - return; - } - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearInterval(this.abrTimer_); - this.abrTimer_ = null; - } - /** - * Get a list of playlists for the currently selected audio playlist - * - * @return {Array} the array of audio playlists - */ - - getAudioTrackPlaylists_() { - const main = this.main(); - const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only - // assume that the audio tracks are contained in main - // playlist array, use that or an empty array. - - if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) { - return defaultPlaylists; - } - const AUDIO = main.mediaGroups.AUDIO; - const groupKeys = Object.keys(AUDIO); - let track; // get the current active track - - if (Object.keys(this.mediaTypes_.AUDIO.groups).length) { - track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet - } else { - // default group is `main` or just the first group. - const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]]; - for (const label in defaultGroup) { - if (defaultGroup[label].default) { - track = { - label - }; - break; - } - } - } // no active track no playlists. - - if (!track) { - return defaultPlaylists; - } - const playlists = []; // get all of the playlists that are possible for the - // active track. - - for (const group in AUDIO) { - if (AUDIO[group][track.label]) { - const properties = AUDIO[group][track.label]; - if (properties.playlists && properties.playlists.length) { - playlists.push.apply(playlists, properties.playlists); - } else if (properties.uri) { - playlists.push(properties); - } else if (main.playlists.length) { - // if an audio group does not have a uri - // see if we have main playlists that use it as a group. - // if we do then add those to the playlists list. - for (let i = 0; i < main.playlists.length; i++) { - const playlist = main.playlists[i]; - if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) { - playlists.push(playlist); - } - } - } - } - } - if (!playlists.length) { - return defaultPlaylists; - } - return playlists; - } - /** - * Register event handlers on the main playlist loader. A helper - * function for construction time. - * - * @private - */ - - setupMainPlaylistLoaderListeners_() { - this.mainPlaylistLoader_.on('loadedmetadata', () => { - const media = this.mainPlaylistLoader_.media(); - const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to - // timeout the request. - - if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) { - this.requestOptions_.timeout = 0; - } else { - this.requestOptions_.timeout = requestTimeout; - } // if this isn't a live video and preload permits, start - // downloading segments - - if (media.endList && this.tech_.preload() !== 'none') { - this.mainSegmentLoader_.playlist(media, this.requestOptions_); - this.mainSegmentLoader_.load(); - } - setupMediaGroups({ - sourceType: this.sourceType_, - segmentLoaders: { - AUDIO: this.audioSegmentLoader_, - SUBTITLES: this.subtitleSegmentLoader_, - main: this.mainSegmentLoader_ - }, - tech: this.tech_, - requestOptions: this.requestOptions_, - mainPlaylistLoader: this.mainPlaylistLoader_, - vhs: this.vhs_, - main: this.main(), - mediaTypes: this.mediaTypes_, - excludePlaylist: this.excludePlaylist.bind(this) - }); - this.triggerPresenceUsage_(this.main(), media); - this.setupFirstPlay(); - if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) { - this.trigger('selectedinitialmedia'); - } else { - // We must wait for the active audio playlist loader to - // finish setting up before triggering this event so the - // representations API and EME setup is correct - this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => { - this.trigger('selectedinitialmedia'); - }); - } - }); - this.mainPlaylistLoader_.on('loadedplaylist', () => { - if (this.loadOnPlay_) { - this.tech_.off('play', this.loadOnPlay_); - } - let updatedPlaylist = this.mainPlaylistLoader_.media(); - if (!updatedPlaylist) { - this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting - // an initial media as the playlist selectors do not consider browser support - - this.excludeUnsupportedVariants_(); - let selectedMedia; - if (this.enableLowInitialPlaylist) { - selectedMedia = this.selectInitialPlaylist(); - } - if (!selectedMedia) { - selectedMedia = this.selectPlaylist(); - } - if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) { - return; - } - this.initialMedia_ = selectedMedia; - this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will - // fire again since the playlist will be requested. In the case of vhs-json - // (where the manifest object is provided as the source), when the media - // playlist's `segments` list is already available, a media playlist won't be - // requested, and loadedplaylist won't fire again, so the playlist handler must be - // called on its own here. - - const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments; - if (!haveJsonSource) { - return; - } - updatedPlaylist = this.initialMedia_; - } - this.handleUpdatedMediaPlaylist(updatedPlaylist); - }); - this.mainPlaylistLoader_.on('error', () => { - const error = this.mainPlaylistLoader_.error; - this.excludePlaylist({ - playlistToExclude: error.playlist, - error - }); - }); - this.mainPlaylistLoader_.on('mediachanging', () => { - this.mainSegmentLoader_.abort(); - this.mainSegmentLoader_.pause(); - }); - this.mainPlaylistLoader_.on('mediachange', () => { - const media = this.mainPlaylistLoader_.media(); - const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to - // timeout the request. - - if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) { - this.requestOptions_.timeout = 0; - } else { - this.requestOptions_.timeout = requestTimeout; - } - this.mainPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals - // that the segments have changed in some way and use that to - // update the SegmentLoader instead of doing it twice here and - // on `loadedplaylist` - - this.mainSegmentLoader_.playlist(media, this.requestOptions_); - this.mainSegmentLoader_.load(); - this.tech_.trigger({ - type: 'mediachange', - bubbles: true - }); - }); - this.mainPlaylistLoader_.on('playlistunchanged', () => { - const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been - // excluded for not-changing. We likely just have a really slowly updating - // playlist. - - if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') { - return; - } - const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist); - if (playlistOutdated) { - // Playlist has stopped updating and we're stuck at its end. Try to - // exclude it and switch to another playlist in the hope that that - // one is updating (and give the player a chance to re-adjust to the - // safe live point). - this.excludePlaylist({ - error: { - message: 'Playlist no longer updating.', - reason: 'playlist-unchanged' - } - }); // useful for monitoring QoS - - this.tech_.trigger('playliststuck'); - } - }); - this.mainPlaylistLoader_.on('renditiondisabled', () => { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-rendition-disabled' - }); - }); - this.mainPlaylistLoader_.on('renditionenabled', () => { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-rendition-enabled' - }); - }); - } - /** - * Given an updated media playlist (whether it was loaded for the first time, or - * refreshed for live playlists), update any relevant properties and state to reflect - * changes in the media that should be accounted for (e.g., cues and duration). - * - * @param {Object} updatedPlaylist the updated media playlist object - * - * @private - */ - - handleUpdatedMediaPlaylist(updatedPlaylist) { - if (this.useCueTags_) { - this.updateAdCues_(updatedPlaylist); - } // TODO: Create a new event on the PlaylistLoader that signals - // that the segments have changed in some way and use that to - // update the SegmentLoader instead of doing it twice here and - // on `mediachange` - - this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_); - this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running, - // as it is possible that it was temporarily stopped while waiting for - // a playlist (e.g., in case the playlist errored and we re-requested it). - - if (!this.tech_.paused()) { - this.mainSegmentLoader_.load(); - if (this.audioSegmentLoader_) { - this.audioSegmentLoader_.load(); - } - } - } - /** - * A helper function for triggerring presence usage events once per source - * - * @private - */ - - triggerPresenceUsage_(main, media) { - const mediaGroups = main.mediaGroups || {}; - let defaultDemuxed = true; - const audioGroupKeys = Object.keys(mediaGroups.AUDIO); - for (const mediaGroup in mediaGroups.AUDIO) { - for (const label in mediaGroups.AUDIO[mediaGroup]) { - const properties = mediaGroups.AUDIO[mediaGroup][label]; - if (!properties.uri) { - defaultDemuxed = false; - } - } - } - if (defaultDemuxed) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-demuxed' - }); - } - if (Object.keys(mediaGroups.SUBTITLES).length) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-webvtt' - }); - } - if (Vhs$1.Playlist.isAes(media)) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-aes' - }); - } - if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-alternate-audio' - }); - } - if (this.useCueTags_) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-playlist-cue-tags' - }); - } - } - shouldSwitchToMedia_(nextPlaylist) { - const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_; - const currentTime = this.tech_.currentTime(); - const bufferLowWaterLine = this.bufferLowWaterLine(); - const bufferHighWaterLine = this.bufferHighWaterLine(); - const buffered = this.tech_.buffered(); - return shouldSwitchToMedia({ - buffered, - currentTime, - currentPlaylist, - nextPlaylist, - bufferLowWaterLine, - bufferHighWaterLine, - duration: this.duration(), - bufferBasedABR: this.bufferBasedABR, - log: this.logger_ - }); - } - /** - * Register event handlers on the segment loaders. A helper function - * for construction time. - * - * @private - */ - - setupSegmentLoaderListeners_() { - this.mainSegmentLoader_.on('bandwidthupdate', () => { - // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's - // useful to check to see if a rendition switch should be made. - this.checkABR_('bandwidthupdate'); - this.tech_.trigger('bandwidthupdate'); - }); - this.mainSegmentLoader_.on('timeout', () => { - if (this.bufferBasedABR) { - // If a rendition change is needed, then it would've be done on `bandwidthupdate`. - // Here the only consideration is that for buffer based ABR there's no guarantee - // of an immediate switch (since the bandwidth is averaged with a timeout - // bandwidth value of 1), so force a load on the segment loader to keep it going. - this.mainSegmentLoader_.load(); - } - }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer - // based ABR. - - if (!this.bufferBasedABR) { - this.mainSegmentLoader_.on('progress', () => { - this.trigger('progress'); - }); - } - this.mainSegmentLoader_.on('error', () => { - const error = this.mainSegmentLoader_.error(); - this.excludePlaylist({ - playlistToExclude: error.playlist, - error - }); - }); - this.mainSegmentLoader_.on('appenderror', () => { - this.error = this.mainSegmentLoader_.error_; - this.trigger('error'); - }); - this.mainSegmentLoader_.on('syncinfoupdate', () => { - this.onSyncInfoUpdate_(); - }); - this.mainSegmentLoader_.on('timestampoffset', () => { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-timestamp-offset' - }); - }); - this.audioSegmentLoader_.on('syncinfoupdate', () => { - this.onSyncInfoUpdate_(); - }); - this.audioSegmentLoader_.on('appenderror', () => { - this.error = this.audioSegmentLoader_.error_; - this.trigger('error'); - }); - this.mainSegmentLoader_.on('ended', () => { - this.logger_('main segment loader ended'); - this.onEndOfStream(); - }); - this.mainSegmentLoader_.on('earlyabort', event => { - // never try to early abort with the new ABR algorithm - if (this.bufferBasedABR) { - return; - } - this.delegateLoaders_('all', ['abort']); - this.excludePlaylist({ - error: { - message: 'Aborted early because there isn\'t enough bandwidth to complete ' + 'the request without rebuffering.' - }, - playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS - }); - }); - const updateCodecs = () => { - if (!this.sourceUpdater_.hasCreatedSourceBuffers()) { - return this.tryToCreateSourceBuffers_(); - } - const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded - - if (!codecs) { - return; - } - this.sourceUpdater_.addOrChangeSourceBuffers(codecs); - }; - this.mainSegmentLoader_.on('trackinfo', updateCodecs); - this.audioSegmentLoader_.on('trackinfo', updateCodecs); - this.mainSegmentLoader_.on('fmp4', () => { - if (!this.triggeredFmp4Usage) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-fmp4' - }); - this.triggeredFmp4Usage = true; - } - }); - this.audioSegmentLoader_.on('fmp4', () => { - if (!this.triggeredFmp4Usage) { - this.tech_.trigger({ - type: 'usage', - name: 'vhs-fmp4' - }); - this.triggeredFmp4Usage = true; - } - }); - this.audioSegmentLoader_.on('ended', () => { - this.logger_('audioSegmentLoader ended'); - this.onEndOfStream(); - }); - } - mediaSecondsLoaded_() { - return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded); - } - /** - * Call load on our SegmentLoaders - */ - - load() { - this.mainSegmentLoader_.load(); - if (this.mediaTypes_.AUDIO.activePlaylistLoader) { - this.audioSegmentLoader_.load(); - } - if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) { - this.subtitleSegmentLoader_.load(); - } - } - /** - * Re-tune playback quality level for the current player - * conditions. This will reset the main segment loader - * and the next segment position to the currentTime. - * This is good for manual quality changes. - * - * @private - */ - - fastQualityChange_(media = this.selectPlaylist()) { - if (media === this.mainPlaylistLoader_.media()) { - this.logger_('skipping fastQualityChange because new media is same as old'); - return; - } - this.switchMedia_(media, 'fast-quality'); // Reset main segment loader properties and next segment position information. - // Don't need to reset audio as it is reset when media changes. - // We resetLoaderProperties separately here as we want to fetch init segments if - // necessary and ensure we're not in an ended state when we switch playlists. - - this.resetMainLoaderReplaceSegments(); - } - /** - * Sets the replaceUntil flag on the main segment soader to the buffered end - * and resets the main segment loaders properties. - */ - - resetMainLoaderReplaceSegments() { - const buffered = this.tech_.buffered(); - const bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer - // on the main loader to remain, false after the resetLoader call, until we have - // replaced all content buffered ahead of the currentTime. - - this.mainSegmentLoader_.replaceSegmentsUntil = bufferedEnd; - this.mainSegmentLoader_.resetLoaderProperties(); - this.mainSegmentLoader_.resetLoader(); - } - /** - * Begin playback. - */ - - play() { - if (this.setupFirstPlay()) { - return; - } - if (this.tech_.ended()) { - this.tech_.setCurrentTime(0); - } - if (this.hasPlayed_) { - this.load(); - } - const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window, - // seek forward to the live point - - if (this.tech_.duration() === Infinity) { - if (this.tech_.currentTime() < seekable.start(0)) { - return this.tech_.setCurrentTime(seekable.end(seekable.length - 1)); - } - } - } - /** - * Seek to the latest media position if this is a live video and the - * player and video are loaded and initialized. - */ - - setupFirstPlay() { - const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play - // If 1) there is no active media - // 2) the player is paused - // 3) the first play has already been setup - // then exit early - - if (!media || this.tech_.paused() || this.hasPlayed_) { - return false; - } // when the video is a live stream and/or has a start time - - if (!media.endList || media.start) { - const seekable = this.seekable(); - if (!seekable.length) { - // without a seekable range, the player cannot seek to begin buffering at the - // live or start point - return false; - } - const seekableEnd = seekable.end(0); - let startPoint = seekableEnd; - if (media.start) { - const offset = media.start.timeOffset; - if (offset < 0) { - startPoint = Math.max(seekableEnd + offset, seekable.start(0)); - } else { - startPoint = Math.min(seekableEnd, offset); - } - } // trigger firstplay to inform the source handler to ignore the next seek event - - this.trigger('firstplay'); // seek to the live point - - this.tech_.setCurrentTime(startPoint); - } - this.hasPlayed_ = true; // we can begin loading now that everything is ready - - this.load(); - return true; - } - /** - * handle the sourceopen event on the MediaSource - * - * @private - */ - - handleSourceOpen_() { - // Only attempt to create the source buffer if none already exist. - // handleSourceOpen is also called when we are "re-opening" a source buffer - // after `endOfStream` has been called (in response to a seek for instance) - this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of - // code in video.js but is required because play() must be invoked - // *after* the media source has opened. - - if (this.tech_.autoplay()) { - const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request - // on browsers which return a promise - - if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') { - playPromise.then(null, e => {}); - } - } - this.trigger('sourceopen'); - } - /** - * handle the sourceended event on the MediaSource - * - * @private - */ - - handleSourceEnded_() { - if (!this.inbandTextTracks_.metadataTrack_) { - return; - } - const cues = this.inbandTextTracks_.metadataTrack_.cues; - if (!cues || !cues.length) { - return; - } - const duration = this.duration(); - cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration; - } - /** - * handle the durationchange event on the MediaSource - * - * @private - */ - - handleDurationChange_() { - this.tech_.trigger('durationchange'); - } - /** - * Calls endOfStream on the media source when all active stream types have called - * endOfStream - * - * @param {string} streamType - * Stream type of the segment loader that called endOfStream - * @private - */ - - onEndOfStream() { - let isEndOfStream = this.mainSegmentLoader_.ended_; - if (this.mediaTypes_.AUDIO.activePlaylistLoader) { - const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active - - if (!mainMediaInfo || mainMediaInfo.hasVideo) { - // if we do not know if the main segment loader contains video yet or if we - // definitively know the main segment loader contains video, then we need to wait - // for both main and audio segment loaders to call endOfStream - isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_; - } else { - // otherwise just rely on the audio loader - isEndOfStream = this.audioSegmentLoader_.ended_; - } - } - if (!isEndOfStream) { - return; - } - this.stopABRTimer_(); - this.sourceUpdater_.endOfStream(); - } - /** - * Check if a playlist has stopped being updated - * - * @param {Object} playlist the media playlist object - * @return {boolean} whether the playlist has stopped being updated or not - */ - - stuckAtPlaylistEnd_(playlist) { - const seekable = this.seekable(); - if (!seekable.length) { - // playlist doesn't have enough information to determine whether we are stuck - return false; - } - const expired = this.syncController_.getExpiredTime(playlist, this.duration()); - if (expired === null) { - return false; - } // does not use the safe live end to calculate playlist end, since we - // don't want to say we are stuck while there is still content - - const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired); - const currentTime = this.tech_.currentTime(); - const buffered = this.tech_.buffered(); - if (!buffered.length) { - // return true if the playhead reached the absolute end of the playlist - return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA; - } - const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute - // end of playlist - - return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA; - } - /** - * Exclude a playlist for a set amount of time, making it unavailable for selection by - * the rendition selection algorithm, then force a new playlist (rendition) selection. - * - * @param {Object=} playlistToExclude - * the playlist to exclude, defaults to the currently selected playlist - * @param {Object=} error - * an optional error - * @param {number=} playlistExclusionDuration - * an optional number of seconds to exclude the playlist - */ - - excludePlaylist({ - playlistToExclude = this.mainPlaylistLoader_.media(), - error = {}, - playlistExclusionDuration - }) { - // If the `error` was generated by the playlist loader, it will contain - // the playlist we were trying to load (but failed) and that should be - // excluded instead of the currently selected playlist which is likely - // out-of-date in this scenario - playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media(); - playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were - // trying to load the main OR while we were disposing of the tech - - if (!playlistToExclude) { - this.error = error; - if (this.mediaSource.readyState !== 'open') { - this.trigger('error'); - } else { - this.sourceUpdater_.endOfStream('network'); - } - return; - } - playlistToExclude.playlistErrors_++; - const playlists = this.mainPlaylistLoader_.main.playlists; - const enabledPlaylists = playlists.filter(isEnabled); - const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded - // forever - - if (playlists.length === 1 && playlistExclusionDuration !== Infinity) { - videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.'); - this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay - - return this.mainPlaylistLoader_.load(isFinalRendition); - } - if (isFinalRendition) { - // If we're content steering, try other pathways. - if (this.main().contentSteering) { - const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh. - - const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000; - this.contentSteeringController_.excludePathway(pathway); - this.excludeThenChangePathway_(); - setTimeout(() => { - this.contentSteeringController_.addAvailablePathway(pathway); - }, reIncludeDelay); - return; - } // Since we're on the final non-excluded playlist, and we're about to exclude - // it, instead of erring the player or retrying this playlist, clear out the current - // exclusion list. This allows other playlists to be attempted in case any have been - // fixed. - - let reincluded = false; - playlists.forEach(playlist => { - // skip current playlist which is about to be excluded - if (playlist === playlistToExclude) { - return; - } - const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with. - - if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) { - reincluded = true; - delete playlist.excludeUntil; - } - }); - if (reincluded) { - videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous - // playlist. This is needed for users relying on the retryplaylist event to catch a - // case where the player might be stuck and looping through "dead" playlists. - - this.tech_.trigger('retryplaylist'); - } - } // Exclude this playlist - - let excludeUntil; - if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) { - excludeUntil = Infinity; - } else { - excludeUntil = Date.now() + playlistExclusionDuration * 1000; - } - playlistToExclude.excludeUntil = excludeUntil; - if (error.reason) { - playlistToExclude.lastExcludeReason_ = error.reason; - } - this.tech_.trigger('excludeplaylist'); - this.tech_.trigger({ - type: 'usage', - name: 'vhs-rendition-excluded' - }); // TODO: only load a new playlist if we're excluding the current playlist - // If this function was called with a playlist that's not the current active playlist - // (e.g., media().id !== playlistToExclude.id), - // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist. - - const nextPlaylist = this.selectPlaylist(); - if (!nextPlaylist) { - this.error = 'Playback cannot continue. No available working or supported playlists.'; - this.trigger('error'); - return; - } - const logFn = error.internal ? this.logger_ : videojs.log.warn; - const errorMessage = error.message ? ' ' + error.message : ''; - logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders - - if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) { - this.delegateLoaders_('audio', ['abort', 'pause']); - } // if subtitle group changed reset subtitle loaders - - if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) { - this.delegateLoaders_('subtitle', ['abort', 'pause']); - } - this.delegateLoaders_('main', ['abort', 'pause']); - const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000; - const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration - - return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay); - } - /** - * Pause all segment/playlist loaders - */ - - pauseLoading() { - this.delegateLoaders_('all', ['abort', 'pause']); - this.stopABRTimer_(); - } - /** - * Call a set of functions in order on playlist loaders, segment loaders, - * or both types of loaders. - * - * @param {string} filter - * Filter loaders that should call fnNames using a string. Can be: - * * all - run on all loaders - * * audio - run on all audio loaders - * * subtitle - run on all subtitle loaders - * * main - run on the main loaders - * - * @param {Array|string} fnNames - * A string or array of function names to call. - */ - - delegateLoaders_(filter, fnNames) { - const loaders = []; - const dontFilterPlaylist = filter === 'all'; - if (dontFilterPlaylist || filter === 'main') { - loaders.push(this.mainPlaylistLoader_); - } - const mediaTypes = []; - if (dontFilterPlaylist || filter === 'audio') { - mediaTypes.push('AUDIO'); - } - if (dontFilterPlaylist || filter === 'subtitle') { - mediaTypes.push('CLOSED-CAPTIONS'); - mediaTypes.push('SUBTITLES'); - } - mediaTypes.forEach(mediaType => { - const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader; - if (loader) { - loaders.push(loader); - } - }); - ['main', 'audio', 'subtitle'].forEach(name => { - const loader = this[`${name}SegmentLoader_`]; - if (loader && (filter === name || filter === 'all')) { - loaders.push(loader); - } - }); - loaders.forEach(loader => fnNames.forEach(fnName => { - if (typeof loader[fnName] === 'function') { - loader[fnName](); - } - })); - } - /** - * set the current time on all segment loaders - * - * @param {TimeRange} currentTime the current time to set - * @return {TimeRange} the current time - */ - - setCurrentTime(currentTime) { - const buffered = findRange(this.tech_.buffered(), currentTime); - if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) { - // return immediately if the metadata is not ready yet - return 0; - } // it's clearly an edge-case but don't thrown an error if asked to - // seek within an empty playlist - - if (!this.mainPlaylistLoader_.media().segments) { - return 0; - } // if the seek location is already buffered, continue buffering as usual - - if (buffered && buffered.length) { - return currentTime; - } // cancel outstanding requests so we begin buffering at the new - // location - - this.mainSegmentLoader_.resetEverything(); - if (this.mediaTypes_.AUDIO.activePlaylistLoader) { - this.audioSegmentLoader_.resetEverything(); - } - if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) { - this.subtitleSegmentLoader_.resetEverything(); - } // start segment loader loading in case they are paused - - this.load(); - } - /** - * get the current duration - * - * @return {TimeRange} the duration - */ - - duration() { - if (!this.mainPlaylistLoader_) { - return 0; - } - const media = this.mainPlaylistLoader_.media(); - if (!media) { - // no playlists loaded yet, so can't determine a duration - return 0; - } // Don't rely on the media source for duration in the case of a live playlist since - // setting the native MediaSource's duration to infinity ends up with consequences to - // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details. - // - // This is resolved in the spec by https://github.com/w3c/media-source/pull/92, - // however, few browsers have support for setLiveSeekableRange() - // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange - // - // Until a time when the duration of the media source can be set to infinity, and a - // seekable range specified across browsers, just return Infinity. - - if (!media.endList) { - return Infinity; - } // Since this is a VOD video, it is safe to rely on the media source's duration (if - // available). If it's not available, fall back to a playlist-calculated estimate. - - if (this.mediaSource) { - return this.mediaSource.duration; - } - return Vhs$1.Playlist.duration(media); - } - /** - * check the seekable range - * - * @return {TimeRange} the seekable range - */ - - seekable() { - return this.seekable_; - } - onSyncInfoUpdate_() { - let audioSeekable; // TODO check for creation of both source buffers before updating seekable - // - // A fix was made to this function where a check for - // this.sourceUpdater_.hasCreatedSourceBuffers - // was added to ensure that both source buffers were created before seekable was - // updated. However, it originally had a bug where it was checking for a true and - // returning early instead of checking for false. Setting it to check for false to - // return early though created other issues. A call to play() would check for seekable - // end without verifying that a seekable range was present. In addition, even checking - // for that didn't solve some issues, as handleFirstPlay is sometimes worked around - // due to a media update calling load on the segment loaders, skipping a seek to live, - // thereby starting live streams at the beginning of the stream rather than at the end. - // - // This conditional should be fixed to wait for the creation of two source buffers at - // the same time as the other sections of code are fixed to properly seek to live and - // not throw an error due to checking for a seekable end when no seekable range exists. - // - // For now, fall back to the older behavior, with the understanding that the seekable - // range may not be completely correct, leading to a suboptimal initial live point. - - if (!this.mainPlaylistLoader_) { - return; - } - let media = this.mainPlaylistLoader_.media(); - if (!media) { - return; - } - let expired = this.syncController_.getExpiredTime(media, this.duration()); - if (expired === null) { - // not enough information to update seekable - return; - } - const main = this.mainPlaylistLoader_.main; - const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media)); - if (mainSeekable.length === 0) { - return; - } - if (this.mediaTypes_.AUDIO.activePlaylistLoader) { - media = this.mediaTypes_.AUDIO.activePlaylistLoader.media(); - expired = this.syncController_.getExpiredTime(media, this.duration()); - if (expired === null) { - return; - } - audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media)); - if (audioSeekable.length === 0) { - return; - } - } - let oldEnd; - let oldStart; - if (this.seekable_ && this.seekable_.length) { - oldEnd = this.seekable_.end(0); - oldStart = this.seekable_.start(0); - } - if (!audioSeekable) { - // seekable has been calculated based on buffering video data so it - // can be returned directly - this.seekable_ = mainSeekable; - } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) { - // seekables are pretty far off, rely on main - this.seekable_ = mainSeekable; - } else { - this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]); - } // seekable is the same as last time - - if (this.seekable_ && this.seekable_.length) { - if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) { - return; - } - } - this.logger_(`seekable updated [${printableRange(this.seekable_)}]`); - this.tech_.trigger('seekablechanged'); - } - /** - * Update the player duration - */ - - updateDuration(isLive) { - if (this.updateDuration_) { - this.mediaSource.removeEventListener('sourceopen', this.updateDuration_); - this.updateDuration_ = null; - } - if (this.mediaSource.readyState !== 'open') { - this.updateDuration_ = this.updateDuration.bind(this, isLive); - this.mediaSource.addEventListener('sourceopen', this.updateDuration_); - return; - } - if (isLive) { - const seekable = this.seekable(); - if (!seekable.length) { - return; - } // Even in the case of a live playlist, the native MediaSource's duration should not - // be set to Infinity (even though this would be expected for a live playlist), since - // setting the native MediaSource's duration to infinity ends up with consequences to - // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details. - // - // This is resolved in the spec by https://github.com/w3c/media-source/pull/92, - // however, few browsers have support for setLiveSeekableRange() - // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange - // - // Until a time when the duration of the media source can be set to infinity, and a - // seekable range specified across browsers, the duration should be greater than or - // equal to the last possible seekable value. - // MediaSource duration starts as NaN - // It is possible (and probable) that this case will never be reached for many - // sources, since the MediaSource reports duration as the highest value without - // accounting for timestamp offset. For example, if the timestamp offset is -100 and - // we buffered times 0 to 100 with real times of 100 to 200, even though current - // time will be between 0 and 100, the native media source may report the duration - // as 200. However, since we report duration separate from the media source (as - // Infinity), and as long as the native media source duration value is greater than - // our reported seekable range, seeks will work as expected. The large number as - // duration for live is actually a strategy used by some players to work around the - // issue of live seekable ranges cited above. - - if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) { - this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1)); - } - return; - } - const buffered = this.tech_.buffered(); - let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media()); - if (buffered.length > 0) { - duration = Math.max(duration, buffered.end(buffered.length - 1)); - } - if (this.mediaSource.duration !== duration) { - this.sourceUpdater_.setDuration(duration); - } - } - /** - * dispose of the PlaylistController and everything - * that it controls - */ - - dispose() { - this.trigger('dispose'); - this.decrypter_.terminate(); - this.mainPlaylistLoader_.dispose(); - this.mainSegmentLoader_.dispose(); - this.contentSteeringController_.dispose(); - if (this.loadOnPlay_) { - this.tech_.off('play', this.loadOnPlay_); - } - ['AUDIO', 'SUBTITLES'].forEach(type => { - const groups = this.mediaTypes_[type].groups; - for (const id in groups) { - groups[id].forEach(group => { - if (group.playlistLoader) { - group.playlistLoader.dispose(); - } - }); - } - }); - this.audioSegmentLoader_.dispose(); - this.subtitleSegmentLoader_.dispose(); - this.sourceUpdater_.dispose(); - this.timelineChangeController_.dispose(); - this.stopABRTimer_(); - if (this.updateDuration_) { - this.mediaSource.removeEventListener('sourceopen', this.updateDuration_); - } - this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player - - this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_); - this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_); - this.off(); - } - /** - * return the main playlist object if we have one - * - * @return {Object} the main playlist object that we parsed - */ - - main() { - return this.mainPlaylistLoader_.main; - } - /** - * return the currently selected playlist - * - * @return {Object} the currently selected playlist object that we parsed - */ - - media() { - // playlist loader will not return media if it has not been fully loaded - return this.mainPlaylistLoader_.media() || this.initialMedia_; - } - areMediaTypesKnown_() { - const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader; - const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info - // otherwise check on the segment loader. - - const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs - - if (!hasMainMediaInfo || !hasAudioMediaInfo) { - return false; - } - return true; - } - getCodecsOrExclude_() { - const media = { - main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {}, - audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {} - }; - const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set "main" media equal to video - - media.video = media.main; - const playlistCodecs = codecsForPlaylist(this.main(), playlist); - const codecs = {}; - const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader; - if (media.main.hasVideo) { - codecs.video = playlistCodecs.video || media.main.videoCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_VIDEO_CODEC; - } - if (media.main.isMuxed) { - codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_AUDIO_CODEC}`; - } - if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) { - codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct "supports" function below - - media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4; - } // no codecs, no playback. - - if (!codecs.audio && !codecs.video) { - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - message: 'Could not determine codecs for playlist.' - }, - playlistExclusionDuration: Infinity - }); - return; - } // fmp4 relies on browser support, while ts relies on muxer support - - const supportFunction = (isFmp4, codec) => isFmp4 ? (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codec) : (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codec); - const unsupportedCodecs = {}; - let unsupportedAudio; - ['video', 'audio'].forEach(function (type) { - if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) { - const supporter = media[type].isFmp4 ? 'browser' : 'muxer'; - unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || []; - unsupportedCodecs[supporter].push(codecs[type]); - if (type === 'audio') { - unsupportedAudio = supporter; - } - } - }); - if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) { - const audioGroup = playlist.attributes.AUDIO; - this.main().playlists.forEach(variant => { - const variantAudioGroup = variant.attributes && variant.attributes.AUDIO; - if (variantAudioGroup === audioGroup && variant !== playlist) { - variant.excludeUntil = Infinity; - } - }); - this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): "${codecs.audio}"`); - } // if we have any unsupported codecs exclude this playlist. - - if (Object.keys(unsupportedCodecs).length) { - const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => { - if (acc) { - acc += ', '; - } - acc += `${supporter} does not support codec(s): "${unsupportedCodecs[supporter].join(',')}"`; - return acc; - }, '') + '.'; - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - internal: true, - message - }, - playlistExclusionDuration: Infinity - }); - return; - } // check if codec switching is happening - - if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) { - const switchMessages = []; - ['video', 'audio'].forEach(type => { - const newCodec = ((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(this.sourceUpdater_.codecs[type] || '')[0] || {}).type; - const oldCodec = ((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs[type] || '')[0] || {}).type; - if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) { - switchMessages.push(`"${this.sourceUpdater_.codecs[type]}" -> "${codecs[type]}"`); - } - }); - if (switchMessages.length) { - this.excludePlaylist({ - playlistToExclude: playlist, - error: { - message: `Codec switching not supported: ${switchMessages.join(', ')}.`, - internal: true - }, - playlistExclusionDuration: Infinity - }); - return; - } - } // TODO: when using the muxer shouldn't we just return - // the codecs that the muxer outputs? - - return codecs; - } - /** - * Create source buffers and exlude any incompatible renditions. - * - * @private - */ - - tryToCreateSourceBuffers_() { - // media source is not ready yet or sourceBuffers are already - // created. - if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) { - return; - } - if (!this.areMediaTypesKnown_()) { - return; - } - const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded - - if (!codecs) { - return; - } - this.sourceUpdater_.createSourceBuffers(codecs); - const codecString = [codecs.video, codecs.audio].filter(Boolean).join(','); - this.excludeIncompatibleVariants_(codecString); - } - /** - * Excludes playlists with codecs that are unsupported by the muxer and browser. - */ - - excludeUnsupportedVariants_() { - const playlists = this.main().playlists; - const ids = []; // TODO: why don't we have a property to loop through all - // playlist? Why did we ever mix indexes and keys? - - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; // check if we already processed this playlist. - - if (ids.indexOf(variant.id) !== -1) { - return; - } - ids.push(variant.id); - const codecs = codecsForPlaylist(this.main, variant); - const unsupported = []; - if (codecs.audio && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codecs.audio) && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codecs.audio)) { - unsupported.push(`audio codec ${codecs.audio}`); - } - if (codecs.video && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.muxerSupportsCodec)(codecs.video) && !(0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)(codecs.video)) { - unsupported.push(`video codec ${codecs.video}`); - } - if (codecs.text && codecs.text === 'stpp.ttml.im1t') { - unsupported.push(`text codec ${codecs.text}`); - } - if (unsupported.length) { - variant.excludeUntil = Infinity; - this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`); - } - }); - } - /** - * Exclude playlists that are known to be codec or - * stream-incompatible with the SourceBuffer configuration. For - * instance, Media Source Extensions would cause the video element to - * stall waiting for video data if you switched from a variant with - * video and audio to an audio-only one. - * - * @param {Object} media a media playlist compatible with the current - * set of SourceBuffers. Variants in the current main playlist that - * do not appear to have compatible codec or stream configurations - * will be excluded from the default playlist selection algorithm - * indefinitely. - * @private - */ - - excludeIncompatibleVariants_(codecString) { - const ids = []; - const playlists = this.main().playlists; - const codecs = unwrapCodecList((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecString)); - const codecCount_ = codecCount(codecs); - const videoDetails = codecs.video && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs.video)[0] || null; - const audioDetails = codecs.audio && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(codecs.audio)[0] || null; - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; // check if we already processed this playlist. - // or it if it is already excluded forever. - - if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) { - return; - } - ids.push(variant.id); - const exclusionReasons = []; // get codecs from the playlist for this variant - - const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant); - const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this - // variant is incompatible. Wait for mux.js to probe - - if (!variantCodecs.audio && !variantCodecs.video) { - return; - } // TODO: we can support this by removing the - // old media source and creating a new one, but it will take some work. - // The number of streams cannot change - - if (variantCodecCount !== codecCount_) { - exclusionReasons.push(`codec count "${variantCodecCount}" !== "${codecCount_}"`); - } // only exclude playlists by codec change, if codecs cannot switch - // during playback. - - if (!this.sourceUpdater_.canChangeType()) { - const variantVideoDetails = variantCodecs.video && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(variantCodecs.video)[0] || null; - const variantAudioDetails = variantCodecs.audio && (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(variantCodecs.audio)[0] || null; // the video codec cannot change - - if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) { - exclusionReasons.push(`video codec "${variantVideoDetails.type}" !== "${videoDetails.type}"`); - } // the audio codec cannot change - - if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) { - exclusionReasons.push(`audio codec "${variantAudioDetails.type}" !== "${audioDetails.type}"`); - } - } - if (exclusionReasons.length) { - variant.excludeUntil = Infinity; - this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`); - } - }); - } - updateAdCues_(media) { - let offset = 0; - const seekable = this.seekable(); - if (seekable.length) { - offset = seekable.start(0); - } - updateAdCues(media, this.cueTagsTrack_, offset); - } - /** - * Calculates the desired forward buffer length based on current time - * - * @return {number} Desired forward buffer length in seconds - */ - - goalBufferLength() { - const currentTime = this.tech_.currentTime(); - const initial = Config.GOAL_BUFFER_LENGTH; - const rate = Config.GOAL_BUFFER_LENGTH_RATE; - const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH); - return Math.min(initial + currentTime * rate, max); - } - /** - * Calculates the desired buffer low water line based on current time - * - * @return {number} Desired buffer low water line in seconds - */ - - bufferLowWaterLine() { - const currentTime = this.tech_.currentTime(); - const initial = Config.BUFFER_LOW_WATER_LINE; - const rate = Config.BUFFER_LOW_WATER_LINE_RATE; - const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE); - const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE); - return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max); - } - bufferHighWaterLine() { - return Config.BUFFER_HIGH_WATER_LINE; - } - addDateRangesToTextTrack_(dateRanges) { - createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_); - addDateRangeMetadata({ - inbandTextTracks: this.inbandTextTracks_, - dateRanges - }); - } - addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) { - const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed - // audio/video source with a metadata track, and an alt audio with a metadata track. - // However, this probably won't happen, and if it does it can be handled then. - - createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_); - addMetadata({ - inbandTextTracks: this.inbandTextTracks_, - metadataArray, - timestampOffset, - videoDuration - }); - } - pathwayAttribute_(playlist) { - return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation; - } - /** - * Initialize content steering listeners and apply the tag properties. - */ - - initContentSteeringController_() { - const initialMain = this.main(); - if (!initialMain.contentSteering) { - return; - } - const updateSteeringValues = main => { - for (const playlist of main.playlists) { - this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist)); - } - this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); - }; - updateSteeringValues(initialMain); - this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new - // manifest is loaded in live DASH with content steering. - - if (this.sourceType_ === 'dash') { - this.mainPlaylistLoader_.on('mediaupdatetimeout', () => { - this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id); // clear past values - - this.contentSteeringController_.abort(); - this.contentSteeringController_.clearTTLTimeout_(); - this.contentSteeringController_.clearAvailablePathways(); - updateSteeringValues(this.main()); - }); - } // Do this at startup only, after that the steering requests are managed by the Content Steering class. - // DASH queryBeforeStart scenarios will be handled by the Content Steering class. - - if (!this.contentSteeringController_.queryBeforeStart) { - this.tech_.one('canplay', () => { - this.contentSteeringController_.requestSteeringManifest(); - }); - } - } - /** - * Simple exclude and change playlist logic for content steering. - */ - - excludeThenChangePathway_() { - const currentPathway = this.contentSteeringController_.getPathway(); - if (!currentPathway) { - return; - } - const main = this.main(); - const playlists = main.playlists; - const ids = new Set(); - let didEnablePlaylists = false; - Object.keys(playlists).forEach(key => { - const variant = playlists[key]; - const pathwayId = this.pathwayAttribute_(variant); - const differentPathwayId = pathwayId && currentPathway !== pathwayId; - const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering'; - if (steeringExclusion && !differentPathwayId) { - delete variant.excludeUntil; - delete variant.lastExcludeReason_; - didEnablePlaylists = true; - } - const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity; - const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil; - if (!shouldExclude) { - return; - } - ids.add(variant.id); - variant.excludeUntil = Infinity; - variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this. - - this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`); - }); - if (this.contentSteeringController_.manifestType_ === 'DASH') { - Object.keys(this.mediaTypes_).forEach(key => { - const type = this.mediaTypes_[key]; - if (type.activePlaylistLoader) { - const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN - - if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) { - didEnablePlaylists = true; - } - } - }); - } - if (didEnablePlaylists) { - this.changeSegmentPathway_(); - } - } - /** - * Changes the current playlists for audio, video and subtitles after a new pathway - * is chosen from content steering. - */ - - changeSegmentPathway_() { - const nextPlaylist = this.selectPlaylist(); - this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH - - if (this.contentSteeringController_.manifestType_ === 'DASH') { - this.switchMediaForDASHContentSteering_(); - } - this.switchMedia_(nextPlaylist, 'content-steering'); - } -} - -/** - * Returns a function that acts as the Enable/disable playlist function. - * - * @param {PlaylistLoader} loader - The main playlist loader - * @param {string} playlistID - id of the playlist - * @param {Function} changePlaylistFn - A function to be called after a - * playlist's enabled-state has been changed. Will NOT be called if a - * playlist's enabled-state is unchanged - * @param {boolean=} enable - Value to set the playlist enabled-state to - * or if undefined returns the current enabled-state for the playlist - * @return {Function} Function for setting/getting enabled - */ - -const enableFunction = (loader, playlistID, changePlaylistFn) => enable => { - const playlist = loader.main.playlists[playlistID]; - const incompatible = isIncompatible(playlist); - const currentlyEnabled = isEnabled(playlist); - if (typeof enable === 'undefined') { - return currentlyEnabled; - } - if (enable) { - delete playlist.disabled; - } else { - playlist.disabled = true; - } - if (enable !== currentlyEnabled && !incompatible) { - // Ensure the outside world knows about our changes - changePlaylistFn(); - if (enable) { - loader.trigger('renditionenabled'); - } else { - loader.trigger('renditiondisabled'); - } - } - return enable; -}; -/** - * The representation object encapsulates the publicly visible information - * in a media playlist along with a setter/getter-type function (enabled) - * for changing the enabled-state of a particular playlist entry - * - * @class Representation - */ - -class Representation { - constructor(vhsHandler, playlist, id) { - const { - playlistController_: pc - } = vhsHandler; - const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional - - if (playlist.attributes) { - const resolution = playlist.attributes.RESOLUTION; - this.width = resolution && resolution.width; - this.height = resolution && resolution.height; - this.bandwidth = playlist.attributes.BANDWIDTH; - this.frameRate = playlist.attributes['FRAME-RATE']; - } - this.codecs = codecsForPlaylist(pc.main(), playlist); - this.playlist = playlist; // The id is simply the ordinality of the media playlist - // within the main playlist - - this.id = id; // Partially-apply the enableFunction to create a playlist- - // specific variant - - this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction); - } -} -/** - * A mixin function that adds the `representations` api to an instance - * of the VhsHandler class - * - * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the - * representation API into - */ - -const renditionSelectionMixin = function (vhsHandler) { - // Add a single API-specific function to the VhsHandler instance - vhsHandler.representations = () => { - const main = vhsHandler.playlistController_.main(); - const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists; - if (!playlists) { - return []; - } - return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id)); - }; -}; - -/** - * @file playback-watcher.js - * - * Playback starts, and now my watch begins. It shall not end until my death. I shall - * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns - * and win no glory. I shall live and die at my post. I am the corrector of the underflow. - * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge - * my life and honor to the Playback Watch, for this Player and all the Players to come. - */ - -const timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error']; -/** - * @class PlaybackWatcher - */ - -class PlaybackWatcher { - /** - * Represents an PlaybackWatcher object. - * - * @class - * @param {Object} options an object that includes the tech and settings - */ - constructor(options) { - this.playlistController_ = options.playlistController; - this.tech_ = options.tech; - this.seekable = options.seekable; - this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow; - this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta; - this.media = options.media; - this.consecutiveUpdates = 0; - this.lastRecordedTime = null; - this.checkCurrentTimeTimeout_ = null; - this.logger_ = logger('PlaybackWatcher'); - this.logger_('initialize'); - const playHandler = () => this.monitorCurrentTime_(); - const canPlayHandler = () => this.monitorCurrentTime_(); - const waitingHandler = () => this.techWaiting_(); - const cancelTimerHandler = () => this.resetTimeUpdate_(); - const pc = this.playlistController_; - const loaderTypes = ['main', 'subtitle', 'audio']; - const loaderChecks = {}; - loaderTypes.forEach(type => { - loaderChecks[type] = { - reset: () => this.resetSegmentDownloads_(type), - updateend: () => this.checkSegmentDownloads_(type) - }; - pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer - // isn't changing we want to reset. We cannot assume that the new rendition - // will also be stalled, until after new appends. - - pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking. - // This prevents one segment playlists (single vtt or single segment content) - // from being detected as stalling. As the buffer will not change in those cases, since - // the buffer is the entire video duration. - - this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset); - }); - /** - * We check if a seek was into a gap through the following steps: - * 1. We get a seeking event and we do not get a seeked event. This means that - * a seek was attempted but not completed. - * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already - * removed everything from our buffer and appended a segment, and should be ready - * to check for gaps. - */ - - const setSeekingHandlers = fn => { - ['main', 'audio'].forEach(type => { - pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_); - }); - }; - this.seekingAppendCheck_ = () => { - if (this.fixesBadSeeks_()) { - this.consecutiveUpdates = 0; - this.lastRecordedTime = this.tech_.currentTime(); - setSeekingHandlers('off'); - } - }; - this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off'); - this.watchForBadSeeking_ = () => { - this.clearSeekingAppendCheck_(); - setSeekingHandlers('on'); - }; - this.tech_.on('seeked', this.clearSeekingAppendCheck_); - this.tech_.on('seeking', this.watchForBadSeeking_); - this.tech_.on('waiting', waitingHandler); - this.tech_.on(timerCancelEvents, cancelTimerHandler); - this.tech_.on('canplay', canPlayHandler); - /* - An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case - is surfaced in one of two ways: - 1) The `waiting` event is fired before the player has buffered content, making it impossible - to find or skip the gap. The `waiting` event is followed by a `play` event. On first play - we can check if playback is stalled due to a gap, and skip the gap if necessary. - 2) A source with a gap at the beginning of the stream is loaded programatically while the player - is in a playing state. To catch this case, it's important that our one-time play listener is setup - even if the player is in a playing state - */ - - this.tech_.one('play', playHandler); // Define the dispose function to clean up our events - - this.dispose = () => { - this.clearSeekingAppendCheck_(); - this.logger_('dispose'); - this.tech_.off('waiting', waitingHandler); - this.tech_.off(timerCancelEvents, cancelTimerHandler); - this.tech_.off('canplay', canPlayHandler); - this.tech_.off('play', playHandler); - this.tech_.off('seeking', this.watchForBadSeeking_); - this.tech_.off('seeked', this.clearSeekingAppendCheck_); - loaderTypes.forEach(type => { - pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend); - pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset); - this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset); - }); - if (this.checkCurrentTimeTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkCurrentTimeTimeout_); - } - this.resetTimeUpdate_(); - }; - } - /** - * Periodically check current time to see if playback stopped - * - * @private - */ - - monitorCurrentTime_() { - this.checkCurrentTime_(); - if (this.checkCurrentTimeTimeout_) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkCurrentTimeTimeout_); - } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 - - this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorCurrentTime_.bind(this), 250); - } - /** - * Reset stalled download stats for a specific type of loader - * - * @param {string} type - * The segment loader type to check. - * - * @listens SegmentLoader#playlistupdate - * @listens Tech#seeking - * @listens Tech#seeked - */ - - resetSegmentDownloads_(type) { - const loader = this.playlistController_[`${type}SegmentLoader_`]; - if (this[`${type}StalledDownloads_`] > 0) { - this.logger_(`resetting possible stalled download count for ${type} loader`); - } - this[`${type}StalledDownloads_`] = 0; - this[`${type}Buffered_`] = loader.buffered_(); - } - /** - * Checks on every segment `appendsdone` to see - * if segment appends are making progress. If they are not - * and we are still downloading bytes. We exclude the playlist. - * - * @param {string} type - * The segment loader type to check. - * - * @listens SegmentLoader#appendsdone - */ - - checkSegmentDownloads_(type) { - const pc = this.playlistController_; - const loader = pc[`${type}SegmentLoader_`]; - const buffered = loader.buffered_(); - const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered); - this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or - // the buffered value for this loader changed - // appends are working - - if (isBufferedDifferent) { - this.resetSegmentDownloads_(type); - return; - } - this[`${type}StalledDownloads_`]++; - this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, { - playlistId: loader.playlist_ && loader.playlist_.id, - buffered: timeRangesToArray(buffered) - }); // after 10 possibly stalled appends with no reset, exclude - - if (this[`${type}StalledDownloads_`] < 10) { - return; - } - this.logger_(`${type} loader stalled download exclusion`); - this.resetSegmentDownloads_(type); - this.tech_.trigger({ - type: 'usage', - name: `vhs-${type}-download-exclusion` - }); - if (type === 'subtitle') { - return; - } // TODO: should we exclude audio tracks rather than main tracks - // when type is audio? - - pc.excludePlaylist({ - error: { - message: `Excessive ${type} segment downloading detected.` - }, - playlistExclusionDuration: Infinity - }); - } - /** - * The purpose of this function is to emulate the "waiting" event on - * browsers that do not emit it when they are waiting for more - * data to continue playback - * - * @private - */ - - checkCurrentTime_() { - if (this.tech_.paused() || this.tech_.seeking()) { - return; - } - const currentTime = this.tech_.currentTime(); - const buffered = this.tech_.buffered(); - if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) { - // If current time is at the end of the final buffered region, then any playback - // stall is most likely caused by buffering in a low bandwidth environment. The tech - // should fire a `waiting` event in this scenario, but due to browser and tech - // inconsistencies. Calling `techWaiting_` here allows us to simulate - // responding to a native `waiting` event when the tech fails to emit one. - return this.techWaiting_(); - } - if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) { - this.consecutiveUpdates++; - this.waiting_(); - } else if (currentTime === this.lastRecordedTime) { - this.consecutiveUpdates++; - } else { - this.consecutiveUpdates = 0; - this.lastRecordedTime = currentTime; - } - } - /** - * Resets the 'timeupdate' mechanism designed to detect that we are stalled - * - * @private - */ - - resetTimeUpdate_() { - this.consecutiveUpdates = 0; - } - /** - * Fixes situations where there's a bad seek - * - * @return {boolean} whether an action was taken to fix the seek - * @private - */ - - fixesBadSeeks_() { - const seeking = this.tech_.seeking(); - if (!seeking) { - return false; - } // TODO: It's possible that these seekable checks should be moved out of this function - // and into a function that runs on seekablechange. It's also possible that we only need - // afterSeekableWindow as the buffered check at the bottom is good enough to handle before - // seekable range. - - const seekable = this.seekable(); - const currentTime = this.tech_.currentTime(); - const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow); - let seekTo; - if (isAfterSeekableRange) { - const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting) - - seekTo = seekableEnd; - } - if (this.beforeSeekableWindow_(seekable, currentTime)) { - const seekableStart = seekable.start(0); // sync to the beginning of the live window - // provide a buffer of .1 seconds to handle rounding/imprecise numbers - - seekTo = seekableStart + ( - // if the playlist is too short and the seekable range is an exact time (can - // happen in live with a 3 segment playlist), then don't use a time delta - seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA); - } - if (typeof seekTo !== 'undefined') { - this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`); - this.tech_.setCurrentTime(seekTo); - return true; - } - const sourceUpdater = this.playlistController_.sourceUpdater_; - const buffered = this.tech_.buffered(); - const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null; - const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null; - const media = this.media(); // verify that at least two segment durations or one part duration have been - // appended before checking for a gap. - - const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been - // appended before checking for a gap. - - const bufferedToCheck = [audioBuffered, videoBuffered]; - for (let i = 0; i < bufferedToCheck.length; i++) { - // skip null buffered - if (!bufferedToCheck[i]) { - continue; - } - const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part - // duration behind we haven't appended enough to call this a bad seek. - - if (timeAhead < minAppendedDuration) { - return false; - } - } - const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered - // to seek over the gap - - if (nextRange.length === 0) { - return false; - } - seekTo = nextRange.start(0) + SAFE_TIME_DELTA; - this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`); - this.tech_.setCurrentTime(seekTo); - return true; - } - /** - * Handler for situations when we determine the player is waiting. - * - * @private - */ - - waiting_() { - if (this.techWaiting_()) { - return; - } // All tech waiting checks failed. Use last resort correction - - const currentTime = this.tech_.currentTime(); - const buffered = this.tech_.buffered(); - const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered - // region with no indication that anything is amiss (seen in Firefox). Seeking to - // currentTime is usually enough to kickstart the player. This checks that the player - // is currently within a buffered region before attempting a corrective seek. - // Chrome does not appear to continue `timeupdate` events after a `waiting` event - // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also - // make sure there is ~3 seconds of forward buffer before taking any corrective action - // to avoid triggering an `unknownwaiting` event when the network is slow. - - if (currentRange.length && currentTime + 3 <= currentRange.end(0)) { - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(currentTime); - this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS - - this.tech_.trigger({ - type: 'usage', - name: 'vhs-unknown-waiting' - }); - return; - } - } - /** - * Handler for situations when the tech fires a `waiting` event - * - * @return {boolean} - * True if an action (or none) was needed to correct the waiting. False if no - * checks passed - * @private - */ - - techWaiting_() { - const seekable = this.seekable(); - const currentTime = this.tech_.currentTime(); - if (this.tech_.seeking()) { - // Tech is seeking or already waiting on another action, no action needed - return true; - } - if (this.beforeSeekableWindow_(seekable, currentTime)) { - const livePoint = seekable.end(seekable.length - 1); - this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`); - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS - - this.tech_.trigger({ - type: 'usage', - name: 'vhs-live-resync' - }); - return true; - } - const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_; - const buffered = this.tech_.buffered(); - const videoUnderflow = this.videoUnderflow_({ - audioBuffered: sourceUpdater.audioBuffered(), - videoBuffered: sourceUpdater.videoBuffered(), - currentTime - }); - if (videoUnderflow) { - // Even though the video underflowed and was stuck in a gap, the audio overplayed - // the gap, leading currentTime into a buffered range. Seeking to currentTime - // allows the video to catch up to the audio position without losing any audio - // (only suffering ~3 seconds of frozen video and a pause in audio playback). - this.resetTimeUpdate_(); - this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS - - this.tech_.trigger({ - type: 'usage', - name: 'vhs-video-underflow' - }); - return true; - } - const nextRange = findNextRange(buffered, currentTime); // check for gap - - if (nextRange.length > 0) { - this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`); - this.resetTimeUpdate_(); - this.skipTheGap_(currentTime); - return true; - } // All checks failed. Returning false to indicate failure to correct waiting - - return false; - } - afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) { - if (!seekable.length) { - // we can't make a solid case if there's no seekable, default to false - return false; - } - let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA; - const isLive = !playlist.endList; - const isLLHLS = typeof playlist.partTargetDuration === 'number'; - if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) { - allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3; - } - if (currentTime > allowedEnd) { - return true; - } - return false; - } - beforeSeekableWindow_(seekable, currentTime) { - if (seekable.length && - // can't fall before 0 and 0 seekable start identifies VOD stream - seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) { - return true; - } - return false; - } - videoUnderflow_({ - videoBuffered, - audioBuffered, - currentTime - }) { - // audio only content will not have video underflow :) - if (!videoBuffered) { - return; - } - let gap; // find a gap in demuxed content. - - if (videoBuffered.length && audioBuffered.length) { - // in Chrome audio will continue to play for ~3s when we run out of video - // so we have to check that the video buffer did have some buffer in the - // past. - const lastVideoRange = findRange(videoBuffered, currentTime - 3); - const videoRange = findRange(videoBuffered, currentTime); - const audioRange = findRange(audioBuffered, currentTime); - if (audioRange.length && !videoRange.length && lastVideoRange.length) { - gap = { - start: lastVideoRange.end(0), - end: audioRange.end(0) - }; - } // find a gap in muxed content. - } else { - const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are - // stuck in a gap due to video underflow. - - if (!nextRange.length) { - gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime); - } - } - if (gap) { - this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`); - return true; - } - return false; - } - /** - * Timer callback. If playback still has not proceeded, then we seek - * to the start of the next buffered region. - * - * @private - */ - - skipTheGap_(scheduledCurrentTime) { - const buffered = this.tech_.buffered(); - const currentTime = this.tech_.currentTime(); - const nextRange = findNextRange(buffered, currentTime); - this.resetTimeUpdate_(); - if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) { - return; - } - this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played - - this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR); - this.tech_.trigger({ - type: 'usage', - name: 'vhs-gap-skip' - }); - } - gapFromVideoUnderflow_(buffered, currentTime) { - // At least in Chrome, if there is a gap in the video buffer, the audio will continue - // playing for ~3 seconds after the video gap starts. This is done to account for - // video buffer underflow/underrun (note that this is not done when there is audio - // buffer underflow/underrun -- in that case the video will stop as soon as it - // encounters the gap, as audio stalls are more noticeable/jarring to a user than - // video stalls). The player's time will reflect the playthrough of audio, so the - // time will appear as if we are in a buffered region, even if we are stuck in a - // "gap." - // - // Example: - // video buffer: 0 => 10.1, 10.2 => 20 - // audio buffer: 0 => 20 - // overall buffer: 0 => 10.1, 10.2 => 20 - // current time: 13 - // - // Chrome's video froze at 10 seconds, where the video buffer encountered the gap, - // however, the audio continued playing until it reached ~3 seconds past the gap - // (13 seconds), at which point it stops as well. Since current time is past the - // gap, findNextRange will return no ranges. - // - // To check for this issue, we see if there is a gap that starts somewhere within - // a 3 second range (3 seconds +/- 1 second) back from our current time. - const gaps = findGaps(buffered); - for (let i = 0; i < gaps.length; i++) { - const start = gaps.start(i); - const end = gaps.end(i); // gap is starts no more than 4 seconds back - - if (currentTime - start < 4 && currentTime - start > 2) { - return { - start, - end - }; - } - } - return null; - } -} -const defaultOptions = { - errorInterval: 30, - getSource(next) { - const tech = this.tech({ - IWillNotUseThisInPlugins: true - }); - const sourceObj = tech.currentSource_ || this.currentSource(); - return next(sourceObj); - } -}; -/** - * Main entry point for the plugin - * - * @param {Player} player a reference to a videojs Player instance - * @param {Object} [options] an object with plugin options - * @private - */ - -const initPlugin = function (player, options) { - let lastCalled = 0; - let seekTo = 0; - const localOptions = merge(defaultOptions, options); - player.ready(() => { - player.trigger({ - type: 'usage', - name: 'vhs-error-reload-initialized' - }); - }); - /** - * Player modifications to perform that must wait until `loadedmetadata` - * has been triggered - * - * @private - */ - - const loadedMetadataHandler = function () { - if (seekTo) { - player.currentTime(seekTo); - } - }; - /** - * Set the source on the player element, play, and seek if necessary - * - * @param {Object} sourceObj An object specifying the source url and mime-type to play - * @private - */ - - const setSource = function (sourceObj) { - if (sourceObj === null || sourceObj === undefined) { - return; - } - seekTo = player.duration() !== Infinity && player.currentTime() || 0; - player.one('loadedmetadata', loadedMetadataHandler); - player.src(sourceObj); - player.trigger({ - type: 'usage', - name: 'vhs-error-reload' - }); - player.play(); - }; - /** - * Attempt to get a source from either the built-in getSource function - * or a custom function provided via the options - * - * @private - */ - - const errorHandler = function () { - // Do not attempt to reload the source if a source-reload occurred before - // 'errorInterval' time has elapsed since the last source-reload - if (Date.now() - lastCalled < localOptions.errorInterval * 1000) { - player.trigger({ - type: 'usage', - name: 'vhs-error-reload-canceled' - }); - return; - } - if (!localOptions.getSource || typeof localOptions.getSource !== 'function') { - videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!'); - return; - } - lastCalled = Date.now(); - return localOptions.getSource.call(player, setSource); - }; - /** - * Unbind any event handlers that were bound by the plugin - * - * @private - */ - - const cleanupEvents = function () { - player.off('loadedmetadata', loadedMetadataHandler); - player.off('error', errorHandler); - player.off('dispose', cleanupEvents); - }; - /** - * Cleanup before re-initializing the plugin - * - * @param {Object} [newOptions] an object with plugin options - * @private - */ - - const reinitPlugin = function (newOptions) { - cleanupEvents(); - initPlugin(player, newOptions); - }; - player.on('error', errorHandler); - player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before - // initializing the plugin - - player.reloadSourceOnError = reinitPlugin; -}; -/** - * Reload the source when an error is detected as long as there - * wasn't an error previously within the last 30 seconds - * - * @param {Object} [options] an object with plugin options - */ - -const reloadSourceOnError = function (options) { - initPlugin(this, options); -}; -var version$4 = "3.7.0"; -var version$3 = "7.0.1"; -var version$2 = "1.2.2"; -var version$1 = "7.1.0"; -var version = "4.0.1"; - -/** - * @file videojs-http-streaming.js - * - * The main file for the VHS project. - * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE - */ -const Vhs = { - PlaylistLoader, - Playlist, - utils, - STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector, - INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector, - lastBandwidthSelector, - movingAverageBandwidthSelector, - comparePlaylistBandwidth, - comparePlaylistResolution, - xhr: xhrFactory() -}; // Define getter/setters for config properties - -Object.keys(Config).forEach(prop => { - Object.defineProperty(Vhs, prop, { - get() { - videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`); - return Config[prop]; - }, - set(value) { - videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`); - if (typeof value !== 'number' || value < 0) { - videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`); - return; - } - Config[prop] = value; - } - }); -}); -const LOCAL_STORAGE_KEY = 'videojs-vhs'; -/** - * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs. - * - * @param {QualityLevelList} qualityLevels The QualityLevelList to update. - * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info. - * @function handleVhsMediaChange - */ - -const handleVhsMediaChange = function (qualityLevels, playlistLoader) { - const newPlaylist = playlistLoader.media(); - let selectedIndex = -1; - for (let i = 0; i < qualityLevels.length; i++) { - if (qualityLevels[i].id === newPlaylist.id) { - selectedIndex = i; - break; - } - } - qualityLevels.selectedIndex_ = selectedIndex; - qualityLevels.trigger({ - selectedIndex, - type: 'change' - }); -}; -/** - * Adds quality levels to list once playlist metadata is available - * - * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to. - * @param {Object} vhs Vhs object to listen to for media events. - * @function handleVhsLoadedMetadata - */ - -const handleVhsLoadedMetadata = function (qualityLevels, vhs) { - vhs.representations().forEach(rep => { - qualityLevels.addQualityLevel(rep); - }); - handleVhsMediaChange(qualityLevels, vhs.playlists); -}; // VHS is a source handler, not a tech. Make sure attempts to use it -// as one do not cause exceptions. - -Vhs.canPlaySource = function () { - return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\'s techOrder.'); -}; -const emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => { - if (!keySystemOptions) { - return keySystemOptions; - } - let codecs = {}; - if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) { - codecs = unwrapCodecList((0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.parseCodecs)(mainPlaylist.attributes.CODECS)); - } - if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) { - codecs.audio = audioPlaylist.attributes.CODECS; - } - const videoContentType = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codecs.video); - const audioContentType = (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.getMimeForCodec)(codecs.audio); // upsert the content types based on the selected playlist - - const keySystemContentTypes = {}; - for (const keySystem in keySystemOptions) { - keySystemContentTypes[keySystem] = {}; - if (audioContentType) { - keySystemContentTypes[keySystem].audioContentType = audioContentType; - } - if (videoContentType) { - keySystemContentTypes[keySystem].videoContentType = videoContentType; - } // Default to using the video playlist's PSSH even though they may be different, as - // videojs-contrib-eme will only accept one in the options. - // - // This shouldn't be an issue for most cases as early intialization will handle all - // unique PSSH values, and if they aren't, then encrypted events should have the - // specific information needed for the unique license. - - if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) { - keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh; - } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url' - // so we need to prevent overwriting the URL entirely - - if (typeof keySystemOptions[keySystem] === 'string') { - keySystemContentTypes[keySystem].url = keySystemOptions[keySystem]; - } - } - return merge(keySystemOptions, keySystemContentTypes); -}; -/** - * @typedef {Object} KeySystems - * - * keySystems configuration for https://github.com/videojs/videojs-contrib-eme - * Note: not all options are listed here. - * - * @property {Uint8Array} [pssh] - * Protection System Specific Header - */ - -/** - * Goes through all the playlists and collects an array of KeySystems options objects - * containing each playlist's keySystems and their pssh values, if available. - * - * @param {Object[]} playlists - * The playlists to look through - * @param {string[]} keySystems - * The keySystems to collect pssh values for - * - * @return {KeySystems[]} - * An array of KeySystems objects containing available key systems and their - * pssh values - */ - -const getAllPsshKeySystemsOptions = (playlists, keySystems) => { - return playlists.reduce((keySystemsArr, playlist) => { - if (!playlist.contentProtection) { - return keySystemsArr; - } - const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => { - const keySystemOptions = playlist.contentProtection[keySystem]; - if (keySystemOptions && keySystemOptions.pssh) { - keySystemsObj[keySystem] = { - pssh: keySystemOptions.pssh - }; - } - return keySystemsObj; - }, {}); - if (Object.keys(keySystemsOptions).length) { - keySystemsArr.push(keySystemsOptions); - } - return keySystemsArr; - }, []); -}; -/** - * Returns a promise that waits for the - * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session. - * - * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11 - * browsers. - * - * As per the above ticket, this is particularly important for Chrome, where, if - * unencrypted content is appended before encrypted content and the key session has not - * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached - * during playback. - * - * @param {Object} player - * The player instance - * @param {Object[]} sourceKeySystems - * The key systems options from the player source - * @param {Object} [audioMedia] - * The active audio media playlist (optional) - * @param {Object[]} mainPlaylists - * The playlists found on the main playlist object - * - * @return {Object} - * Promise that resolves when the key session has been created - */ - -const waitForKeySessionCreation = ({ - player, - sourceKeySystems, - audioMedia, - mainPlaylists -}) => { - if (!player.eme.initializeMediaKeys) { - return Promise.resolve(); - } // TODO should all audio PSSH values be initialized for DRM? - // - // All unique video rendition pssh values are initialized for DRM, but here only - // the initial audio playlist license is initialized. In theory, an encrypted - // event should be fired if the user switches to an alternative audio playlist - // where a license is required, but this case hasn't yet been tested. In addition, there - // may be many alternate audio playlists unlikely to be used (e.g., multiple different - // languages). - - const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists; - const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems)); - const initializationFinishedPromises = []; - const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The - // only place where it should not be deduped is for ms-prefixed APIs, but - // the existence of modern EME APIs in addition to - // ms-prefixed APIs on Edge should prevent this from being a concern. - // initializeMediaKeys also won't use the webkit-prefixed APIs. - - keySystemsOptionsArr.forEach(keySystemsOptions => { - keySessionCreatedPromises.push(new Promise((resolve, reject) => { - player.tech_.one('keysessioncreated', resolve); - })); - initializationFinishedPromises.push(new Promise((resolve, reject) => { - player.eme.initializeMediaKeys({ - keySystems: keySystemsOptions - }, err => { - if (err) { - reject(err); - return; - } - resolve(); - }); - })); - }); // The reasons Promise.race is chosen over Promise.any: - // - // * Promise.any is only available in Safari 14+. - // * None of these promises are expected to reject. If they do reject, it might be - // better here for the race to surface the rejection, rather than mask it by using - // Promise.any. - - return Promise.race([ - // If a session was previously created, these will all finish resolving without - // creating a new session, otherwise it will take until the end of all license - // requests, which is why the key session check is used (to make setup much faster). - Promise.all(initializationFinishedPromises), - // Once a single session is created, the browser knows DRM will be used. - Promise.race(keySessionCreatedPromises)]); -}; -/** - * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and - * there are keySystems on the source, sets up source options to prepare the source for - * eme. - * - * @param {Object} player - * The player instance - * @param {Object[]} sourceKeySystems - * The key systems options from the player source - * @param {Object} media - * The active media playlist - * @param {Object} [audioMedia] - * The active audio media playlist (optional) - * - * @return {boolean} - * Whether or not options were configured and EME is available - */ - -const setupEmeOptions = ({ - player, - sourceKeySystems, - media, - audioMedia -}) => { - const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia); - if (!sourceOptions) { - return false; - } - player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing - // do nothing. - - if (sourceOptions && !player.eme) { - videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin'); - return false; - } - return true; -}; -const getVhsLocalStorage = () => { - if (!(global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage)) { - return null; - } - const storedObject = global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage.getItem(LOCAL_STORAGE_KEY); - if (!storedObject) { - return null; - } - try { - return JSON.parse(storedObject); - } catch (e) { - // someone may have tampered with the value - return null; - } -}; -const updateVhsLocalStorage = options => { - if (!(global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage)) { - return false; - } - let objectToStore = getVhsLocalStorage(); - objectToStore = objectToStore ? merge(objectToStore, options) : options; - try { - global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore)); - } catch (e) { - // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where - // storage is set to 0). - // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions - // No need to perform any operation. - return false; - } - return objectToStore; -}; -/** - * Parses VHS-supported media types from data URIs. See - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - * for information on data URIs. - * - * @param {string} dataUri - * The data URI - * - * @return {string|Object} - * The parsed object/string, or the original string if no supported media type - * was found - */ - -const expandDataUri = dataUri => { - if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) { - return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1)); - } // no known case for this data URI, return the string as-is - - return dataUri; -}; -/** - * Adds a request hook to an xhr object - * - * @param {Object} xhr object to add the onRequest hook to - * @param {function} callback hook function for an xhr request - */ - -const addOnRequestHook = (xhr, callback) => { - if (!xhr._requestCallbackSet) { - xhr._requestCallbackSet = new Set(); - } - xhr._requestCallbackSet.add(callback); -}; -/** - * Adds a response hook to an xhr object - * - * @param {Object} xhr object to add the onResponse hook to - * @param {function} callback hook function for an xhr response - */ - -const addOnResponseHook = (xhr, callback) => { - if (!xhr._responseCallbackSet) { - xhr._responseCallbackSet = new Set(); - } - xhr._responseCallbackSet.add(callback); -}; -/** - * Removes a request hook on an xhr object, deletes the onRequest set if empty. - * - * @param {Object} xhr object to remove the onRequest hook from - * @param {function} callback hook function to remove - */ - -const removeOnRequestHook = (xhr, callback) => { - if (!xhr._requestCallbackSet) { - return; - } - xhr._requestCallbackSet.delete(callback); - if (!xhr._requestCallbackSet.size) { - delete xhr._requestCallbackSet; - } -}; -/** - * Removes a response hook on an xhr object, deletes the onResponse set if empty. - * - * @param {Object} xhr object to remove the onResponse hook from - * @param {function} callback hook function to remove - */ - -const removeOnResponseHook = (xhr, callback) => { - if (!xhr._responseCallbackSet) { - return; - } - xhr._responseCallbackSet.delete(callback); - if (!xhr._responseCallbackSet.size) { - delete xhr._responseCallbackSet; - } -}; -/** - * Whether the browser has built-in HLS support. - */ - -Vhs.supportsNativeHls = function () { - if (!(global_document__WEBPACK_IMPORTED_MODULE_1___default()) || !(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement)) { - return false; - } - const video = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement('video'); // native HLS is definitely not supported if HTML5 video isn't - - if (!videojs.getTech('Html5').isSupported()) { - return false; - } // HLS manifests can go by many mime-types - - const canPlay = [ - // Apple santioned - 'application/vnd.apple.mpegurl', - // Apple sanctioned for backwards compatibility - 'audio/mpegurl', - // Very common - 'audio/x-mpegurl', - // Very common - 'application/x-mpegurl', - // Included for completeness - 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl']; - return canPlay.some(function (canItPlay) { - return /maybe|probably/i.test(video.canPlayType(canItPlay)); - }); -}(); -Vhs.supportsNativeDash = function () { - if (!(global_document__WEBPACK_IMPORTED_MODULE_1___default()) || !(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement) || !videojs.getTech('Html5').isSupported()) { - return false; - } - return /maybe|probably/i.test(global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement('video').canPlayType('application/dash+xml')); -}(); -Vhs.supportsTypeNatively = type => { - if (type === 'hls') { - return Vhs.supportsNativeHls; - } - if (type === 'dash') { - return Vhs.supportsNativeDash; - } - return false; -}; -/** - * VHS is a source handler, not a tech. Make sure attempts to use it - * as one do not cause exceptions. - */ - -Vhs.isSupported = function () { - return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\'s techOrder.'); -}; -/** - * A global function for setting an onRequest hook - * - * @param {function} callback for request modifiction - */ - -Vhs.xhr.onRequest = function (callback) { - addOnRequestHook(Vhs.xhr, callback); -}; -/** - * A global function for setting an onResponse hook - * - * @param {callback} callback for response data retrieval - */ - -Vhs.xhr.onResponse = function (callback) { - addOnResponseHook(Vhs.xhr, callback); -}; -/** - * Deletes a global onRequest callback if it exists - * - * @param {function} callback to delete from the global set - */ - -Vhs.xhr.offRequest = function (callback) { - removeOnRequestHook(Vhs.xhr, callback); -}; -/** - * Deletes a global onResponse callback if it exists - * - * @param {function} callback to delete from the global set - */ - -Vhs.xhr.offResponse = function (callback) { - removeOnResponseHook(Vhs.xhr, callback); -}; -const Component = videojs.getComponent('Component'); -/** - * The Vhs Handler object, where we orchestrate all of the parts - * of VHS to interact with video.js - * - * @class VhsHandler - * @extends videojs.Component - * @param {Object} source the soruce object - * @param {Tech} tech the parent tech object - * @param {Object} options optional and required options - */ - -class VhsHandler extends Component { - constructor(source, tech, options) { - super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed - // use that over the VHS level `bandwidth` option - - if (typeof options.initialBandwidth === 'number') { - this.options_.bandwidth = options.initialBandwidth; - } - this.logger_ = logger('VhsHandler'); // we need access to the player in some cases, - // so, get it from Video.js via the `playerId` - - if (tech.options_ && tech.options_.playerId) { - const _player = videojs.getPlayer(tech.options_.playerId); - this.player_ = _player; - } - this.tech_ = tech; - this.source_ = source; - this.stats = {}; - this.ignoreNextSeekingEvent_ = false; - this.setOptions_(); - if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) { - tech.overrideNativeAudioTracks(true); - tech.overrideNativeVideoTracks(true); - } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) { - // overriding native VHS only works if audio tracks have been emulated - // error early if we're misconfigured - throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB'); - } // listen for fullscreenchange events for this player so that we - // can adjust our quality selection quickly - - this.on((global_document__WEBPACK_IMPORTED_MODULE_1___default()), ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => { - const fullscreenElement = (global_document__WEBPACK_IMPORTED_MODULE_1___default().fullscreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().webkitFullscreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().mozFullScreenElement) || (global_document__WEBPACK_IMPORTED_MODULE_1___default().msFullscreenElement); - if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) { - this.playlistController_.fastQualityChange_(); - } else { - // When leaving fullscreen, since the in page pixel dimensions should be smaller - // than full screen, see if there should be a rendition switch down to preserve - // bandwidth. - this.playlistController_.checkABR_(); - } - }); - this.on(this.tech_, 'seeking', function () { - if (this.ignoreNextSeekingEvent_) { - this.ignoreNextSeekingEvent_ = false; - return; - } - this.setCurrentTime(this.tech_.currentTime()); - }); - this.on(this.tech_, 'error', function () { - // verify that the error was real and we are loaded - // enough to have pc loaded. - if (this.tech_.error() && this.playlistController_) { - this.playlistController_.pauseLoading(); - } - }); - this.on(this.tech_, 'play', this.play); - } - setOptions_() { - // defaults - this.options_.withCredentials = this.options_.withCredentials || false; - this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true; - this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false; - this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false; - this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false; - this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false; - this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false; - this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false; - this.options_.customTagParsers = this.options_.customTagParsers || []; - this.options_.customTagMappers = this.options_.customTagMappers || []; - this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; - this.options_.llhls = this.options_.llhls === false ? false : true; - this.options_.bufferBasedABR = this.options_.bufferBasedABR || false; - if (typeof this.options_.playlistExclusionDuration !== 'number') { - this.options_.playlistExclusionDuration = 60; - } - if (typeof this.options_.bandwidth !== 'number') { - if (this.options_.useBandwidthFromLocalStorage) { - const storedObject = getVhsLocalStorage(); - if (storedObject && storedObject.bandwidth) { - this.options_.bandwidth = storedObject.bandwidth; - this.tech_.trigger({ - type: 'usage', - name: 'vhs-bandwidth-from-local-storage' - }); - } - if (storedObject && storedObject.throughput) { - this.options_.throughput = storedObject.throughput; - this.tech_.trigger({ - type: 'usage', - name: 'vhs-throughput-from-local-storage' - }); - } - } - } // if bandwidth was not set by options or pulled from local storage, start playlist - // selection at a reasonable bandwidth - - if (typeof this.options_.bandwidth !== 'number') { - this.options_.bandwidth = Config.INITIAL_BANDWIDTH; - } // If the bandwidth number is unchanged from the initial setting - // then this takes precedence over the enableLowInitialPlaylist option - - this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src - - ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => { - if (typeof this.source_[option] !== 'undefined') { - this.options_[option] = this.source_[option]; - } - }); - this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions; - this.useDevicePixelRatio = this.options_.useDevicePixelRatio; - } - /** - * called when player.src gets called, handle a new source - * - * @param {Object} src the source object to handle - */ - - src(src, type) { - // do nothing if the src is falsey - if (!src) { - return; - } - this.setOptions_(); // add main playlist controller options - - this.options_.src = expandDataUri(this.source_.src); - this.options_.tech = this.tech_; - this.options_.externVhs = Vhs; - this.options_.sourceType = (0,_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__.simpleTypeFromSourceType)(type); // Whenever we seek internally, we should update the tech - - this.options_.seekTo = time => { - this.tech_.setCurrentTime(time); - }; - this.playlistController_ = new PlaylistController(this.options_); - const playbackWatcherOptions = merge({ - liveRangeSafeTimeDelta: SAFE_TIME_DELTA - }, this.options_, { - seekable: () => this.seekable(), - media: () => this.playlistController_.media(), - playlistController: this.playlistController_ - }); - this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions); - this.playlistController_.on('error', () => { - const player = videojs.players[this.tech_.options_.playerId]; - let error = this.playlistController_.error; - if (typeof error === 'object' && !error.code) { - error.code = 3; - } else if (typeof error === 'string') { - error = { - message: error, - code: 3 - }; - } - player.error(error); - }); - const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards - // compatibility with < v2 - - this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this); - this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2 - - this.playlists = this.playlistController_.mainPlaylistLoader_; - this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist - // controller. Using a custom property for backwards compatibility - // with < v2 - - Object.defineProperties(this, { - selectPlaylist: { - get() { - return this.playlistController_.selectPlaylist; - }, - set(selectPlaylist) { - this.playlistController_.selectPlaylist = selectPlaylist.bind(this); - } - }, - throughput: { - get() { - return this.playlistController_.mainSegmentLoader_.throughput.rate; - }, - set(throughput) { - this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value - // for the cumulative average - - this.playlistController_.mainSegmentLoader_.throughput.count = 1; - } - }, - bandwidth: { - get() { - let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth; - const networkInformation = (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).connection || (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).mozConnection || (global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator).webkitConnection; - const tenMbpsAsBitsPerSecond = 10e6; - if (this.options_.useNetworkInformationApi && networkInformation) { - // downlink returns Mbps - // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink - const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player - // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that - // high quality streams are not filtered out. - - if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) { - playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec); - } else { - playerBandwidthEst = networkInfoBandwidthEstBitsPerSec; - } - } - return playerBandwidthEst; - }, - set(bandwidth) { - this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter - // `count` is set to zero that current value of `rate` isn't included - // in the cumulative average - - this.playlistController_.mainSegmentLoader_.throughput = { - rate: 0, - count: 0 - }; - } - }, - /** - * `systemBandwidth` is a combination of two serial processes bit-rates. The first - * is the network bitrate provided by `bandwidth` and the second is the bitrate of - * the entire process after that - decryption, transmuxing, and appending - provided - * by `throughput`. - * - * Since the two process are serial, the overall system bandwidth is given by: - * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput) - */ - systemBandwidth: { - get() { - const invBandwidth = 1 / (this.bandwidth || 1); - let invThroughput; - if (this.throughput > 0) { - invThroughput = 1 / this.throughput; - } else { - invThroughput = 0; - } - const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput)); - return systemBitrate; - }, - set() { - videojs.log.error('The "systemBandwidth" property is read-only'); - } - } - }); - if (this.options_.bandwidth) { - this.bandwidth = this.options_.bandwidth; - } - if (this.options_.throughput) { - this.throughput = this.options_.throughput; - } - Object.defineProperties(this.stats, { - bandwidth: { - get: () => this.bandwidth || 0, - enumerable: true - }, - mediaRequests: { - get: () => this.playlistController_.mediaRequests_() || 0, - enumerable: true - }, - mediaRequestsAborted: { - get: () => this.playlistController_.mediaRequestsAborted_() || 0, - enumerable: true - }, - mediaRequestsTimedout: { - get: () => this.playlistController_.mediaRequestsTimedout_() || 0, - enumerable: true - }, - mediaRequestsErrored: { - get: () => this.playlistController_.mediaRequestsErrored_() || 0, - enumerable: true - }, - mediaTransferDuration: { - get: () => this.playlistController_.mediaTransferDuration_() || 0, - enumerable: true - }, - mediaBytesTransferred: { - get: () => this.playlistController_.mediaBytesTransferred_() || 0, - enumerable: true - }, - mediaSecondsLoaded: { - get: () => this.playlistController_.mediaSecondsLoaded_() || 0, - enumerable: true - }, - mediaAppends: { - get: () => this.playlistController_.mediaAppends_() || 0, - enumerable: true - }, - mainAppendsToLoadedData: { - get: () => this.playlistController_.mainAppendsToLoadedData_() || 0, - enumerable: true - }, - audioAppendsToLoadedData: { - get: () => this.playlistController_.audioAppendsToLoadedData_() || 0, - enumerable: true - }, - appendsToLoadedData: { - get: () => this.playlistController_.appendsToLoadedData_() || 0, - enumerable: true - }, - timeToLoadedData: { - get: () => this.playlistController_.timeToLoadedData_() || 0, - enumerable: true - }, - buffered: { - get: () => timeRangesToArray(this.tech_.buffered()), - enumerable: true - }, - currentTime: { - get: () => this.tech_.currentTime(), - enumerable: true - }, - currentSource: { - get: () => this.tech_.currentSource_, - enumerable: true - }, - currentTech: { - get: () => this.tech_.name_, - enumerable: true - }, - duration: { - get: () => this.tech_.duration(), - enumerable: true - }, - main: { - get: () => this.playlists.main, - enumerable: true - }, - playerDimensions: { - get: () => this.tech_.currentDimensions(), - enumerable: true - }, - seekable: { - get: () => timeRangesToArray(this.tech_.seekable()), - enumerable: true - }, - timestamp: { - get: () => Date.now(), - enumerable: true - }, - videoPlaybackQuality: { - get: () => this.tech_.getVideoPlaybackQuality(), - enumerable: true - } - }); - this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_)); - this.tech_.on('bandwidthupdate', () => { - if (this.options_.useBandwidthFromLocalStorage) { - updateVhsLocalStorage({ - bandwidth: this.bandwidth, - throughput: Math.round(this.throughput) - }); - } - }); - this.playlistController_.on('selectedinitialmedia', () => { - // Add the manual rendition mix-in to VhsHandler - renditionSelectionMixin(this); - }); - this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => { - this.setupEme_(); - }); // the bandwidth of the primary segment loader is our best - // estimate of overall bandwidth - - this.on(this.playlistController_, 'progress', function () { - this.tech_.trigger('progress'); - }); // In the live case, we need to ignore the very first `seeking` event since - // that will be the result of the seek-to-live behavior - - this.on(this.playlistController_, 'firstplay', function () { - this.ignoreNextSeekingEvent_ = true; - }); - this.setupQualityLevels_(); // do nothing if the tech has been disposed already - // this can occur if someone sets the src in player.ready(), for instance - - if (!this.tech_.el()) { - return; - } - this.mediaSourceUrl_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.createObjectURL(this.playlistController_.mediaSource); - this.tech_.src(this.mediaSourceUrl_); - } - createKeySessions_() { - const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader; - this.logger_('waiting for EME key session creation'); - waitForKeySessionCreation({ - player: this.player_, - sourceKeySystems: this.source_.keySystems, - audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(), - mainPlaylists: this.playlists.main.playlists - }).then(() => { - this.logger_('created EME key session'); - this.playlistController_.sourceUpdater_.initializedEme(); - }).catch(err => { - this.logger_('error while creating EME key session', err); - this.player_.error({ - message: 'Failed to initialize media keys for EME', - code: 3 - }); - }); - } - handleWaitingForKey_() { - // If waitingforkey is fired, it's possible that the data that's necessary to retrieve - // the key is in the manifest. While this should've happened on initial source load, it - // may happen again in live streams where the keys change, and the manifest info - // reflects the update. - // - // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's - // already requested keys for, we don't have to worry about this generating extraneous - // requests. - this.logger_('waitingforkey fired, attempting to create any new key sessions'); - this.createKeySessions_(); - } - /** - * If necessary and EME is available, sets up EME options and waits for key session - * creation. - * - * This function also updates the source updater so taht it can be used, as for some - * browsers, EME must be configured before content is appended (if appending unencrypted - * content before encrypted content). - */ - - setupEme_() { - const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader; - const didSetupEmeOptions = setupEmeOptions({ - player: this.player_, - sourceKeySystems: this.source_.keySystems, - media: this.playlists.media(), - audioMedia: audioPlaylistLoader && audioPlaylistLoader.media() - }); - this.player_.tech_.on('keystatuschange', e => { - if (e.status !== 'output-restricted') { - return; - } - const mainPlaylist = this.playlistController_.main(); - if (!mainPlaylist || !mainPlaylist.playlists) { - return; - } - const excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection - - mainPlaylist.playlists.forEach(playlist => { - if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) { - if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) { - playlist.excludeUntil = Infinity; - excludedHDPlaylists.push(playlist); - } - } - }); - if (excludedHDPlaylists.length) { - videojs.log.warn('DRM keystatus changed to "output-restricted." Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.', ...excludedHDPlaylists); // Clear the buffer before switching playlists, since it may already contain unplayable segments - - this.playlistController_.mainSegmentLoader_.resetEverything(); - this.playlistController_.fastQualityChange_(); - } - }); - this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this); - this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_); - if (!didSetupEmeOptions) { - // If EME options were not set up, we've done all we could to initialize EME. - this.playlistController_.sourceUpdater_.initializedEme(); - return; - } - this.createKeySessions_(); - } - /** - * Initializes the quality levels and sets listeners to update them. - * - * @method setupQualityLevels_ - * @private - */ - - setupQualityLevels_() { - const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin - // or qualityLevels_ listeners have already been setup, do nothing. - - if (!player || !player.qualityLevels || this.qualityLevels_) { - return; - } - this.qualityLevels_ = player.qualityLevels(); - this.playlistController_.on('selectedinitialmedia', () => { - handleVhsLoadedMetadata(this.qualityLevels_, this); - }); - this.playlists.on('mediachange', () => { - handleVhsMediaChange(this.qualityLevels_, this.playlists); - }); - } - /** - * return the version - */ - - static version() { - return { - '@videojs/http-streaming': version$4, - 'mux.js': version$3, - 'mpd-parser': version$2, - 'm3u8-parser': version$1, - 'aes-decrypter': version - }; - } - /** - * return the version - */ - - version() { - return this.constructor.version(); - } - canChangeType() { - return SourceUpdater.canChangeType(); - } - /** - * Begin playing the video. - */ - - play() { - this.playlistController_.play(); - } - /** - * a wrapper around the function in PlaylistController - */ - - setCurrentTime(currentTime) { - this.playlistController_.setCurrentTime(currentTime); - } - /** - * a wrapper around the function in PlaylistController - */ - - duration() { - return this.playlistController_.duration(); - } - /** - * a wrapper around the function in PlaylistController - */ - - seekable() { - return this.playlistController_.seekable(); - } - /** - * Abort all outstanding work and cleanup. - */ - - dispose() { - if (this.playbackWatcher_) { - this.playbackWatcher_.dispose(); - } - if (this.playlistController_) { - this.playlistController_.dispose(); - } - if (this.qualityLevels_) { - this.qualityLevels_.dispose(); - } - if (this.tech_ && this.tech_.vhs) { - delete this.tech_.vhs; - } - if (this.mediaSourceUrl_ && (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL).revokeObjectURL) { - global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.revokeObjectURL(this.mediaSourceUrl_); - this.mediaSourceUrl_ = null; - } - if (this.tech_) { - this.tech_.off('waitingforkey', this.handleWaitingForKey_); - } - super.dispose(); - } - convertToProgramTime(time, callback) { - return getProgramTime({ - playlist: this.playlistController_.media(), - time, - callback - }); - } // the player must be playing before calling this - - seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) { - return seekToProgramTime({ - programTime, - playlist: this.playlistController_.media(), - retryCount, - pauseAfterSeek, - seekTo: this.options_.seekTo, - tech: this.options_.tech, - callback - }); - } - /** - * Adds the onRequest, onResponse, offRequest and offResponse functions - * to the VhsHandler xhr Object. - */ - - setupXhrHooks_() { - /** - * A player function for setting an onRequest hook - * - * @param {function} callback for request modifiction - */ - this.xhr.onRequest = callback => { - addOnRequestHook(this.xhr, callback); - }; - /** - * A player function for setting an onResponse hook - * - * @param {callback} callback for response data retrieval - */ - - this.xhr.onResponse = callback => { - addOnResponseHook(this.xhr, callback); - }; - /** - * Deletes a player onRequest callback if it exists - * - * @param {function} callback to delete from the player set - */ - - this.xhr.offRequest = callback => { - removeOnRequestHook(this.xhr, callback); - }; - /** - * Deletes a player onResponse callback if it exists - * - * @param {function} callback to delete from the player set - */ - - this.xhr.offResponse = callback => { - removeOnResponseHook(this.xhr, callback); - }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks. - // This allows hooks to be set before the source is set to vhs when handleSource is called. - - this.player_.trigger('xhr-hooks-ready'); - } -} -/** - * The Source Handler object, which informs video.js what additional - * MIME types are supported and sets up playback. It is registered - * automatically to the appropriate tech based on the capabilities of - * the browser it is running in. It is not necessary to use or modify - * this object in normal usage. - */ - -const VhsSourceHandler = { - name: 'videojs-http-streaming', - VERSION: version$4, - canHandleSource(srcObj, options = {}) { - const localOptions = merge(videojs.options, options); - return VhsSourceHandler.canPlayType(srcObj.type, localOptions); - }, - handleSource(source, tech, options = {}) { - const localOptions = merge(videojs.options, options); - tech.vhs = new VhsHandler(source, tech, localOptions); - tech.vhs.xhr = xhrFactory(); - tech.vhs.setupXhrHooks_(); - tech.vhs.src(source.src, source.type); - return tech.vhs; - }, - canPlayType(type, options) { - const simpleType = (0,_videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_10__.simpleTypeFromSourceType)(type); - if (!simpleType) { - return ''; - } - const overrideNative = VhsSourceHandler.getOverrideNative(options); - const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType); - const canUseMsePlayback = !supportsTypeNatively || overrideNative; - return canUseMsePlayback ? 'maybe' : ''; - }, - getOverrideNative(options = {}) { - const { - vhs = {} - } = options; - const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS); - const { - overrideNative = defaultOverrideNative - } = vhs; - return overrideNative; - } -}; -/** - * Check to see if the native MediaSource object exists and supports - * an MP4 container with both H.264 video and AAC-LC audio. - * - * @return {boolean} if native media sources are supported - */ - -const supportsNativeMediaSources = () => { - return (0,_videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_9__.browserSupportsCodec)('avc1.4d400d,mp4a.40.2'); -}; // register source handlers with the appropriate techs - -if (supportsNativeMediaSources()) { - videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0); -} -videojs.VhsHandler = VhsHandler; -videojs.VhsSourceHandler = VhsSourceHandler; -videojs.Vhs = Vhs; -if (!videojs.use) { - videojs.registerComponent('Vhs', Vhs); -} -videojs.options.vhs = videojs.options.vhs || {}; -if (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) { - videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError); -} - - - - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js ***! - \**********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ENDIANNESS: () => (/* binding */ ENDIANNESS), -/* harmony export */ IS_BIG_ENDIAN: () => (/* binding */ IS_BIG_ENDIAN), -/* harmony export */ IS_LITTLE_ENDIAN: () => (/* binding */ IS_LITTLE_ENDIAN), -/* harmony export */ bytesMatch: () => (/* binding */ bytesMatch), -/* harmony export */ bytesToNumber: () => (/* binding */ bytesToNumber), -/* harmony export */ bytesToString: () => (/* binding */ bytesToString), -/* harmony export */ concatTypedArrays: () => (/* binding */ concatTypedArrays), -/* harmony export */ countBits: () => (/* binding */ countBits), -/* harmony export */ countBytes: () => (/* binding */ countBytes), -/* harmony export */ isArrayBufferView: () => (/* binding */ isArrayBufferView), -/* harmony export */ isTypedArray: () => (/* binding */ isTypedArray), -/* harmony export */ numberToBytes: () => (/* binding */ numberToBytes), -/* harmony export */ padStart: () => (/* binding */ padStart), -/* harmony export */ reverseBytes: () => (/* binding */ reverseBytes), -/* harmony export */ sliceBytes: () => (/* binding */ sliceBytes), -/* harmony export */ stringToBytes: () => (/* binding */ stringToBytes), -/* harmony export */ toBinaryString: () => (/* binding */ toBinaryString), -/* harmony export */ toHexString: () => (/* binding */ toHexString), -/* harmony export */ toUint8: () => (/* binding */ toUint8) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2)); - -var repeat = function repeat(str, len) { - var acc = ''; - - while (len--) { - acc += str; - } - - return acc; -}; // count the number of bits it would take to represent a number -// we used to do this with log2 but BigInt does not support builtin math -// Math.ceil(log2(x)); - - -var countBits = function countBits(x) { - return x.toString(2).length; -}; // count the number of whole bytes it would take to represent a number - -var countBytes = function countBytes(x) { - return Math.ceil(countBits(x) / 8); -}; -var padStart = function padStart(b, len, str) { - if (str === void 0) { - str = ' '; - } - - return (repeat(str, len) + b.toString()).slice(-len); -}; -var isArrayBufferView = function isArrayBufferView(obj) { - if (ArrayBuffer.isView === 'function') { - return ArrayBuffer.isView(obj); - } - - return obj && obj.buffer instanceof ArrayBuffer; -}; -var isTypedArray = function isTypedArray(obj) { - return isArrayBufferView(obj); -}; -var toUint8 = function toUint8(bytes) { - if (bytes instanceof Uint8Array) { - return bytes; - } - - if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) { - // any non-number or NaN leads to empty uint8array - // eslint-disable-next-line - if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) { - bytes = 0; - } else { - bytes = [bytes]; - } - } - - return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0); -}; -var toHexString = function toHexString(bytes) { - bytes = toUint8(bytes); - var str = ''; - - for (var i = 0; i < bytes.length; i++) { - str += padStart(bytes[i].toString(16), 2, '0'); - } - - return str; -}; -var toBinaryString = function toBinaryString(bytes) { - bytes = toUint8(bytes); - var str = ''; - - for (var i = 0; i < bytes.length; i++) { - str += padStart(bytes[i].toString(2), 8, '0'); - } - - return str; -}; -var BigInt = (global_window__WEBPACK_IMPORTED_MODULE_0___default().BigInt) || Number; -var BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')]; -var ENDIANNESS = function () { - var a = new Uint16Array([0xFFCC]); - var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength); - - if (b[0] === 0xFF) { - return 'big'; - } - - if (b[0] === 0xCC) { - return 'little'; - } - - return 'unknown'; -}(); -var IS_BIG_ENDIAN = ENDIANNESS === 'big'; -var IS_LITTLE_ENDIAN = ENDIANNESS === 'little'; -var bytesToNumber = function bytesToNumber(bytes, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$signed = _ref.signed, - signed = _ref$signed === void 0 ? false : _ref$signed, - _ref$le = _ref.le, - le = _ref$le === void 0 ? false : _ref$le; - - bytes = toUint8(bytes); - var fn = le ? 'reduce' : 'reduceRight'; - var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn]; - var number = obj.call(bytes, function (total, byte, i) { - var exponent = le ? i : Math.abs(i + 1 - bytes.length); - return total + BigInt(byte) * BYTE_TABLE[exponent]; - }, BigInt(0)); - - if (signed) { - var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1); - number = BigInt(number); - - if (number > max) { - number -= max; - number -= max; - number -= BigInt(2); - } - } - - return Number(number); -}; -var numberToBytes = function numberToBytes(number, _temp2) { - var _ref2 = _temp2 === void 0 ? {} : _temp2, - _ref2$le = _ref2.le, - le = _ref2$le === void 0 ? false : _ref2$le; - - // eslint-disable-next-line - if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) { - number = 0; - } - - number = BigInt(number); - var byteCount = countBytes(number); - var bytes = new Uint8Array(new ArrayBuffer(byteCount)); - - for (var i = 0; i < byteCount; i++) { - var byteIndex = le ? i : Math.abs(i + 1 - bytes.length); - bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF)); - - if (number < 0) { - bytes[byteIndex] = Math.abs(~bytes[byteIndex]); - bytes[byteIndex] -= i === 0 ? 1 : 2; - } - } - - return bytes; -}; -var bytesToString = function bytesToString(bytes) { - if (!bytes) { - return ''; - } // TODO: should toUint8 handle cases where we only have 8 bytes - // but report more since this is a Uint16+ Array? - - - bytes = Array.prototype.slice.call(bytes); - var string = String.fromCharCode.apply(null, toUint8(bytes)); - - try { - return decodeURIComponent(escape(string)); - } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial - // or full non string data. Just return the potentially garbled string. - } - - return string; -}; -var stringToBytes = function stringToBytes(string, stringIsBytes) { - if (typeof string !== 'string' && string && typeof string.toString === 'function') { - string = string.toString(); - } - - if (typeof string !== 'string') { - return new Uint8Array(); - } // If the string already is bytes, we don't have to do this - // otherwise we do this so that we split multi length characters - // into individual bytes - - - if (!stringIsBytes) { - string = unescape(encodeURIComponent(string)); - } - - var view = new Uint8Array(string.length); - - for (var i = 0; i < string.length; i++) { - view[i] = string.charCodeAt(i); - } - - return view; -}; -var concatTypedArrays = function concatTypedArrays() { - for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) { - buffers[_key] = arguments[_key]; - } - - buffers = buffers.filter(function (b) { - return b && (b.byteLength || b.length) && typeof b !== 'string'; - }); - - if (buffers.length <= 1) { - // for 0 length we will return empty uint8 - // for 1 length we return the first uint8 - return toUint8(buffers[0]); - } - - var totalLen = buffers.reduce(function (total, buf, i) { - return total + (buf.byteLength || buf.length); - }, 0); - var tempBuffer = new Uint8Array(totalLen); - var offset = 0; - buffers.forEach(function (buf) { - buf = toUint8(buf); - tempBuffer.set(buf, offset); - offset += buf.byteLength; - }); - return tempBuffer; -}; -/** - * Check if the bytes "b" are contained within bytes "a". - * - * @param {Uint8Array|Array} a - * Bytes to check in - * - * @param {Uint8Array|Array} b - * Bytes to check for - * - * @param {Object} options - * options - * - * @param {Array|Uint8Array} [offset=0] - * offset to use when looking at bytes in a - * - * @param {Array|Uint8Array} [mask=[]] - * mask to use on bytes before comparison. - * - * @return {boolean} - * If all bytes in b are inside of a, taking into account - * bit masks. - */ - -var bytesMatch = function bytesMatch(a, b, _temp3) { - var _ref3 = _temp3 === void 0 ? {} : _temp3, - _ref3$offset = _ref3.offset, - offset = _ref3$offset === void 0 ? 0 : _ref3$offset, - _ref3$mask = _ref3.mask, - mask = _ref3$mask === void 0 ? [] : _ref3$mask; - - a = toUint8(a); - b = toUint8(b); // ie 11 does not support uint8 every - - var fn = b.every ? b.every : Array.prototype.every; - return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8 - fn.call(b, function (bByte, i) { - var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i]; - return bByte === aByte; - }); -}; -var sliceBytes = function sliceBytes(src, start, end) { - if (Uint8Array.prototype.slice) { - return Uint8Array.prototype.slice.call(src, start, end); - } - - return new Uint8Array(Array.prototype.slice.call(src, start, end)); -}; -var reverseBytes = function reverseBytes(src) { - if (src.reverse) { - return src.reverse(); - } - - return Array.prototype.reverse.call(src); -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js ***! - \***********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getAv1Codec: () => (/* binding */ getAv1Codec), -/* harmony export */ getAvcCodec: () => (/* binding */ getAvcCodec), -/* harmony export */ getHvcCodec: () => (/* binding */ getHvcCodec) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax -// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1 - -var getAv1Codec = function getAv1Codec(bytes) { - var codec = ''; - var profile = bytes[1] >>> 3; - var level = bytes[1] & 0x1F; - var tier = bytes[2] >>> 7; - var highBitDepth = (bytes[2] & 0x40) >> 6; - var twelveBit = (bytes[2] & 0x20) >> 5; - var monochrome = (bytes[2] & 0x10) >> 4; - var chromaSubsamplingX = (bytes[2] & 0x08) >> 3; - var chromaSubsamplingY = (bytes[2] & 0x04) >> 2; - var chromaSamplePosition = bytes[2] & 0x03; - codec += profile + "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0'); - - if (tier === 0) { - codec += 'M'; - } else if (tier === 1) { - codec += 'H'; - } - - var bitDepth; - - if (profile === 2 && highBitDepth) { - bitDepth = twelveBit ? 12 : 10; - } else { - bitDepth = highBitDepth ? 10 : 8; - } - - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); // TODO: can we parse color range?? - - codec += "." + monochrome; - codec += "." + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition; - return codec; -}; -var getAvcCodec = function getAvcCodec(bytes) { - var profileId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[1]); - var constraintFlags = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[2] & 0xFC); - var levelId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[3]); - return "" + profileId + constraintFlags + levelId; -}; -var getHvcCodec = function getHvcCodec(bytes) { - var codec = ''; - var profileSpace = bytes[1] >> 6; - var profileId = bytes[1] & 0x1F; - var tierFlag = (bytes[1] & 0x20) >> 5; - var profileCompat = bytes.subarray(2, 6); - var constraintIds = bytes.subarray(6, 12); - var levelId = bytes[12]; - - if (profileSpace === 1) { - codec += 'A'; - } else if (profileSpace === 2) { - codec += 'B'; - } else if (profileSpace === 3) { - codec += 'C'; - } - - codec += profileId + "."; // ffmpeg does this in big endian - - var profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian... - - if (profileCompatVal > 255) { - profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat), 2); - } - - codec += profileCompatVal.toString(16) + "."; - - if (tierFlag === 0) { - codec += 'L'; - } else { - codec += 'H'; - } - - codec += levelId; - var constraints = ''; - - for (var i = 0; i < constraintIds.length; i++) { - var v = constraintIds[i]; - - if (v) { - if (constraints) { - constraints += '.'; - } - - constraints += v.toString(16); - } - } - - if (constraints) { - codec += "." + constraints; - } - - return codec; -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js": -/*!****************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DEFAULT_AUDIO_CODEC: () => (/* binding */ DEFAULT_AUDIO_CODEC), -/* harmony export */ DEFAULT_VIDEO_CODEC: () => (/* binding */ DEFAULT_VIDEO_CODEC), -/* harmony export */ browserSupportsCodec: () => (/* binding */ browserSupportsCodec), -/* harmony export */ codecsFromDefault: () => (/* binding */ codecsFromDefault), -/* harmony export */ getMimeForCodec: () => (/* binding */ getMimeForCodec), -/* harmony export */ isAudioCodec: () => (/* binding */ isAudioCodec), -/* harmony export */ isTextCodec: () => (/* binding */ isTextCodec), -/* harmony export */ isVideoCodec: () => (/* binding */ isVideoCodec), -/* harmony export */ mapLegacyAvcCodecs: () => (/* binding */ mapLegacyAvcCodecs), -/* harmony export */ muxerSupportsCodec: () => (/* binding */ muxerSupportsCodec), -/* harmony export */ parseCodecs: () => (/* binding */ parseCodecs), -/* harmony export */ translateLegacyCodec: () => (/* binding */ translateLegacyCodec), -/* harmony export */ translateLegacyCodecs: () => (/* binding */ translateLegacyCodecs) -/* harmony export */ }); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__); - -var regexs = { - // to determine mime types - mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/, - webm: /^(vp0?[89]|av0?1|opus|vorbis)/, - ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/, - // to determine if a codec is audio or video - video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/, - audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/, - text: /^(stpp.ttml.im1t)/, - // mux.js support regex - muxerVideo: /^(avc0?1)/, - muxerAudio: /^(mp4a)/, - // match nothing as muxer does not support text right now. - // there cannot never be a character before the start of a string - // so this matches nothing. - muxerText: /a^/ -}; -var mediaTypes = ['video', 'audio', 'text']; -var upperMediaTypes = ['Video', 'Audio', 'Text']; -/** - * Replace the old apple-style `avc1.
.
` codec string with the standard - * `avc1.` - * - * @param {string} codec - * Codec string to translate - * @return {string} - * The translated codec string - */ - -var translateLegacyCodec = function translateLegacyCodec(codec) { - if (!codec) { - return codec; - } - - return codec.replace(/avc1\.(\d+)\.(\d+)/i, function (orig, profile, avcLevel) { - var profileHex = ('00' + Number(profile).toString(16)).slice(-2); - var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2); - return 'avc1.' + profileHex + '00' + avcLevelHex; - }); -}; -/** - * Replace the old apple-style `avc1.
.
` codec strings with the standard - * `avc1.` - * - * @param {string[]} codecs - * An array of codec strings to translate - * @return {string[]} - * The translated array of codec strings - */ - -var translateLegacyCodecs = function translateLegacyCodecs(codecs) { - return codecs.map(translateLegacyCodec); -}; -/** - * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the - * standard `avc1.`. - * - * @param {string} codecString - * The codec string - * @return {string} - * The codec string with old apple-style codecs replaced - * - * @private - */ - -var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) { - return codecString.replace(/avc1\.(\d+)\.(\d+)/i, function (match) { - return translateLegacyCodecs([match])[0]; - }); -}; -/** - * @typedef {Object} ParsedCodecInfo - * @property {number} codecCount - * Number of codecs parsed - * @property {string} [videoCodec] - * Parsed video codec (if found) - * @property {string} [videoObjectTypeIndicator] - * Video object type indicator (if found) - * @property {string|null} audioProfile - * Audio profile - */ - -/** - * Parses a codec string to retrieve the number of codecs specified, the video codec and - * object type indicator, and the audio profile. - * - * @param {string} [codecString] - * The codec string to parse - * @return {ParsedCodecInfo} - * Parsed codec info - */ - -var parseCodecs = function parseCodecs(codecString) { - if (codecString === void 0) { - codecString = ''; - } - - var codecs = codecString.split(','); - var result = []; - codecs.forEach(function (codec) { - codec = codec.trim(); - var codecType; - mediaTypes.forEach(function (name) { - var match = regexs[name].exec(codec.toLowerCase()); - - if (!match || match.length <= 1) { - return; - } - - codecType = name; // maintain codec case - - var type = codec.substring(0, match[1].length); - var details = codec.replace(type, ''); - result.push({ - type: type, - details: details, - mediaType: name - }); - }); - - if (!codecType) { - result.push({ - type: codec, - details: '', - mediaType: 'unknown' - }); - } - }); - return result; -}; -/** - * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is - * a default alternate audio playlist for the provided audio group. - * - * @param {Object} master - * The master playlist - * @param {string} audioGroupId - * ID of the audio group for which to find the default codec info - * @return {ParsedCodecInfo} - * Parsed codec info - */ - -var codecsFromDefault = function codecsFromDefault(master, audioGroupId) { - if (!master.mediaGroups.AUDIO || !audioGroupId) { - return null; - } - - var audioGroup = master.mediaGroups.AUDIO[audioGroupId]; - - if (!audioGroup) { - return null; - } - - for (var name in audioGroup) { - var audioType = audioGroup[name]; - - if (audioType.default && audioType.playlists) { - // codec should be the same for all playlists within the audio type - return parseCodecs(audioType.playlists[0].attributes.CODECS); - } - } - - return null; -}; -var isVideoCodec = function isVideoCodec(codec) { - if (codec === void 0) { - codec = ''; - } - - return regexs.video.test(codec.trim().toLowerCase()); -}; -var isAudioCodec = function isAudioCodec(codec) { - if (codec === void 0) { - codec = ''; - } - - return regexs.audio.test(codec.trim().toLowerCase()); -}; -var isTextCodec = function isTextCodec(codec) { - if (codec === void 0) { - codec = ''; - } - - return regexs.text.test(codec.trim().toLowerCase()); -}; -var getMimeForCodec = function getMimeForCodec(codecString) { - if (!codecString || typeof codecString !== 'string') { - return; - } - - var codecs = codecString.toLowerCase().split(',').map(function (c) { - return translateLegacyCodec(c.trim()); - }); // default to video type - - var type = 'video'; // only change to audio type if the only codec we have is - // audio - - if (codecs.length === 1 && isAudioCodec(codecs[0])) { - type = 'audio'; - } else if (codecs.length === 1 && isTextCodec(codecs[0])) { - // text uses application/ for now - type = 'application'; - } // default the container to mp4 - - - var container = 'mp4'; // every codec must be able to go into the container - // for that container to be the correct one - - if (codecs.every(function (c) { - return regexs.mp4.test(c); - })) { - container = 'mp4'; - } else if (codecs.every(function (c) { - return regexs.webm.test(c); - })) { - container = 'webm'; - } else if (codecs.every(function (c) { - return regexs.ogg.test(c); - })) { - container = 'ogg'; - } - - return type + "/" + container + ";codecs=\"" + codecString + "\""; -}; -var browserSupportsCodec = function browserSupportsCodec(codecString) { - if (codecString === void 0) { - codecString = ''; - } - - return (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource) && (global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource).isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false; -}; -var muxerSupportsCodec = function muxerSupportsCodec(codecString) { - if (codecString === void 0) { - codecString = ''; - } - - return codecString.toLowerCase().split(',').every(function (codec) { - codec = codec.trim(); // any match is supported. - - for (var i = 0; i < upperMediaTypes.length; i++) { - var type = upperMediaTypes[i]; - - if (regexs["muxer" + type].test(codec)) { - return true; - } - } - - return false; - }); -}; -var DEFAULT_AUDIO_CODEC = 'mp4a.40.2'; -var DEFAULT_VIDEO_CODEC = 'avc1.4d400d'; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js": -/*!********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ detectContainerForBytes: () => (/* binding */ detectContainerForBytes), -/* harmony export */ isLikely: () => (/* binding */ isLikely), -/* harmony export */ isLikelyFmp4MediaSegment: () => (/* binding */ isLikelyFmp4MediaSegment) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mp4-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js"); -/* harmony import */ var _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ebml-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js"); -/* harmony import */ var _id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./id3-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js"); -/* harmony import */ var _nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nal-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js"); - - - - - -var CONSTANTS = { - // "webm" string literal in hex - 'webm': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x77, 0x65, 0x62, 0x6d]), - // "matroska" string literal in hex - 'matroska': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]), - // "fLaC" string literal in hex - 'flac': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x4c, 0x61, 0x43]), - // "OggS" string literal in hex - 'ogg': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x4f, 0x67, 0x67, 0x53]), - // ac-3 sync byte, also works for ec-3 as that is simply a codec - // of ac-3 - 'ac3': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x0b, 0x77]), - // "RIFF" string literal in hex used for wav and avi - 'riff': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x52, 0x49, 0x46, 0x46]), - // "AVI" string literal in hex - 'avi': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x41, 0x56, 0x49]), - // "WAVE" string literal in hex - 'wav': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x57, 0x41, 0x56, 0x45]), - // "ftyp3g" string literal in hex - '3gp': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]), - // "ftyp" string literal in hex - 'mp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70]), - // "styp" string literal in hex - 'fmp4': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x73, 0x74, 0x79, 0x70]), - // "ftypqt" string literal in hex - 'mov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]), - // moov string literal in hex - 'moov': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x76]), - // moof string literal in hex - 'moof': (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x6D, 0x6F, 0x6F, 0x66]) -}; -var _isLikely = { - aac: function aac(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x10], { - offset: offset, - mask: [0xFF, 0x16] - }); - }, - mp3: function mp3(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, [0xFF, 0x02], { - offset: offset, - mask: [0xFF, 0x06] - }); - }, - webm: function webm(bytes) { - var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm - - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.webm); - }, - mkv: function mkv(bytes) { - var docType = (0,_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.findEbml)(bytes, [_ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.EBML, _ebml_helpers_js__WEBPACK_IMPORTED_MODULE_2__.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska - - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(docType, CONSTANTS.matroska); - }, - mp4: function mp4(bytes) { - // if this file is another base media file format, it is not mp4 - if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) { - return false; - } // if this file starts with a ftyp or styp box its mp4 - - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mp4, { - offset: 4 - }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.fmp4, { - offset: 4 - })) { - return true; - } // if this file starts with a moof/moov box its mp4 - - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moof, { - offset: 4 - }) || (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.moov, { - offset: 4 - })) { - return true; - } - }, - mov: function mov(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.mov, { - offset: 4 - }); - }, - '3gp': function gp(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS['3gp'], { - offset: 4 - }); - }, - ac3: function ac3(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ac3, { - offset: offset - }); - }, - ts: function ts(bytes) { - if (bytes.length < 189 && bytes.length >= 1) { - return bytes[0] === 0x47; - } - - var i = 0; // check the first 376 bytes for two matching sync bytes - - while (i + 188 < bytes.length && i < 188) { - if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) { - return true; - } - - i += 1; - } - - return false; - }, - flac: function flac(bytes) { - var offset = (0,_id3_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getId3Offset)(bytes); - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.flac, { - offset: offset - }); - }, - ogg: function ogg(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.ogg); - }, - avi: function avi(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.avi, { - offset: 8 - }); - }, - wav: function wav(bytes) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.riff) && (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, CONSTANTS.wav, { - offset: 8 - }); - }, - 'h264': function h264(bytes) { - // find seq_parameter_set_rbsp - return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH264Nal)(bytes, 7, 3).length; - }, - 'h265': function h265(bytes) { - // find video_parameter_set_rbsp or seq_parameter_set_rbsp - return (0,_nal_helpers_js__WEBPACK_IMPORTED_MODULE_4__.findH265Nal)(bytes, [32, 33], 3).length; - } -}; // get all the isLikely functions -// but make sure 'ts' is above h264 and h265 -// but below everything else as it is the least specific - -var isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265 -.filter(function (t) { - return t !== 'ts' && t !== 'h264' && t !== 'h265'; -}) // add it back to the bottom -.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data. - -isLikelyTypes.forEach(function (type) { - var isLikelyFn = _isLikely[type]; - - _isLikely[type] = function (bytes) { - return isLikelyFn((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes)); - }; -}); // export after wrapping - -var isLikely = _isLikely; // A useful list of file signatures can be found here -// https://en.wikipedia.org/wiki/List_of_file_signatures - -var detectContainerForBytes = function detectContainerForBytes(bytes) { - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - - for (var i = 0; i < isLikelyTypes.length; i++) { - var type = isLikelyTypes[i]; - - if (isLikely[type](bytes)) { - return type; - } - } - - return ''; -}; // fmp4 is not a container - -var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) { - return (0,_mp4_helpers_js__WEBPACK_IMPORTED_MODULE_1__.findBox)(bytes, ['moof']).length > 0; -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js ***! - \**********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ EBML_TAGS: () => (/* binding */ EBML_TAGS), -/* harmony export */ decodeBlock: () => (/* binding */ decodeBlock), -/* harmony export */ findEbml: () => (/* binding */ findEbml), -/* harmony export */ parseData: () => (/* binding */ parseData), -/* harmony export */ parseTracks: () => (/* binding */ parseTracks) -/* harmony export */ }); -/* harmony import */ var _byte_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js"); - - // relevant specs for this parser: -// https://matroska-org.github.io/libebml/specs.html -// https://www.matroska.org/technical/elements.html -// https://www.webmproject.org/docs/container/ - -var EBML_TAGS = { - EBML: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1A, 0x45, 0xDF, 0xA3]), - DocType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x42, 0x82]), - Segment: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x18, 0x53, 0x80, 0x67]), - SegmentInfo: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x15, 0x49, 0xA9, 0x66]), - Tracks: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x16, 0x54, 0xAE, 0x6B]), - Track: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), - TrackNumber: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xd7]), - DefaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x23, 0xe3, 0x83]), - TrackEntry: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xAE]), - TrackType: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x83]), - FlagDefault: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x88]), - CodecID: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x86]), - CodecPrivate: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x63, 0xA2]), - VideoTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe0]), - AudioTrack: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xe1]), - // Not used yet, but will be used for live webm/mkv - // see https://www.matroska.org/technical/basics.html#block-structure - // see https://www.matroska.org/technical/basics.html#simpleblock-structure - Cluster: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x1F, 0x43, 0xB6, 0x75]), - Timestamp: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xE7]), - TimestampScale: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x2A, 0xD7, 0xB1]), - BlockGroup: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA0]), - BlockDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x9B]), - Block: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA1]), - SimpleBlock: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0xA3]) -}; -/** - * This is a simple table to determine the length - * of things in ebml. The length is one based (starts at 1, - * rather than zero) and for every zero bit before a one bit - * we add one to length. We also need this table because in some - * case we have to xor all the length bits from another value. - */ - -var LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1]; - -var getLength = function getLength(byte) { - var len = 1; - - for (var i = 0; i < LENGTH_TABLE.length; i++) { - if (byte & LENGTH_TABLE[i]) { - break; - } - - len++; - } - - return len; -}; // length in ebml is stored in the first 4 to 8 bits -// of the first byte. 4 for the id length and 8 for the -// data size length. Length is measured by converting the number to binary -// then 1 + the number of zeros before a 1 is encountered starting -// from the left. - - -var getvint = function getvint(bytes, offset, removeLength, signed) { - if (removeLength === void 0) { - removeLength = true; - } - - if (signed === void 0) { - signed = false; - } - - var length = getLength(bytes[offset]); - var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes - // as they will be modified below to remove the dataSizeLen bits and we do not - // want to modify the original data. normally we could just call slice on - // uint8array but ie 11 does not support that... - - if (removeLength) { - valueBytes = Array.prototype.slice.call(bytes, offset, offset + length); - valueBytes[0] ^= LENGTH_TABLE[length - 1]; - } - - return { - length: length, - value: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(valueBytes, { - signed: signed - }), - bytes: valueBytes - }; -}; - -var normalizePath = function normalizePath(path) { - if (typeof path === 'string') { - return path.match(/.{1,2}/g).map(function (p) { - return normalizePath(p); - }); - } - - if (typeof path === 'number') { - return (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.numberToBytes)(path); - } - - return path; -}; - -var normalizePaths = function normalizePaths(paths) { - if (!Array.isArray(paths)) { - return [normalizePath(paths)]; - } - - return paths.map(function (p) { - return normalizePath(p); - }); -}; - -var getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) { - if (offset >= bytes.length) { - return bytes.length; - } - - var innerid = getvint(bytes, offset, false); - - if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(id.bytes, innerid.bytes)) { - return offset; - } - - var dataHeader = getvint(bytes, offset + innerid.length); - return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length); -}; -/** - * Notes on the EBLM format. - * - * EBLM uses "vints" tags. Every vint tag contains - * two parts - * - * 1. The length from the first byte. You get this by - * converting the byte to binary and counting the zeros - * before a 1. Then you add 1 to that. Examples - * 00011111 = length 4 because there are 3 zeros before a 1. - * 00100000 = length 3 because there are 2 zeros before a 1. - * 00000011 = length 7 because there are 6 zeros before a 1. - * - * 2. The bits used for length are removed from the first byte - * Then all the bytes are merged into a value. NOTE: this - * is not the case for id ebml tags as there id includes - * length bits. - * - */ - - -var findEbml = function findEbml(bytes, paths) { - paths = normalizePaths(paths); - bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - - if (!paths.length) { - return results; - } - - var i = 0; - - while (i < bytes.length) { - var id = getvint(bytes, i, false); - var dataHeader = getvint(bytes, i + id.length); - var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream - - if (dataHeader.value === 0x7f) { - dataHeader.value = getInfinityDataSize(id, bytes, dataStart); - - if (dataHeader.value !== bytes.length) { - dataHeader.value -= dataStart; - } - } - - var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value; - var data = bytes.subarray(dataStart, dataEnd); - - if ((0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(paths[0], id.bytes)) { - if (paths.length === 1) { - // this is the end of the paths and we've found the tag we were - // looking for - results.push(data); - } else { - // recursively search for the next tag inside of the data - // of this one - results = results.concat(findEbml(data, paths.slice(1))); - } - } - - var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it - - i += totalLength; - } - - return results; -}; // see https://www.matroska.org/technical/basics.html#block-structure - -var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) { - var duration; - - if (type === 'group') { - duration = findEbml(block, [EBML_TAGS.BlockDuration])[0]; - - if (duration) { - duration = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(duration); - duration = 1 / timestampScale * duration * timestampScale / 1000; - } - - block = findEbml(block, [EBML_TAGS.Block])[0]; - type = 'block'; // treat data as a block after this point - } - - var dv = new DataView(block.buffer, block.byteOffset, block.byteLength); - var trackNumber = getvint(block, 0); - var timestamp = dv.getInt16(trackNumber.length, false); - var flags = block[trackNumber.length + 2]; - var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds - - var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame - - var parsed = { - duration: duration, - trackNumber: trackNumber.value, - keyframe: type === 'simple' && flags >> 7 === 1, - invisible: (flags & 0x08) >> 3 === 1, - lacing: (flags & 0x06) >> 1, - discardable: type === 'simple' && (flags & 0x01) === 1, - frames: [], - pts: ptsdts, - dts: ptsdts, - timestamp: timestamp - }; - - if (!parsed.lacing) { - parsed.frames.push(data); - return parsed; - } - - var numberOfFrames = data[0] + 1; - var frameSizes = []; - var offset = 1; // Fixed - - if (parsed.lacing === 2) { - var sizeOfFrame = (data.length - offset) / numberOfFrames; - - for (var i = 0; i < numberOfFrames; i++) { - frameSizes.push(sizeOfFrame); - } - } // xiph - - - if (parsed.lacing === 1) { - for (var _i = 0; _i < numberOfFrames - 1; _i++) { - var size = 0; - - do { - size += data[offset]; - offset++; - } while (data[offset - 1] === 0xFF); - - frameSizes.push(size); - } - } // ebml - - - if (parsed.lacing === 3) { - // first vint is unsinged - // after that vints are singed and - // based on a compounding size - var _size = 0; - - for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) { - var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true); - _size += vint.value; - frameSizes.push(_size); - offset += vint.length; - } - } - - frameSizes.forEach(function (size) { - parsed.frames.push(data.subarray(offset, offset + size)); - offset += size; - }); - return parsed; -}; // VP9 Codec Feature Metadata (CodecPrivate) -// https://www.webmproject.org/docs/container/ - -var parseVp9Private = function parseVp9Private(bytes) { - var i = 0; - var params = {}; - - while (i < bytes.length) { - var id = bytes[i] & 0x7f; - var len = bytes[i + 1]; - var val = void 0; - - if (len === 1) { - val = bytes[i + 2]; - } else { - val = bytes.subarray(i + 2, i + 2 + len); - } - - if (id === 1) { - params.profile = val; - } else if (id === 2) { - params.level = val; - } else if (id === 3) { - params.bitDepth = val; - } else if (id === 4) { - params.chromaSubsampling = val; - } else { - params[id] = val; - } - - i += 2 + len; - } - - return params; -}; - -var parseTracks = function parseTracks(bytes) { - bytes = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var decodedTracks = []; - var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]); - - if (!tracks.length) { - tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]); - } - - if (!tracks.length) { - tracks = findEbml(bytes, [EBML_TAGS.Track]); - } - - if (!tracks.length) { - return decodedTracks; - } - - tracks.forEach(function (track) { - var trackType = findEbml(track, EBML_TAGS.TrackType)[0]; - - if (!trackType || !trackType.length) { - return; - } // 1 is video, 2 is audio, 17 is subtitle - // other values are unimportant in this context - - - if (trackType[0] === 1) { - trackType = 'video'; - } else if (trackType[0] === 2) { - trackType = 'audio'; - } else if (trackType[0] === 17) { - trackType = 'subtitle'; - } else { - return; - } // todo parse language - - - var decodedTrack = { - rawCodec: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(findEbml(track, [EBML_TAGS.CodecID])[0]), - type: trackType, - codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0], - number: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.TrackNumber])[0]), - defaultDuration: (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(findEbml(track, [EBML_TAGS.DefaultDuration])[0]), - default: findEbml(track, [EBML_TAGS.FlagDefault])[0], - rawData: track - }; - var codec = ''; - - if (/V_MPEG4\/ISO\/AVC/.test(decodedTrack.rawCodec)) { - codec = "avc1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(decodedTrack.codecPrivate); - } else if (/V_MPEGH\/ISO\/HEVC/.test(decodedTrack.rawCodec)) { - codec = "hev1." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(decodedTrack.codecPrivate); - } else if (/V_MPEG4\/ISO\/ASP/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString(); - } else { - codec = 'mp4v.20.9'; - } - } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) { - codec = 'theora'; - } else if (/^V_VP8/.test(decodedTrack.rawCodec)) { - codec = 'vp8'; - } else if (/^V_VP9/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate), - profile = _parseVp9Private.profile, - level = _parseVp9Private.level, - bitDepth = _parseVp9Private.bitDepth, - chromaSubsampling = _parseVp9Private.chromaSubsampling; - - codec = 'vp09.'; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0') + "."; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0') + "."; - codec += (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0') + "."; - codec += "" + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name - - var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || []; - var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || []; - var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || []; - var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all. - - if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) { - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients[0], 2, '0'); - codec += "." + (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag[0], 2, '0'); - } - } else { - codec = 'vp9'; - } - } else if (/^V_AV1/.test(decodedTrack.rawCodec)) { - codec = "av01." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(decodedTrack.codecPrivate); - } else if (/A_ALAC/.test(decodedTrack.rawCodec)) { - codec = 'alac'; - } else if (/A_MPEG\/L2/.test(decodedTrack.rawCodec)) { - codec = 'mp2'; - } else if (/A_MPEG\/L3/.test(decodedTrack.rawCodec)) { - codec = 'mp3'; - } else if (/^A_AAC/.test(decodedTrack.rawCodec)) { - if (decodedTrack.codecPrivate) { - codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString(); - } else { - codec = 'mp4a.40.2'; - } - } else if (/^A_AC3/.test(decodedTrack.rawCodec)) { - codec = 'ac-3'; - } else if (/^A_PCM/.test(decodedTrack.rawCodec)) { - codec = 'pcm'; - } else if (/^A_MS\/ACM/.test(decodedTrack.rawCodec)) { - codec = 'speex'; - } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) { - codec = 'ec-3'; - } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) { - codec = 'vorbis'; - } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) { - codec = 'flac'; - } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) { - codec = 'opus'; - } - - decodedTrack.codec = codec; - decodedTracks.push(decodedTrack); - }); - return decodedTracks.sort(function (a, b) { - return a.number - b.number; - }); -}; -var parseData = function parseData(data, tracks) { - var allBlocks = []; - var segment = findEbml(data, [EBML_TAGS.Segment])[0]; - var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms - - if (timestampScale && timestampScale.length) { - timestampScale = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestampScale); - } else { - timestampScale = 1000000; - } - - var clusters = findEbml(segment, [EBML_TAGS.Cluster]); - - if (!tracks) { - tracks = parseTracks(segment); - } - - clusters.forEach(function (cluster, ci) { - var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) { - return { - type: 'simple', - data: b - }; - }); - var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) { - return { - type: 'group', - data: b - }; - }); - var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0; - - if (timestamp && timestamp.length) { - timestamp = (0,_byte_helpers__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(timestamp); - } // get all blocks then sort them into the correct order - - - var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) { - return a.data.byteOffset - b.data.byteOffset; - }); - blocks.forEach(function (block, bi) { - var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp); - allBlocks.push(decoded); - }); - }); - return { - tracks: tracks, - blocks: allBlocks - }; -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getId3Offset: () => (/* binding */ getId3Offset), -/* harmony export */ getId3Size: () => (/* binding */ getId3Size) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - -var ID3 = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x49, 0x44, 0x33]); -var getId3Size = function getId3Size(bytes, offset) { - if (offset === void 0) { - offset = 0; - } - - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var flags = bytes[offset + 5]; - var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9]; - var footerPresent = (flags & 16) >> 4; - - if (footerPresent) { - return returnSize + 20; - } - - return returnSize + 10; -}; -var getId3Offset = function getId3Offset(bytes, offset) { - if (offset === void 0) { - offset = 0; - } - - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - - if (bytes.length - offset < 10 || !(0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes, ID3, { - offset: offset - })) { - return offset; - } - - offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files - // have multiple ID3 tag sections even though - // they should not. - - return getId3Offset(bytes, offset); -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ simpleTypeFromSourceType: () => (/* binding */ simpleTypeFromSourceType) -/* harmony export */ }); -var MPEGURL_REGEX = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i; -var DASH_REGEX = /^application\/dash\+xml/i; -/** - * Returns a string that describes the type of source based on a video source object's - * media type. - * - * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type} - * - * @param {string} type - * Video source object media type - * @return {('hls'|'dash'|'vhs-json'|null)} - * VHS source type string - */ - -var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) { - if (MPEGURL_REGEX.test(type)) { - return 'hls'; - } - - if (DASH_REGEX.test(type)) { - return 'dash'; - } // Denotes the special case of a manifest object passed to http-streaming instead of a - // source URL. - // - // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types. - // - // In this case, vnd stands for vendor, video.js for the organization, VHS for this - // project, and the +json suffix identifies the structure of the media type. - - - if (type === 'application/vnd.videojs.vhs+json') { - return 'vhs-json'; - } - - return null; -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ addSampleDescription: () => (/* binding */ addSampleDescription), -/* harmony export */ buildFrameTable: () => (/* binding */ buildFrameTable), -/* harmony export */ findBox: () => (/* binding */ findBox), -/* harmony export */ findNamedBox: () => (/* binding */ findNamedBox), -/* harmony export */ parseDescriptors: () => (/* binding */ parseDescriptors), -/* harmony export */ parseMediaInfo: () => (/* binding */ parseMediaInfo), -/* harmony export */ parseTracks: () => (/* binding */ parseTracks) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); -/* harmony import */ var _codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codec-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js"); -/* harmony import */ var _opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./opus-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js"); - - - - -var normalizePath = function normalizePath(path) { - if (typeof path === 'string') { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.stringToBytes)(path); - } - - if (typeof path === 'number') { - return path; - } - - return path; -}; - -var normalizePaths = function normalizePaths(paths) { - if (!Array.isArray(paths)) { - return [normalizePath(paths)]; - } - - return paths.map(function (p) { - return normalizePath(p); - }); -}; - -var DESCRIPTORS; -var parseDescriptors = function parseDescriptors(bytes) { - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - var i = 0; - - while (bytes.length > i) { - var tag = bytes[i]; - var size = 0; - var headerSize = 0; // tag - - headerSize++; - var byte = bytes[headerSize]; // first byte - - headerSize++; - - while (byte & 0x80) { - size = (byte & 0x7F) << 7; - byte = bytes[headerSize]; - headerSize++; - } - - size += byte & 0x7F; - - for (var z = 0; z < DESCRIPTORS.length; z++) { - var _DESCRIPTORS$z = DESCRIPTORS[z], - id = _DESCRIPTORS$z.id, - parser = _DESCRIPTORS$z.parser; - - if (tag === id) { - results.push(parser(bytes.subarray(headerSize, headerSize + size))); - break; - } - } - - i += size + headerSize; - } - - return results; -}; -DESCRIPTORS = [{ - id: 0x03, - parser: function parser(bytes) { - var desc = { - tag: 0x03, - id: bytes[0] << 8 | bytes[1], - flags: bytes[2], - size: 3, - dependsOnEsId: 0, - ocrEsId: 0, - descriptors: [], - url: '' - }; // depends on es id - - if (desc.flags & 0x80) { - desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; - desc.size += 2; - } // url - - - if (desc.flags & 0x40) { - var len = bytes[desc.size]; - desc.url = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(desc.size + 1, desc.size + 1 + len)); - desc.size += len; - } // ocr es id - - - if (desc.flags & 0x20) { - desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1]; - desc.size += 2; - } - - desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || []; - return desc; - } -}, { - id: 0x04, - parser: function parser(bytes) { - // DecoderConfigDescriptor - var desc = { - tag: 0x04, - oti: bytes[0], - streamType: bytes[1], - bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4], - maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8], - avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12], - descriptors: parseDescriptors(bytes.subarray(13)) - }; - return desc; - } -}, { - id: 0x05, - parser: function parser(bytes) { - // DecoderSpecificInfo - return { - tag: 0x05, - bytes: bytes - }; - } -}, { - id: 0x06, - parser: function parser(bytes) { - // SLConfigDescriptor - return { - tag: 0x06, - bytes: bytes - }; - } -}]; -/** - * find any number of boxes by name given a path to it in an iso bmff - * such as mp4. - * - * @param {TypedArray} bytes - * bytes for the iso bmff to search for boxes in - * - * @param {Uint8Array[]|string[]|string|Uint8Array} name - * An array of paths or a single path representing the name - * of boxes to search through in bytes. Paths may be - * uint8 (character codes) or strings. - * - * @param {boolean} [complete=false] - * Should we search only for complete boxes on the final path. - * This is very useful when you do not want to get back partial boxes - * in the case of streaming files. - * - * @return {Uint8Array[]} - * An array of the end paths that we found. - */ - -var findBox = function findBox(bytes, paths, complete) { - if (complete === void 0) { - complete = false; - } - - paths = normalizePaths(paths); - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var results = []; - - if (!paths.length) { - // short-circuit the search for empty paths - return results; - } - - var i = 0; - - while (i < bytes.length) { - var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0; - var type = bytes.subarray(i + 4, i + 8); // invalid box format. - - if (size === 0) { - break; - } - - var end = i + size; - - if (end > bytes.length) { - // this box is bigger than the number of bytes we have - // and complete is set, we cannot find any more boxes. - if (complete) { - break; - } - - end = bytes.length; - } - - var data = bytes.subarray(i + 8, end); - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(type, paths[0])) { - if (paths.length === 1) { - // this is the end of the path and we've found the box we were - // looking for - results.push(data); - } else { - // recursively search for the next box along the path - results.push.apply(results, findBox(data, paths.slice(1), complete)); - } - } - - i = end; - } // we've finished searching all of bytes - - - return results; -}; -/** - * Search for a single matching box by name in an iso bmff format like - * mp4. This function is useful for finding codec boxes which - * can be placed arbitrarily in sample descriptions depending - * on the version of the file or file type. - * - * @param {TypedArray} bytes - * bytes for the iso bmff to search for boxes in - * - * @param {string|Uint8Array} name - * The name of the box to find. - * - * @return {Uint8Array[]} - * a subarray of bytes representing the name boxed we found. - */ - -var findNamedBox = function findNamedBox(bytes, name) { - name = normalizePath(name); - - if (!name.length) { - // short-circuit the search for empty paths - return bytes.subarray(bytes.length); - } - - var i = 0; - - while (i < bytes.length) { - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + name.length), name)) { - var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0; - var end = size > 1 ? i + size : bytes.byteLength; - return bytes.subarray(i + 4, end); - } - - i++; - } // we've finished searching all of bytes - - - return bytes.subarray(bytes.length); -}; - -var parseSamples = function parseSamples(data, entrySize, parseEntry) { - if (entrySize === void 0) { - entrySize = 4; - } - - if (parseEntry === void 0) { - parseEntry = function parseEntry(d) { - return (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(d); - }; - } - - var entries = []; - - if (!data || !data.length) { - return entries; - } - - var entryCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(data.subarray(4, 8)); - - for (var i = 8; entryCount; i += entrySize, entryCount--) { - entries.push(parseEntry(data.subarray(i, i + entrySize))); - } - - return entries; -}; - -var buildFrameTable = function buildFrameTable(stbl, timescale) { - var keySamples = parseSamples(findBox(stbl, ['stss'])[0]); - var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]); - var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) { - return { - sampleCount: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), - sampleDelta: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)) - }; - }); - var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) { - return { - firstChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(0, 4)), - samplesPerChunk: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(4, 8)), - sampleDescriptionIndex: (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(entry.subarray(8, 12)) - }; - }); - var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need - - var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null); - var frames = []; - - for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) { - var samplesInChunk = void 0; - - for (var i = 0; i < samplesToChunks.length; i++) { - var sampleToChunk = samplesToChunks[i]; - var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk); - - if (isThisOne) { - samplesInChunk = sampleToChunk.samplesPerChunk; - break; - } - } - - var chunkOffset = chunkOffsets[chunkIndex]; - - for (var _i = 0; _i < samplesInChunk; _i++) { - var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe - - var keyframe = !keySamples.length; - - if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) { - keyframe = true; - } - - var frame = { - keyframe: keyframe, - start: chunkOffset, - end: chunkOffset + frameEnd - }; - - for (var k = 0; k < timeToSamples.length; k++) { - var _timeToSamples$k = timeToSamples[k], - sampleCount = _timeToSamples$k.sampleCount, - sampleDelta = _timeToSamples$k.sampleDelta; - - if (frames.length <= sampleCount) { - // ms to ns - var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0; - frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000; - frame.duration = sampleDelta; - break; - } - } - - frames.push(frame); - chunkOffset += frameEnd; - } - } - - return frames; -}; -var addSampleDescription = function addSampleDescription(track, bytes) { - var codec = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(bytes.subarray(0, 4)); - - if (track.type === 'video') { - track.info = track.info || {}; - track.info.width = bytes[28] << 8 | bytes[29]; - track.info.height = bytes[30] << 8 | bytes[31]; - } else if (track.type === 'audio') { - track.info = track.info || {}; - track.info.channels = bytes[20] << 8 | bytes[21]; - track.info.bitDepth = bytes[22] << 8 | bytes[23]; - track.info.sampleRate = bytes[28] << 8 | bytes[29]; - } - - if (codec === 'avc1') { - var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord - - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAvcCodec)(avcC); - track.info.avcC = avcC; // TODO: do we need to parse all this? - - /* { - configurationVersion: avcC[0], - profile: avcC[1], - profileCompatibility: avcC[2], - level: avcC[3], - lengthSizeMinusOne: avcC[4] & 0x3 - }; - let spsNalUnitCount = avcC[5] & 0x1F; - const spsNalUnits = track.info.avc.spsNalUnits = []; - // past spsNalUnitCount - let offset = 6; - while (spsNalUnitCount--) { - const nalLen = avcC[offset] << 8 | avcC[offset + 1]; - spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); - offset += nalLen + 2; - } - let ppsNalUnitCount = avcC[offset]; - const ppsNalUnits = track.info.avc.ppsNalUnits = []; - // past ppsNalUnitCount - offset += 1; - while (ppsNalUnitCount--) { - const nalLen = avcC[offset] << 8 | avcC[offset + 1]; - ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen)); - offset += nalLen + 2; - }*/ - // HEVCDecoderConfigurationRecord - } else if (codec === 'hvc1' || codec === 'hev1') { - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getHvcCodec)(findNamedBox(bytes, 'hvcC')); - } else if (codec === 'mp4a' || codec === 'mp4v') { - var esds = findNamedBox(bytes, 'esds'); - var esDescriptor = parseDescriptors(esds.subarray(4))[0]; - var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) { - var tag = _ref.tag; - return tag === 0x04; - })[0]; - - if (decoderConfig) { - // most codecs do not have a further '.' - // such as 0xa5 for ac-3 and 0xa6 for e-ac-3 - codec += '.' + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(decoderConfig.oti); - - if (decoderConfig.oti === 0x40) { - codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString(); - } else if (decoderConfig.oti === 0x20) { - codec += '.' + decoderConfig.descriptors[0].bytes[4].toString(); - } else if (decoderConfig.oti === 0xdd) { - codec = 'vorbis'; - } - } else if (track.type === 'audio') { - codec += '.40.2'; - } else { - codec += '.20.9'; - } - } else if (codec === 'av01') { - // AV1DecoderConfigurationRecord - codec += "." + (0,_codec_helpers_js__WEBPACK_IMPORTED_MODULE_1__.getAv1Codec)(findNamedBox(bytes, 'av1C')); - } else if (codec === 'vp09') { - // VPCodecConfigurationRecord - var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/ - - var profile = vpcC[0]; - var level = vpcC[1]; - var bitDepth = vpcC[2] >> 4; - var chromaSubsampling = (vpcC[2] & 0x0F) >> 1; - var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3; - var colourPrimaries = vpcC[3]; - var transferCharacteristics = vpcC[4]; - var matrixCoefficients = vpcC[5]; - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(profile, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(chromaSubsampling, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(colourPrimaries, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(transferCharacteristics, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(matrixCoefficients, 2, '0'); - codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(videoFullRangeFlag, 2, '0'); - } else if (codec === 'theo') { - codec = 'theora'; - } else if (codec === 'spex') { - codec = 'speex'; - } else if (codec === '.mp3') { - codec = 'mp4a.40.34'; - } else if (codec === 'msVo') { - codec = 'vorbis'; - } else if (codec === 'Opus') { - codec = 'opus'; - var dOps = findNamedBox(bytes, 'dOps'); - track.info.opus = (0,_opus_helpers_js__WEBPACK_IMPORTED_MODULE_2__.parseOpusHead)(dOps); // TODO: should this go into the webm code?? - // Firefox requires a codecDelay for opus playback - // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238 - - track.info.codecDelay = 6500000; - } else { - codec = codec.toLowerCase(); - } - /* eslint-enable */ - // flac, ac-3, ec-3, opus - - - track.codec = codec; -}; -var parseTracks = function parseTracks(bytes, frameTable) { - if (frameTable === void 0) { - frameTable = true; - } - - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - var traks = findBox(bytes, ['moov', 'trak'], true); - var tracks = []; - traks.forEach(function (trak) { - var track = { - bytes: trak - }; - var mdia = findBox(trak, ['mdia'])[0]; - var hdlr = findBox(mdia, ['hdlr'])[0]; - var trakType = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToString)(hdlr.subarray(8, 12)); - - if (trakType === 'soun') { - track.type = 'audio'; - } else if (trakType === 'vide') { - track.type = 'video'; - } else { - track.type = trakType; - } - - var tkhd = findBox(trak, ['tkhd'])[0]; - - if (tkhd) { - var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength); - var tkhdVersion = view.getUint8(0); - track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20); - } - - var mdhd = findBox(mdia, ['mdhd'])[0]; - - if (mdhd) { - // mdhd is a FullBox, meaning it will have its own version as the first byte - var version = mdhd[0]; - var index = version === 0 ? 12 : 20; - track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0; - } - - var stbl = findBox(mdia, ['minf', 'stbl'])[0]; - var stsd = findBox(stbl, ['stsd'])[0]; - var descriptionCount = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(4, 8)); - var offset = 8; // add codec and codec info - - while (descriptionCount--) { - var len = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(stsd.subarray(offset, offset + 4)); - var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len); - addSampleDescription(track, sampleDescriptor); - offset += 4 + len; - } - - if (frameTable) { - track.frameTable = buildFrameTable(stbl, track.timescale); - } // codec has no sub parameters - - - tracks.push(track); - }); - return tracks; -}; -var parseMediaInfo = function parseMediaInfo(bytes) { - var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0]; - - if (!mvhd || !mvhd.length) { - return; - } - - var info = {}; // ms to ns - // mvhd v1 has 8 byte duration and other fields too - - if (mvhd[0] === 1) { - info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(20, 24)); - info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(24, 32)); - } else { - info.timestampScale = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(12, 16)); - info.duration = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesToNumber)(mvhd.subarray(16, 20)); - } - - info.bytes = mvhd; - return info; -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ EMULATION_PREVENTION: () => (/* binding */ EMULATION_PREVENTION), -/* harmony export */ NAL_TYPE_ONE: () => (/* binding */ NAL_TYPE_ONE), -/* harmony export */ NAL_TYPE_TWO: () => (/* binding */ NAL_TYPE_TWO), -/* harmony export */ discardEmulationPreventionBytes: () => (/* binding */ discardEmulationPreventionBytes), -/* harmony export */ findH264Nal: () => (/* binding */ findH264Nal), -/* harmony export */ findH265Nal: () => (/* binding */ findH265Nal), -/* harmony export */ findNal: () => (/* binding */ findNal) -/* harmony export */ }); -/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js"); - -var NAL_TYPE_ONE = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x00, 0x01]); -var NAL_TYPE_TWO = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x01]); -var EMULATION_PREVENTION = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)([0x00, 0x00, 0x03]); -/** - * Expunge any "Emulation Prevention" bytes from a "Raw Byte - * Sequence Payload" - * - * @param data {Uint8Array} the bytes of a RBSP from a NAL - * unit - * @return {Uint8Array} the RBSP without any Emulation - * Prevention Bytes - */ - -var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) { - var positions = []; - var i = 1; // Find all `Emulation Prevention Bytes` - - while (i < bytes.length - 2) { - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) { - positions.push(i + 2); - i++; - } - - i++; - } // If no Emulation Prevention Bytes were found just return the original - // array - - - if (positions.length === 0) { - return bytes; - } // Create a new array to hold the NAL unit data - - - var newLength = bytes.length - positions.length; - var newData = new Uint8Array(newLength); - var sourceIndex = 0; - - for (i = 0; i < newLength; sourceIndex++, i++) { - if (sourceIndex === positions[0]) { - // Skip this byte - sourceIndex++; // Remove this position index - - positions.shift(); - } - - newData[i] = bytes[sourceIndex]; - } - - return newData; -}; -var findNal = function findNal(bytes, dataType, types, nalLimit) { - if (nalLimit === void 0) { - nalLimit = Infinity; - } - - bytes = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(bytes); - types = [].concat(types); - var i = 0; - var nalStart; - var nalsFound = 0; // keep searching until: - // we reach the end of bytes - // we reach the maximum number of nals they want to seach - // NOTE: that we disregard nalLimit when we have found the start - // of the nal we want so that we can find the end of the nal we want. - - while (i < bytes.length && (nalsFound < nalLimit || nalStart)) { - var nalOffset = void 0; - - if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_ONE)) { - nalOffset = 4; - } else if ((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.bytesMatch)(bytes.subarray(i), NAL_TYPE_TWO)) { - nalOffset = 3; - } // we are unsynced, - // find the next nal unit - - - if (!nalOffset) { - i++; - continue; - } - - nalsFound++; - - if (nalStart) { - return discardEmulationPreventionBytes(bytes.subarray(nalStart, i)); - } - - var nalType = void 0; - - if (dataType === 'h264') { - nalType = bytes[i + nalOffset] & 0x1f; - } else if (dataType === 'h265') { - nalType = bytes[i + nalOffset] >> 1 & 0x3f; - } - - if (types.indexOf(nalType) !== -1) { - nalStart = i + nalOffset; - } // nal header is 1 length for h264, and 2 for h265 - - - i += nalOffset + (dataType === 'h264' ? 1 : 2); - } - - return bytes.subarray(0, 0); -}; -var findH264Nal = function findH264Nal(bytes, type, nalLimit) { - return findNal(bytes, 'h264', type, nalLimit); -}; -var findH265Nal = function findH265Nal(bytes, type, nalLimit) { - return findNal(bytes, 'h265', type, nalLimit); -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js ***! - \**********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPUS_HEAD: () => (/* binding */ OPUS_HEAD), -/* harmony export */ parseOpusHead: () => (/* binding */ parseOpusHead), -/* harmony export */ setOpusHead: () => (/* binding */ setOpusHead) -/* harmony export */ }); -var OPUS_HEAD = new Uint8Array([// O, p, u, s -0x4f, 0x70, 0x75, 0x73, // H, e, a, d -0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus -// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html -// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html - -var parseOpusHead = function parseOpusHead(bytes) { - var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); - var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian. - - var littleEndian = version !== 0; - var config = { - version: version, - channels: view.getUint8(1), - preSkip: view.getUint16(2, littleEndian), - sampleRate: view.getUint32(4, littleEndian), - outputGain: view.getUint16(8, littleEndian), - channelMappingFamily: view.getUint8(10) - }; - - if (config.channelMappingFamily > 0 && bytes.length > 10) { - config.streamCount = view.getUint8(11); - config.twoChannelStreamCount = view.getUint8(12); - config.channelMapping = []; - - for (var c = 0; c < config.channels; c++) { - config.channelMapping.push(view.getUint8(13 + c)); - } - } - - return config; -}; -var setOpusHead = function setOpusHead(config) { - var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels; - var view = new DataView(new ArrayBuffer(size)); - var littleEndian = config.version !== 0; - view.setUint8(0, config.version); - view.setUint8(1, config.channels); - view.setUint16(2, config.preSkip, littleEndian); - view.setUint32(4, config.sampleRate, littleEndian); - view.setUint16(8, config.outputGain, littleEndian); - view.setUint8(10, config.channelMappingFamily); - - if (config.channelMappingFamily > 0) { - view.setUint8(11, config.streamCount); - config.channelMapping.foreach(function (cm, i) { - view.setUint8(12 + i, cm); - }); - } - - return new Uint8Array(view.buffer); -}; - -/***/ }), - -/***/ "./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js"); -/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); -/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__); - - -var DEFAULT_LOCATION = 'http://example.com'; - -var resolveUrl = function resolveUrl(baseUrl, relativeUrl) { - // return early if we don't need to resolve - if (/^[a-z]+:/i.test(relativeUrl)) { - return relativeUrl; - } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location - - - if (/^data:/.test(baseUrl)) { - baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || ''; - } // IE11 supports URL but not the URL constructor - // feature detect the behavior we want - - - var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function'; - var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node) - // and if baseUrl isn't an absolute url - - var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location - - if (nativeURL) { - baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION); - } else if (!/\/\//i.test(baseUrl)) { - baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl); - } - - if (nativeURL) { - var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol - // and if we're location-less, remove the location - // otherwise, return the url unmodified - - if (removeLocation) { - return newUrl.href.slice(DEFAULT_LOCATION.length); - } else if (protocolLess) { - return newUrl.href.slice(newUrl.protocol.length); - } - - return newUrl.href; - } - - return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl); - -/***/ }), - -/***/ "./node_modules/videojs-vtt.js/lib/browser-index.js": -/*!**********************************************************!*\ - !*** ./node_modules/videojs-vtt.js/lib/browser-index.js ***! - \**********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Default exports for Node. Export the extended versions of VTTCue and -// VTTRegion in Node since we likely want the capability to convert back and -// forth between JSON. If we don't then it's not that big of a deal since we're -// off browser. - -var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js"); - -var vttjs = module.exports = { - WebVTT: __webpack_require__(/*! ./vtt.js */ "./node_modules/videojs-vtt.js/lib/vtt.js"), - VTTCue: __webpack_require__(/*! ./vttcue.js */ "./node_modules/videojs-vtt.js/lib/vttcue.js"), - VTTRegion: __webpack_require__(/*! ./vttregion.js */ "./node_modules/videojs-vtt.js/lib/vttregion.js") -}; - -window.vttjs = vttjs; -window.WebVTT = vttjs.WebVTT; - -var cueShim = vttjs.VTTCue; -var regionShim = vttjs.VTTRegion; -var nativeVTTCue = window.VTTCue; -var nativeVTTRegion = window.VTTRegion; - -vttjs.shim = function() { - window.VTTCue = cueShim; - window.VTTRegion = regionShim; -}; - -vttjs.restore = function() { - window.VTTCue = nativeVTTCue; - window.VTTRegion = nativeVTTRegion; -}; - -if (!window.VTTCue) { - vttjs.shim(); -} - - -/***/ }), - -/***/ "./node_modules/videojs-vtt.js/lib/vtt.js": -/*!************************************************!*\ - !*** ./node_modules/videojs-vtt.js/lib/vtt.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ -var document = __webpack_require__(/*! global/document */ "./node_modules/global/document.js"); - -var _objCreate = Object.create || (function() { - function F() {} - return function(o) { - if (arguments.length !== 1) { - throw new Error('Object.create shim only accepts one parameter.'); - } - F.prototype = o; - return new F(); - }; -})(); - -// Creates a new ParserError object from an errorData object. The errorData -// object should have default code and message properties. The default message -// property can be overriden by passing in a message parameter. -// See ParsingError.Errors below for acceptable errors. -function ParsingError(errorData, message) { - this.name = "ParsingError"; - this.code = errorData.code; - this.message = message || errorData.message; -} -ParsingError.prototype = _objCreate(Error.prototype); -ParsingError.prototype.constructor = ParsingError; - -// ParsingError metadata for acceptable ParsingErrors. -ParsingError.Errors = { - BadSignature: { - code: 0, - message: "Malformed WebVTT signature." - }, - BadTimeStamp: { - code: 1, - message: "Malformed time stamp." - } -}; - -// Try to parse input as a time stamp. -function parseTimeStamp(input) { - - function computeSeconds(h, m, s, f) { - return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000; - } - - var m = input.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/); - if (!m) { - return null; - } - - if (m[3]) { - // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds] - return computeSeconds(m[1], m[2], m[3].replace(":", ""), m[4]); - } else if (m[1] > 59) { - // Timestamp takes the form of [hours]:[minutes].[milliseconds] - // First position is hours as it's over 59. - return computeSeconds(m[1], m[2], 0, m[4]); - } else { - // Timestamp takes the form of [minutes]:[seconds].[milliseconds] - return computeSeconds(0, m[1], m[2], m[4]); - } -} - -// A settings object holds key/value pairs and will ignore anything but the first -// assignment to a specific key. -function Settings() { - this.values = _objCreate(null); -} - -Settings.prototype = { - // Only accept the first assignment to any key. - set: function(k, v) { - if (!this.get(k) && v !== "") { - this.values[k] = v; - } - }, - // Return the value for a key, or a default value. - // If 'defaultKey' is passed then 'dflt' is assumed to be an object with - // a number of possible default values as properties where 'defaultKey' is - // the key of the property that will be chosen; otherwise it's assumed to be - // a single value. - get: function(k, dflt, defaultKey) { - if (defaultKey) { - return this.has(k) ? this.values[k] : dflt[defaultKey]; - } - return this.has(k) ? this.values[k] : dflt; - }, - // Check whether we have a value for a key. - has: function(k) { - return k in this.values; - }, - // Accept a setting if its one of the given alternatives. - alt: function(k, v, a) { - for (var n = 0; n < a.length; ++n) { - if (v === a[n]) { - this.set(k, v); - break; - } - } - }, - // Accept a setting if its a valid (signed) integer. - integer: function(k, v) { - if (/^-?\d+$/.test(v)) { // integer - this.set(k, parseInt(v, 10)); - } - }, - // Accept a setting if its a valid percentage. - percent: function(k, v) { - var m; - if ((m = v.match(/^([\d]{1,3})(\.[\d]*)?%$/))) { - v = parseFloat(v); - if (v >= 0 && v <= 100) { - this.set(k, v); - return true; - } - } - return false; - } -}; - -// Helper function to parse input into groups separated by 'groupDelim', and -// interprete each group as a key/value pair separated by 'keyValueDelim'. -function parseOptions(input, callback, keyValueDelim, groupDelim) { - var groups = groupDelim ? input.split(groupDelim) : [input]; - for (var i in groups) { - if (typeof groups[i] !== "string") { - continue; - } - var kv = groups[i].split(keyValueDelim); - if (kv.length !== 2) { - continue; - } - var k = kv[0].trim(); - var v = kv[1].trim(); - callback(k, v); - } -} - -function parseCue(input, cue, regionList) { - // Remember the original input if we need to throw an error. - var oInput = input; - // 4.1 WebVTT timestamp - function consumeTimeStamp() { - var ts = parseTimeStamp(input); - if (ts === null) { - throw new ParsingError(ParsingError.Errors.BadTimeStamp, - "Malformed timestamp: " + oInput); - } - // Remove time stamp from input. - input = input.replace(/^[^\sa-zA-Z-]+/, ""); - return ts; - } - - // 4.4.2 WebVTT cue settings - function consumeCueSettings(input, cue) { - var settings = new Settings(); - - parseOptions(input, function (k, v) { - switch (k) { - case "region": - // Find the last region we parsed with the same region id. - for (var i = regionList.length - 1; i >= 0; i--) { - if (regionList[i].id === v) { - settings.set(k, regionList[i].region); - break; - } - } - break; - case "vertical": - settings.alt(k, v, ["rl", "lr"]); - break; - case "line": - var vals = v.split(","), - vals0 = vals[0]; - settings.integer(k, vals0); - settings.percent(k, vals0) ? settings.set("snapToLines", false) : null; - settings.alt(k, vals0, ["auto"]); - if (vals.length === 2) { - settings.alt("lineAlign", vals[1], ["start", "center", "end"]); - } - break; - case "position": - vals = v.split(","); - settings.percent(k, vals[0]); - if (vals.length === 2) { - settings.alt("positionAlign", vals[1], ["start", "center", "end"]); - } - break; - case "size": - settings.percent(k, v); - break; - case "align": - settings.alt(k, v, ["start", "center", "end", "left", "right"]); - break; - } - }, /:/, /\s/); - - // Apply default values for any missing fields. - cue.region = settings.get("region", null); - cue.vertical = settings.get("vertical", ""); - try { - cue.line = settings.get("line", "auto"); - } catch (e) {} - cue.lineAlign = settings.get("lineAlign", "start"); - cue.snapToLines = settings.get("snapToLines", true); - cue.size = settings.get("size", 100); - // Safari still uses the old middle value and won't accept center - try { - cue.align = settings.get("align", "center"); - } catch (e) { - cue.align = settings.get("align", "middle"); - } - try { - cue.position = settings.get("position", "auto"); - } catch (e) { - cue.position = settings.get("position", { - start: 0, - left: 0, - center: 50, - middle: 50, - end: 100, - right: 100 - }, cue.align); - } - - - cue.positionAlign = settings.get("positionAlign", { - start: "start", - left: "start", - center: "center", - middle: "center", - end: "end", - right: "end" - }, cue.align); - } - - function skipWhitespace() { - input = input.replace(/^\s+/, ""); - } - - // 4.1 WebVTT cue timings. - skipWhitespace(); - cue.startTime = consumeTimeStamp(); // (1) collect cue start time - skipWhitespace(); - if (input.substr(0, 3) !== "-->") { // (3) next characters must match "-->" - throw new ParsingError(ParsingError.Errors.BadTimeStamp, - "Malformed time stamp (time stamps must be separated by '-->'): " + - oInput); - } - input = input.substr(3); - skipWhitespace(); - cue.endTime = consumeTimeStamp(); // (5) collect cue end time - - // 4.1 WebVTT cue settings list. - skipWhitespace(); - consumeCueSettings(input, cue); -} - -// When evaluating this file as part of a Webpack bundle for server -// side rendering, `document` is an empty object. -var TEXTAREA_ELEMENT = document.createElement && document.createElement("textarea"); - -var TAG_NAME = { - c: "span", - i: "i", - b: "b", - u: "u", - ruby: "ruby", - rt: "rt", - v: "span", - lang: "span" -}; - -// 5.1 default text color -// 5.2 default text background color is equivalent to text color with bg_ prefix -var DEFAULT_COLOR_CLASS = { - white: 'rgba(255,255,255,1)', - lime: 'rgba(0,255,0,1)', - cyan: 'rgba(0,255,255,1)', - red: 'rgba(255,0,0,1)', - yellow: 'rgba(255,255,0,1)', - magenta: 'rgba(255,0,255,1)', - blue: 'rgba(0,0,255,1)', - black: 'rgba(0,0,0,1)' -}; - -var TAG_ANNOTATION = { - v: "title", - lang: "lang" -}; - -var NEEDS_PARENT = { - rt: "ruby" -}; - -// Parse content into a document fragment. -function parseContent(window, input) { - function nextToken() { - // Check for end-of-string. - if (!input) { - return null; - } - - // Consume 'n' characters from the input. - function consume(result) { - input = input.substr(result.length); - return result; - } - - var m = input.match(/^([^<]*)(<[^>]*>?)?/); - // If there is some text before the next tag, return it, otherwise return - // the tag. - return consume(m[1] ? m[1] : m[2]); - } - - function unescape(s) { - TEXTAREA_ELEMENT.innerHTML = s; - s = TEXTAREA_ELEMENT.textContent; - TEXTAREA_ELEMENT.textContent = ""; - return s; - } - - function shouldAdd(current, element) { - return !NEEDS_PARENT[element.localName] || - NEEDS_PARENT[element.localName] === current.localName; - } - - // Create an element for this tag. - function createElement(type, annotation) { - var tagName = TAG_NAME[type]; - if (!tagName) { - return null; - } - var element = window.document.createElement(tagName); - var name = TAG_ANNOTATION[type]; - if (name && annotation) { - element[name] = annotation.trim(); - } - return element; - } - - var rootDiv = window.document.createElement("div"), - current = rootDiv, - t, - tagStack = []; - - while ((t = nextToken()) !== null) { - if (t[0] === '<') { - if (t[1] === "/") { - // If the closing tag matches, move back up to the parent node. - if (tagStack.length && - tagStack[tagStack.length - 1] === t.substr(2).replace(">", "")) { - tagStack.pop(); - current = current.parentNode; - } - // Otherwise just ignore the end tag. - continue; - } - var ts = parseTimeStamp(t.substr(1, t.length - 2)); - var node; - if (ts) { - // Timestamps are lead nodes as well. - node = window.document.createProcessingInstruction("timestamp", ts); - current.appendChild(node); - continue; - } - var m = t.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/); - // If we can't parse the tag, skip to the next tag. - if (!m) { - continue; - } - // Try to construct an element, and ignore the tag if we couldn't. - node = createElement(m[1], m[3]); - if (!node) { - continue; - } - // Determine if the tag should be added based on the context of where it - // is placed in the cuetext. - if (!shouldAdd(current, node)) { - continue; - } - // Set the class list (as a list of classes, separated by space). - if (m[2]) { - var classes = m[2].split('.'); - - classes.forEach(function(cl) { - var bgColor = /^bg_/.test(cl); - // slice out `bg_` if it's a background color - var colorName = bgColor ? cl.slice(3) : cl; - - if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) { - var propName = bgColor ? 'background-color' : 'color'; - var propValue = DEFAULT_COLOR_CLASS[colorName]; - - node.style[propName] = propValue; - } - }); - - node.className = classes.join(' '); - } - // Append the node to the current node, and enter the scope of the new - // node. - tagStack.push(m[1]); - current.appendChild(node); - current = node; - continue; - } - - // Text nodes are leaf nodes. - current.appendChild(window.document.createTextNode(unescape(t))); - } - - return rootDiv; -} - -// This is a list of all the Unicode characters that have a strong -// right-to-left category. What this means is that these characters are -// written right-to-left for sure. It was generated by pulling all the strong -// right-to-left characters out of the Unicode data table. That table can -// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt -var strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6], - [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d], - [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6], - [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5], - [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815], - [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858], - [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f], - [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c], - [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1], - [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc], - [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808], - [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855], - [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f], - [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13], - [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58], - [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72], - [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f], - [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32], - [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42], - [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f], - [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59], - [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62], - [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77], - [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b], - [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]]; - -function isStrongRTLChar(charCode) { - for (var i = 0; i < strongRTLRanges.length; i++) { - var currentRange = strongRTLRanges[i]; - if (charCode >= currentRange[0] && charCode <= currentRange[1]) { - return true; - } - } - - return false; -} - -function determineBidi(cueDiv) { - var nodeStack = [], - text = "", - charCode; - - if (!cueDiv || !cueDiv.childNodes) { - return "ltr"; - } - - function pushNodes(nodeStack, node) { - for (var i = node.childNodes.length - 1; i >= 0; i--) { - nodeStack.push(node.childNodes[i]); - } - } - - function nextTextNode(nodeStack) { - if (!nodeStack || !nodeStack.length) { - return null; - } - - var node = nodeStack.pop(), - text = node.textContent || node.innerText; - if (text) { - // TODO: This should match all unicode type B characters (paragraph - // separator characters). See issue #115. - var m = text.match(/^.*(\n|\r)/); - if (m) { - nodeStack.length = 0; - return m[0]; - } - return text; - } - if (node.tagName === "ruby") { - return nextTextNode(nodeStack); - } - if (node.childNodes) { - pushNodes(nodeStack, node); - return nextTextNode(nodeStack); - } - } - - pushNodes(nodeStack, cueDiv); - while ((text = nextTextNode(nodeStack))) { - for (var i = 0; i < text.length; i++) { - charCode = text.charCodeAt(i); - if (isStrongRTLChar(charCode)) { - return "rtl"; - } - } - } - return "ltr"; -} - -function computeLinePos(cue) { - if (typeof cue.line === "number" && - (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) { - return cue.line; - } - if (!cue.track || !cue.track.textTrackList || - !cue.track.textTrackList.mediaElement) { - return -1; - } - var track = cue.track, - trackList = track.textTrackList, - count = 0; - for (var i = 0; i < trackList.length && trackList[i] !== track; i++) { - if (trackList[i].mode === "showing") { - count++; - } - } - return ++count * -1; -} - -function StyleBox() { -} - -// Apply styles to a div. If there is no div passed then it defaults to the -// div on 'this'. -StyleBox.prototype.applyStyles = function(styles, div) { - div = div || this.div; - for (var prop in styles) { - if (styles.hasOwnProperty(prop)) { - div.style[prop] = styles[prop]; - } - } -}; - -StyleBox.prototype.formatStyle = function(val, unit) { - return val === 0 ? 0 : val + unit; -}; - -// Constructs the computed display state of the cue (a div). Places the div -// into the overlay which should be a block level element (usually a div). -function CueStyleBox(window, cue, styleOptions) { - StyleBox.call(this); - this.cue = cue; - - // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will - // have inline positioning and will function as the cue background box. - this.cueDiv = parseContent(window, cue.text); - var styles = { - color: "rgba(255, 255, 255, 1)", - backgroundColor: "rgba(0, 0, 0, 0.8)", - position: "relative", - left: 0, - right: 0, - top: 0, - bottom: 0, - display: "inline", - writingMode: cue.vertical === "" ? "horizontal-tb" - : cue.vertical === "lr" ? "vertical-lr" - : "vertical-rl", - unicodeBidi: "plaintext" - }; - - this.applyStyles(styles, this.cueDiv); - - // Create an absolutely positioned div that will be used to position the cue - // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS - // mirrors of them except middle instead of center on Safari. - this.div = window.document.createElement("div"); - styles = { - direction: determineBidi(this.cueDiv), - writingMode: cue.vertical === "" ? "horizontal-tb" - : cue.vertical === "lr" ? "vertical-lr" - : "vertical-rl", - unicodeBidi: "plaintext", - textAlign: cue.align === "middle" ? "center" : cue.align, - font: styleOptions.font, - whiteSpace: "pre-line", - position: "absolute" - }; - - this.applyStyles(styles); - this.div.appendChild(this.cueDiv); - - // Calculate the distance from the reference edge of the viewport to the text - // position of the cue box. The reference edge will be resolved later when - // the box orientation styles are applied. - var textPos = 0; - switch (cue.positionAlign) { - case "start": - case "line-left": - textPos = cue.position; - break; - case "center": - textPos = cue.position - (cue.size / 2); - break; - case "end": - case "line-right": - textPos = cue.position - cue.size; - break; - } - - // Horizontal box orientation; textPos is the distance from the left edge of the - // area to the left edge of the box and cue.size is the distance extending to - // the right from there. - if (cue.vertical === "") { - this.applyStyles({ - left: this.formatStyle(textPos, "%"), - width: this.formatStyle(cue.size, "%") - }); - // Vertical box orientation; textPos is the distance from the top edge of the - // area to the top edge of the box and cue.size is the height extending - // downwards from there. - } else { - this.applyStyles({ - top: this.formatStyle(textPos, "%"), - height: this.formatStyle(cue.size, "%") - }); - } - - this.move = function(box) { - this.applyStyles({ - top: this.formatStyle(box.top, "px"), - bottom: this.formatStyle(box.bottom, "px"), - left: this.formatStyle(box.left, "px"), - right: this.formatStyle(box.right, "px"), - height: this.formatStyle(box.height, "px"), - width: this.formatStyle(box.width, "px") - }); - }; -} -CueStyleBox.prototype = _objCreate(StyleBox.prototype); -CueStyleBox.prototype.constructor = CueStyleBox; - -// Represents the co-ordinates of an Element in a way that we can easily -// compute things with such as if it overlaps or intersects with another Element. -// Can initialize it with either a StyleBox or another BoxPosition. -function BoxPosition(obj) { - // Either a BoxPosition was passed in and we need to copy it, or a StyleBox - // was passed in and we need to copy the results of 'getBoundingClientRect' - // as the object returned is readonly. All co-ordinate values are in reference - // to the viewport origin (top left). - var lh, height, width, top; - if (obj.div) { - height = obj.div.offsetHeight; - width = obj.div.offsetWidth; - top = obj.div.offsetTop; - - var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && - rects.getClientRects && rects.getClientRects(); - obj = obj.div.getBoundingClientRect(); - // In certain cases the outter div will be slightly larger then the sum of - // the inner div's lines. This could be due to bold text, etc, on some platforms. - // In this case we should get the average line height and use that. This will - // result in the desired behaviour. - lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length) - : 0; - - } - this.left = obj.left; - this.right = obj.right; - this.top = obj.top || top; - this.height = obj.height || height; - this.bottom = obj.bottom || (top + (obj.height || height)); - this.width = obj.width || width; - this.lineHeight = lh !== undefined ? lh : obj.lineHeight; -} - -// Move the box along a particular axis. Optionally pass in an amount to move -// the box. If no amount is passed then the default is the line height of the -// box. -BoxPosition.prototype.move = function(axis, toMove) { - toMove = toMove !== undefined ? toMove : this.lineHeight; - switch (axis) { - case "+x": - this.left += toMove; - this.right += toMove; - break; - case "-x": - this.left -= toMove; - this.right -= toMove; - break; - case "+y": - this.top += toMove; - this.bottom += toMove; - break; - case "-y": - this.top -= toMove; - this.bottom -= toMove; - break; - } -}; - -// Check if this box overlaps another box, b2. -BoxPosition.prototype.overlaps = function(b2) { - return this.left < b2.right && - this.right > b2.left && - this.top < b2.bottom && - this.bottom > b2.top; -}; - -// Check if this box overlaps any other boxes in boxes. -BoxPosition.prototype.overlapsAny = function(boxes) { - for (var i = 0; i < boxes.length; i++) { - if (this.overlaps(boxes[i])) { - return true; - } - } - return false; -}; - -// Check if this box is within another box. -BoxPosition.prototype.within = function(container) { - return this.top >= container.top && - this.bottom <= container.bottom && - this.left >= container.left && - this.right <= container.right; -}; - -// Check if this box is entirely within the container or it is overlapping -// on the edge opposite of the axis direction passed. For example, if "+x" is -// passed and the box is overlapping on the left edge of the container, then -// return true. -BoxPosition.prototype.overlapsOppositeAxis = function(container, axis) { - switch (axis) { - case "+x": - return this.left < container.left; - case "-x": - return this.right > container.right; - case "+y": - return this.top < container.top; - case "-y": - return this.bottom > container.bottom; - } -}; - -// Find the percentage of the area that this box is overlapping with another -// box. -BoxPosition.prototype.intersectPercentage = function(b2) { - var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)), - y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)), - intersectArea = x * y; - return intersectArea / (this.height * this.width); -}; - -// Convert the positions from this box to CSS compatible positions using -// the reference container's positions. This has to be done because this -// box's positions are in reference to the viewport origin, whereas, CSS -// values are in referecne to their respective edges. -BoxPosition.prototype.toCSSCompatValues = function(reference) { - return { - top: this.top - reference.top, - bottom: reference.bottom - this.bottom, - left: this.left - reference.left, - right: reference.right - this.right, - height: this.height, - width: this.width - }; -}; - -// Get an object that represents the box's position without anything extra. -// Can pass a StyleBox, HTMLElement, or another BoxPositon. -BoxPosition.getSimpleBoxPosition = function(obj) { - var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0; - var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0; - var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0; - - obj = obj.div ? obj.div.getBoundingClientRect() : - obj.tagName ? obj.getBoundingClientRect() : obj; - var ret = { - left: obj.left, - right: obj.right, - top: obj.top || top, - height: obj.height || height, - bottom: obj.bottom || (top + (obj.height || height)), - width: obj.width || width - }; - return ret; -}; - -// Move a StyleBox to its specified, or next best, position. The containerBox -// is the box that contains the StyleBox, such as a div. boxPositions are -// a list of other boxes that the styleBox can't overlap with. -function moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) { - - // Find the best position for a cue box, b, on the video. The axis parameter - // is a list of axis, the order of which, it will move the box along. For example: - // Passing ["+x", "-x"] will move the box first along the x axis in the positive - // direction. If it doesn't find a good position for it there it will then move - // it along the x axis in the negative direction. - function findBestPosition(b, axis) { - var bestPosition, - specifiedPosition = new BoxPosition(b), - percentage = 1; // Highest possible so the first thing we get is better. - - for (var i = 0; i < axis.length; i++) { - while (b.overlapsOppositeAxis(containerBox, axis[i]) || - (b.within(containerBox) && b.overlapsAny(boxPositions))) { - b.move(axis[i]); - } - // We found a spot where we aren't overlapping anything. This is our - // best position. - if (b.within(containerBox)) { - return b; - } - var p = b.intersectPercentage(containerBox); - // If we're outside the container box less then we were on our last try - // then remember this position as the best position. - if (percentage > p) { - bestPosition = new BoxPosition(b); - percentage = p; - } - // Reset the box position to the specified position. - b = new BoxPosition(specifiedPosition); - } - return bestPosition || specifiedPosition; - } - - var boxPosition = new BoxPosition(styleBox), - cue = styleBox.cue, - linePos = computeLinePos(cue), - axis = []; - - // If we have a line number to align the cue to. - if (cue.snapToLines) { - var size; - switch (cue.vertical) { - case "": - axis = [ "+y", "-y" ]; - size = "height"; - break; - case "rl": - axis = [ "+x", "-x" ]; - size = "width"; - break; - case "lr": - axis = [ "-x", "+x" ]; - size = "width"; - break; - } - - var step = boxPosition.lineHeight, - position = step * Math.round(linePos), - maxPosition = containerBox[size] + step, - initialAxis = axis[0]; - - // If the specified intial position is greater then the max position then - // clamp the box to the amount of steps it would take for the box to - // reach the max position. - if (Math.abs(position) > maxPosition) { - position = position < 0 ? -1 : 1; - position *= Math.ceil(maxPosition / step) * step; - } - - // If computed line position returns negative then line numbers are - // relative to the bottom of the video instead of the top. Therefore, we - // need to increase our initial position by the length or width of the - // video, depending on the writing direction, and reverse our axis directions. - if (linePos < 0) { - position += cue.vertical === "" ? containerBox.height : containerBox.width; - axis = axis.reverse(); - } - - // Move the box to the specified position. This may not be its best - // position. - boxPosition.move(initialAxis, position); - - } else { - // If we have a percentage line value for the cue. - var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100; - - switch (cue.lineAlign) { - case "center": - linePos -= (calculatedPercentage / 2); - break; - case "end": - linePos -= calculatedPercentage; - break; - } - - // Apply initial line position to the cue box. - switch (cue.vertical) { - case "": - styleBox.applyStyles({ - top: styleBox.formatStyle(linePos, "%") - }); - break; - case "rl": - styleBox.applyStyles({ - left: styleBox.formatStyle(linePos, "%") - }); - break; - case "lr": - styleBox.applyStyles({ - right: styleBox.formatStyle(linePos, "%") - }); - break; - } - - axis = [ "+y", "-x", "+x", "-y" ]; - - // Get the box position again after we've applied the specified positioning - // to it. - boxPosition = new BoxPosition(styleBox); - } - - var bestPosition = findBestPosition(boxPosition, axis); - styleBox.move(bestPosition.toCSSCompatValues(containerBox)); -} - -function WebVTT() { - // Nothing -} - -// Helper to allow strings to be decoded instead of the default binary utf8 data. -WebVTT.StringDecoder = function() { - return { - decode: function(data) { - if (!data) { - return ""; - } - if (typeof data !== "string") { - throw new Error("Error - expected string data."); - } - return decodeURIComponent(encodeURIComponent(data)); - } - }; -}; - -WebVTT.convertCueToDOMTree = function(window, cuetext) { - if (!window || !cuetext) { - return null; - } - return parseContent(window, cuetext); -}; - -var FONT_SIZE_PERCENT = 0.05; -var FONT_STYLE = "sans-serif"; -var CUE_BACKGROUND_PADDING = "1.5%"; - -// Runs the processing model over the cues and regions passed to it. -// @param overlay A block level element (usually a div) that the computed cues -// and regions will be placed into. -WebVTT.processCues = function(window, cues, overlay) { - if (!window || !cues || !overlay) { - return null; - } - - // Remove all previous children. - while (overlay.firstChild) { - overlay.removeChild(overlay.firstChild); - } - - var paddedOverlay = window.document.createElement("div"); - paddedOverlay.style.position = "absolute"; - paddedOverlay.style.left = "0"; - paddedOverlay.style.right = "0"; - paddedOverlay.style.top = "0"; - paddedOverlay.style.bottom = "0"; - paddedOverlay.style.margin = CUE_BACKGROUND_PADDING; - overlay.appendChild(paddedOverlay); - - // Determine if we need to compute the display states of the cues. This could - // be the case if a cue's state has been changed since the last computation or - // if it has not been computed yet. - function shouldCompute(cues) { - for (var i = 0; i < cues.length; i++) { - if (cues[i].hasBeenReset || !cues[i].displayState) { - return true; - } - } - return false; - } - - // We don't need to recompute the cues' display states. Just reuse them. - if (!shouldCompute(cues)) { - for (var i = 0; i < cues.length; i++) { - paddedOverlay.appendChild(cues[i].displayState); - } - return; - } - - var boxPositions = [], - containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay), - fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100; - var styleOptions = { - font: fontSize + "px " + FONT_STYLE - }; - - (function() { - var styleBox, cue; - - for (var i = 0; i < cues.length; i++) { - cue = cues[i]; - - // Compute the intial position and styles of the cue div. - styleBox = new CueStyleBox(window, cue, styleOptions); - paddedOverlay.appendChild(styleBox.div); - - // Move the cue div to it's correct line position. - moveBoxToLinePosition(window, styleBox, containerBox, boxPositions); - - // Remember the computed div so that we don't have to recompute it later - // if we don't have too. - cue.displayState = styleBox.div; - - boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox)); - } - })(); -}; - -WebVTT.Parser = function(window, vttjs, decoder) { - if (!decoder) { - decoder = vttjs; - vttjs = {}; - } - if (!vttjs) { - vttjs = {}; - } - - this.window = window; - this.vttjs = vttjs; - this.state = "INITIAL"; - this.buffer = ""; - this.decoder = decoder || new TextDecoder("utf8"); - this.regionList = []; -}; - -WebVTT.Parser.prototype = { - // If the error is a ParsingError then report it to the consumer if - // possible. If it's not a ParsingError then throw it like normal. - reportOrThrowError: function(e) { - if (e instanceof ParsingError) { - this.onparsingerror && this.onparsingerror(e); - } else { - throw e; - } - }, - parse: function (data) { - var self = this; - - // If there is no data then we won't decode it, but will just try to parse - // whatever is in buffer already. This may occur in circumstances, for - // example when flush() is called. - if (data) { - // Try to decode the data that we received. - self.buffer += self.decoder.decode(data, {stream: true}); - } - - function collectNextLine() { - var buffer = self.buffer; - var pos = 0; - while (pos < buffer.length && buffer[pos] !== '\r' && buffer[pos] !== '\n') { - ++pos; - } - var line = buffer.substr(0, pos); - // Advance the buffer early in case we fail below. - if (buffer[pos] === '\r') { - ++pos; - } - if (buffer[pos] === '\n') { - ++pos; - } - self.buffer = buffer.substr(pos); - return line; - } - - // 3.4 WebVTT region and WebVTT region settings syntax - function parseRegion(input) { - var settings = new Settings(); - - parseOptions(input, function (k, v) { - switch (k) { - case "id": - settings.set(k, v); - break; - case "width": - settings.percent(k, v); - break; - case "lines": - settings.integer(k, v); - break; - case "regionanchor": - case "viewportanchor": - var xy = v.split(','); - if (xy.length !== 2) { - break; - } - // We have to make sure both x and y parse, so use a temporary - // settings object here. - var anchor = new Settings(); - anchor.percent("x", xy[0]); - anchor.percent("y", xy[1]); - if (!anchor.has("x") || !anchor.has("y")) { - break; - } - settings.set(k + "X", anchor.get("x")); - settings.set(k + "Y", anchor.get("y")); - break; - case "scroll": - settings.alt(k, v, ["up"]); - break; - } - }, /=/, /\s/); - - // Create the region, using default values for any values that were not - // specified. - if (settings.has("id")) { - var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)(); - region.width = settings.get("width", 100); - region.lines = settings.get("lines", 3); - region.regionAnchorX = settings.get("regionanchorX", 0); - region.regionAnchorY = settings.get("regionanchorY", 100); - region.viewportAnchorX = settings.get("viewportanchorX", 0); - region.viewportAnchorY = settings.get("viewportanchorY", 100); - region.scroll = settings.get("scroll", ""); - // Register the region. - self.onregion && self.onregion(region); - // Remember the VTTRegion for later in case we parse any VTTCues that - // reference it. - self.regionList.push({ - id: settings.get("id"), - region: region - }); - } - } - - // draft-pantos-http-live-streaming-20 - // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5 - // 3.5 WebVTT - function parseTimestampMap(input) { - var settings = new Settings(); - - parseOptions(input, function(k, v) { - switch(k) { - case "MPEGT": - settings.integer(k + 'S', v); - break; - case "LOCA": - settings.set(k + 'L', parseTimeStamp(v)); - break; - } - }, /[^\d]:/, /,/); - - self.ontimestampmap && self.ontimestampmap({ - "MPEGTS": settings.get("MPEGTS"), - "LOCAL": settings.get("LOCAL") - }); - } - - // 3.2 WebVTT metadata header syntax - function parseHeader(input) { - if (input.match(/X-TIMESTAMP-MAP/)) { - // This line contains HLS X-TIMESTAMP-MAP metadata - parseOptions(input, function(k, v) { - switch(k) { - case "X-TIMESTAMP-MAP": - parseTimestampMap(v); - break; - } - }, /=/); - } else { - parseOptions(input, function (k, v) { - switch (k) { - case "Region": - // 3.3 WebVTT region metadata header syntax - parseRegion(v); - break; - } - }, /:/); - } - - } - - // 5.1 WebVTT file parsing. - try { - var line; - if (self.state === "INITIAL") { - // We can't start parsing until we have the first line. - if (!/\r\n|\n/.test(self.buffer)) { - return this; - } - - line = collectNextLine(); - - var m = line.match(/^WEBVTT([ \t].*)?$/); - if (!m || !m[0]) { - throw new ParsingError(ParsingError.Errors.BadSignature); - } - - self.state = "HEADER"; - } - - var alreadyCollectedLine = false; - while (self.buffer) { - // We can't parse a line until we have the full line. - if (!/\r\n|\n/.test(self.buffer)) { - return this; - } - - if (!alreadyCollectedLine) { - line = collectNextLine(); - } else { - alreadyCollectedLine = false; - } - - switch (self.state) { - case "HEADER": - // 13-18 - Allow a header (metadata) under the WEBVTT line. - if (/:/.test(line)) { - parseHeader(line); - } else if (!line) { - // An empty line terminates the header and starts the body (cues). - self.state = "ID"; - } - continue; - case "NOTE": - // Ignore NOTE blocks. - if (!line) { - self.state = "ID"; - } - continue; - case "ID": - // Check for the start of NOTE blocks. - if (/^NOTE($|[ \t])/.test(line)) { - self.state = "NOTE"; - break; - } - // 19-29 - Allow any number of line terminators, then initialize new cue values. - if (!line) { - continue; - } - self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, ""); - // Safari still uses the old middle value and won't accept center - try { - self.cue.align = "center"; - } catch (e) { - self.cue.align = "middle"; - } - self.state = "CUE"; - // 30-39 - Check if self line contains an optional identifier or timing data. - if (line.indexOf("-->") === -1) { - self.cue.id = line; - continue; - } - // Process line as start of a cue. - /*falls through*/ - case "CUE": - // 40 - Collect cue timings and settings. - try { - parseCue(line, self.cue, self.regionList); - } catch (e) { - self.reportOrThrowError(e); - // In case of an error ignore rest of the cue. - self.cue = null; - self.state = "BADCUE"; - continue; - } - self.state = "CUETEXT"; - continue; - case "CUETEXT": - var hasSubstring = line.indexOf("-->") !== -1; - // 34 - If we have an empty line then report the cue. - // 35 - If we have the special substring '-->' then report the cue, - // but do not collect the line as we need to process the current - // one as a new cue. - if (!line || hasSubstring && (alreadyCollectedLine = true)) { - // We are done parsing self cue. - self.oncue && self.oncue(self.cue); - self.cue = null; - self.state = "ID"; - continue; - } - if (self.cue.text) { - self.cue.text += "\n"; - } - self.cue.text += line.replace(/\u2028/g, '\n').replace(/u2029/g, '\n'); - continue; - case "BADCUE": // BADCUE - // 54-62 - Collect and discard the remaining cue. - if (!line) { - self.state = "ID"; - } - continue; - } - } - } catch (e) { - self.reportOrThrowError(e); - - // If we are currently parsing a cue, report what we have. - if (self.state === "CUETEXT" && self.cue && self.oncue) { - self.oncue(self.cue); - } - self.cue = null; - // Enter BADWEBVTT state if header was not parsed correctly otherwise - // another exception occurred so enter BADCUE state. - self.state = self.state === "INITIAL" ? "BADWEBVTT" : "BADCUE"; - } - return this; - }, - flush: function () { - var self = this; - try { - // Finish decoding the stream. - self.buffer += self.decoder.decode(); - // Synthesize the end of the current cue or region. - if (self.cue || self.state === "HEADER") { - self.buffer += "\n\n"; - self.parse(); - } - // If we've flushed, parsed, and we're still on the INITIAL state then - // that means we don't have enough of the stream to parse the first - // line. - if (self.state === "INITIAL") { - throw new ParsingError(ParsingError.Errors.BadSignature); - } - } catch(e) { - self.reportOrThrowError(e); - } - self.onflush && self.onflush(); - return this; - } -}; - -module.exports = WebVTT; - - -/***/ }), - -/***/ "./node_modules/videojs-vtt.js/lib/vttcue.js": -/*!***************************************************!*\ - !*** ./node_modules/videojs-vtt.js/lib/vttcue.js ***! - \***************************************************/ -/***/ ((module) => { - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var autoKeyword = "auto"; -var directionSetting = { - "": 1, - "lr": 1, - "rl": 1 -}; -var alignSetting = { - "start": 1, - "center": 1, - "end": 1, - "left": 1, - "right": 1, - "auto": 1, - "line-left": 1, - "line-right": 1 -}; - -function findDirectionSetting(value) { - if (typeof value !== "string") { - return false; - } - var dir = directionSetting[value.toLowerCase()]; - return dir ? value.toLowerCase() : false; -} - -function findAlignSetting(value) { - if (typeof value !== "string") { - return false; - } - var align = alignSetting[value.toLowerCase()]; - return align ? value.toLowerCase() : false; -} - -function VTTCue(startTime, endTime, text) { - /** - * Shim implementation specific properties. These properties are not in - * the spec. - */ - - // Lets us know when the VTTCue's data has changed in such a way that we need - // to recompute its display state. This lets us compute its display state - // lazily. - this.hasBeenReset = false; - - /** - * VTTCue and TextTrackCue properties - * http://dev.w3.org/html5/webvtt/#vttcue-interface - */ - - var _id = ""; - var _pauseOnExit = false; - var _startTime = startTime; - var _endTime = endTime; - var _text = text; - var _region = null; - var _vertical = ""; - var _snapToLines = true; - var _line = "auto"; - var _lineAlign = "start"; - var _position = "auto"; - var _positionAlign = "auto"; - var _size = 100; - var _align = "center"; - - Object.defineProperties(this, { - "id": { - enumerable: true, - get: function() { - return _id; - }, - set: function(value) { - _id = "" + value; - } - }, - - "pauseOnExit": { - enumerable: true, - get: function() { - return _pauseOnExit; - }, - set: function(value) { - _pauseOnExit = !!value; - } - }, - - "startTime": { - enumerable: true, - get: function() { - return _startTime; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("Start time must be set to a number."); - } - _startTime = value; - this.hasBeenReset = true; - } - }, - - "endTime": { - enumerable: true, - get: function() { - return _endTime; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("End time must be set to a number."); - } - _endTime = value; - this.hasBeenReset = true; - } - }, - - "text": { - enumerable: true, - get: function() { - return _text; - }, - set: function(value) { - _text = "" + value; - this.hasBeenReset = true; - } - }, - - "region": { - enumerable: true, - get: function() { - return _region; - }, - set: function(value) { - _region = value; - this.hasBeenReset = true; - } - }, - - "vertical": { - enumerable: true, - get: function() { - return _vertical; - }, - set: function(value) { - var setting = findDirectionSetting(value); - // Have to check for false because the setting an be an empty string. - if (setting === false) { - throw new SyntaxError("Vertical: an invalid or illegal direction string was specified."); - } - _vertical = setting; - this.hasBeenReset = true; - } - }, - - "snapToLines": { - enumerable: true, - get: function() { - return _snapToLines; - }, - set: function(value) { - _snapToLines = !!value; - this.hasBeenReset = true; - } - }, - - "line": { - enumerable: true, - get: function() { - return _line; - }, - set: function(value) { - if (typeof value !== "number" && value !== autoKeyword) { - throw new SyntaxError("Line: an invalid number or illegal string was specified."); - } - _line = value; - this.hasBeenReset = true; - } - }, - - "lineAlign": { - enumerable: true, - get: function() { - return _lineAlign; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - console.warn("lineAlign: an invalid or illegal string was specified."); - } else { - _lineAlign = setting; - this.hasBeenReset = true; - } - } - }, - - "position": { - enumerable: true, - get: function() { - return _position; - }, - set: function(value) { - if (value < 0 || value > 100) { - throw new Error("Position must be between 0 and 100."); - } - _position = value; - this.hasBeenReset = true; - } - }, - - "positionAlign": { - enumerable: true, - get: function() { - return _positionAlign; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - console.warn("positionAlign: an invalid or illegal string was specified."); - } else { - _positionAlign = setting; - this.hasBeenReset = true; - } - } - }, - - "size": { - enumerable: true, - get: function() { - return _size; - }, - set: function(value) { - if (value < 0 || value > 100) { - throw new Error("Size must be between 0 and 100."); - } - _size = value; - this.hasBeenReset = true; - } - }, - - "align": { - enumerable: true, - get: function() { - return _align; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - throw new SyntaxError("align: an invalid or illegal alignment string was specified."); - } - _align = setting; - this.hasBeenReset = true; - } - } - }); - - /** - * Other spec defined properties - */ - - // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state - this.displayState = undefined; -} - -/** - * VTTCue methods - */ - -VTTCue.prototype.getCueAsHTML = function() { - // Assume WebVTT.convertCueToDOMTree is on the global. - return WebVTT.convertCueToDOMTree(window, this.text); -}; - -module.exports = VTTCue; - - -/***/ }), - -/***/ "./node_modules/videojs-vtt.js/lib/vttregion.js": -/*!******************************************************!*\ - !*** ./node_modules/videojs-vtt.js/lib/vttregion.js ***! - \******************************************************/ -/***/ ((module) => { - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var scrollSetting = { - "": true, - "up": true -}; - -function findScrollSetting(value) { - if (typeof value !== "string") { - return false; - } - var scroll = scrollSetting[value.toLowerCase()]; - return scroll ? value.toLowerCase() : false; -} - -function isValidPercentValue(value) { - return typeof value === "number" && (value >= 0 && value <= 100); -} - -// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface -function VTTRegion() { - var _width = 100; - var _lines = 3; - var _regionAnchorX = 0; - var _regionAnchorY = 100; - var _viewportAnchorX = 0; - var _viewportAnchorY = 100; - var _scroll = ""; - - Object.defineProperties(this, { - "width": { - enumerable: true, - get: function() { - return _width; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("Width must be between 0 and 100."); - } - _width = value; - } - }, - "lines": { - enumerable: true, - get: function() { - return _lines; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("Lines must be set to a number."); - } - _lines = value; - } - }, - "regionAnchorY": { - enumerable: true, - get: function() { - return _regionAnchorY; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("RegionAnchorX must be between 0 and 100."); - } - _regionAnchorY = value; - } - }, - "regionAnchorX": { - enumerable: true, - get: function() { - return _regionAnchorX; - }, - set: function(value) { - if(!isValidPercentValue(value)) { - throw new Error("RegionAnchorY must be between 0 and 100."); - } - _regionAnchorX = value; - } - }, - "viewportAnchorY": { - enumerable: true, - get: function() { - return _viewportAnchorY; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("ViewportAnchorY must be between 0 and 100."); - } - _viewportAnchorY = value; - } - }, - "viewportAnchorX": { - enumerable: true, - get: function() { - return _viewportAnchorX; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("ViewportAnchorX must be between 0 and 100."); - } - _viewportAnchorX = value; - } - }, - "scroll": { - enumerable: true, - get: function() { - return _scroll; - }, - set: function(value) { - var setting = findScrollSetting(value); - // Have to check for false as an empty string is a legal value. - if (setting === false) { - console.warn("Scroll: an invalid or illegal string was specified."); - } else { - _scroll = setting; - } - } - } - }); -} - -module.exports = VTTRegion; - - -/***/ }), - -/***/ "?34aa": -/*!******************************!*\ - !*** min-document (ignored) ***! - \******************************/ -/***/ (() => { - -/* (ignored) */ - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/extends.js": -/*!********************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/extends.js ***! - \********************************************************/ -/***/ ((module) => { - -function _extends() { - module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - return _extends.apply(this, arguments); -} -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": -/*!************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ _extends) -/* harmony export */ }); -function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; - return _extends.apply(this, arguments); -} - -/***/ }), - -/***/ "./node_modules/dom7/dom7.esm.js": -/*!***************************************!*\ - !*** ./node_modules/dom7/dom7.esm.js ***! - \***************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ $: () => (/* binding */ $), -/* harmony export */ add: () => (/* binding */ add), -/* harmony export */ addClass: () => (/* binding */ addClass), -/* harmony export */ animate: () => (/* binding */ animate), -/* harmony export */ animationEnd: () => (/* binding */ animationEnd), -/* harmony export */ append: () => (/* binding */ append), -/* harmony export */ appendTo: () => (/* binding */ appendTo), -/* harmony export */ attr: () => (/* binding */ attr), -/* harmony export */ blur: () => (/* binding */ blur), -/* harmony export */ change: () => (/* binding */ change), -/* harmony export */ children: () => (/* binding */ children), -/* harmony export */ click: () => (/* binding */ click), -/* harmony export */ closest: () => (/* binding */ closest), -/* harmony export */ css: () => (/* binding */ css), -/* harmony export */ data: () => (/* binding */ data), -/* harmony export */ dataset: () => (/* binding */ dataset), -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), -/* harmony export */ detach: () => (/* binding */ detach), -/* harmony export */ each: () => (/* binding */ each), -/* harmony export */ empty: () => (/* binding */ empty), -/* harmony export */ eq: () => (/* binding */ eq), -/* harmony export */ filter: () => (/* binding */ filter), -/* harmony export */ find: () => (/* binding */ find), -/* harmony export */ focus: () => (/* binding */ focus), -/* harmony export */ focusin: () => (/* binding */ focusin), -/* harmony export */ focusout: () => (/* binding */ focusout), -/* harmony export */ hasClass: () => (/* binding */ hasClass), -/* harmony export */ height: () => (/* binding */ height), -/* harmony export */ hide: () => (/* binding */ hide), -/* harmony export */ html: () => (/* binding */ html), -/* harmony export */ index: () => (/* binding */ index), -/* harmony export */ insertAfter: () => (/* binding */ insertAfter), -/* harmony export */ insertBefore: () => (/* binding */ insertBefore), -/* harmony export */ is: () => (/* binding */ is), -/* harmony export */ keydown: () => (/* binding */ keydown), -/* harmony export */ keypress: () => (/* binding */ keypress), -/* harmony export */ keyup: () => (/* binding */ keyup), -/* harmony export */ mousedown: () => (/* binding */ mousedown), -/* harmony export */ mouseenter: () => (/* binding */ mouseenter), -/* harmony export */ mouseleave: () => (/* binding */ mouseleave), -/* harmony export */ mousemove: () => (/* binding */ mousemove), -/* harmony export */ mouseout: () => (/* binding */ mouseout), -/* harmony export */ mouseover: () => (/* binding */ mouseover), -/* harmony export */ mouseup: () => (/* binding */ mouseup), -/* harmony export */ next: () => (/* binding */ next), -/* harmony export */ nextAll: () => (/* binding */ nextAll), -/* harmony export */ off: () => (/* binding */ off), -/* harmony export */ offset: () => (/* binding */ offset), -/* harmony export */ on: () => (/* binding */ on), -/* harmony export */ once: () => (/* binding */ once), -/* harmony export */ outerHeight: () => (/* binding */ outerHeight), -/* harmony export */ outerWidth: () => (/* binding */ outerWidth), -/* harmony export */ parent: () => (/* binding */ parent), -/* harmony export */ parents: () => (/* binding */ parents), -/* harmony export */ prepend: () => (/* binding */ prepend), -/* harmony export */ prependTo: () => (/* binding */ prependTo), -/* harmony export */ prev: () => (/* binding */ prev), -/* harmony export */ prevAll: () => (/* binding */ prevAll), -/* harmony export */ prop: () => (/* binding */ prop), -/* harmony export */ remove: () => (/* binding */ remove), -/* harmony export */ removeAttr: () => (/* binding */ removeAttr), -/* harmony export */ removeClass: () => (/* binding */ removeClass), -/* harmony export */ removeData: () => (/* binding */ removeData), -/* harmony export */ resize: () => (/* binding */ resize), -/* harmony export */ scroll: () => (/* binding */ scroll), -/* harmony export */ scrollLeft: () => (/* binding */ scrollLeft), -/* harmony export */ scrollTo: () => (/* binding */ scrollTo), -/* harmony export */ scrollTop: () => (/* binding */ scrollTop), -/* harmony export */ show: () => (/* binding */ show), -/* harmony export */ siblings: () => (/* binding */ siblings), -/* harmony export */ stop: () => (/* binding */ stop), -/* harmony export */ styles: () => (/* binding */ styles), -/* harmony export */ submit: () => (/* binding */ submit), -/* harmony export */ text: () => (/* binding */ text), -/* harmony export */ toggleClass: () => (/* binding */ toggleClass), -/* harmony export */ touchend: () => (/* binding */ touchend), -/* harmony export */ touchmove: () => (/* binding */ touchmove), -/* harmony export */ touchstart: () => (/* binding */ touchstart), -/* harmony export */ transform: () => (/* binding */ transform), -/* harmony export */ transition: () => (/* binding */ transition), -/* harmony export */ transitionEnd: () => (/* binding */ transitionEnd), -/* harmony export */ transitionStart: () => (/* binding */ transitionStart), -/* harmony export */ trigger: () => (/* binding */ trigger), -/* harmony export */ val: () => (/* binding */ val), -/* harmony export */ value: () => (/* binding */ value), -/* harmony export */ width: () => (/* binding */ width) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/** - * Dom7 4.0.6 - * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API - * https://framework7.io/docs/dom7.html - * - * Copyright 2023, Vladimir Kharlampidi - * - * Licensed under MIT - * - * Released on: February 2, 2023 - */ - - -/* eslint-disable no-proto */ -function makeReactive(obj) { - const proto = obj.__proto__; - Object.defineProperty(obj, '__proto__', { - get() { - return proto; - }, - - set(value) { - proto.__proto__ = value; - } - - }); -} - -class Dom7 extends Array { - constructor(items) { - if (typeof items === 'number') { - super(items); - } else { - super(...(items || [])); - makeReactive(this); - } - } - -} - -function arrayFlat(arr = []) { - const res = []; - arr.forEach(el => { - if (Array.isArray(el)) { - res.push(...arrayFlat(el)); - } else { - res.push(el); - } - }); - return res; -} -function arrayFilter(arr, callback) { - return Array.prototype.filter.call(arr, callback); -} -function arrayUnique(arr) { - const uniqueArray = []; - - for (let i = 0; i < arr.length; i += 1) { - if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); - } - - return uniqueArray; -} -function toCamelCase(string) { - return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase()); -} - -// eslint-disable-next-line - -function qsa(selector, context) { - if (typeof selector !== 'string') { - return [selector]; - } - - const a = []; - const res = context.querySelectorAll(selector); - - for (let i = 0; i < res.length; i += 1) { - a.push(res[i]); - } - - return a; -} - -function $(selector, context) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - let arr = []; - - if (!context && selector instanceof Dom7) { - return selector; - } - - if (!selector) { - return new Dom7(arr); - } - - if (typeof selector === 'string') { - const html = selector.trim(); - - if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { - let toCreate = 'div'; - if (html.indexOf(' c.split(' '))); - this.forEach(el => { - el.classList.add(...classNames); - }); - return this; -} - -function removeClass(...classes) { - const classNames = arrayFlat(classes.map(c => c.split(' '))); - this.forEach(el => { - el.classList.remove(...classNames); - }); - return this; -} - -function toggleClass(...classes) { - const classNames = arrayFlat(classes.map(c => c.split(' '))); - this.forEach(el => { - classNames.forEach(className => { - el.classList.toggle(className); - }); - }); -} - -function hasClass(...classes) { - const classNames = arrayFlat(classes.map(c => c.split(' '))); - return arrayFilter(this, el => { - return classNames.filter(className => el.classList.contains(className)).length > 0; - }).length > 0; -} - -function attr(attrs, value) { - if (arguments.length === 1 && typeof attrs === 'string') { - // Get attr - if (this[0]) return this[0].getAttribute(attrs); - return undefined; - } // Set attrs - - - for (let i = 0; i < this.length; i += 1) { - if (arguments.length === 2) { - // String - this[i].setAttribute(attrs, value); - } else { - // Object - for (const attrName in attrs) { - this[i][attrName] = attrs[attrName]; - this[i].setAttribute(attrName, attrs[attrName]); - } - } - } - - return this; -} - -function removeAttr(attr) { - for (let i = 0; i < this.length; i += 1) { - this[i].removeAttribute(attr); - } - - return this; -} - -function prop(props, value) { - if (arguments.length === 1 && typeof props === 'string') { - // Get prop - if (this[0]) return this[0][props]; - } else { - // Set props - for (let i = 0; i < this.length; i += 1) { - if (arguments.length === 2) { - // String - this[i][props] = value; - } else { - // Object - for (const propName in props) { - this[i][propName] = props[propName]; - } - } - } - - return this; - } - - return this; -} - -function data(key, value) { - let el; - - if (typeof value === 'undefined') { - el = this[0]; - if (!el) return undefined; // Get value - - if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) { - return el.dom7ElementDataStorage[key]; - } - - const dataKey = el.getAttribute(`data-${key}`); - - if (dataKey) { - return dataKey; - } - - return undefined; - } // Set value - - - for (let i = 0; i < this.length; i += 1) { - el = this[i]; - if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {}; - el.dom7ElementDataStorage[key] = value; - } - - return this; -} - -function removeData(key) { - for (let i = 0; i < this.length; i += 1) { - const el = this[i]; - - if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) { - el.dom7ElementDataStorage[key] = null; - delete el.dom7ElementDataStorage[key]; - } - } -} - -function dataset() { - const el = this[0]; - if (!el) return undefined; - const dataset = {}; // eslint-disable-line - - if (el.dataset) { - for (const dataKey in el.dataset) { - dataset[dataKey] = el.dataset[dataKey]; - } - } else { - for (let i = 0; i < el.attributes.length; i += 1) { - const attr = el.attributes[i]; - - if (attr.name.indexOf('data-') >= 0) { - dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value; - } - } - } - - for (const key in dataset) { - if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1; - } - - return dataset; -} - -function val(value) { - if (typeof value === 'undefined') { - // get value - const el = this[0]; - if (!el) return undefined; - - if (el.multiple && el.nodeName.toLowerCase() === 'select') { - const values = []; - - for (let i = 0; i < el.selectedOptions.length; i += 1) { - values.push(el.selectedOptions[i].value); - } - - return values; - } - - return el.value; - } // set value - - - for (let i = 0; i < this.length; i += 1) { - const el = this[i]; - - if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') { - for (let j = 0; j < el.options.length; j += 1) { - el.options[j].selected = value.indexOf(el.options[j].value) >= 0; - } - } else { - el.value = value; - } - } - - return this; -} - -function value(value) { - return this.val(value); -} - -function transform(transform) { - for (let i = 0; i < this.length; i += 1) { - this[i].style.transform = transform; - } - - return this; -} - -function transition(duration) { - for (let i = 0; i < this.length; i += 1) { - this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration; - } - - return this; -} - -function on(...args) { - let [eventType, targetSelector, listener, capture] = args; - - if (typeof args[1] === 'function') { - [eventType, listener, capture] = args; - targetSelector = undefined; - } - - if (!capture) capture = false; - - function handleLiveEvent(e) { - const target = e.target; - if (!target) return; - const eventData = e.target.dom7EventData || []; - - if (eventData.indexOf(e) < 0) { - eventData.unshift(e); - } - - if ($(target).is(targetSelector)) listener.apply(target, eventData);else { - const parents = $(target).parents(); // eslint-disable-line - - for (let k = 0; k < parents.length; k += 1) { - if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData); - } - } - } - - function handleEvent(e) { - const eventData = e && e.target ? e.target.dom7EventData || [] : []; - - if (eventData.indexOf(e) < 0) { - eventData.unshift(e); - } - - listener.apply(this, eventData); - } - - const events = eventType.split(' '); - let j; - - for (let i = 0; i < this.length; i += 1) { - const el = this[i]; - - if (!targetSelector) { - for (j = 0; j < events.length; j += 1) { - const event = events[j]; - if (!el.dom7Listeners) el.dom7Listeners = {}; - if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; - el.dom7Listeners[event].push({ - listener, - proxyListener: handleEvent - }); - el.addEventListener(event, handleEvent, capture); - } - } else { - // Live events - for (j = 0; j < events.length; j += 1) { - const event = events[j]; - if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; - if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = []; - el.dom7LiveListeners[event].push({ - listener, - proxyListener: handleLiveEvent - }); - el.addEventListener(event, handleLiveEvent, capture); - } - } - } - - return this; -} - -function off(...args) { - let [eventType, targetSelector, listener, capture] = args; - - if (typeof args[1] === 'function') { - [eventType, listener, capture] = args; - targetSelector = undefined; - } - - if (!capture) capture = false; - const events = eventType.split(' '); - - for (let i = 0; i < events.length; i += 1) { - const event = events[i]; - - for (let j = 0; j < this.length; j += 1) { - const el = this[j]; - let handlers; - - if (!targetSelector && el.dom7Listeners) { - handlers = el.dom7Listeners[event]; - } else if (targetSelector && el.dom7LiveListeners) { - handlers = el.dom7LiveListeners[event]; - } - - if (handlers && handlers.length) { - for (let k = handlers.length - 1; k >= 0; k -= 1) { - const handler = handlers[k]; - - if (listener && handler.listener === listener) { - el.removeEventListener(event, handler.proxyListener, capture); - handlers.splice(k, 1); - } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { - el.removeEventListener(event, handler.proxyListener, capture); - handlers.splice(k, 1); - } else if (!listener) { - el.removeEventListener(event, handler.proxyListener, capture); - handlers.splice(k, 1); - } - } - } - } - } - - return this; -} - -function once(...args) { - const dom = this; - let [eventName, targetSelector, listener, capture] = args; - - if (typeof args[1] === 'function') { - [eventName, listener, capture] = args; - targetSelector = undefined; - } - - function onceHandler(...eventArgs) { - listener.apply(this, eventArgs); - dom.off(eventName, targetSelector, onceHandler, capture); - - if (onceHandler.dom7proxy) { - delete onceHandler.dom7proxy; - } - } - - onceHandler.dom7proxy = listener; - return dom.on(eventName, targetSelector, onceHandler, capture); -} - -function trigger(...args) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const events = args[0].split(' '); - const eventData = args[1]; - - for (let i = 0; i < events.length; i += 1) { - const event = events[i]; - - for (let j = 0; j < this.length; j += 1) { - const el = this[j]; - - if (window.CustomEvent) { - const evt = new window.CustomEvent(event, { - detail: eventData, - bubbles: true, - cancelable: true - }); - el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); - el.dispatchEvent(evt); - el.dom7EventData = []; - delete el.dom7EventData; - } - } - } - - return this; -} - -function transitionStart(callback) { - const dom = this; - - function fireCallBack(e) { - if (e.target !== this) return; - callback.call(this, e); - dom.off('transitionstart', fireCallBack); - } - - if (callback) { - dom.on('transitionstart', fireCallBack); - } - - return this; -} - -function transitionEnd(callback) { - const dom = this; - - function fireCallBack(e) { - if (e.target !== this) return; - callback.call(this, e); - dom.off('transitionend', fireCallBack); - } - - if (callback) { - dom.on('transitionend', fireCallBack); - } - - return this; -} - -function animationEnd(callback) { - const dom = this; - - function fireCallBack(e) { - if (e.target !== this) return; - callback.call(this, e); - dom.off('animationend', fireCallBack); - } - - if (callback) { - dom.on('animationend', fireCallBack); - } - - return this; -} - -function width() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - if (this[0] === window) { - return window.innerWidth; - } - - if (this.length > 0) { - return parseFloat(this.css('width')); - } - - return null; -} - -function outerWidth(includeMargins) { - if (this.length > 0) { - if (includeMargins) { - const styles = this.styles(); - return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); - } - - return this[0].offsetWidth; - } - - return null; -} - -function height() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - if (this[0] === window) { - return window.innerHeight; - } - - if (this.length > 0) { - return parseFloat(this.css('height')); - } - - return null; -} - -function outerHeight(includeMargins) { - if (this.length > 0) { - if (includeMargins) { - const styles = this.styles(); - return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); - } - - return this[0].offsetHeight; - } - - return null; -} - -function offset() { - if (this.length > 0) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const el = this[0]; - const box = el.getBoundingClientRect(); - const body = document.body; - const clientTop = el.clientTop || body.clientTop || 0; - const clientLeft = el.clientLeft || body.clientLeft || 0; - const scrollTop = el === window ? window.scrollY : el.scrollTop; - const scrollLeft = el === window ? window.scrollX : el.scrollLeft; - return { - top: box.top + scrollTop - clientTop, - left: box.left + scrollLeft - clientLeft - }; - } - - return null; -} - -function hide() { - for (let i = 0; i < this.length; i += 1) { - this[i].style.display = 'none'; - } - - return this; -} - -function show() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - for (let i = 0; i < this.length; i += 1) { - const el = this[i]; - - if (el.style.display === 'none') { - el.style.display = ''; - } - - if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') { - // Still not visible - el.style.display = 'block'; - } - } - - return this; -} - -function styles() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - if (this[0]) return window.getComputedStyle(this[0], null); - return {}; -} - -function css(props, value) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let i; - - if (arguments.length === 1) { - if (typeof props === 'string') { - // .css('width') - if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props); - } else { - // .css({ width: '100px' }) - for (i = 0; i < this.length; i += 1) { - for (const prop in props) { - this[i].style[prop] = props[prop]; - } - } - - return this; - } - } - - if (arguments.length === 2 && typeof props === 'string') { - // .css('width', '100px') - for (i = 0; i < this.length; i += 1) { - this[i].style[props] = value; - } - - return this; - } - - return this; -} - -function each(callback) { - if (!callback) return this; - this.forEach((el, index) => { - callback.apply(el, [el, index]); - }); - return this; -} - -function filter(callback) { - const result = arrayFilter(this, callback); - return $(result); -} - -function html(html) { - if (typeof html === 'undefined') { - return this[0] ? this[0].innerHTML : null; - } - - for (let i = 0; i < this.length; i += 1) { - this[i].innerHTML = html; - } - - return this; -} - -function text(text) { - if (typeof text === 'undefined') { - return this[0] ? this[0].textContent.trim() : null; - } - - for (let i = 0; i < this.length; i += 1) { - this[i].textContent = text; - } - - return this; -} - -function is(selector) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const el = this[0]; - let compareWith; - let i; - if (!el || typeof selector === 'undefined') return false; - - if (typeof selector === 'string') { - if (el.matches) return el.matches(selector); - if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); - if (el.msMatchesSelector) return el.msMatchesSelector(selector); - compareWith = $(selector); - - for (i = 0; i < compareWith.length; i += 1) { - if (compareWith[i] === el) return true; - } - - return false; - } - - if (selector === document) { - return el === document; - } - - if (selector === window) { - return el === window; - } - - if (selector.nodeType || selector instanceof Dom7) { - compareWith = selector.nodeType ? [selector] : selector; - - for (i = 0; i < compareWith.length; i += 1) { - if (compareWith[i] === el) return true; - } - - return false; - } - - return false; -} - -function index() { - let child = this[0]; - let i; - - if (child) { - i = 0; // eslint-disable-next-line - - while ((child = child.previousSibling) !== null) { - if (child.nodeType === 1) i += 1; - } - - return i; - } - - return undefined; -} - -function eq(index) { - if (typeof index === 'undefined') return this; - const length = this.length; - - if (index > length - 1) { - return $([]); - } - - if (index < 0) { - const returnIndex = length + index; - if (returnIndex < 0) return $([]); - return $([this[returnIndex]]); - } - - return $([this[index]]); -} - -function append(...els) { - let newChild; - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - - for (let k = 0; k < els.length; k += 1) { - newChild = els[k]; - - for (let i = 0; i < this.length; i += 1) { - if (typeof newChild === 'string') { - const tempDiv = document.createElement('div'); - tempDiv.innerHTML = newChild; - - while (tempDiv.firstChild) { - this[i].appendChild(tempDiv.firstChild); - } - } else if (newChild instanceof Dom7) { - for (let j = 0; j < newChild.length; j += 1) { - this[i].appendChild(newChild[j]); - } - } else { - this[i].appendChild(newChild); - } - } - } - - return this; -} - -function appendTo(parent) { - $(parent).append(this); - return this; -} - -function prepend(newChild) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - let i; - let j; - - for (i = 0; i < this.length; i += 1) { - if (typeof newChild === 'string') { - const tempDiv = document.createElement('div'); - tempDiv.innerHTML = newChild; - - for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { - this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); - } - } else if (newChild instanceof Dom7) { - for (j = 0; j < newChild.length; j += 1) { - this[i].insertBefore(newChild[j], this[i].childNodes[0]); - } - } else { - this[i].insertBefore(newChild, this[i].childNodes[0]); - } - } - - return this; -} - -function prependTo(parent) { - $(parent).prepend(this); - return this; -} - -function insertBefore(selector) { - const before = $(selector); - - for (let i = 0; i < this.length; i += 1) { - if (before.length === 1) { - before[0].parentNode.insertBefore(this[i], before[0]); - } else if (before.length > 1) { - for (let j = 0; j < before.length; j += 1) { - before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]); - } - } - } -} - -function insertAfter(selector) { - const after = $(selector); - - for (let i = 0; i < this.length; i += 1) { - if (after.length === 1) { - after[0].parentNode.insertBefore(this[i], after[0].nextSibling); - } else if (after.length > 1) { - for (let j = 0; j < after.length; j += 1) { - after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling); - } - } - } -} - -function next(selector) { - if (this.length > 0) { - if (selector) { - if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { - return $([this[0].nextElementSibling]); - } - - return $([]); - } - - if (this[0].nextElementSibling) return $([this[0].nextElementSibling]); - return $([]); - } - - return $([]); -} - -function nextAll(selector) { - const nextEls = []; - let el = this[0]; - if (!el) return $([]); - - while (el.nextElementSibling) { - const next = el.nextElementSibling; // eslint-disable-line - - if (selector) { - if ($(next).is(selector)) nextEls.push(next); - } else nextEls.push(next); - - el = next; - } - - return $(nextEls); -} - -function prev(selector) { - if (this.length > 0) { - const el = this[0]; - - if (selector) { - if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { - return $([el.previousElementSibling]); - } - - return $([]); - } - - if (el.previousElementSibling) return $([el.previousElementSibling]); - return $([]); - } - - return $([]); -} - -function prevAll(selector) { - const prevEls = []; - let el = this[0]; - if (!el) return $([]); - - while (el.previousElementSibling) { - const prev = el.previousElementSibling; // eslint-disable-line - - if (selector) { - if ($(prev).is(selector)) prevEls.push(prev); - } else prevEls.push(prev); - - el = prev; - } - - return $(prevEls); -} - -function siblings(selector) { - return this.nextAll(selector).add(this.prevAll(selector)); -} - -function parent(selector) { - const parents = []; // eslint-disable-line - - for (let i = 0; i < this.length; i += 1) { - if (this[i].parentNode !== null) { - if (selector) { - if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); - } else { - parents.push(this[i].parentNode); - } - } - } - - return $(parents); -} - -function parents(selector) { - const parents = []; // eslint-disable-line - - for (let i = 0; i < this.length; i += 1) { - let parent = this[i].parentNode; // eslint-disable-line - - while (parent) { - if (selector) { - if ($(parent).is(selector)) parents.push(parent); - } else { - parents.push(parent); - } - - parent = parent.parentNode; - } - } - - return $(parents); -} - -function closest(selector) { - let closest = this; // eslint-disable-line - - if (typeof selector === 'undefined') { - return $([]); - } - - if (!closest.is(selector)) { - closest = closest.parents(selector).eq(0); - } - - return closest; -} - -function find(selector) { - const foundElements = []; - - for (let i = 0; i < this.length; i += 1) { - const found = this[i].querySelectorAll(selector); - - for (let j = 0; j < found.length; j += 1) { - foundElements.push(found[j]); - } - } - - return $(foundElements); -} - -function children(selector) { - const children = []; // eslint-disable-line - - for (let i = 0; i < this.length; i += 1) { - const childNodes = this[i].children; - - for (let j = 0; j < childNodes.length; j += 1) { - if (!selector || $(childNodes[j]).is(selector)) { - children.push(childNodes[j]); - } - } - } - - return $(children); -} - -function remove() { - for (let i = 0; i < this.length; i += 1) { - if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); - } - - return this; -} - -function detach() { - return this.remove(); -} - -function add(...els) { - const dom = this; - let i; - let j; - - for (i = 0; i < els.length; i += 1) { - const toAdd = $(els[i]); - - for (j = 0; j < toAdd.length; j += 1) { - dom.push(toAdd[j]); - } - } - - return dom; -} - -function empty() { - for (let i = 0; i < this.length; i += 1) { - const el = this[i]; - - if (el.nodeType === 1) { - for (let j = 0; j < el.childNodes.length; j += 1) { - if (el.childNodes[j].parentNode) { - el.childNodes[j].parentNode.removeChild(el.childNodes[j]); - } - } - - el.textContent = ''; - } - } - - return this; -} - -// eslint-disable-next-line - -function scrollTo(...args) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let [left, top, duration, easing, callback] = args; - - if (args.length === 4 && typeof easing === 'function') { - callback = easing; - [left, top, duration, callback, easing] = args; - } - - if (typeof easing === 'undefined') easing = 'swing'; - return this.each(function animate() { - const el = this; - let currentTop; - let currentLeft; - let maxTop; - let maxLeft; - let newTop; - let newLeft; - let scrollTop; // eslint-disable-line - - let scrollLeft; // eslint-disable-line - - let animateTop = top > 0 || top === 0; - let animateLeft = left > 0 || left === 0; - - if (typeof easing === 'undefined') { - easing = 'swing'; - } - - if (animateTop) { - currentTop = el.scrollTop; - - if (!duration) { - el.scrollTop = top; - } - } - - if (animateLeft) { - currentLeft = el.scrollLeft; - - if (!duration) { - el.scrollLeft = left; - } - } - - if (!duration) return; - - if (animateTop) { - maxTop = el.scrollHeight - el.offsetHeight; - newTop = Math.max(Math.min(top, maxTop), 0); - } - - if (animateLeft) { - maxLeft = el.scrollWidth - el.offsetWidth; - newLeft = Math.max(Math.min(left, maxLeft), 0); - } - - let startTime = null; - if (animateTop && newTop === currentTop) animateTop = false; - if (animateLeft && newLeft === currentLeft) animateLeft = false; - - function render(time = new Date().getTime()) { - if (startTime === null) { - startTime = time; - } - - const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); - const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2; - let done; - if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop); - if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft); - - if (animateTop && newTop > currentTop && scrollTop >= newTop) { - el.scrollTop = newTop; - done = true; - } - - if (animateTop && newTop < currentTop && scrollTop <= newTop) { - el.scrollTop = newTop; - done = true; - } - - if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) { - el.scrollLeft = newLeft; - done = true; - } - - if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) { - el.scrollLeft = newLeft; - done = true; - } - - if (done) { - if (callback) callback(); - return; - } - - if (animateTop) el.scrollTop = scrollTop; - if (animateLeft) el.scrollLeft = scrollLeft; - window.requestAnimationFrame(render); - } - - window.requestAnimationFrame(render); - }); -} // scrollTop(top, duration, easing, callback) { - - -function scrollTop(...args) { - let [top, duration, easing, callback] = args; - - if (args.length === 3 && typeof easing === 'function') { - [top, duration, callback, easing] = args; - } - - const dom = this; - - if (typeof top === 'undefined') { - if (dom.length > 0) return dom[0].scrollTop; - return null; - } - - return dom.scrollTo(undefined, top, duration, easing, callback); -} - -function scrollLeft(...args) { - let [left, duration, easing, callback] = args; - - if (args.length === 3 && typeof easing === 'function') { - [left, duration, callback, easing] = args; - } - - const dom = this; - - if (typeof left === 'undefined') { - if (dom.length > 0) return dom[0].scrollLeft; - return null; - } - - return dom.scrollTo(left, undefined, duration, easing, callback); -} - -// eslint-disable-next-line - -function animate(initialProps, initialParams) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const els = this; - const a = { - props: Object.assign({}, initialProps), - params: Object.assign({ - duration: 300, - easing: 'swing' // or 'linear' - - /* Callbacks - begin(elements) - complete(elements) - progress(elements, complete, remaining, start, tweenValue) - */ - - }, initialParams), - elements: els, - animating: false, - que: [], - - easingProgress(easing, progress) { - if (easing === 'swing') { - return 0.5 - Math.cos(progress * Math.PI) / 2; - } - - if (typeof easing === 'function') { - return easing(progress); - } - - return progress; - }, - - stop() { - if (a.frameId) { - window.cancelAnimationFrame(a.frameId); - } - - a.animating = false; - a.elements.each(el => { - const element = el; - delete element.dom7AnimateInstance; - }); - a.que = []; - }, - - done(complete) { - a.animating = false; - a.elements.each(el => { - const element = el; - delete element.dom7AnimateInstance; - }); - if (complete) complete(els); - - if (a.que.length > 0) { - const que = a.que.shift(); - a.animate(que[0], que[1]); - } - }, - - animate(props, params) { - if (a.animating) { - a.que.push([props, params]); - return a; - } - - const elements = []; // Define & Cache Initials & Units - - a.elements.each((el, index) => { - let initialFullValue; - let initialValue; - let unit; - let finalValue; - let finalFullValue; - if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a; - elements[index] = { - container: el - }; - Object.keys(props).forEach(prop => { - initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); - initialValue = parseFloat(initialFullValue); - unit = initialFullValue.replace(initialValue, ''); - finalValue = parseFloat(props[prop]); - finalFullValue = props[prop] + unit; - elements[index][prop] = { - initialFullValue, - initialValue, - unit, - finalValue, - finalFullValue, - currentValue: initialValue - }; - }); - }); - let startTime = null; - let time; - let elementsDone = 0; - let propsDone = 0; - let done; - let began = false; - a.animating = true; - - function render() { - time = new Date().getTime(); - let progress; - let easeProgress; // let el; - - if (!began) { - began = true; - if (params.begin) params.begin(els); - } - - if (startTime === null) { - startTime = time; - } - - if (params.progress) { - // eslint-disable-next-line - params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime); - } - - elements.forEach(element => { - const el = element; - if (done || el.done) return; - Object.keys(props).forEach(prop => { - if (done || el.done) return; - progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0); - easeProgress = a.easingProgress(params.easing, progress); - const { - initialValue, - finalValue, - unit - } = el[prop]; - el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue); - const currentValue = el[prop].currentValue; - - if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) { - el.container.style[prop] = finalValue + unit; - propsDone += 1; - - if (propsDone === Object.keys(props).length) { - el.done = true; - elementsDone += 1; - } - - if (elementsDone === elements.length) { - done = true; - } - } - - if (done) { - a.done(params.complete); - return; - } - - el.container.style[prop] = currentValue + unit; - }); - }); - if (done) return; // Then call - - a.frameId = window.requestAnimationFrame(render); - } - - a.frameId = window.requestAnimationFrame(render); - return a; - } - - }; - - if (a.elements.length === 0) { - return els; - } - - let animateInstance; - - for (let i = 0; i < a.elements.length; i += 1) { - if (a.elements[i].dom7AnimateInstance) { - animateInstance = a.elements[i].dom7AnimateInstance; - } else a.elements[i].dom7AnimateInstance = a; - } - - if (!animateInstance) { - animateInstance = a; - } - - if (initialProps === 'stop') { - animateInstance.stop(); - } else { - animateInstance.animate(a.props, a.params); - } - - return els; -} - -function stop() { - const els = this; - - for (let i = 0; i < els.length; i += 1) { - if (els[i].dom7AnimateInstance) { - els[i].dom7AnimateInstance.stop(); - } - } -} - -const noTrigger = 'resize scroll'.split(' '); - -function shortcut(name) { - function eventHandler(...args) { - if (typeof args[0] === 'undefined') { - for (let i = 0; i < this.length; i += 1) { - if (noTrigger.indexOf(name) < 0) { - if (name in this[i]) this[i][name]();else { - $(this[i]).trigger(name); - } - } - } - - return this; - } - - return this.on(name, ...args); - } - - return eventHandler; -} - -const click = shortcut('click'); -const blur = shortcut('blur'); -const focus = shortcut('focus'); -const focusin = shortcut('focusin'); -const focusout = shortcut('focusout'); -const keyup = shortcut('keyup'); -const keydown = shortcut('keydown'); -const keypress = shortcut('keypress'); -const submit = shortcut('submit'); -const change = shortcut('change'); -const mousedown = shortcut('mousedown'); -const mousemove = shortcut('mousemove'); -const mouseup = shortcut('mouseup'); -const mouseenter = shortcut('mouseenter'); -const mouseleave = shortcut('mouseleave'); -const mouseout = shortcut('mouseout'); -const mouseover = shortcut('mouseover'); -const touchstart = shortcut('touchstart'); -const touchend = shortcut('touchend'); -const touchmove = shortcut('touchmove'); -const resize = shortcut('resize'); -const scroll = shortcut('scroll'); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ($); - - - -/***/ }), - -/***/ "./node_modules/ssr-window/ssr-window.esm.js": -/*!***************************************************!*\ - !*** ./node_modules/ssr-window/ssr-window.esm.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ extend: () => (/* binding */ extend), -/* harmony export */ getDocument: () => (/* binding */ getDocument), -/* harmony export */ getWindow: () => (/* binding */ getWindow), -/* harmony export */ ssrDocument: () => (/* binding */ ssrDocument), -/* harmony export */ ssrWindow: () => (/* binding */ ssrWindow) -/* harmony export */ }); -/** - * SSR Window 4.0.2 - * Better handling for window object in SSR environment - * https://github.com/nolimits4web/ssr-window - * - * Copyright 2021, Vladimir Kharlampidi - * - * Licensed under MIT - * - * Released on: December 13, 2021 - */ -/* eslint-disable no-param-reassign */ -function isObject(obj) { - return (obj !== null && - typeof obj === 'object' && - 'constructor' in obj && - obj.constructor === Object); -} -function extend(target = {}, src = {}) { - Object.keys(src).forEach((key) => { - if (typeof target[key] === 'undefined') - target[key] = src[key]; - else if (isObject(src[key]) && - isObject(target[key]) && - Object.keys(src[key]).length > 0) { - extend(target[key], src[key]); - } - }); -} - -const ssrDocument = { - body: {}, - addEventListener() { }, - removeEventListener() { }, - activeElement: { - blur() { }, - nodeName: '', - }, - querySelector() { - return null; - }, - querySelectorAll() { - return []; - }, - getElementById() { - return null; - }, - createEvent() { - return { - initEvent() { }, - }; - }, - createElement() { - return { - children: [], - childNodes: [], - style: {}, - setAttribute() { }, - getElementsByTagName() { - return []; - }, - }; - }, - createElementNS() { - return {}; - }, - importNode() { - return null; - }, - location: { - hash: '', - host: '', - hostname: '', - href: '', - origin: '', - pathname: '', - protocol: '', - search: '', - }, -}; -function getDocument() { - const doc = typeof document !== 'undefined' ? document : {}; - extend(doc, ssrDocument); - return doc; -} - -const ssrWindow = { - document: ssrDocument, - navigator: { - userAgent: '', - }, - location: { - hash: '', - host: '', - hostname: '', - href: '', - origin: '', - pathname: '', - protocol: '', - search: '', - }, - history: { - replaceState() { }, - pushState() { }, - go() { }, - back() { }, - }, - CustomEvent: function CustomEvent() { - return this; - }, - addEventListener() { }, - removeEventListener() { }, - getComputedStyle() { - return { - getPropertyValue() { - return ''; - }, - }; - }, - Image() { }, - Date() { }, - screen: {}, - setTimeout() { }, - clearTimeout() { }, - matchMedia() { - return {}; - }, - requestAnimationFrame(callback) { - if (typeof setTimeout === 'undefined') { - callback(); - return null; - } - return setTimeout(callback, 0); - }, - cancelAnimationFrame(id) { - if (typeof setTimeout === 'undefined') { - return; - } - clearTimeout(id); - }, -}; -function getWindow() { - const win = typeof window !== 'undefined' ? window : {}; - extend(win, ssrWindow); - return win; -} - - - - -/***/ }), - -/***/ "./node_modules/swiper/core/breakpoints/getBreakpoint.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/breakpoints/getBreakpoint.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getBreakpoint) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -function getBreakpoint(breakpoints, base = 'window', containerEl) { - if (!breakpoints || base === 'container' && !containerEl) return undefined; - let breakpoint = false; - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; - const points = Object.keys(breakpoints).map(point => { - if (typeof point === 'string' && point.indexOf('@') === 0) { - const minRatio = parseFloat(point.substr(1)); - const value = currentHeight * minRatio; - return { - value, - point - }; - } - - return { - value: point, - point - }; - }); - points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); - - for (let i = 0; i < points.length; i += 1) { - const { - point, - value - } = points[i]; - - if (base === 'window') { - if (window.matchMedia(`(min-width: ${value}px)`).matches) { - breakpoint = point; - } - } else if (value <= containerEl.clientWidth) { - breakpoint = point; - } - } - - return breakpoint || 'max'; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/breakpoints/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/swiper/core/breakpoints/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _setBreakpoint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setBreakpoint.js */ "./node_modules/swiper/core/breakpoints/setBreakpoint.js"); -/* harmony import */ var _getBreakpoint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getBreakpoint.js */ "./node_modules/swiper/core/breakpoints/getBreakpoint.js"); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - setBreakpoint: _setBreakpoint_js__WEBPACK_IMPORTED_MODULE_0__["default"], - getBreakpoint: _getBreakpoint_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/breakpoints/setBreakpoint.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/breakpoints/setBreakpoint.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setBreakpoint) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - -const isGridEnabled = (swiper, params) => { - return swiper.grid && params.grid && params.grid.rows > 1; -}; - -function setBreakpoint() { - const swiper = this; - const { - activeIndex, - initialized, - loopedSlides = 0, - params, - $el - } = swiper; - const breakpoints = params.breakpoints; - if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters - - const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); - if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; - const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; - const breakpointParams = breakpointOnlyParams || swiper.originalParams; - const wasMultiRow = isGridEnabled(swiper, params); - const isMultiRow = isGridEnabled(swiper, breakpointParams); - const wasEnabled = params.enabled; - - if (wasMultiRow && !isMultiRow) { - $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`); - swiper.emitContainerClasses(); - } else if (!wasMultiRow && isMultiRow) { - $el.addClass(`${params.containerModifierClass}grid`); - - if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { - $el.addClass(`${params.containerModifierClass}grid-column`); - } - - swiper.emitContainerClasses(); - } - - const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; - const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); - - if (directionChanged && initialized) { - swiper.changeDirection(); - } - - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(swiper.params, breakpointParams); - const isEnabled = swiper.params.enabled; - Object.assign(swiper, { - allowTouchMove: swiper.params.allowTouchMove, - allowSlideNext: swiper.params.allowSlideNext, - allowSlidePrev: swiper.params.allowSlidePrev - }); - - if (wasEnabled && !isEnabled) { - swiper.disable(); - } else if (!wasEnabled && isEnabled) { - swiper.enable(); - } - - swiper.currentBreakpoint = breakpoint; - swiper.emit('_beforeBreakpoint', breakpointParams); - - if (needsReLoop && initialized) { - swiper.loopDestroy(); - swiper.loopCreate(); - swiper.updateSlides(); - swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); - } - - swiper.emit('breakpoint', breakpointParams); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/check-overflow/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/core/check-overflow/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -function checkOverflow() { - const swiper = this; - const { - isLocked: wasLocked, - params - } = swiper; - const { - slidesOffsetBefore - } = params; - - if (slidesOffsetBefore) { - const lastSlideIndex = swiper.slides.length - 1; - const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; - swiper.isLocked = swiper.size > lastSlideRightEdge; - } else { - swiper.isLocked = swiper.snapGrid.length === 1; - } - - if (params.allowSlideNext === true) { - swiper.allowSlideNext = !swiper.isLocked; - } - - if (params.allowSlidePrev === true) { - swiper.allowSlidePrev = !swiper.isLocked; - } - - if (wasLocked && wasLocked !== swiper.isLocked) { - swiper.isEnd = false; - } - - if (wasLocked !== swiper.isLocked) { - swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - checkOverflow -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/classes/addClasses.js": -/*!********************************************************!*\ - !*** ./node_modules/swiper/core/classes/addClasses.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ addClasses) -/* harmony export */ }); -function prepareClasses(entries, prefix) { - const resultClasses = []; - entries.forEach(item => { - if (typeof item === 'object') { - Object.keys(item).forEach(classNames => { - if (item[classNames]) { - resultClasses.push(prefix + classNames); - } - }); - } else if (typeof item === 'string') { - resultClasses.push(prefix + item); - } - }); - return resultClasses; -} - -function addClasses() { - const swiper = this; - const { - classNames, - params, - rtl, - $el, - device, - support - } = swiper; // prettier-ignore - - const suffixes = prepareClasses(['initialized', params.direction, { - 'pointer-events': !support.touch - }, { - 'free-mode': swiper.params.freeMode && params.freeMode.enabled - }, { - 'autoheight': params.autoHeight - }, { - 'rtl': rtl - }, { - 'grid': params.grid && params.grid.rows > 1 - }, { - 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' - }, { - 'android': device.android - }, { - 'ios': device.ios - }, { - 'css-mode': params.cssMode - }, { - 'centered': params.cssMode && params.centeredSlides - }], params.containerModifierClass); - classNames.push(...suffixes); - $el.addClass([...classNames].join(' ')); - swiper.emitContainerClasses(); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/classes/index.js": -/*!***************************************************!*\ - !*** ./node_modules/swiper/core/classes/index.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _addClasses_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addClasses.js */ "./node_modules/swiper/core/classes/addClasses.js"); -/* harmony import */ var _removeClasses_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeClasses.js */ "./node_modules/swiper/core/classes/removeClasses.js"); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - addClasses: _addClasses_js__WEBPACK_IMPORTED_MODULE_0__["default"], - removeClasses: _removeClasses_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/classes/removeClasses.js": -/*!***********************************************************!*\ - !*** ./node_modules/swiper/core/classes/removeClasses.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ removeClasses) -/* harmony export */ }); -function removeClasses() { - const swiper = this; - const { - $el, - classNames - } = swiper; - $el.removeClass(classNames.join(' ')); - swiper.emitContainerClasses(); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/core.js": -/*!******************************************!*\ - !*** ./node_modules/swiper/core/core.js ***! - \******************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* harmony import */ var _shared_get_support_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/get-support.js */ "./node_modules/swiper/shared/get-support.js"); -/* harmony import */ var _shared_get_device_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/get-device.js */ "./node_modules/swiper/shared/get-device.js"); -/* harmony import */ var _shared_get_browser_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shared/get-browser.js */ "./node_modules/swiper/shared/get-browser.js"); -/* harmony import */ var _modules_resize_resize_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/resize/resize.js */ "./node_modules/swiper/core/modules/resize/resize.js"); -/* harmony import */ var _modules_observer_observer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/observer/observer.js */ "./node_modules/swiper/core/modules/observer/observer.js"); -/* harmony import */ var _events_emitter_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./events-emitter.js */ "./node_modules/swiper/core/events-emitter.js"); -/* harmony import */ var _update_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./update/index.js */ "./node_modules/swiper/core/update/index.js"); -/* harmony import */ var _translate_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./translate/index.js */ "./node_modules/swiper/core/translate/index.js"); -/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/swiper/core/transition/index.js"); -/* harmony import */ var _slide_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./slide/index.js */ "./node_modules/swiper/core/slide/index.js"); -/* harmony import */ var _loop_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./loop/index.js */ "./node_modules/swiper/core/loop/index.js"); -/* harmony import */ var _grab_cursor_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./grab-cursor/index.js */ "./node_modules/swiper/core/grab-cursor/index.js"); -/* harmony import */ var _events_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./events/index.js */ "./node_modules/swiper/core/events/index.js"); -/* harmony import */ var _breakpoints_index_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./breakpoints/index.js */ "./node_modules/swiper/core/breakpoints/index.js"); -/* harmony import */ var _classes_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./classes/index.js */ "./node_modules/swiper/core/classes/index.js"); -/* harmony import */ var _images_index_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./images/index.js */ "./node_modules/swiper/core/images/index.js"); -/* harmony import */ var _check_overflow_index_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./check-overflow/index.js */ "./node_modules/swiper/core/check-overflow/index.js"); -/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./defaults.js */ "./node_modules/swiper/core/defaults.js"); -/* harmony import */ var _moduleExtendParams_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./moduleExtendParams.js */ "./node_modules/swiper/core/moduleExtendParams.js"); -/* eslint no-param-reassign: "off" */ - - - - - - - - - - - - - - - - - - - - - - -const prototypes = { - eventsEmitter: _events_emitter_js__WEBPACK_IMPORTED_MODULE_8__["default"], - update: _update_index_js__WEBPACK_IMPORTED_MODULE_9__["default"], - translate: _translate_index_js__WEBPACK_IMPORTED_MODULE_10__["default"], - transition: _transition_index_js__WEBPACK_IMPORTED_MODULE_11__["default"], - slide: _slide_index_js__WEBPACK_IMPORTED_MODULE_12__["default"], - loop: _loop_index_js__WEBPACK_IMPORTED_MODULE_13__["default"], - grabCursor: _grab_cursor_index_js__WEBPACK_IMPORTED_MODULE_14__["default"], - events: _events_index_js__WEBPACK_IMPORTED_MODULE_15__["default"], - breakpoints: _breakpoints_index_js__WEBPACK_IMPORTED_MODULE_16__["default"], - checkOverflow: _check_overflow_index_js__WEBPACK_IMPORTED_MODULE_19__["default"], - classes: _classes_index_js__WEBPACK_IMPORTED_MODULE_17__["default"], - images: _images_index_js__WEBPACK_IMPORTED_MODULE_18__["default"] -}; -const extendedDefaults = {}; - -class Swiper { - constructor(...args) { - let el; - let params; - - if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { - params = args[0]; - } else { - [el, params] = args; - } - - if (!params) params = {}; - params = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params); - if (el && !params.el) params.el = el; - - if (params.el && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el).length > 1) { - const swipers = []; - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el).each(containerEl => { - const newParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params, { - el: containerEl - }); - swipers.push(new Swiper(newParams)); - }); - return swipers; - } // Swiper Instance - - - const swiper = this; - swiper.__swiper__ = true; - swiper.support = (0,_shared_get_support_js__WEBPACK_IMPORTED_MODULE_3__.getSupport)(); - swiper.device = (0,_shared_get_device_js__WEBPACK_IMPORTED_MODULE_4__.getDevice)({ - userAgent: params.userAgent - }); - swiper.browser = (0,_shared_get_browser_js__WEBPACK_IMPORTED_MODULE_5__.getBrowser)(); - swiper.eventsListeners = {}; - swiper.eventsAnyListeners = []; - swiper.modules = [...swiper.__modules__]; - - if (params.modules && Array.isArray(params.modules)) { - swiper.modules.push(...params.modules); - } - - const allModulesParams = {}; - swiper.modules.forEach(mod => { - mod({ - swiper, - extendParams: (0,_moduleExtendParams_js__WEBPACK_IMPORTED_MODULE_21__["default"])(params, allModulesParams), - on: swiper.on.bind(swiper), - once: swiper.once.bind(swiper), - off: swiper.off.bind(swiper), - emit: swiper.emit.bind(swiper) - }); - }); // Extend defaults with modules params - - const swiperParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, _defaults_js__WEBPACK_IMPORTED_MODULE_20__["default"], allModulesParams); // Extend defaults with passed params - - swiper.params = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, swiperParams, extendedDefaults, params); - swiper.originalParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, swiper.params); - swiper.passedParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params); // add event listeners - - if (swiper.params && swiper.params.on) { - Object.keys(swiper.params.on).forEach(eventName => { - swiper.on(eventName, swiper.params.on[eventName]); - }); - } - - if (swiper.params && swiper.params.onAny) { - swiper.onAny(swiper.params.onAny); - } // Save Dom lib - - - swiper.$ = _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"]; // Extend Swiper - - Object.assign(swiper, { - enabled: swiper.params.enabled, - el, - // Classes - classNames: [], - // Slides - slides: (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), - slidesGrid: [], - snapGrid: [], - slidesSizesGrid: [], - - // isDirection - isHorizontal() { - return swiper.params.direction === 'horizontal'; - }, - - isVertical() { - return swiper.params.direction === 'vertical'; - }, - - // Indexes - activeIndex: 0, - realIndex: 0, - // - isBeginning: true, - isEnd: false, - // Props - translate: 0, - previousTranslate: 0, - progress: 0, - velocity: 0, - animating: false, - // Locks - allowSlideNext: swiper.params.allowSlideNext, - allowSlidePrev: swiper.params.allowSlidePrev, - // Touch Events - touchEvents: function touchEvents() { - const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; - const desktop = ['pointerdown', 'pointermove', 'pointerup']; - swiper.touchEventsTouch = { - start: touch[0], - move: touch[1], - end: touch[2], - cancel: touch[3] - }; - swiper.touchEventsDesktop = { - start: desktop[0], - move: desktop[1], - end: desktop[2] - }; - return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; - }(), - touchEventsData: { - isTouched: undefined, - isMoved: undefined, - allowTouchCallbacks: undefined, - touchStartTime: undefined, - isScrolling: undefined, - currentTranslate: undefined, - startTranslate: undefined, - allowThresholdMove: undefined, - // Form elements to match - focusableElements: swiper.params.focusableElements, - // Last click time - lastClickTime: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), - clickTimeout: undefined, - // Velocities - velocities: [], - allowMomentumBounce: undefined, - isTouchEvent: undefined, - startMoving: undefined - }, - // Clicks - allowClick: true, - // Touches - allowTouchMove: swiper.params.allowTouchMove, - touches: { - startX: 0, - startY: 0, - currentX: 0, - currentY: 0, - diff: 0 - }, - // Images - imagesToLoad: [], - imagesLoaded: 0 - }); - swiper.emit('_swiper'); // Init - - if (swiper.params.init) { - swiper.init(); - } // Return app instance - - - return swiper; - } - - enable() { - const swiper = this; - if (swiper.enabled) return; - swiper.enabled = true; - - if (swiper.params.grabCursor) { - swiper.setGrabCursor(); - } - - swiper.emit('enable'); - } - - disable() { - const swiper = this; - if (!swiper.enabled) return; - swiper.enabled = false; - - if (swiper.params.grabCursor) { - swiper.unsetGrabCursor(); - } - - swiper.emit('disable'); - } - - setProgress(progress, speed) { - const swiper = this; - progress = Math.min(Math.max(progress, 0), 1); - const min = swiper.minTranslate(); - const max = swiper.maxTranslate(); - const current = (max - min) * progress + min; - swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } - - emitContainerClasses() { - const swiper = this; - if (!swiper.params._emitClasses || !swiper.el) return; - const cls = swiper.el.className.split(' ').filter(className => { - return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; - }); - swiper.emit('_containerClasses', cls.join(' ')); - } - - getSlideClasses(slideEl) { - const swiper = this; - return slideEl.className.split(' ').filter(className => { - return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; - }).join(' '); - } - - emitSlidesClasses() { - const swiper = this; - if (!swiper.params._emitClasses || !swiper.el) return; - const updates = []; - swiper.slides.each(slideEl => { - const classNames = swiper.getSlideClasses(slideEl); - updates.push({ - slideEl, - classNames - }); - swiper.emit('_slideClass', slideEl, classNames); - }); - swiper.emit('_slideClasses', updates); - } - - slidesPerViewDynamic(view = 'current', exact = false) { - const swiper = this; - const { - params, - slides, - slidesGrid, - slidesSizesGrid, - size: swiperSize, - activeIndex - } = swiper; - let spv = 1; - - if (params.centeredSlides) { - let slideSize = slides[activeIndex].swiperSlideSize; - let breakLoop; - - for (let i = activeIndex + 1; i < slides.length; i += 1) { - if (slides[i] && !breakLoop) { - slideSize += slides[i].swiperSlideSize; - spv += 1; - if (slideSize > swiperSize) breakLoop = true; - } - } - - for (let i = activeIndex - 1; i >= 0; i -= 1) { - if (slides[i] && !breakLoop) { - slideSize += slides[i].swiperSlideSize; - spv += 1; - if (slideSize > swiperSize) breakLoop = true; - } - } - } else { - // eslint-disable-next-line - if (view === 'current') { - for (let i = activeIndex + 1; i < slides.length; i += 1) { - const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; - - if (slideInView) { - spv += 1; - } - } - } else { - // previous - for (let i = activeIndex - 1; i >= 0; i -= 1) { - const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; - - if (slideInView) { - spv += 1; - } - } - } - } - - return spv; - } - - update() { - const swiper = this; - if (!swiper || swiper.destroyed) return; - const { - snapGrid, - params - } = swiper; // Breakpoints - - if (params.breakpoints) { - swiper.setBreakpoint(); - } - - swiper.updateSize(); - swiper.updateSlides(); - swiper.updateProgress(); - swiper.updateSlidesClasses(); - - function setTranslate() { - const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; - const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); - swiper.setTranslate(newTranslate); - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } - - let translated; - - if (swiper.params.freeMode && swiper.params.freeMode.enabled) { - setTranslate(); - - if (swiper.params.autoHeight) { - swiper.updateAutoHeight(); - } - } else { - if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { - translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); - } else { - translated = swiper.slideTo(swiper.activeIndex, 0, false, true); - } - - if (!translated) { - setTranslate(); - } - } - - if (params.watchOverflow && snapGrid !== swiper.snapGrid) { - swiper.checkOverflow(); - } - - swiper.emit('update'); - } - - changeDirection(newDirection, needUpdate = true) { - const swiper = this; - const currentDirection = swiper.params.direction; - - if (!newDirection) { - // eslint-disable-next-line - newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; - } - - if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { - return swiper; - } - - swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`); - swiper.emitContainerClasses(); - swiper.params.direction = newDirection; - swiper.slides.each(slideEl => { - if (newDirection === 'vertical') { - slideEl.style.width = ''; - } else { - slideEl.style.height = ''; - } - }); - swiper.emit('changeDirection'); - if (needUpdate) swiper.update(); - return swiper; - } - - mount(el) { - const swiper = this; - if (swiper.mounted) return true; // Find el - - const $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el || swiper.params.el); - el = $el[0]; - - if (!el) { - return false; - } - - el.swiper = swiper; - - const getWrapperSelector = () => { - return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; - }; - - const getWrapper = () => { - if (el && el.shadowRoot && el.shadowRoot.querySelector) { - const res = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items - - res.children = options => $el.children(options); - - return res; - } - - return $el.children(getWrapperSelector()); - }; // Find Wrapper - - - let $wrapperEl = getWrapper(); - - if ($wrapperEl.length === 0 && swiper.params.createElements) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const wrapper = document.createElement('div'); - $wrapperEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(wrapper); - wrapper.className = swiper.params.wrapperClass; - $el.append(wrapper); - $el.children(`.${swiper.params.slideClass}`).each(slideEl => { - $wrapperEl.append(slideEl); - }); - } - - Object.assign(swiper, { - $el, - el, - $wrapperEl, - wrapperEl: $wrapperEl[0], - mounted: true, - // RTL - rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl', - rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), - wrongRTL: $wrapperEl.css('display') === '-webkit-box' - }); - return true; - } - - init(el) { - const swiper = this; - if (swiper.initialized) return swiper; - const mounted = swiper.mount(el); - if (mounted === false) return swiper; - swiper.emit('beforeInit'); // Set breakpoint - - if (swiper.params.breakpoints) { - swiper.setBreakpoint(); - } // Add Classes - - - swiper.addClasses(); // Create loop - - if (swiper.params.loop) { - swiper.loopCreate(); - } // Update size - - - swiper.updateSize(); // Update slides - - swiper.updateSlides(); - - if (swiper.params.watchOverflow) { - swiper.checkOverflow(); - } // Set Grab Cursor - - - if (swiper.params.grabCursor && swiper.enabled) { - swiper.setGrabCursor(); - } - - if (swiper.params.preloadImages) { - swiper.preloadImages(); - } // Slide To Initial Slide - - - if (swiper.params.loop) { - swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true); - } else { - swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); - } // Attach events - - - swiper.attachEvents(); // Init Flag - - swiper.initialized = true; // Emit - - swiper.emit('init'); - swiper.emit('afterInit'); - return swiper; - } - - destroy(deleteInstance = true, cleanStyles = true) { - const swiper = this; - const { - params, - $el, - $wrapperEl, - slides - } = swiper; - - if (typeof swiper.params === 'undefined' || swiper.destroyed) { - return null; - } - - swiper.emit('beforeDestroy'); // Init Flag - - swiper.initialized = false; // Detach events - - swiper.detachEvents(); // Destroy loop - - if (params.loop) { - swiper.loopDestroy(); - } // Cleanup styles - - - if (cleanStyles) { - swiper.removeClasses(); - $el.removeAttr('style'); - $wrapperEl.removeAttr('style'); - - if (slides && slides.length) { - slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index'); - } - } - - swiper.emit('destroy'); // Detach emitter events - - Object.keys(swiper.eventsListeners).forEach(eventName => { - swiper.off(eventName); - }); - - if (deleteInstance !== false) { - swiper.$el[0].swiper = null; - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.deleteProps)(swiper); - } - - swiper.destroyed = true; - return null; - } - - static extendDefaults(newDefaults) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)(extendedDefaults, newDefaults); - } - - static get extendedDefaults() { - return extendedDefaults; - } - - static get defaults() { - return _defaults_js__WEBPACK_IMPORTED_MODULE_20__["default"]; - } - - static installModule(mod) { - if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; - const modules = Swiper.prototype.__modules__; - - if (typeof mod === 'function' && modules.indexOf(mod) < 0) { - modules.push(mod); - } - } - - static use(module) { - if (Array.isArray(module)) { - module.forEach(m => Swiper.installModule(m)); - return Swiper; - } - - Swiper.installModule(module); - return Swiper; - } - -} - -Object.keys(prototypes).forEach(prototypeGroup => { - Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { - Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; - }); -}); -Swiper.use([_modules_resize_resize_js__WEBPACK_IMPORTED_MODULE_6__["default"], _modules_observer_observer_js__WEBPACK_IMPORTED_MODULE_7__["default"]]); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Swiper); - -/***/ }), - -/***/ "./node_modules/swiper/core/defaults.js": -/*!**********************************************!*\ - !*** ./node_modules/swiper/core/defaults.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - init: true, - direction: 'horizontal', - touchEventsTarget: 'wrapper', - initialSlide: 0, - speed: 300, - cssMode: false, - updateOnWindowResize: true, - resizeObserver: true, - nested: false, - createElements: false, - enabled: true, - focusableElements: 'input, select, option, textarea, button, video, label', - // Overrides - width: null, - height: null, - // - preventInteractionOnTransition: false, - // ssr - userAgent: null, - url: null, - // To support iOS's swipe-to-go-back gesture (when being used in-app). - edgeSwipeDetection: false, - edgeSwipeThreshold: 20, - // Autoheight - autoHeight: false, - // Set wrapper width - setWrapperSize: false, - // Virtual Translate - virtualTranslate: false, - // Effects - effect: 'slide', - // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' - // Breakpoints - breakpoints: undefined, - breakpointsBase: 'window', - // Slides grid - spaceBetween: 0, - slidesPerView: 1, - slidesPerGroup: 1, - slidesPerGroupSkip: 0, - slidesPerGroupAuto: false, - centeredSlides: false, - centeredSlidesBounds: false, - slidesOffsetBefore: 0, - // in px - slidesOffsetAfter: 0, - // in px - normalizeSlideIndex: true, - centerInsufficientSlides: false, - // Disable swiper and hide navigation when container not overflow - watchOverflow: true, - // Round length - roundLengths: false, - // Touches - touchRatio: 1, - touchAngle: 45, - simulateTouch: true, - shortSwipes: true, - longSwipes: true, - longSwipesRatio: 0.5, - longSwipesMs: 300, - followFinger: true, - allowTouchMove: true, - threshold: 0, - touchMoveStopPropagation: false, - touchStartPreventDefault: true, - touchStartForcePreventDefault: false, - touchReleaseOnEdges: false, - // Unique Navigation Elements - uniqueNavElements: true, - // Resistance - resistance: true, - resistanceRatio: 0.85, - // Progress - watchSlidesProgress: false, - // Cursor - grabCursor: false, - // Clicks - preventClicks: true, - preventClicksPropagation: true, - slideToClickedSlide: false, - // Images - preloadImages: true, - updateOnImagesReady: true, - // loop - loop: false, - loopAdditionalSlides: 0, - loopedSlides: null, - loopFillGroupWithBlank: false, - loopPreventsSlide: true, - // rewind - rewind: false, - // Swiping/no swiping - allowSlidePrev: true, - allowSlideNext: true, - swipeHandler: null, - // '.swipe-handler', - noSwiping: true, - noSwipingClass: 'swiper-no-swiping', - noSwipingSelector: null, - // Passive Listeners - passiveListeners: true, - // NS - containerModifierClass: 'swiper-', - // NEW - slideClass: 'swiper-slide', - slideBlankClass: 'swiper-slide-invisible-blank', - slideActiveClass: 'swiper-slide-active', - slideDuplicateActiveClass: 'swiper-slide-duplicate-active', - slideVisibleClass: 'swiper-slide-visible', - slideDuplicateClass: 'swiper-slide-duplicate', - slideNextClass: 'swiper-slide-next', - slideDuplicateNextClass: 'swiper-slide-duplicate-next', - slidePrevClass: 'swiper-slide-prev', - slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', - wrapperClass: 'swiper-wrapper', - // Callbacks - runCallbacksOnInit: true, - // Internals - _emitClasses: false -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/events-emitter.js": -/*!****************************************************!*\ - !*** ./node_modules/swiper/core/events-emitter.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* eslint-disable no-underscore-dangle */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - on(events, handler, priority) { - const self = this; - if (typeof handler !== 'function') return self; - const method = priority ? 'unshift' : 'push'; - events.split(' ').forEach(event => { - if (!self.eventsListeners[event]) self.eventsListeners[event] = []; - self.eventsListeners[event][method](handler); - }); - return self; - }, - - once(events, handler, priority) { - const self = this; - if (typeof handler !== 'function') return self; - - function onceHandler(...args) { - self.off(events, onceHandler); - - if (onceHandler.__emitterProxy) { - delete onceHandler.__emitterProxy; - } - - handler.apply(self, args); - } - - onceHandler.__emitterProxy = handler; - return self.on(events, onceHandler, priority); - }, - - onAny(handler, priority) { - const self = this; - if (typeof handler !== 'function') return self; - const method = priority ? 'unshift' : 'push'; - - if (self.eventsAnyListeners.indexOf(handler) < 0) { - self.eventsAnyListeners[method](handler); - } - - return self; - }, - - offAny(handler) { - const self = this; - if (!self.eventsAnyListeners) return self; - const index = self.eventsAnyListeners.indexOf(handler); - - if (index >= 0) { - self.eventsAnyListeners.splice(index, 1); - } - - return self; - }, - - off(events, handler) { - const self = this; - if (!self.eventsListeners) return self; - events.split(' ').forEach(event => { - if (typeof handler === 'undefined') { - self.eventsListeners[event] = []; - } else if (self.eventsListeners[event]) { - self.eventsListeners[event].forEach((eventHandler, index) => { - if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { - self.eventsListeners[event].splice(index, 1); - } - }); - } - }); - return self; - }, - - emit(...args) { - const self = this; - if (!self.eventsListeners) return self; - let events; - let data; - let context; - - if (typeof args[0] === 'string' || Array.isArray(args[0])) { - events = args[0]; - data = args.slice(1, args.length); - context = self; - } else { - events = args[0].events; - data = args[0].data; - context = args[0].context || self; - } - - data.unshift(context); - const eventsArray = Array.isArray(events) ? events : events.split(' '); - eventsArray.forEach(event => { - if (self.eventsAnyListeners && self.eventsAnyListeners.length) { - self.eventsAnyListeners.forEach(eventHandler => { - eventHandler.apply(context, [event, ...data]); - }); - } - - if (self.eventsListeners && self.eventsListeners[event]) { - self.eventsListeners[event].forEach(eventHandler => { - eventHandler.apply(context, data); - }); - } - }); - return self; - } - -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/events/index.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/core/events/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _onTouchStart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./onTouchStart.js */ "./node_modules/swiper/core/events/onTouchStart.js"); -/* harmony import */ var _onTouchMove_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./onTouchMove.js */ "./node_modules/swiper/core/events/onTouchMove.js"); -/* harmony import */ var _onTouchEnd_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./onTouchEnd.js */ "./node_modules/swiper/core/events/onTouchEnd.js"); -/* harmony import */ var _onResize_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./onResize.js */ "./node_modules/swiper/core/events/onResize.js"); -/* harmony import */ var _onClick_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./onClick.js */ "./node_modules/swiper/core/events/onClick.js"); -/* harmony import */ var _onScroll_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./onScroll.js */ "./node_modules/swiper/core/events/onScroll.js"); - - - - - - - -let dummyEventAttached = false; - -function dummyEventListener() {} - -const events = (swiper, method) => { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const { - params, - touchEvents, - el, - wrapperEl, - device, - support - } = swiper; - const capture = !!params.nested; - const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; - const swiperMethod = method; // Touch Events - - if (!support.touch) { - el[domMethod](touchEvents.start, swiper.onTouchStart, false); - document[domMethod](touchEvents.move, swiper.onTouchMove, capture); - document[domMethod](touchEvents.end, swiper.onTouchEnd, false); - } else { - const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? { - passive: true, - capture: false - } : false; - el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener); - el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? { - passive: false, - capture - } : capture); - el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener); - - if (touchEvents.cancel) { - el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener); - } - } // Prevent Links Clicks - - - if (params.preventClicks || params.preventClicksPropagation) { - el[domMethod]('click', swiper.onClick, true); - } - - if (params.cssMode) { - wrapperEl[domMethod]('scroll', swiper.onScroll); - } // Resize handler - - - if (params.updateOnWindowResize) { - swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', _onResize_js__WEBPACK_IMPORTED_MODULE_4__["default"], true); - } else { - swiper[swiperMethod]('observerUpdate', _onResize_js__WEBPACK_IMPORTED_MODULE_4__["default"], true); - } -}; - -function attachEvents() { - const swiper = this; - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const { - params, - support - } = swiper; - swiper.onTouchStart = _onTouchStart_js__WEBPACK_IMPORTED_MODULE_1__["default"].bind(swiper); - swiper.onTouchMove = _onTouchMove_js__WEBPACK_IMPORTED_MODULE_2__["default"].bind(swiper); - swiper.onTouchEnd = _onTouchEnd_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind(swiper); - - if (params.cssMode) { - swiper.onScroll = _onScroll_js__WEBPACK_IMPORTED_MODULE_6__["default"].bind(swiper); - } - - swiper.onClick = _onClick_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(swiper); - - if (support.touch && !dummyEventAttached) { - document.addEventListener('touchstart', dummyEventListener); - dummyEventAttached = true; - } - - events(swiper, 'on'); -} - -function detachEvents() { - const swiper = this; - events(swiper, 'off'); -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - attachEvents, - detachEvents -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onClick.js": -/*!****************************************************!*\ - !*** ./node_modules/swiper/core/events/onClick.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onClick) -/* harmony export */ }); -function onClick(e) { - const swiper = this; - if (!swiper.enabled) return; - - if (!swiper.allowClick) { - if (swiper.params.preventClicks) e.preventDefault(); - - if (swiper.params.preventClicksPropagation && swiper.animating) { - e.stopPropagation(); - e.stopImmediatePropagation(); - } - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onResize.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/events/onResize.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onResize) -/* harmony export */ }); -function onResize() { - const swiper = this; - const { - params, - el - } = swiper; - if (el && el.offsetWidth === 0) return; // Breakpoints - - if (params.breakpoints) { - swiper.setBreakpoint(); - } // Save locks - - - const { - allowSlideNext, - allowSlidePrev, - snapGrid - } = swiper; // Disable locks on resize - - swiper.allowSlideNext = true; - swiper.allowSlidePrev = true; - swiper.updateSize(); - swiper.updateSlides(); - swiper.updateSlidesClasses(); - - if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { - swiper.slideTo(swiper.slides.length - 1, 0, false, true); - } else { - swiper.slideTo(swiper.activeIndex, 0, false, true); - } - - if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { - swiper.autoplay.run(); - } // Return locks after resize - - - swiper.allowSlidePrev = allowSlidePrev; - swiper.allowSlideNext = allowSlideNext; - - if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { - swiper.checkOverflow(); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onScroll.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/events/onScroll.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onScroll) -/* harmony export */ }); -function onScroll() { - const swiper = this; - const { - wrapperEl, - rtlTranslate, - enabled - } = swiper; - if (!enabled) return; - swiper.previousTranslate = swiper.translate; - - if (swiper.isHorizontal()) { - swiper.translate = -wrapperEl.scrollLeft; - } else { - swiper.translate = -wrapperEl.scrollTop; - } // eslint-disable-next-line - - - if (swiper.translate === -0) swiper.translate = 0; - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - let newProgress; - const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); - - if (translatesDiff === 0) { - newProgress = 0; - } else { - newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; - } - - if (newProgress !== swiper.progress) { - swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); - } - - swiper.emit('setTranslate', swiper.translate, false); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onTouchEnd.js": -/*!*******************************************************!*\ - !*** ./node_modules/swiper/core/events/onTouchEnd.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onTouchEnd) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function onTouchEnd(event) { - const swiper = this; - const data = swiper.touchEventsData; - const { - params, - touches, - rtlTranslate: rtl, - slidesGrid, - enabled - } = swiper; - if (!enabled) return; - let e = event; - if (e.originalEvent) e = e.originalEvent; - - if (data.allowTouchCallbacks) { - swiper.emit('touchEnd', e); - } - - data.allowTouchCallbacks = false; - - if (!data.isTouched) { - if (data.isMoved && params.grabCursor) { - swiper.setGrabCursor(false); - } - - data.isMoved = false; - data.startMoving = false; - return; - } // Return Grab Cursor - - - if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { - swiper.setGrabCursor(false); - } // Time diff - - - const touchEndTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); - const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click - - if (swiper.allowClick) { - const pathTree = e.path || e.composedPath && e.composedPath(); - swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); - swiper.emit('tap click', e); - - if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { - swiper.emit('doubleTap doubleClick', e); - } - } - - data.lastClickTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { - if (!swiper.destroyed) swiper.allowClick = true; - }); - - if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { - data.isTouched = false; - data.isMoved = false; - data.startMoving = false; - return; - } - - data.isTouched = false; - data.isMoved = false; - data.startMoving = false; - let currentPos; - - if (params.followFinger) { - currentPos = rtl ? swiper.translate : -swiper.translate; - } else { - currentPos = -data.currentTranslate; - } - - if (params.cssMode) { - return; - } - - if (swiper.params.freeMode && params.freeMode.enabled) { - swiper.freeMode.onTouchEnd({ - currentPos - }); - return; - } // Find current slide - - - let stopIndex = 0; - let groupSize = swiper.slidesSizesGrid[0]; - - for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { - const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; - - if (typeof slidesGrid[i + increment] !== 'undefined') { - if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { - stopIndex = i; - groupSize = slidesGrid[i + increment] - slidesGrid[i]; - } - } else if (currentPos >= slidesGrid[i]) { - stopIndex = i; - groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; - } - } // Find current slide size - - - const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; - const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; - - if (timeDiff > params.longSwipesMs) { - // Long touches - if (!params.longSwipes) { - swiper.slideTo(swiper.activeIndex); - return; - } - - if (swiper.swipeDirection === 'next') { - if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); - } - - if (swiper.swipeDirection === 'prev') { - if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); - } - } else { - // Short swipes - if (!params.shortSwipes) { - swiper.slideTo(swiper.activeIndex); - return; - } - - const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); - - if (!isNavButtonTarget) { - if (swiper.swipeDirection === 'next') { - swiper.slideTo(stopIndex + increment); - } - - if (swiper.swipeDirection === 'prev') { - swiper.slideTo(stopIndex); - } - } else if (e.target === swiper.navigation.nextEl) { - swiper.slideTo(stopIndex + increment); - } else { - swiper.slideTo(stopIndex); - } - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onTouchMove.js": -/*!********************************************************!*\ - !*** ./node_modules/swiper/core/events/onTouchMove.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onTouchMove) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - - -function onTouchMove(event) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const swiper = this; - const data = swiper.touchEventsData; - const { - params, - touches, - rtlTranslate: rtl, - enabled - } = swiper; - if (!enabled) return; - let e = event; - if (e.originalEvent) e = e.originalEvent; - - if (!data.isTouched) { - if (data.startMoving && data.isScrolling) { - swiper.emit('touchMoveOpposite', e); - } - - return; - } - - if (data.isTouchEvent && e.type !== 'touchmove') return; - const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); - const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; - const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; - - if (e.preventedByNestedSwiper) { - touches.startX = pageX; - touches.startY = pageY; - return; - } - - if (!swiper.allowTouchMove) { - // isMoved = true; - swiper.allowClick = false; - - if (data.isTouched) { - Object.assign(touches, { - startX: pageX, - startY: pageY, - currentX: pageX, - currentY: pageY - }); - data.touchStartTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); - } - - return; - } - - if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { - if (swiper.isVertical()) { - // Vertical - if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { - data.isTouched = false; - data.isMoved = false; - return; - } - } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { - return; - } - } - - if (data.isTouchEvent && document.activeElement) { - if (e.target === document.activeElement && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).is(data.focusableElements)) { - data.isMoved = true; - swiper.allowClick = false; - return; - } - } - - if (data.allowTouchCallbacks) { - swiper.emit('touchMove', e); - } - - if (e.targetTouches && e.targetTouches.length > 1) return; - touches.currentX = pageX; - touches.currentY = pageY; - const diffX = touches.currentX - touches.startX; - const diffY = touches.currentY - touches.startY; - if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; - - if (typeof data.isScrolling === 'undefined') { - let touchAngle; - - if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { - data.isScrolling = false; - } else { - // eslint-disable-next-line - if (diffX * diffX + diffY * diffY >= 25) { - touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; - data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; - } - } - } - - if (data.isScrolling) { - swiper.emit('touchMoveOpposite', e); - } - - if (typeof data.startMoving === 'undefined') { - if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { - data.startMoving = true; - } - } - - if (data.isScrolling) { - data.isTouched = false; - return; - } - - if (!data.startMoving) { - return; - } - - swiper.allowClick = false; - - if (!params.cssMode && e.cancelable) { - e.preventDefault(); - } - - if (params.touchMoveStopPropagation && !params.nested) { - e.stopPropagation(); - } - - if (!data.isMoved) { - if (params.loop && !params.cssMode) { - swiper.loopFix(); - } - - data.startTranslate = swiper.getTranslate(); - swiper.setTransition(0); - - if (swiper.animating) { - swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); - } - - data.allowMomentumBounce = false; // Grab Cursor - - if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { - swiper.setGrabCursor(true); - } - - swiper.emit('sliderFirstMove', e); - } - - swiper.emit('sliderMove', e); - data.isMoved = true; - let diff = swiper.isHorizontal() ? diffX : diffY; - touches.diff = diff; - diff *= params.touchRatio; - if (rtl) diff = -diff; - swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; - data.currentTranslate = diff + data.startTranslate; - let disableParentSwiper = true; - let resistanceRatio = params.resistanceRatio; - - if (params.touchReleaseOnEdges) { - resistanceRatio = 0; - } - - if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { - disableParentSwiper = false; - if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; - } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { - disableParentSwiper = false; - if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; - } - - if (disableParentSwiper) { - e.preventedByNestedSwiper = true; - } // Directions locks - - - if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { - data.currentTranslate = data.startTranslate; - } - - if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { - data.currentTranslate = data.startTranslate; - } - - if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { - data.currentTranslate = data.startTranslate; - } // Threshold - - - if (params.threshold > 0) { - if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { - if (!data.allowThresholdMove) { - data.allowThresholdMove = true; - touches.startX = touches.currentX; - touches.startY = touches.currentY; - data.currentTranslate = data.startTranslate; - touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; - return; - } - } else { - data.currentTranslate = data.startTranslate; - return; - } - } - - if (!params.followFinger || params.cssMode) return; // Update active index in free mode - - if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } - - if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) { - swiper.freeMode.onTouchMove(); - } // Update progress - - - swiper.updateProgress(data.currentTranslate); // Update translate - - swiper.setTranslate(data.currentTranslate); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/events/onTouchStart.js": -/*!*********************************************************!*\ - !*** ./node_modules/swiper/core/events/onTouchStart.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ onTouchStart) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - - // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd - -function closestElement(selector, base = this) { - function __closestFrom(el) { - if (!el || el === (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)() || el === (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)()) return null; - if (el.assignedSlot) el = el.assignedSlot; - const found = el.closest(selector); - return found || __closestFrom(el.getRootNode().host); - } - - return __closestFrom(base); -} - -function onTouchStart(event) { - const swiper = this; - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const data = swiper.touchEventsData; - const { - params, - touches, - enabled - } = swiper; - if (!enabled) return; - - if (swiper.animating && params.preventInteractionOnTransition) { - return; - } - - if (!swiper.animating && params.cssMode && params.loop) { - swiper.loopFix(); - } - - let e = event; - if (e.originalEvent) e = e.originalEvent; - let $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target); - - if (params.touchEventsTarget === 'wrapper') { - if (!$targetEl.closest(swiper.wrapperEl).length) return; - } - - data.isTouchEvent = e.type === 'touchstart'; - if (!data.isTouchEvent && 'which' in e && e.which === 3) return; - if (!data.isTouchEvent && 'button' in e && e.button > 0) return; - if (data.isTouched && data.isMoved) return; // change target el for shadow root component - - const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; - - if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) { - $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(event.path[0]); - } - - const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; - const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element - - if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) { - swiper.allowClick = true; - return; - } - - if (params.swipeHandler) { - if (!$targetEl.closest(params.swipeHandler)[0]) return; - } - - touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; - touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; - const startX = touches.currentX; - const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore - - const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; - const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; - - if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { - if (edgeSwipeDetection === 'prevent') { - event.preventDefault(); - } else { - return; - } - } - - Object.assign(data, { - isTouched: true, - isMoved: false, - allowTouchCallbacks: true, - isScrolling: undefined, - startMoving: undefined - }); - touches.startX = startX; - touches.startY = startY; - data.touchStartTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); - swiper.allowClick = true; - swiper.updateSize(); - swiper.swipeDirection = undefined; - if (params.threshold > 0) data.allowThresholdMove = false; - - if (e.type !== 'touchstart') { - let preventDefault = true; - if ($targetEl.is(data.focusableElements)) preventDefault = false; - - if (document.activeElement && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) { - document.activeElement.blur(); - } - - const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; - - if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) { - e.preventDefault(); - } - } - - swiper.emit('touchStart', e); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/grab-cursor/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/swiper/core/grab-cursor/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _setGrabCursor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setGrabCursor.js */ "./node_modules/swiper/core/grab-cursor/setGrabCursor.js"); -/* harmony import */ var _unsetGrabCursor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./unsetGrabCursor.js */ "./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js"); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - setGrabCursor: _setGrabCursor_js__WEBPACK_IMPORTED_MODULE_0__["default"], - unsetGrabCursor: _unsetGrabCursor_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/grab-cursor/setGrabCursor.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/grab-cursor/setGrabCursor.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setGrabCursor) -/* harmony export */ }); -function setGrabCursor(moving) { - const swiper = this; - if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; - const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; - el.style.cursor = 'move'; - el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; - el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; - el.style.cursor = moving ? 'grabbing' : 'grab'; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js": -/*!*****************************************************************!*\ - !*** ./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ unsetGrabCursor) -/* harmony export */ }); -function unsetGrabCursor() { - const swiper = this; - - if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { - return; - } - - swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/images/index.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/core/images/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _loadImage_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loadImage.js */ "./node_modules/swiper/core/images/loadImage.js"); -/* harmony import */ var _preloadImages_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./preloadImages.js */ "./node_modules/swiper/core/images/preloadImages.js"); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - loadImage: _loadImage_js__WEBPACK_IMPORTED_MODULE_0__["default"], - preloadImages: _preloadImages_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/images/loadImage.js": -/*!******************************************************!*\ - !*** ./node_modules/swiper/core/images/loadImage.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ loadImage) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let image; - - function onReady() { - if (callback) callback(); - } - - const isPicture = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(imageEl).parent('picture')[0]; - - if (!isPicture && (!imageEl.complete || !checkForComplete)) { - if (src) { - image = new window.Image(); - image.onload = onReady; - image.onerror = onReady; - - if (sizes) { - image.sizes = sizes; - } - - if (srcset) { - image.srcset = srcset; - } - - if (src) { - image.src = src; - } - } else { - onReady(); - } - } else { - // image already loaded... - onReady(); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/images/preloadImages.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/core/images/preloadImages.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ preloadImages) -/* harmony export */ }); -function preloadImages() { - const swiper = this; - swiper.imagesToLoad = swiper.$el.find('img'); - - function onReady() { - if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; - if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; - - if (swiper.imagesLoaded === swiper.imagesToLoad.length) { - if (swiper.params.updateOnImagesReady) swiper.update(); - swiper.emit('imagesReady'); - } - } - - for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { - const imageEl = swiper.imagesToLoad[i]; - swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/loop/index.js": -/*!************************************************!*\ - !*** ./node_modules/swiper/core/loop/index.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _loopCreate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loopCreate.js */ "./node_modules/swiper/core/loop/loopCreate.js"); -/* harmony import */ var _loopFix_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loopFix.js */ "./node_modules/swiper/core/loop/loopFix.js"); -/* harmony import */ var _loopDestroy_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loopDestroy.js */ "./node_modules/swiper/core/loop/loopDestroy.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - loopCreate: _loopCreate_js__WEBPACK_IMPORTED_MODULE_0__["default"], - loopFix: _loopFix_js__WEBPACK_IMPORTED_MODULE_1__["default"], - loopDestroy: _loopDestroy_js__WEBPACK_IMPORTED_MODULE_2__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/loop/loopCreate.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/loop/loopCreate.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ loopCreate) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function loopCreate() { - const swiper = this; - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const { - params, - $wrapperEl - } = swiper; // Remove duplicated slides - - const $selector = $wrapperEl.children().length > 0 ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])($wrapperEl.children()[0].parentNode) : $wrapperEl; - $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); - let slides = $selector.children(`.${params.slideClass}`); - - if (params.loopFillGroupWithBlank) { - const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; - - if (blankSlidesNum !== params.slidesPerGroup) { - for (let i = 0; i < blankSlidesNum; i += 1) { - const blankNode = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`); - $selector.append(blankNode); - } - - slides = $selector.children(`.${params.slideClass}`); - } - } - - if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; - swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); - swiper.loopedSlides += params.loopAdditionalSlides; - - if (swiper.loopedSlides > slides.length) { - swiper.loopedSlides = slides.length; - } - - const prependSlides = []; - const appendSlides = []; - slides.each((el, index) => { - const slide = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el); - - if (index < swiper.loopedSlides) { - appendSlides.push(el); - } - - if (index < slides.length && index >= slides.length - swiper.loopedSlides) { - prependSlides.push(el); - } - - slide.attr('data-swiper-slide-index', index); - }); - - for (let i = 0; i < appendSlides.length; i += 1) { - $selector.append((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); - } - - for (let i = prependSlides.length - 1; i >= 0; i -= 1) { - $selector.prepend((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/loop/loopDestroy.js": -/*!******************************************************!*\ - !*** ./node_modules/swiper/core/loop/loopDestroy.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ loopDestroy) -/* harmony export */ }); -function loopDestroy() { - const swiper = this; - const { - $wrapperEl, - params, - slides - } = swiper; - $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove(); - slides.removeAttr('data-swiper-slide-index'); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/loop/loopFix.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/core/loop/loopFix.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ loopFix) -/* harmony export */ }); -function loopFix() { - const swiper = this; - swiper.emit('beforeLoopFix'); - const { - activeIndex, - slides, - loopedSlides, - allowSlidePrev, - allowSlideNext, - snapGrid, - rtlTranslate: rtl - } = swiper; - let newIndex; - swiper.allowSlidePrev = true; - swiper.allowSlideNext = true; - const snapTranslate = -snapGrid[activeIndex]; - const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding - - if (activeIndex < loopedSlides) { - newIndex = slides.length - loopedSlides * 3 + activeIndex; - newIndex += loopedSlides; - const slideChanged = swiper.slideTo(newIndex, 0, false, true); - - if (slideChanged && diff !== 0) { - swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); - } - } else if (activeIndex >= slides.length - loopedSlides) { - // Fix For Positive Oversliding - newIndex = -slides.length + activeIndex + loopedSlides; - newIndex += loopedSlides; - const slideChanged = swiper.slideTo(newIndex, 0, false, true); - - if (slideChanged && diff !== 0) { - swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); - } - } - - swiper.allowSlidePrev = allowSlidePrev; - swiper.allowSlideNext = allowSlideNext; - swiper.emit('loopFix'); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/moduleExtendParams.js": -/*!********************************************************!*\ - !*** ./node_modules/swiper/core/moduleExtendParams.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ moduleExtendParams) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function moduleExtendParams(params, allModulesParams) { - return function extendParams(obj = {}) { - const moduleParamName = Object.keys(obj)[0]; - const moduleParams = obj[moduleParamName]; - - if (typeof moduleParams !== 'object' || moduleParams === null) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); - return; - } - - if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { - params[moduleParamName] = { - auto: true - }; - } - - if (!(moduleParamName in params && 'enabled' in moduleParams)) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); - return; - } - - if (params[moduleParamName] === true) { - params[moduleParamName] = { - enabled: true - }; - } - - if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { - params[moduleParamName].enabled = true; - } - - if (!params[moduleParamName]) params[moduleParamName] = { - enabled: false - }; - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); - }; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/modules/observer/observer.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/modules/observer/observer.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Observer) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -function Observer({ - swiper, - extendParams, - on, - emit -}) { - const observers = []; - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - const attach = (target, options = {}) => { - const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; - const observer = new ObserverFunc(mutations => { - // The observerUpdate event should only be triggered - // once despite the number of mutations. Additional - // triggers are redundant and are very costly - if (mutations.length === 1) { - emit('observerUpdate', mutations[0]); - return; - } - - const observerUpdate = function observerUpdate() { - emit('observerUpdate', mutations[0]); - }; - - if (window.requestAnimationFrame) { - window.requestAnimationFrame(observerUpdate); - } else { - window.setTimeout(observerUpdate, 0); - } - }); - observer.observe(target, { - attributes: typeof options.attributes === 'undefined' ? true : options.attributes, - childList: typeof options.childList === 'undefined' ? true : options.childList, - characterData: typeof options.characterData === 'undefined' ? true : options.characterData - }); - observers.push(observer); - }; - - const init = () => { - if (!swiper.params.observer) return; - - if (swiper.params.observeParents) { - const containerParents = swiper.$el.parents(); - - for (let i = 0; i < containerParents.length; i += 1) { - attach(containerParents[i]); - } - } // Observe container - - - attach(swiper.$el[0], { - childList: swiper.params.observeSlideChildren - }); // Observe wrapper - - attach(swiper.$wrapperEl[0], { - attributes: false - }); - }; - - const destroy = () => { - observers.forEach(observer => { - observer.disconnect(); - }); - observers.splice(0, observers.length); - }; - - extendParams({ - observer: false, - observeParents: false, - observeSlideChildren: false - }); - on('init', init); - on('destroy', destroy); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/modules/resize/resize.js": -/*!***********************************************************!*\ - !*** ./node_modules/swiper/core/modules/resize/resize.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Resize) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -function Resize({ - swiper, - on, - emit -}) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let observer = null; - - const resizeHandler = () => { - if (!swiper || swiper.destroyed || !swiper.initialized) return; - emit('beforeResize'); - emit('resize'); - }; - - const createObserver = () => { - if (!swiper || swiper.destroyed || !swiper.initialized) return; - observer = new ResizeObserver(entries => { - const { - width, - height - } = swiper; - let newWidth = width; - let newHeight = height; - entries.forEach(({ - contentBoxSize, - contentRect, - target - }) => { - if (target && target !== swiper.el) return; - newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; - newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; - }); - - if (newWidth !== width || newHeight !== height) { - resizeHandler(); - } - }); - observer.observe(swiper.el); - }; - - const removeObserver = () => { - if (observer && observer.unobserve && swiper.el) { - observer.unobserve(swiper.el); - observer = null; - } - }; - - const orientationChangeHandler = () => { - if (!swiper || swiper.destroyed || !swiper.initialized) return; - emit('orientationchange'); - }; - - on('init', () => { - if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { - createObserver(); - return; - } - - window.addEventListener('resize', resizeHandler); - window.addEventListener('orientationchange', orientationChangeHandler); - }); - on('destroy', () => { - removeObserver(); - window.removeEventListener('resize', resizeHandler); - window.removeEventListener('orientationchange', orientationChangeHandler); - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/index.js": -/*!*************************************************!*\ - !*** ./node_modules/swiper/core/slide/index.js ***! - \*************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _slideTo_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slideTo.js */ "./node_modules/swiper/core/slide/slideTo.js"); -/* harmony import */ var _slideToLoop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slideToLoop.js */ "./node_modules/swiper/core/slide/slideToLoop.js"); -/* harmony import */ var _slideNext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slideNext.js */ "./node_modules/swiper/core/slide/slideNext.js"); -/* harmony import */ var _slidePrev_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slidePrev.js */ "./node_modules/swiper/core/slide/slidePrev.js"); -/* harmony import */ var _slideReset_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./slideReset.js */ "./node_modules/swiper/core/slide/slideReset.js"); -/* harmony import */ var _slideToClosest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./slideToClosest.js */ "./node_modules/swiper/core/slide/slideToClosest.js"); -/* harmony import */ var _slideToClickedSlide_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./slideToClickedSlide.js */ "./node_modules/swiper/core/slide/slideToClickedSlide.js"); - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - slideTo: _slideTo_js__WEBPACK_IMPORTED_MODULE_0__["default"], - slideToLoop: _slideToLoop_js__WEBPACK_IMPORTED_MODULE_1__["default"], - slideNext: _slideNext_js__WEBPACK_IMPORTED_MODULE_2__["default"], - slidePrev: _slidePrev_js__WEBPACK_IMPORTED_MODULE_3__["default"], - slideReset: _slideReset_js__WEBPACK_IMPORTED_MODULE_4__["default"], - slideToClosest: _slideToClosest_js__WEBPACK_IMPORTED_MODULE_5__["default"], - slideToClickedSlide: _slideToClickedSlide_js__WEBPACK_IMPORTED_MODULE_6__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideNext.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideNext.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideNext) -/* harmony export */ }); -/* eslint no-unused-vars: "off" */ -function slideNext(speed = this.params.speed, runCallbacks = true, internal) { - const swiper = this; - const { - animating, - enabled, - params - } = swiper; - if (!enabled) return swiper; - let perGroup = params.slidesPerGroup; - - if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { - perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); - } - - const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; - - if (params.loop) { - if (animating && params.loopPreventsSlide) return false; - swiper.loopFix(); // eslint-disable-next-line - - swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; - } - - if (params.rewind && swiper.isEnd) { - return swiper.slideTo(0, speed, runCallbacks, internal); - } - - return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slidePrev.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/slide/slidePrev.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slidePrev) -/* harmony export */ }); -/* eslint no-unused-vars: "off" */ -function slidePrev(speed = this.params.speed, runCallbacks = true, internal) { - const swiper = this; - const { - params, - animating, - snapGrid, - slidesGrid, - rtlTranslate, - enabled - } = swiper; - if (!enabled) return swiper; - - if (params.loop) { - if (animating && params.loopPreventsSlide) return false; - swiper.loopFix(); // eslint-disable-next-line - - swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; - } - - const translate = rtlTranslate ? swiper.translate : -swiper.translate; - - function normalize(val) { - if (val < 0) return -Math.floor(Math.abs(val)); - return Math.floor(val); - } - - const normalizedTranslate = normalize(translate); - const normalizedSnapGrid = snapGrid.map(val => normalize(val)); - let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; - - if (typeof prevSnap === 'undefined' && params.cssMode) { - let prevSnapIndex; - snapGrid.forEach((snap, snapIndex) => { - if (normalizedTranslate >= snap) { - // prevSnap = snap; - prevSnapIndex = snapIndex; - } - }); - - if (typeof prevSnapIndex !== 'undefined') { - prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; - } - } - - let prevIndex = 0; - - if (typeof prevSnap !== 'undefined') { - prevIndex = slidesGrid.indexOf(prevSnap); - if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; - - if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { - prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; - prevIndex = Math.max(prevIndex, 0); - } - } - - if (params.rewind && swiper.isBeginning) { - return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal); - } - - return swiper.slideTo(prevIndex, speed, runCallbacks, internal); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideReset.js": -/*!******************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideReset.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideReset) -/* harmony export */ }); -/* eslint no-unused-vars: "off" */ -function slideReset(speed = this.params.speed, runCallbacks = true, internal) { - const swiper = this; - return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideTo.js": -/*!***************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideTo.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideTo) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) { - if (typeof index !== 'number' && typeof index !== 'string') { - throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`); - } - - if (typeof index === 'string') { - /** - * The `index` argument converted from `string` to `number`. - * @type {number} - */ - const indexAsNumber = parseInt(index, 10); - /** - * Determines whether the `index` argument is a valid `number` - * after being converted from the `string` type. - * @type {boolean} - */ - - const isValidNumber = isFinite(indexAsNumber); - - if (!isValidNumber) { - throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`); - } // Knowing that the converted `index` is a valid number, - // we can update the original argument's value. - - - index = indexAsNumber; - } - - const swiper = this; - let slideIndex = index; - if (slideIndex < 0) slideIndex = 0; - const { - params, - snapGrid, - slidesGrid, - previousIndex, - activeIndex, - rtlTranslate: rtl, - wrapperEl, - enabled - } = swiper; - - if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { - return false; - } - - const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); - let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); - if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; - - if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { - swiper.emit('beforeSlideChangeStart'); - } - - const translate = -snapGrid[snapIndex]; // Update progress - - swiper.updateProgress(translate); // Normalize slideIndex - - if (params.normalizeSlideIndex) { - for (let i = 0; i < slidesGrid.length; i += 1) { - const normalizedTranslate = -Math.floor(translate * 100); - const normalizedGrid = Math.floor(slidesGrid[i] * 100); - const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); - - if (typeof slidesGrid[i + 1] !== 'undefined') { - if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { - slideIndex = i; - } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { - slideIndex = i + 1; - } - } else if (normalizedTranslate >= normalizedGrid) { - slideIndex = i; - } - } - } // Directions locks - - - if (swiper.initialized && slideIndex !== activeIndex) { - if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { - return false; - } - - if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { - if ((activeIndex || 0) !== slideIndex) return false; - } - } - - let direction; - if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index - - if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { - swiper.updateActiveIndex(slideIndex); // Update Height - - if (params.autoHeight) { - swiper.updateAutoHeight(); - } - - swiper.updateSlidesClasses(); - - if (params.effect !== 'slide') { - swiper.setTranslate(translate); - } - - if (direction !== 'reset') { - swiper.transitionStart(runCallbacks, direction); - swiper.transitionEnd(runCallbacks, direction); - } - - return false; - } - - if (params.cssMode) { - const isH = swiper.isHorizontal(); - const t = rtl ? translate : -translate; - - if (speed === 0) { - const isVirtual = swiper.virtual && swiper.params.virtual.enabled; - - if (isVirtual) { - swiper.wrapperEl.style.scrollSnapType = 'none'; - swiper._immediateVirtual = true; - } - - wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; - - if (isVirtual) { - requestAnimationFrame(() => { - swiper.wrapperEl.style.scrollSnapType = ''; - swiper._swiperImmediateVirtual = false; - }); - } - } else { - if (!swiper.support.smoothScroll) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.animateCSSModeScroll)({ - swiper, - targetPosition: t, - side: isH ? 'left' : 'top' - }); - return true; - } - - wrapperEl.scrollTo({ - [isH ? 'left' : 'top']: t, - behavior: 'smooth' - }); - } - - return true; - } - - swiper.setTransition(speed); - swiper.setTranslate(translate); - swiper.updateActiveIndex(slideIndex); - swiper.updateSlidesClasses(); - swiper.emit('beforeTransitionStart', speed, internal); - swiper.transitionStart(runCallbacks, direction); - - if (speed === 0) { - swiper.transitionEnd(runCallbacks, direction); - } else if (!swiper.animating) { - swiper.animating = true; - - if (!swiper.onSlideToWrapperTransitionEnd) { - swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { - if (!swiper || swiper.destroyed) return; - if (e.target !== this) return; - swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); - swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); - swiper.onSlideToWrapperTransitionEnd = null; - delete swiper.onSlideToWrapperTransitionEnd; - swiper.transitionEnd(runCallbacks, direction); - }; - } - - swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); - swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); - } - - return true; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideToClickedSlide.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideToClickedSlide.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideToClickedSlide) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - -function slideToClickedSlide() { - const swiper = this; - const { - params, - $wrapperEl - } = swiper; - const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; - let slideToIndex = swiper.clickedIndex; - let realIndex; - - if (params.loop) { - if (swiper.animating) return; - realIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); - - if (params.centeredSlides) { - if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { - swiper.loopFix(); - slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { - swiper.slideTo(slideToIndex); - }); - } else { - swiper.slideTo(slideToIndex); - } - } else if (slideToIndex > swiper.slides.length - slidesPerView) { - swiper.loopFix(); - slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { - swiper.slideTo(slideToIndex); - }); - } else { - swiper.slideTo(slideToIndex); - } - } else { - swiper.slideTo(slideToIndex); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideToClosest.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideToClosest.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideToClosest) -/* harmony export */ }); -/* eslint no-unused-vars: "off" */ -function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) { - const swiper = this; - let index = swiper.activeIndex; - const skip = Math.min(swiper.params.slidesPerGroupSkip, index); - const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); - const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; - - if (translate >= swiper.snapGrid[snapIndex]) { - // The current translate is on or after the current snap index, so the choice - // is between the current index and the one after it. - const currentSnap = swiper.snapGrid[snapIndex]; - const nextSnap = swiper.snapGrid[snapIndex + 1]; - - if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { - index += swiper.params.slidesPerGroup; - } - } else { - // The current translate is before the current snap index, so the choice - // is between the current index and the one before it. - const prevSnap = swiper.snapGrid[snapIndex - 1]; - const currentSnap = swiper.snapGrid[snapIndex]; - - if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { - index -= swiper.params.slidesPerGroup; - } - } - - index = Math.max(index, 0); - index = Math.min(index, swiper.slidesGrid.length - 1); - return swiper.slideTo(index, speed, runCallbacks, internal); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/slide/slideToLoop.js": -/*!*******************************************************!*\ - !*** ./node_modules/swiper/core/slide/slideToLoop.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ slideToLoop) -/* harmony export */ }); -function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) { - const swiper = this; - let newIndex = index; - - if (swiper.params.loop) { - newIndex += swiper.loopedSlides; - } - - return swiper.slideTo(newIndex, speed, runCallbacks, internal); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/transition/index.js": -/*!******************************************************!*\ - !*** ./node_modules/swiper/core/transition/index.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _setTransition_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setTransition.js */ "./node_modules/swiper/core/transition/setTransition.js"); -/* harmony import */ var _transitionStart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitionStart.js */ "./node_modules/swiper/core/transition/transitionStart.js"); -/* harmony import */ var _transitionEnd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transitionEnd.js */ "./node_modules/swiper/core/transition/transitionEnd.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - setTransition: _setTransition_js__WEBPACK_IMPORTED_MODULE_0__["default"], - transitionStart: _transitionStart_js__WEBPACK_IMPORTED_MODULE_1__["default"], - transitionEnd: _transitionEnd_js__WEBPACK_IMPORTED_MODULE_2__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/transition/setTransition.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/core/transition/setTransition.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setTransition) -/* harmony export */ }); -function setTransition(duration, byController) { - const swiper = this; - - if (!swiper.params.cssMode) { - swiper.$wrapperEl.transition(duration); - } - - swiper.emit('setTransition', duration, byController); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/transition/transitionEmit.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/transition/transitionEmit.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transitionEmit) -/* harmony export */ }); -function transitionEmit({ - swiper, - runCallbacks, - direction, - step -}) { - const { - activeIndex, - previousIndex - } = swiper; - let dir = direction; - - if (!dir) { - if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; - } - - swiper.emit(`transition${step}`); - - if (runCallbacks && activeIndex !== previousIndex) { - if (dir === 'reset') { - swiper.emit(`slideResetTransition${step}`); - return; - } - - swiper.emit(`slideChangeTransition${step}`); - - if (dir === 'next') { - swiper.emit(`slideNextTransition${step}`); - } else { - swiper.emit(`slidePrevTransition${step}`); - } - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/transition/transitionEnd.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/core/transition/transitionEnd.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transitionEnd) -/* harmony export */ }); -/* harmony import */ var _transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transitionEmit.js */ "./node_modules/swiper/core/transition/transitionEmit.js"); - -function transitionEnd(runCallbacks = true, direction) { - const swiper = this; - const { - params - } = swiper; - swiper.animating = false; - if (params.cssMode) return; - swiper.setTransition(0); - (0,_transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ - swiper, - runCallbacks, - direction, - step: 'End' - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/transition/transitionStart.js": -/*!****************************************************************!*\ - !*** ./node_modules/swiper/core/transition/transitionStart.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transitionStart) -/* harmony export */ }); -/* harmony import */ var _transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transitionEmit.js */ "./node_modules/swiper/core/transition/transitionEmit.js"); - -function transitionStart(runCallbacks = true, direction) { - const swiper = this; - const { - params - } = swiper; - if (params.cssMode) return; - - if (params.autoHeight) { - swiper.updateAutoHeight(); - } - - (0,_transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ - swiper, - runCallbacks, - direction, - step: 'Start' - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/getTranslate.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/core/translate/getTranslate.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getSwiperTranslate) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') { - const swiper = this; - const { - params, - rtlTranslate: rtl, - translate, - $wrapperEl - } = swiper; - - if (params.virtualTranslate) { - return rtl ? -translate : translate; - } - - if (params.cssMode) { - return translate; - } - - let currentTranslate = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.getTranslate)($wrapperEl[0], axis); - if (rtl) currentTranslate = -currentTranslate; - return currentTranslate || 0; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/core/translate/index.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _getTranslate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getTranslate.js */ "./node_modules/swiper/core/translate/getTranslate.js"); -/* harmony import */ var _setTranslate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setTranslate.js */ "./node_modules/swiper/core/translate/setTranslate.js"); -/* harmony import */ var _minTranslate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./minTranslate.js */ "./node_modules/swiper/core/translate/minTranslate.js"); -/* harmony import */ var _maxTranslate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./maxTranslate.js */ "./node_modules/swiper/core/translate/maxTranslate.js"); -/* harmony import */ var _translateTo_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./translateTo.js */ "./node_modules/swiper/core/translate/translateTo.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getTranslate: _getTranslate_js__WEBPACK_IMPORTED_MODULE_0__["default"], - setTranslate: _setTranslate_js__WEBPACK_IMPORTED_MODULE_1__["default"], - minTranslate: _minTranslate_js__WEBPACK_IMPORTED_MODULE_2__["default"], - maxTranslate: _maxTranslate_js__WEBPACK_IMPORTED_MODULE_3__["default"], - translateTo: _translateTo_js__WEBPACK_IMPORTED_MODULE_4__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/maxTranslate.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/core/translate/maxTranslate.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ maxTranslate) -/* harmony export */ }); -function maxTranslate() { - return -this.snapGrid[this.snapGrid.length - 1]; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/minTranslate.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/core/translate/minTranslate.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ minTranslate) -/* harmony export */ }); -function minTranslate() { - return -this.snapGrid[0]; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/setTranslate.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/core/translate/setTranslate.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setTranslate) -/* harmony export */ }); -function setTranslate(translate, byController) { - const swiper = this; - const { - rtlTranslate: rtl, - params, - $wrapperEl, - wrapperEl, - progress - } = swiper; - let x = 0; - let y = 0; - const z = 0; - - if (swiper.isHorizontal()) { - x = rtl ? -translate : translate; - } else { - y = translate; - } - - if (params.roundLengths) { - x = Math.floor(x); - y = Math.floor(y); - } - - if (params.cssMode) { - wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; - } else if (!params.virtualTranslate) { - $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); - } - - swiper.previousTranslate = swiper.translate; - swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress - - let newProgress; - const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); - - if (translatesDiff === 0) { - newProgress = 0; - } else { - newProgress = (translate - swiper.minTranslate()) / translatesDiff; - } - - if (newProgress !== progress) { - swiper.updateProgress(translate); - } - - swiper.emit('setTranslate', swiper.translate, byController); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/translate/translateTo.js": -/*!***********************************************************!*\ - !*** ./node_modules/swiper/core/translate/translateTo.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ translateTo) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) { - const swiper = this; - const { - params, - wrapperEl - } = swiper; - - if (swiper.animating && params.preventInteractionOnTransition) { - return false; - } - - const minTranslate = swiper.minTranslate(); - const maxTranslate = swiper.maxTranslate(); - let newTranslate; - if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress - - swiper.updateProgress(newTranslate); - - if (params.cssMode) { - const isH = swiper.isHorizontal(); - - if (speed === 0) { - wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; - } else { - if (!swiper.support.smoothScroll) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.animateCSSModeScroll)({ - swiper, - targetPosition: -newTranslate, - side: isH ? 'left' : 'top' - }); - return true; - } - - wrapperEl.scrollTo({ - [isH ? 'left' : 'top']: -newTranslate, - behavior: 'smooth' - }); - } - - return true; - } - - if (speed === 0) { - swiper.setTransition(0); - swiper.setTranslate(newTranslate); - - if (runCallbacks) { - swiper.emit('beforeTransitionStart', speed, internal); - swiper.emit('transitionEnd'); - } - } else { - swiper.setTransition(speed); - swiper.setTranslate(newTranslate); - - if (runCallbacks) { - swiper.emit('beforeTransitionStart', speed, internal); - swiper.emit('transitionStart'); - } - - if (!swiper.animating) { - swiper.animating = true; - - if (!swiper.onTranslateToWrapperTransitionEnd) { - swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { - if (!swiper || swiper.destroyed) return; - if (e.target !== this) return; - swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); - swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); - swiper.onTranslateToWrapperTransitionEnd = null; - delete swiper.onTranslateToWrapperTransitionEnd; - - if (runCallbacks) { - swiper.emit('transitionEnd'); - } - }; - } - - swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); - swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); - } - } - - return true; -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/index.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/core/update/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _updateSize_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./updateSize.js */ "./node_modules/swiper/core/update/updateSize.js"); -/* harmony import */ var _updateSlides_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./updateSlides.js */ "./node_modules/swiper/core/update/updateSlides.js"); -/* harmony import */ var _updateAutoHeight_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./updateAutoHeight.js */ "./node_modules/swiper/core/update/updateAutoHeight.js"); -/* harmony import */ var _updateSlidesOffset_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./updateSlidesOffset.js */ "./node_modules/swiper/core/update/updateSlidesOffset.js"); -/* harmony import */ var _updateSlidesProgress_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./updateSlidesProgress.js */ "./node_modules/swiper/core/update/updateSlidesProgress.js"); -/* harmony import */ var _updateProgress_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./updateProgress.js */ "./node_modules/swiper/core/update/updateProgress.js"); -/* harmony import */ var _updateSlidesClasses_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./updateSlidesClasses.js */ "./node_modules/swiper/core/update/updateSlidesClasses.js"); -/* harmony import */ var _updateActiveIndex_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./updateActiveIndex.js */ "./node_modules/swiper/core/update/updateActiveIndex.js"); -/* harmony import */ var _updateClickedSlide_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./updateClickedSlide.js */ "./node_modules/swiper/core/update/updateClickedSlide.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - updateSize: _updateSize_js__WEBPACK_IMPORTED_MODULE_0__["default"], - updateSlides: _updateSlides_js__WEBPACK_IMPORTED_MODULE_1__["default"], - updateAutoHeight: _updateAutoHeight_js__WEBPACK_IMPORTED_MODULE_2__["default"], - updateSlidesOffset: _updateSlidesOffset_js__WEBPACK_IMPORTED_MODULE_3__["default"], - updateSlidesProgress: _updateSlidesProgress_js__WEBPACK_IMPORTED_MODULE_4__["default"], - updateProgress: _updateProgress_js__WEBPACK_IMPORTED_MODULE_5__["default"], - updateSlidesClasses: _updateSlidesClasses_js__WEBPACK_IMPORTED_MODULE_6__["default"], - updateActiveIndex: _updateActiveIndex_js__WEBPACK_IMPORTED_MODULE_7__["default"], - updateClickedSlide: _updateClickedSlide_js__WEBPACK_IMPORTED_MODULE_8__["default"] -}); - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateActiveIndex.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateActiveIndex.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateActiveIndex) -/* harmony export */ }); -function updateActiveIndex(newActiveIndex) { - const swiper = this; - const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; - const { - slidesGrid, - snapGrid, - params, - activeIndex: previousIndex, - realIndex: previousRealIndex, - snapIndex: previousSnapIndex - } = swiper; - let activeIndex = newActiveIndex; - let snapIndex; - - if (typeof activeIndex === 'undefined') { - for (let i = 0; i < slidesGrid.length; i += 1) { - if (typeof slidesGrid[i + 1] !== 'undefined') { - if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { - activeIndex = i; - } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { - activeIndex = i + 1; - } - } else if (translate >= slidesGrid[i]) { - activeIndex = i; - } - } // Normalize slideIndex - - - if (params.normalizeSlideIndex) { - if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; - } - } - - if (snapGrid.indexOf(translate) >= 0) { - snapIndex = snapGrid.indexOf(translate); - } else { - const skip = Math.min(params.slidesPerGroupSkip, activeIndex); - snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); - } - - if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; - - if (activeIndex === previousIndex) { - if (snapIndex !== previousSnapIndex) { - swiper.snapIndex = snapIndex; - swiper.emit('snapIndexChange'); - } - - return; - } // Get real index - - - const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); - Object.assign(swiper, { - snapIndex, - realIndex, - previousIndex, - activeIndex - }); - swiper.emit('activeIndexChange'); - swiper.emit('snapIndexChange'); - - if (previousRealIndex !== realIndex) { - swiper.emit('realIndexChange'); - } - - if (swiper.initialized || swiper.params.runCallbacksOnInit) { - swiper.emit('slideChange'); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateAutoHeight.js": -/*!*************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateAutoHeight.js ***! - \*************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateAutoHeight) -/* harmony export */ }); -function updateAutoHeight(speed) { - const swiper = this; - const activeSlides = []; - const isVirtual = swiper.virtual && swiper.params.virtual.enabled; - let newHeight = 0; - let i; - - if (typeof speed === 'number') { - swiper.setTransition(speed); - } else if (speed === true) { - swiper.setTransition(swiper.params.speed); - } - - const getSlideByIndex = index => { - if (isVirtual) { - return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0]; - } - - return swiper.slides.eq(index)[0]; - }; // Find slides currently in view - - - if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { - if (swiper.params.centeredSlides) { - swiper.visibleSlides.each(slide => { - activeSlides.push(slide); - }); - } else { - for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { - const index = swiper.activeIndex + i; - if (index > swiper.slides.length && !isVirtual) break; - activeSlides.push(getSlideByIndex(index)); - } - } - } else { - activeSlides.push(getSlideByIndex(swiper.activeIndex)); - } // Find new height from highest slide in view - - - for (i = 0; i < activeSlides.length; i += 1) { - if (typeof activeSlides[i] !== 'undefined') { - const height = activeSlides[i].offsetHeight; - newHeight = height > newHeight ? height : newHeight; - } - } // Update Height - - - if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateClickedSlide.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateClickedSlide.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateClickedSlide) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - -function updateClickedSlide(e) { - const swiper = this; - const params = swiper.params; - const slide = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e).closest(`.${params.slideClass}`)[0]; - let slideFound = false; - let slideIndex; - - if (slide) { - for (let i = 0; i < swiper.slides.length; i += 1) { - if (swiper.slides[i] === slide) { - slideFound = true; - slideIndex = i; - break; - } - } - } - - if (slide && slideFound) { - swiper.clickedSlide = slide; - - if (swiper.virtual && swiper.params.virtual.enabled) { - swiper.clickedIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(slide).attr('data-swiper-slide-index'), 10); - } else { - swiper.clickedIndex = slideIndex; - } - } else { - swiper.clickedSlide = undefined; - swiper.clickedIndex = undefined; - return; - } - - if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { - swiper.slideToClickedSlide(); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateProgress.js": -/*!***********************************************************!*\ - !*** ./node_modules/swiper/core/update/updateProgress.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateProgress) -/* harmony export */ }); -function updateProgress(translate) { - const swiper = this; - - if (typeof translate === 'undefined') { - const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line - - translate = swiper && swiper.translate && swiper.translate * multiplier || 0; - } - - const params = swiper.params; - const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); - let { - progress, - isBeginning, - isEnd - } = swiper; - const wasBeginning = isBeginning; - const wasEnd = isEnd; - - if (translatesDiff === 0) { - progress = 0; - isBeginning = true; - isEnd = true; - } else { - progress = (translate - swiper.minTranslate()) / translatesDiff; - isBeginning = progress <= 0; - isEnd = progress >= 1; - } - - Object.assign(swiper, { - progress, - isBeginning, - isEnd - }); - if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); - - if (isBeginning && !wasBeginning) { - swiper.emit('reachBeginning toEdge'); - } - - if (isEnd && !wasEnd) { - swiper.emit('reachEnd toEdge'); - } - - if (wasBeginning && !isBeginning || wasEnd && !isEnd) { - swiper.emit('fromEdge'); - } - - swiper.emit('progress', progress); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateSize.js": -/*!*******************************************************!*\ - !*** ./node_modules/swiper/core/update/updateSize.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateSize) -/* harmony export */ }); -function updateSize() { - const swiper = this; - let width; - let height; - const $el = swiper.$el; - - if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { - width = swiper.params.width; - } else { - width = $el[0].clientWidth; - } - - if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { - height = swiper.params.height; - } else { - height = $el[0].clientHeight; - } - - if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { - return; - } // Subtract paddings - - - width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10); - height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10); - if (Number.isNaN(width)) width = 0; - if (Number.isNaN(height)) height = 0; - Object.assign(swiper, { - width, - height, - size: swiper.isHorizontal() ? width : height - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateSlides.js": -/*!*********************************************************!*\ - !*** ./node_modules/swiper/core/update/updateSlides.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateSlides) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function updateSlides() { - const swiper = this; - - function getDirectionLabel(property) { - if (swiper.isHorizontal()) { - return property; - } // prettier-ignore - - - return { - 'width': 'height', - 'margin-top': 'margin-left', - 'margin-bottom ': 'margin-right', - 'margin-left': 'margin-top', - 'margin-right': 'margin-bottom', - 'padding-left': 'padding-top', - 'padding-right': 'padding-bottom', - 'marginRight': 'marginBottom' - }[property]; - } - - function getDirectionPropertyValue(node, label) { - return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); - } - - const params = swiper.params; - const { - $wrapperEl, - size: swiperSize, - rtlTranslate: rtl, - wrongRTL - } = swiper; - const isVirtual = swiper.virtual && params.virtual.enabled; - const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; - const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); - const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; - let snapGrid = []; - const slidesGrid = []; - const slidesSizesGrid = []; - let offsetBefore = params.slidesOffsetBefore; - - if (typeof offsetBefore === 'function') { - offsetBefore = params.slidesOffsetBefore.call(swiper); - } - - let offsetAfter = params.slidesOffsetAfter; - - if (typeof offsetAfter === 'function') { - offsetAfter = params.slidesOffsetAfter.call(swiper); - } - - const previousSnapGridLength = swiper.snapGrid.length; - const previousSlidesGridLength = swiper.slidesGrid.length; - let spaceBetween = params.spaceBetween; - let slidePosition = -offsetBefore; - let prevSlideSize = 0; - let index = 0; - - if (typeof swiperSize === 'undefined') { - return; - } - - if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { - spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; - } - - swiper.virtualSize = -spaceBetween; // reset margins - - if (rtl) slides.css({ - marginLeft: '', - marginBottom: '', - marginTop: '' - });else slides.css({ - marginRight: '', - marginBottom: '', - marginTop: '' - }); // reset cssMode offsets - - if (params.centeredSlides && params.cssMode) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-before', ''); - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-after', ''); - } - - const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; - - if (gridEnabled) { - swiper.grid.initSlides(slidesLength); - } // Calc slides - - - let slideSize; - const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { - return typeof params.breakpoints[key].slidesPerView !== 'undefined'; - }).length > 0; - - for (let i = 0; i < slidesLength; i += 1) { - slideSize = 0; - const slide = slides.eq(i); - - if (gridEnabled) { - swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); - } - - if (slide.css('display') === 'none') continue; // eslint-disable-line - - if (params.slidesPerView === 'auto') { - if (shouldResetSlideSize) { - slides[i].style[getDirectionLabel('width')] = ``; - } - - const slideStyles = getComputedStyle(slide[0]); - const currentTransform = slide[0].style.transform; - const currentWebKitTransform = slide[0].style.webkitTransform; - - if (currentTransform) { - slide[0].style.transform = 'none'; - } - - if (currentWebKitTransform) { - slide[0].style.webkitTransform = 'none'; - } - - if (params.roundLengths) { - slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); - } else { - // eslint-disable-next-line - const width = getDirectionPropertyValue(slideStyles, 'width'); - const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); - const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); - const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); - const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); - const boxSizing = slideStyles.getPropertyValue('box-sizing'); - - if (boxSizing && boxSizing === 'border-box') { - slideSize = width + marginLeft + marginRight; - } else { - const { - clientWidth, - offsetWidth - } = slide[0]; - slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); - } - } - - if (currentTransform) { - slide[0].style.transform = currentTransform; - } - - if (currentWebKitTransform) { - slide[0].style.webkitTransform = currentWebKitTransform; - } - - if (params.roundLengths) slideSize = Math.floor(slideSize); - } else { - slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; - if (params.roundLengths) slideSize = Math.floor(slideSize); - - if (slides[i]) { - slides[i].style[getDirectionLabel('width')] = `${slideSize}px`; - } - } - - if (slides[i]) { - slides[i].swiperSlideSize = slideSize; - } - - slidesSizesGrid.push(slideSize); - - if (params.centeredSlides) { - slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; - if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; - if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; - if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; - if (params.roundLengths) slidePosition = Math.floor(slidePosition); - if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); - slidesGrid.push(slidePosition); - } else { - if (params.roundLengths) slidePosition = Math.floor(slidePosition); - if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); - slidesGrid.push(slidePosition); - slidePosition = slidePosition + slideSize + spaceBetween; - } - - swiper.virtualSize += slideSize + spaceBetween; - prevSlideSize = slideSize; - index += 1; - } - - swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; - - if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { - $wrapperEl.css({ - width: `${swiper.virtualSize + params.spaceBetween}px` - }); - } - - if (params.setWrapperSize) { - $wrapperEl.css({ - [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px` - }); - } - - if (gridEnabled) { - swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); - } // Remove last grid elements depending on width - - - if (!params.centeredSlides) { - const newSlidesGrid = []; - - for (let i = 0; i < snapGrid.length; i += 1) { - let slidesGridItem = snapGrid[i]; - if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); - - if (snapGrid[i] <= swiper.virtualSize - swiperSize) { - newSlidesGrid.push(slidesGridItem); - } - } - - snapGrid = newSlidesGrid; - - if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { - snapGrid.push(swiper.virtualSize - swiperSize); - } - } - - if (snapGrid.length === 0) snapGrid = [0]; - - if (params.spaceBetween !== 0) { - const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight'); - slides.filter((_, slideIndex) => { - if (!params.cssMode) return true; - - if (slideIndex === slides.length - 1) { - return false; - } - - return true; - }).css({ - [key]: `${spaceBetween}px` - }); - } - - if (params.centeredSlides && params.centeredSlidesBounds) { - let allSlidesSize = 0; - slidesSizesGrid.forEach(slideSizeValue => { - allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); - }); - allSlidesSize -= params.spaceBetween; - const maxSnap = allSlidesSize - swiperSize; - snapGrid = snapGrid.map(snap => { - if (snap < 0) return -offsetBefore; - if (snap > maxSnap) return maxSnap + offsetAfter; - return snap; - }); - } - - if (params.centerInsufficientSlides) { - let allSlidesSize = 0; - slidesSizesGrid.forEach(slideSizeValue => { - allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); - }); - allSlidesSize -= params.spaceBetween; - - if (allSlidesSize < swiperSize) { - const allSlidesOffset = (swiperSize - allSlidesSize) / 2; - snapGrid.forEach((snap, snapIndex) => { - snapGrid[snapIndex] = snap - allSlidesOffset; - }); - slidesGrid.forEach((snap, snapIndex) => { - slidesGrid[snapIndex] = snap + allSlidesOffset; - }); - } - } - - Object.assign(swiper, { - slides, - snapGrid, - slidesGrid, - slidesSizesGrid - }); - - if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); - const addToSnapGrid = -swiper.snapGrid[0]; - const addToSlidesGrid = -swiper.slidesGrid[0]; - swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); - swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); - } - - if (slidesLength !== previousSlidesLength) { - swiper.emit('slidesLengthChange'); - } - - if (snapGrid.length !== previousSnapGridLength) { - if (swiper.params.watchOverflow) swiper.checkOverflow(); - swiper.emit('snapGridLengthChange'); - } - - if (slidesGrid.length !== previousSlidesGridLength) { - swiper.emit('slidesGridLengthChange'); - } - - if (params.watchSlidesProgress) { - swiper.updateSlidesOffset(); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateSlidesClasses.js": -/*!****************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateSlidesClasses.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateSlidesClasses) -/* harmony export */ }); -function updateSlidesClasses() { - const swiper = this; - const { - slides, - params, - $wrapperEl, - activeIndex, - realIndex - } = swiper; - const isVirtual = swiper.virtual && params.virtual.enabled; - slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); - let activeSlide; - - if (isVirtual) { - activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); - } else { - activeSlide = slides.eq(activeIndex); - } // Active classes - - - activeSlide.addClass(params.slideActiveClass); - - if (params.loop) { - // Duplicate to all looped slides - if (activeSlide.hasClass(params.slideDuplicateClass)) { - $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); - } else { - $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); - } - } // Next Slide - - - let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); - - if (params.loop && nextSlide.length === 0) { - nextSlide = slides.eq(0); - nextSlide.addClass(params.slideNextClass); - } // Prev Slide - - - let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); - - if (params.loop && prevSlide.length === 0) { - prevSlide = slides.eq(-1); - prevSlide.addClass(params.slidePrevClass); - } - - if (params.loop) { - // Duplicate to all looped slides - if (nextSlide.hasClass(params.slideDuplicateClass)) { - $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); - } else { - $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); - } - - if (prevSlide.hasClass(params.slideDuplicateClass)) { - $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); - } else { - $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); - } - } - - swiper.emitSlidesClasses(); -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateSlidesOffset.js": -/*!***************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateSlidesOffset.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateSlidesOffset) -/* harmony export */ }); -function updateSlidesOffset() { - const swiper = this; - const slides = swiper.slides; - - for (let i = 0; i < slides.length; i += 1) { - slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; - } -} - -/***/ }), - -/***/ "./node_modules/swiper/core/update/updateSlidesProgress.js": -/*!*****************************************************************!*\ - !*** ./node_modules/swiper/core/update/updateSlidesProgress.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updateSlidesProgress) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - -function updateSlidesProgress(translate = this && this.translate || 0) { - const swiper = this; - const params = swiper.params; - const { - slides, - rtlTranslate: rtl, - snapGrid - } = swiper; - if (slides.length === 0) return; - if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); - let offsetCenter = -translate; - if (rtl) offsetCenter = translate; // Visible Slides - - slides.removeClass(params.slideVisibleClass); - swiper.visibleSlidesIndexes = []; - swiper.visibleSlides = []; - - for (let i = 0; i < slides.length; i += 1) { - const slide = slides[i]; - let slideOffset = slide.swiperSlideOffset; - - if (params.cssMode && params.centeredSlides) { - slideOffset -= slides[0].swiperSlideOffset; - } - - const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); - const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); - const slideBefore = -(offsetCenter - slideOffset); - const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; - const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; - - if (isVisible) { - swiper.visibleSlides.push(slide); - swiper.visibleSlidesIndexes.push(i); - slides.eq(i).addClass(params.slideVisibleClass); - } - - slide.progress = rtl ? -slideProgress : slideProgress; - slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; - } - - swiper.visibleSlides = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.visibleSlides); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/a11y/a11y.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/modules/a11y/a11y.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ A11y) -/* harmony export */ }); -/* harmony import */ var _shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/classes-to-selector.js */ "./node_modules/swiper/shared/classes-to-selector.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function A11y({ - swiper, - extendParams, - on -}) { - extendParams({ - a11y: { - enabled: true, - notificationClass: 'swiper-notification', - prevSlideMessage: 'Previous slide', - nextSlideMessage: 'Next slide', - firstSlideMessage: 'This is the first slide', - lastSlideMessage: 'This is the last slide', - paginationBulletMessage: 'Go to slide {{index}}', - slideLabelMessage: '{{index}} / {{slidesLength}}', - containerMessage: null, - containerRoleDescriptionMessage: null, - itemRoleDescriptionMessage: null, - slideRole: 'group' - } - }); - let liveRegion = null; - - function notify(message) { - const notification = liveRegion; - if (notification.length === 0) return; - notification.html(''); - notification.html(message); - } - - function getRandomNumber(size = 16) { - const randomChar = () => Math.round(16 * Math.random()).toString(16); - - return 'x'.repeat(size).replace(/x/g, randomChar); - } - - function makeElFocusable($el) { - $el.attr('tabIndex', '0'); - } - - function makeElNotFocusable($el) { - $el.attr('tabIndex', '-1'); - } - - function addElRole($el, role) { - $el.attr('role', role); - } - - function addElRoleDescription($el, description) { - $el.attr('aria-roledescription', description); - } - - function addElControls($el, controls) { - $el.attr('aria-controls', controls); - } - - function addElLabel($el, label) { - $el.attr('aria-label', label); - } - - function addElId($el, id) { - $el.attr('id', id); - } - - function addElLive($el, live) { - $el.attr('aria-live', live); - } - - function disableEl($el) { - $el.attr('aria-disabled', true); - } - - function enableEl($el) { - $el.attr('aria-disabled', false); - } - - function onEnterOrSpaceKey(e) { - if (e.keyCode !== 13 && e.keyCode !== 32) return; - const params = swiper.params.a11y; - const $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target); - - if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { - if (!(swiper.isEnd && !swiper.params.loop)) { - swiper.slideNext(); - } - - if (swiper.isEnd) { - notify(params.lastSlideMessage); - } else { - notify(params.nextSlideMessage); - } - } - - if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { - if (!(swiper.isBeginning && !swiper.params.loop)) { - swiper.slidePrev(); - } - - if (swiper.isBeginning) { - notify(params.firstSlideMessage); - } else { - notify(params.prevSlideMessage); - } - } - - if (swiper.pagination && $targetEl.is((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass))) { - $targetEl[0].click(); - } - } - - function updateNavigation() { - if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; - const { - $nextEl, - $prevEl - } = swiper.navigation; - - if ($prevEl && $prevEl.length > 0) { - if (swiper.isBeginning) { - disableEl($prevEl); - makeElNotFocusable($prevEl); - } else { - enableEl($prevEl); - makeElFocusable($prevEl); - } - } - - if ($nextEl && $nextEl.length > 0) { - if (swiper.isEnd) { - disableEl($nextEl); - makeElNotFocusable($nextEl); - } else { - enableEl($nextEl); - makeElFocusable($nextEl); - } - } - } - - function hasPagination() { - return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; - } - - function hasClickablePagination() { - return hasPagination() && swiper.params.pagination.clickable; - } - - function updatePagination() { - const params = swiper.params.a11y; - if (!hasPagination()) return; - swiper.pagination.bullets.each(bulletEl => { - const $bulletEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(bulletEl); - - if (swiper.params.pagination.clickable) { - makeElFocusable($bulletEl); - - if (!swiper.params.pagination.renderBullet) { - addElRole($bulletEl, 'button'); - addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1)); - } - } - - if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) { - $bulletEl.attr('aria-current', 'true'); - } else { - $bulletEl.removeAttr('aria-current'); - } - }); - } - - const initNavEl = ($el, wrapperId, message) => { - makeElFocusable($el); - - if ($el[0].tagName !== 'BUTTON') { - addElRole($el, 'button'); - $el.on('keydown', onEnterOrSpaceKey); - } - - addElLabel($el, message); - addElControls($el, wrapperId); - }; - - function init() { - const params = swiper.params.a11y; - swiper.$el.append(liveRegion); // Container - - const $containerEl = swiper.$el; - - if (params.containerRoleDescriptionMessage) { - addElRoleDescription($containerEl, params.containerRoleDescriptionMessage); - } - - if (params.containerMessage) { - addElLabel($containerEl, params.containerMessage); - } // Wrapper - - - const $wrapperEl = swiper.$wrapperEl; - const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`; - const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; - addElId($wrapperEl, wrapperId); - addElLive($wrapperEl, live); // Slide - - if (params.itemRoleDescriptionMessage) { - addElRoleDescription((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.slides), params.itemRoleDescriptionMessage); - } - - addElRole((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.slides), params.slideRole); - const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length; - swiper.slides.each((slideEl, index) => { - const $slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl); - const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index; - const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); - addElLabel($slideEl, ariaLabelMessage); - }); // Navigation - - let $nextEl; - let $prevEl; - - if (swiper.navigation && swiper.navigation.$nextEl) { - $nextEl = swiper.navigation.$nextEl; - } - - if (swiper.navigation && swiper.navigation.$prevEl) { - $prevEl = swiper.navigation.$prevEl; - } - - if ($nextEl && $nextEl.length) { - initNavEl($nextEl, wrapperId, params.nextSlideMessage); - } - - if ($prevEl && $prevEl.length) { - initNavEl($prevEl, wrapperId, params.prevSlideMessage); - } // Pagination - - - if (hasClickablePagination()) { - swiper.pagination.$el.on('keydown', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); - } - } - - function destroy() { - if (liveRegion && liveRegion.length > 0) liveRegion.remove(); - let $nextEl; - let $prevEl; - - if (swiper.navigation && swiper.navigation.$nextEl) { - $nextEl = swiper.navigation.$nextEl; - } - - if (swiper.navigation && swiper.navigation.$prevEl) { - $prevEl = swiper.navigation.$prevEl; - } - - if ($nextEl) { - $nextEl.off('keydown', onEnterOrSpaceKey); - } - - if ($prevEl) { - $prevEl.off('keydown', onEnterOrSpaceKey); - } // Pagination - - - if (hasClickablePagination()) { - swiper.pagination.$el.off('keydown', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); - } - } - - on('beforeInit', () => { - liveRegion = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(``); - }); - on('afterInit', () => { - if (!swiper.params.a11y.enabled) return; - init(); - updateNavigation(); - }); - on('toEdge', () => { - if (!swiper.params.a11y.enabled) return; - updateNavigation(); - }); - on('fromEdge', () => { - if (!swiper.params.a11y.enabled) return; - updateNavigation(); - }); - on('paginationUpdate', () => { - if (!swiper.params.a11y.enabled) return; - updatePagination(); - }); - on('destroy', () => { - if (!swiper.params.a11y.enabled) return; - destroy(); - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/autoplay/autoplay.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/modules/autoplay/autoplay.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Autoplay) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* eslint no-underscore-dangle: "off" */ - -/* eslint no-use-before-define: "off" */ - - -function Autoplay({ - swiper, - extendParams, - on, - emit -}) { - let timeout; - swiper.autoplay = { - running: false, - paused: false - }; - extendParams({ - autoplay: { - enabled: false, - delay: 3000, - waitForTransition: true, - disableOnInteraction: true, - stopOnLastSlide: false, - reverseDirection: false, - pauseOnMouseEnter: false - } - }); - - function run() { - const $activeSlideEl = swiper.slides.eq(swiper.activeIndex); - let delay = swiper.params.autoplay.delay; - - if ($activeSlideEl.attr('data-swiper-autoplay')) { - delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; - } - - clearTimeout(timeout); - timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { - let autoplayResult; - - if (swiper.params.autoplay.reverseDirection) { - if (swiper.params.loop) { - swiper.loopFix(); - autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); - emit('autoplay'); - } else if (!swiper.isBeginning) { - autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); - emit('autoplay'); - } else if (!swiper.params.autoplay.stopOnLastSlide) { - autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); - emit('autoplay'); - } else { - stop(); - } - } else if (swiper.params.loop) { - swiper.loopFix(); - autoplayResult = swiper.slideNext(swiper.params.speed, true, true); - emit('autoplay'); - } else if (!swiper.isEnd) { - autoplayResult = swiper.slideNext(swiper.params.speed, true, true); - emit('autoplay'); - } else if (!swiper.params.autoplay.stopOnLastSlide) { - autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true); - emit('autoplay'); - } else { - stop(); - } - - if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) { - run(); - } - }, delay); - } - - function start() { - if (typeof timeout !== 'undefined') return false; - if (swiper.autoplay.running) return false; - swiper.autoplay.running = true; - emit('autoplayStart'); - run(); - return true; - } - - function stop() { - if (!swiper.autoplay.running) return false; - if (typeof timeout === 'undefined') return false; - - if (timeout) { - clearTimeout(timeout); - timeout = undefined; - } - - swiper.autoplay.running = false; - emit('autoplayStop'); - return true; - } - - function pause(speed) { - if (!swiper.autoplay.running) return; - if (swiper.autoplay.paused) return; - if (timeout) clearTimeout(timeout); - swiper.autoplay.paused = true; - - if (speed === 0 || !swiper.params.autoplay.waitForTransition) { - swiper.autoplay.paused = false; - run(); - } else { - ['transitionend', 'webkitTransitionEnd'].forEach(event => { - swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd); - }); - } - } - - function onVisibilityChange() { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - - if (document.visibilityState === 'hidden' && swiper.autoplay.running) { - pause(); - } - - if (document.visibilityState === 'visible' && swiper.autoplay.paused) { - run(); - swiper.autoplay.paused = false; - } - } - - function onTransitionEnd(e) { - if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; - if (e.target !== swiper.$wrapperEl[0]) return; - ['transitionend', 'webkitTransitionEnd'].forEach(event => { - swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); - }); - swiper.autoplay.paused = false; - - if (!swiper.autoplay.running) { - stop(); - } else { - run(); - } - } - - function onMouseEnter() { - if (swiper.params.autoplay.disableOnInteraction) { - stop(); - } else { - pause(); - } - - ['transitionend', 'webkitTransitionEnd'].forEach(event => { - swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); - }); - } - - function onMouseLeave() { - if (swiper.params.autoplay.disableOnInteraction) { - return; - } - - swiper.autoplay.paused = false; - run(); - } - - function attachMouseEvents() { - if (swiper.params.autoplay.pauseOnMouseEnter) { - swiper.$el.on('mouseenter', onMouseEnter); - swiper.$el.on('mouseleave', onMouseLeave); - } - } - - function detachMouseEvents() { - swiper.$el.off('mouseenter', onMouseEnter); - swiper.$el.off('mouseleave', onMouseLeave); - } - - on('init', () => { - if (swiper.params.autoplay.enabled) { - start(); - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - document.addEventListener('visibilitychange', onVisibilityChange); - attachMouseEvents(); - } - }); - on('beforeTransitionStart', (_s, speed, internal) => { - if (swiper.autoplay.running) { - if (internal || !swiper.params.autoplay.disableOnInteraction) { - swiper.autoplay.pause(speed); - } else { - stop(); - } - } - }); - on('sliderFirstMove', () => { - if (swiper.autoplay.running) { - if (swiper.params.autoplay.disableOnInteraction) { - stop(); - } else { - pause(); - } - } - }); - on('touchEnd', () => { - if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { - run(); - } - }); - on('destroy', () => { - detachMouseEvents(); - - if (swiper.autoplay.running) { - stop(); - } - - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - document.removeEventListener('visibilitychange', onVisibilityChange); - }); - Object.assign(swiper.autoplay, { - pause, - run, - start, - stop - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/controller/controller.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/modules/controller/controller.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Controller) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* eslint no-bitwise: ["error", { "allow": [">>"] }] */ - -function Controller({ - swiper, - extendParams, - on -}) { - extendParams({ - controller: { - control: undefined, - inverse: false, - by: 'slide' // or 'container' - - } - }); - swiper.controller = { - control: undefined - }; - - function LinearSpline(x, y) { - const binarySearch = function search() { - let maxIndex; - let minIndex; - let guess; - return (array, val) => { - minIndex = -1; - maxIndex = array.length; - - while (maxIndex - minIndex > 1) { - guess = maxIndex + minIndex >> 1; - - if (array[guess] <= val) { - minIndex = guess; - } else { - maxIndex = guess; - } - } - - return maxIndex; - }; - }(); - - this.x = x; - this.y = y; - this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value: - // (x1,y1) is the known point before given value, - // (x3,y3) is the known point after given value. - - let i1; - let i3; - - this.interpolate = function interpolate(x2) { - if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2): - - i3 = binarySearch(this.x, x2); - i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already: - // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 - - return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; - }; - - return this; - } // xxx: for now i will just save one spline function to to - - - function getInterpolateFunction(c) { - if (!swiper.controller.spline) { - swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); - } - } - - function setTranslate(_t, byController) { - const controlled = swiper.controller.control; - let multiplier; - let controlledTranslate; - const Swiper = swiper.constructor; - - function setControlledTranslate(c) { - // this will create an Interpolate function based on the snapGrids - // x is the Grid of the scrolled scroller and y will be the controlled scroller - // it makes sense to create this only once and recall it for the interpolation - // the function does a lot of value caching for performance - const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; - - if (swiper.params.controller.by === 'slide') { - getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid - // but it did not work out - - controlledTranslate = -swiper.controller.spline.interpolate(-translate); - } - - if (!controlledTranslate || swiper.params.controller.by === 'container') { - multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); - controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); - } - - if (swiper.params.controller.inverse) { - controlledTranslate = c.maxTranslate() - controlledTranslate; - } - - c.updateProgress(controlledTranslate); - c.setTranslate(controlledTranslate, swiper); - c.updateActiveIndex(); - c.updateSlidesClasses(); - } - - if (Array.isArray(controlled)) { - for (let i = 0; i < controlled.length; i += 1) { - if (controlled[i] !== byController && controlled[i] instanceof Swiper) { - setControlledTranslate(controlled[i]); - } - } - } else if (controlled instanceof Swiper && byController !== controlled) { - setControlledTranslate(controlled); - } - } - - function setTransition(duration, byController) { - const Swiper = swiper.constructor; - const controlled = swiper.controller.control; - let i; - - function setControlledTransition(c) { - c.setTransition(duration, swiper); - - if (duration !== 0) { - c.transitionStart(); - - if (c.params.autoHeight) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { - c.updateAutoHeight(); - }); - } - - c.$wrapperEl.transitionEnd(() => { - if (!controlled) return; - - if (c.params.loop && swiper.params.controller.by === 'slide') { - c.loopFix(); - } - - c.transitionEnd(); - }); - } - } - - if (Array.isArray(controlled)) { - for (i = 0; i < controlled.length; i += 1) { - if (controlled[i] !== byController && controlled[i] instanceof Swiper) { - setControlledTransition(controlled[i]); - } - } - } else if (controlled instanceof Swiper && byController !== controlled) { - setControlledTransition(controlled); - } - } - - function removeSpline() { - if (!swiper.controller.control) return; - - if (swiper.controller.spline) { - swiper.controller.spline = undefined; - delete swiper.controller.spline; - } - } - - on('beforeInit', () => { - swiper.controller.control = swiper.params.controller.control; - }); - on('update', () => { - removeSpline(); - }); - on('resize', () => { - removeSpline(); - }); - on('observerUpdate', () => { - removeSpline(); - }); - on('setTranslate', (_s, translate, byController) => { - if (!swiper.controller.control) return; - swiper.controller.setTranslate(translate, byController); - }); - on('setTransition', (_s, duration, byController) => { - if (!swiper.controller.control) return; - swiper.controller.setTransition(duration, byController); - }); - Object.assign(swiper.controller, { - setTranslate, - setTransition - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-cards/effect-cards.js": -/*!******************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-cards/effect-cards.js ***! - \******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectCards) -/* harmony export */ }); -/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); -/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); -/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); - - - - -function EffectCards({ - swiper, - extendParams, - on -}) { - extendParams({ - cardsEffect: { - slideShadows: true, - transformEl: null - } - }); - - const setTranslate = () => { - const { - slides, - activeIndex - } = swiper; - const params = swiper.params.cardsEffect; - const { - startTranslate, - isTouched - } = swiper.touchEventsData; - const currentTranslate = swiper.translate; - - for (let i = 0; i < slides.length; i += 1) { - const $slideEl = slides.eq(i); - const slideProgress = $slideEl[0].progress; - const progress = Math.min(Math.max(slideProgress, -4), 4); - let offset = $slideEl[0].swiperSlideOffset; - - if (swiper.params.centeredSlides && !swiper.params.cssMode) { - swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`); - } - - if (swiper.params.centeredSlides && swiper.params.cssMode) { - offset -= slides[0].swiperSlideOffset; - } - - let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; - let tY = 0; - const tZ = -100 * Math.abs(progress); - let scale = 1; - let rotate = -2 * progress; - let tXAdd = 8 - Math.abs(progress) * 0.75; - const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; - const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; - - if (isSwipeToNext || isSwipeToPrev) { - const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; - rotate += -28 * progress * subProgress; - scale += -0.5 * subProgress; - tXAdd += 96 * subProgress; - tY = `${-25 * subProgress * Math.abs(progress)}%`; - } - - if (progress < 0) { - // next - tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`; - } else if (progress > 0) { - // prev - tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`; - } else { - tX = `${tX}px`; - } - - if (!swiper.isHorizontal()) { - const prevY = tY; - tY = tX; - tX = prevY; - } - - const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; - const transform = ` - translate3d(${tX}, ${tY}, ${tZ}px) - rotateZ(${rotate}deg) - scale(${scaleString}) - `; - - if (params.slideShadows) { - // Set shadows - let $shadowEl = $slideEl.find('.swiper-slide-shadow'); - - if ($shadowEl.length === 0) { - $shadowEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl); - } - - if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); - } - - $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; - const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); - $targetEl.transform(transform); - } - }; - - const setTransition = duration => { - const { - transformEl - } = swiper.params.cardsEffect; - const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; - $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); - (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ - swiper, - duration, - transformEl - }); - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ - effect: 'cards', - swiper, - on, - setTranslate, - setTransition, - perspective: () => true, - overwriteParams: () => ({ - watchSlidesProgress: true, - virtualTranslate: !swiper.params.cssMode - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js": -/*!**************************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectCoverflow) -/* harmony export */ }); -/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); -/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); - - - -function EffectCoverflow({ - swiper, - extendParams, - on -}) { - extendParams({ - coverflowEffect: { - rotate: 50, - stretch: 0, - depth: 100, - scale: 1, - modifier: 1, - slideShadows: true, - transformEl: null - } - }); - - const setTranslate = () => { - const { - width: swiperWidth, - height: swiperHeight, - slides, - slidesSizesGrid - } = swiper; - const params = swiper.params.coverflowEffect; - const isHorizontal = swiper.isHorizontal(); - const transform = swiper.translate; - const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; - const rotate = isHorizontal ? params.rotate : -params.rotate; - const translate = params.depth; // Each slide offset from center - - for (let i = 0, length = slides.length; i < length; i += 1) { - const $slideEl = slides.eq(i); - const slideSize = slidesSizesGrid[i]; - const slideOffset = $slideEl[0].swiperSlideOffset; - const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier; - let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; - let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0 - - let translateZ = -translate * Math.abs(offsetMultiplier); - let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders - - if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { - stretch = parseFloat(params.stretch) / 100 * slideSize; - } - - let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; - let translateX = isHorizontal ? stretch * offsetMultiplier : 0; - let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values - - if (Math.abs(translateX) < 0.001) translateX = 0; - if (Math.abs(translateY) < 0.001) translateY = 0; - if (Math.abs(translateZ) < 0.001) translateZ = 0; - if (Math.abs(rotateY) < 0.001) rotateY = 0; - if (Math.abs(rotateX) < 0.001) rotateX = 0; - if (Math.abs(scale) < 0.001) scale = 0; - const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; - const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); - $targetEl.transform(slideTransform); - $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; - - if (params.slideShadows) { - // Set shadows - let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); - let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); - - if ($shadowBeforeEl.length === 0) { - $shadowBeforeEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, isHorizontal ? 'left' : 'top'); - } - - if ($shadowAfterEl.length === 0) { - $shadowAfterEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, isHorizontal ? 'right' : 'bottom'); - } - - if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; - if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; - } - } - }; - - const setTransition = duration => { - const { - transformEl - } = swiper.params.coverflowEffect; - const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; - $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ - effect: 'coverflow', - swiper, - on, - setTranslate, - setTransition, - perspective: () => true, - overwriteParams: () => ({ - watchSlidesProgress: true - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-creative/effect-creative.js": -/*!************************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-creative/effect-creative.js ***! - \************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectCreative) -/* harmony export */ }); -/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); -/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); -/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); - - - - -function EffectCreative({ - swiper, - extendParams, - on -}) { - extendParams({ - creativeEffect: { - transformEl: null, - limitProgress: 1, - shadowPerProgress: false, - progressMultiplier: 1, - perspective: true, - prev: { - translate: [0, 0, 0], - rotate: [0, 0, 0], - opacity: 1, - scale: 1 - }, - next: { - translate: [0, 0, 0], - rotate: [0, 0, 0], - opacity: 1, - scale: 1 - } - } - }); - - const getTranslateValue = value => { - if (typeof value === 'string') return value; - return `${value}px`; - }; - - const setTranslate = () => { - const { - slides, - $wrapperEl, - slidesSizesGrid - } = swiper; - const params = swiper.params.creativeEffect; - const { - progressMultiplier: multiplier - } = params; - const isCenteredSlides = swiper.params.centeredSlides; - - if (isCenteredSlides) { - const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; - $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`); - } - - for (let i = 0; i < slides.length; i += 1) { - const $slideEl = slides.eq(i); - const slideProgress = $slideEl[0].progress; - const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress); - let originalProgress = progress; - - if (!isCenteredSlides) { - originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress); - } - - const offset = $slideEl[0].swiperSlideOffset; - const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; - const r = [0, 0, 0]; - let custom = false; - - if (!swiper.isHorizontal()) { - t[1] = t[0]; - t[0] = 0; - } - - let data = { - translate: [0, 0, 0], - rotate: [0, 0, 0], - scale: 1, - opacity: 1 - }; - - if (progress < 0) { - data = params.next; - custom = true; - } else if (progress > 0) { - data = params.prev; - custom = true; - } // set translate - - - t.forEach((value, index) => { - t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; - }); // set rotates - - r.forEach((value, index) => { - r[index] = data.rotate[index] * Math.abs(progress * multiplier); - }); - $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; - const translateString = t.join(', '); - const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; - const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; - const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; - const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows - - if (custom && data.shadow || !custom) { - let $shadowEl = $slideEl.children('.swiper-slide-shadow'); - - if ($shadowEl.length === 0 && data.shadow) { - $shadowEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl); - } - - if ($shadowEl.length) { - const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; - $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); - } - } - - const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); - $targetEl.transform(transform).css({ - opacity: opacityString - }); - - if (data.origin) { - $targetEl.css('transform-origin', data.origin); - } - } - }; - - const setTransition = duration => { - const { - transformEl - } = swiper.params.creativeEffect; - const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; - $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); - (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ - swiper, - duration, - transformEl, - allSlides: true - }); - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ - effect: 'creative', - swiper, - on, - setTranslate, - setTransition, - perspective: () => swiper.params.creativeEffect.perspective, - overwriteParams: () => ({ - watchSlidesProgress: true, - virtualTranslate: !swiper.params.cssMode - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-cube/effect-cube.js": -/*!****************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-cube/effect-cube.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectCube) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); - - -function EffectCube({ - swiper, - extendParams, - on -}) { - extendParams({ - cubeEffect: { - slideShadows: true, - shadow: true, - shadowOffset: 20, - shadowScale: 0.94 - } - }); - - const setTranslate = () => { - const { - $el, - $wrapperEl, - slides, - width: swiperWidth, - height: swiperHeight, - rtlTranslate: rtl, - size: swiperSize, - browser - } = swiper; - const params = swiper.params.cubeEffect; - const isHorizontal = swiper.isHorizontal(); - const isVirtual = swiper.virtual && swiper.params.virtual.enabled; - let wrapperRotate = 0; - let $cubeShadowEl; - - if (params.shadow) { - if (isHorizontal) { - $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); - - if ($cubeShadowEl.length === 0) { - $cubeShadowEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])('
'); - $wrapperEl.append($cubeShadowEl); - } - - $cubeShadowEl.css({ - height: `${swiperWidth}px` - }); - } else { - $cubeShadowEl = $el.find('.swiper-cube-shadow'); - - if ($cubeShadowEl.length === 0) { - $cubeShadowEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])('
'); - $el.append($cubeShadowEl); - } - } - } - - for (let i = 0; i < slides.length; i += 1) { - const $slideEl = slides.eq(i); - let slideIndex = i; - - if (isVirtual) { - slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); - } - - let slideAngle = slideIndex * 90; - let round = Math.floor(slideAngle / 360); - - if (rtl) { - slideAngle = -slideAngle; - round = Math.floor(-slideAngle / 360); - } - - const progress = Math.max(Math.min($slideEl[0].progress, 1), -1); - let tx = 0; - let ty = 0; - let tz = 0; - - if (slideIndex % 4 === 0) { - tx = -round * 4 * swiperSize; - tz = 0; - } else if ((slideIndex - 1) % 4 === 0) { - tx = 0; - tz = -round * 4 * swiperSize; - } else if ((slideIndex - 2) % 4 === 0) { - tx = swiperSize + round * 4 * swiperSize; - tz = swiperSize; - } else if ((slideIndex - 3) % 4 === 0) { - tx = -swiperSize; - tz = 3 * swiperSize + swiperSize * 4 * round; - } - - if (rtl) { - tx = -tx; - } - - if (!isHorizontal) { - ty = tx; - tx = 0; - } - - const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; - - if (progress <= 1 && progress > -1) { - wrapperRotate = slideIndex * 90 + progress * 90; - if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; - } - - $slideEl.transform(transform); - - if (params.slideShadows) { - // Set shadows - let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); - let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); - - if (shadowBefore.length === 0) { - shadowBefore = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`
`); - $slideEl.append(shadowBefore); - } - - if (shadowAfter.length === 0) { - shadowAfter = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`
`); - $slideEl.append(shadowAfter); - } - - if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); - if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); - } - } - - $wrapperEl.css({ - '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`, - 'transform-origin': `50% 50% -${swiperSize / 2}px` - }); - - if (params.shadow) { - if (isHorizontal) { - $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`); - } else { - const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; - const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); - const scale1 = params.shadowScale; - const scale2 = params.shadowScale / multiplier; - const offset = params.shadowOffset; - $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`); - } - } - - const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0; - $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`); - }; - - const setTransition = duration => { - const { - $el, - slides - } = swiper; - slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); - - if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { - $el.find('.swiper-cube-shadow').transition(duration); - } - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ - effect: 'cube', - swiper, - on, - setTranslate, - setTransition, - perspective: () => true, - overwriteParams: () => ({ - slidesPerView: 1, - slidesPerGroup: 1, - watchSlidesProgress: true, - resistanceRatio: 0, - spaceBetween: 0, - centeredSlides: false, - virtualTranslate: true - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-fade/effect-fade.js": -/*!****************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-fade/effect-fade.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectFade) -/* harmony export */ }); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); -/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); -/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); - - - -function EffectFade({ - swiper, - extendParams, - on -}) { - extendParams({ - fadeEffect: { - crossFade: false, - transformEl: null - } - }); - - const setTranslate = () => { - const { - slides - } = swiper; - const params = swiper.params.fadeEffect; - - for (let i = 0; i < slides.length; i += 1) { - const $slideEl = swiper.slides.eq(i); - const offset = $slideEl[0].swiperSlideOffset; - let tx = -offset; - if (!swiper.params.virtualTranslate) tx -= swiper.translate; - let ty = 0; - - if (!swiper.isHorizontal()) { - ty = tx; - tx = 0; - } - - const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); - const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params, $slideEl); - $targetEl.css({ - opacity: slideOpacity - }).transform(`translate3d(${tx}px, ${ty}px, 0px)`); - } - }; - - const setTransition = duration => { - const { - transformEl - } = swiper.params.fadeEffect; - const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; - $transitionElements.transition(duration); - (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_2__["default"])({ - swiper, - duration, - transformEl, - allSlides: true - }); - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ - effect: 'fade', - swiper, - on, - setTranslate, - setTransition, - overwriteParams: () => ({ - slidesPerView: 1, - slidesPerGroup: 1, - watchSlidesProgress: true, - spaceBetween: 0, - virtualTranslate: !swiper.params.cssMode - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/effect-flip/effect-flip.js": -/*!****************************************************************!*\ - !*** ./node_modules/swiper/modules/effect-flip/effect-flip.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ EffectFlip) -/* harmony export */ }); -/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); -/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); -/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); -/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); - - - - -function EffectFlip({ - swiper, - extendParams, - on -}) { - extendParams({ - flipEffect: { - slideShadows: true, - limitRotation: true, - transformEl: null - } - }); - - const setTranslate = () => { - const { - slides, - rtlTranslate: rtl - } = swiper; - const params = swiper.params.flipEffect; - - for (let i = 0; i < slides.length; i += 1) { - const $slideEl = slides.eq(i); - let progress = $slideEl[0].progress; - - if (swiper.params.flipEffect.limitRotation) { - progress = Math.max(Math.min($slideEl[0].progress, 1), -1); - } - - const offset = $slideEl[0].swiperSlideOffset; - const rotate = -180 * progress; - let rotateY = rotate; - let rotateX = 0; - let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; - let ty = 0; - - if (!swiper.isHorizontal()) { - ty = tx; - tx = 0; - rotateX = -rotateY; - rotateY = 0; - } else if (rtl) { - rotateY = -rotateY; - } - - $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; - - if (params.slideShadows) { - // Set shadows - let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); - let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); - - if (shadowBefore.length === 0) { - shadowBefore = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top'); - } - - if (shadowAfter.length === 0) { - shadowAfter = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); - } - - if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); - if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); - } - - const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; - const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); - $targetEl.transform(transform); - } - }; - - const setTransition = duration => { - const { - transformEl - } = swiper.params.flipEffect; - const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; - $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); - (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ - swiper, - duration, - transformEl - }); - }; - - (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ - effect: 'flip', - swiper, - on, - setTranslate, - setTransition, - perspective: () => true, - overwriteParams: () => ({ - slidesPerView: 1, - slidesPerGroup: 1, - watchSlidesProgress: true, - spaceBetween: 0, - virtualTranslate: !swiper.params.cssMode - }) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/free-mode/free-mode.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/modules/free-mode/free-mode.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ freeMode) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - -function freeMode({ - swiper, - extendParams, - emit, - once -}) { - extendParams({ - freeMode: { - enabled: false, - momentum: true, - momentumRatio: 1, - momentumBounce: true, - momentumBounceRatio: 1, - momentumVelocityRatio: 1, - sticky: false, - minimumVelocity: 0.02 - } - }); - - function onTouchMove() { - const { - touchEventsData: data, - touches - } = swiper; // Velocity - - if (data.velocities.length === 0) { - data.velocities.push({ - position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], - time: data.touchStartTime - }); - } - - data.velocities.push({ - position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], - time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)() - }); - } - - function onTouchEnd({ - currentPos - }) { - const { - params, - $wrapperEl, - rtlTranslate: rtl, - snapGrid, - touchEventsData: data - } = swiper; // Time diff - - const touchEndTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); - const timeDiff = touchEndTime - data.touchStartTime; - - if (currentPos < -swiper.minTranslate()) { - swiper.slideTo(swiper.activeIndex); - return; - } - - if (currentPos > -swiper.maxTranslate()) { - if (swiper.slides.length < snapGrid.length) { - swiper.slideTo(snapGrid.length - 1); - } else { - swiper.slideTo(swiper.slides.length - 1); - } - - return; - } - - if (params.freeMode.momentum) { - if (data.velocities.length > 1) { - const lastMoveEvent = data.velocities.pop(); - const velocityEvent = data.velocities.pop(); - const distance = lastMoveEvent.position - velocityEvent.position; - const time = lastMoveEvent.time - velocityEvent.time; - swiper.velocity = distance / time; - swiper.velocity /= 2; - - if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { - swiper.velocity = 0; - } // this implies that the user stopped moving a finger then released. - // There would be no events with distance zero, so the last event is stale. - - - if (time > 150 || (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)() - lastMoveEvent.time > 300) { - swiper.velocity = 0; - } - } else { - swiper.velocity = 0; - } - - swiper.velocity *= params.freeMode.momentumVelocityRatio; - data.velocities.length = 0; - let momentumDuration = 1000 * params.freeMode.momentumRatio; - const momentumDistance = swiper.velocity * momentumDuration; - let newPosition = swiper.translate + momentumDistance; - if (rtl) newPosition = -newPosition; - let doBounce = false; - let afterBouncePosition; - const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; - let needsLoopFix; - - if (newPosition < swiper.maxTranslate()) { - if (params.freeMode.momentumBounce) { - if (newPosition + swiper.maxTranslate() < -bounceAmount) { - newPosition = swiper.maxTranslate() - bounceAmount; - } - - afterBouncePosition = swiper.maxTranslate(); - doBounce = true; - data.allowMomentumBounce = true; - } else { - newPosition = swiper.maxTranslate(); - } - - if (params.loop && params.centeredSlides) needsLoopFix = true; - } else if (newPosition > swiper.minTranslate()) { - if (params.freeMode.momentumBounce) { - if (newPosition - swiper.minTranslate() > bounceAmount) { - newPosition = swiper.minTranslate() + bounceAmount; - } - - afterBouncePosition = swiper.minTranslate(); - doBounce = true; - data.allowMomentumBounce = true; - } else { - newPosition = swiper.minTranslate(); - } - - if (params.loop && params.centeredSlides) needsLoopFix = true; - } else if (params.freeMode.sticky) { - let nextSlide; - - for (let j = 0; j < snapGrid.length; j += 1) { - if (snapGrid[j] > -newPosition) { - nextSlide = j; - break; - } - } - - if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { - newPosition = snapGrid[nextSlide]; - } else { - newPosition = snapGrid[nextSlide - 1]; - } - - newPosition = -newPosition; - } - - if (needsLoopFix) { - once('transitionEnd', () => { - swiper.loopFix(); - }); - } // Fix duration - - - if (swiper.velocity !== 0) { - if (rtl) { - momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); - } else { - momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); - } - - if (params.freeMode.sticky) { - // If freeMode.sticky is active and the user ends a swipe with a slow-velocity - // event, then durations can be 20+ seconds to slide one (or zero!) slides. - // It's easy to see this when simulating touch with mouse events. To fix this, - // limit single-slide swipes to the default slide duration. This also has the - // nice side effect of matching slide speed if the user stopped moving before - // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. - // For faster swipes, also apply limits (albeit higher ones). - const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); - const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; - - if (moveDistance < currentSlideSize) { - momentumDuration = params.speed; - } else if (moveDistance < 2 * currentSlideSize) { - momentumDuration = params.speed * 1.5; - } else { - momentumDuration = params.speed * 2.5; - } - } - } else if (params.freeMode.sticky) { - swiper.slideToClosest(); - return; - } - - if (params.freeMode.momentumBounce && doBounce) { - swiper.updateProgress(afterBouncePosition); - swiper.setTransition(momentumDuration); - swiper.setTranslate(newPosition); - swiper.transitionStart(true, swiper.swipeDirection); - swiper.animating = true; - $wrapperEl.transitionEnd(() => { - if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; - emit('momentumBounce'); - swiper.setTransition(params.speed); - setTimeout(() => { - swiper.setTranslate(afterBouncePosition); - $wrapperEl.transitionEnd(() => { - if (!swiper || swiper.destroyed) return; - swiper.transitionEnd(); - }); - }, 0); - }); - } else if (swiper.velocity) { - emit('_freeModeNoMomentumRelease'); - swiper.updateProgress(newPosition); - swiper.setTransition(momentumDuration); - swiper.setTranslate(newPosition); - swiper.transitionStart(true, swiper.swipeDirection); - - if (!swiper.animating) { - swiper.animating = true; - $wrapperEl.transitionEnd(() => { - if (!swiper || swiper.destroyed) return; - swiper.transitionEnd(); - }); - } - } else { - swiper.updateProgress(newPosition); - } - - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } else if (params.freeMode.sticky) { - swiper.slideToClosest(); - return; - } else if (params.freeMode) { - emit('_freeModeNoMomentumRelease'); - } - - if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { - swiper.updateProgress(); - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } - } - - Object.assign(swiper, { - freeMode: { - onTouchMove, - onTouchEnd - } - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/grid/grid.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/modules/grid/grid.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Grid) -/* harmony export */ }); -function Grid({ - swiper, - extendParams -}) { - extendParams({ - grid: { - rows: 1, - fill: 'column' - } - }); - let slidesNumberEvenToRows; - let slidesPerRow; - let numFullColumns; - - const initSlides = slidesLength => { - const { - slidesPerView - } = swiper.params; - const { - rows, - fill - } = swiper.params.grid; - slidesPerRow = slidesNumberEvenToRows / rows; - numFullColumns = Math.floor(slidesLength / rows); - - if (Math.floor(slidesLength / rows) === slidesLength / rows) { - slidesNumberEvenToRows = slidesLength; - } else { - slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; - } - - if (slidesPerView !== 'auto' && fill === 'row') { - slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); - } - }; - - const updateSlide = (i, slide, slidesLength, getDirectionLabel) => { - const { - slidesPerGroup, - spaceBetween - } = swiper.params; - const { - rows, - fill - } = swiper.params.grid; // Set slides order - - let newSlideOrderIndex; - let column; - let row; - - if (fill === 'row' && slidesPerGroup > 1) { - const groupIndex = Math.floor(i / (slidesPerGroup * rows)); - const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; - const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); - row = Math.floor(slideIndexInGroup / columnsInGroup); - column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; - newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; - slide.css({ - '-webkit-order': newSlideOrderIndex, - order: newSlideOrderIndex - }); - } else if (fill === 'column') { - column = Math.floor(i / rows); - row = i - column * rows; - - if (column > numFullColumns || column === numFullColumns && row === rows - 1) { - row += 1; - - if (row >= rows) { - row = 0; - column += 1; - } - } - } else { - row = Math.floor(i / slidesPerRow); - column = i - row * slidesPerRow; - } - - slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : ''); - }; - - const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => { - const { - spaceBetween, - centeredSlides, - roundLengths - } = swiper.params; - const { - rows - } = swiper.params.grid; - swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; - swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; - swiper.$wrapperEl.css({ - [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px` - }); - - if (centeredSlides) { - snapGrid.splice(0, snapGrid.length); - const newSlidesGrid = []; - - for (let i = 0; i < snapGrid.length; i += 1) { - let slidesGridItem = snapGrid[i]; - if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); - if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); - } - - snapGrid.push(...newSlidesGrid); - } - }; - - swiper.grid = { - initSlides, - updateSlide, - updateWrapperSize - }; -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/hash-navigation/hash-navigation.js": -/*!************************************************************************!*\ - !*** ./node_modules/swiper/modules/hash-navigation/hash-navigation.js ***! - \************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ HashNavigation) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function HashNavigation({ - swiper, - extendParams, - emit, - on -}) { - let initialized = false; - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - extendParams({ - hashNavigation: { - enabled: false, - replaceState: false, - watchState: false - } - }); - - const onHashChange = () => { - emit('hashChange'); - const newHash = document.location.hash.replace('#', ''); - const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); - - if (newHash !== activeSlideHash) { - const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index(); - if (typeof newIndex === 'undefined') return; - swiper.slideTo(newIndex); - } - }; - - const setHash = () => { - if (!initialized || !swiper.params.hashNavigation.enabled) return; - - if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { - window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''); - emit('hashSet'); - } else { - const slide = swiper.slides.eq(swiper.activeIndex); - const hash = slide.attr('data-hash') || slide.attr('data-history'); - document.location.hash = hash || ''; - emit('hashSet'); - } - }; - - const init = () => { - if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; - initialized = true; - const hash = document.location.hash.replace('#', ''); - - if (hash) { - const speed = 0; - - for (let i = 0, length = swiper.slides.length; i < length; i += 1) { - const slide = swiper.slides.eq(i); - const slideHash = slide.attr('data-hash') || slide.attr('data-history'); - - if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { - const index = slide.index(); - swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); - } - } - } - - if (swiper.params.hashNavigation.watchState) { - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window).on('hashchange', onHashChange); - } - }; - - const destroy = () => { - if (swiper.params.hashNavigation.watchState) { - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window).off('hashchange', onHashChange); - } - }; - - on('init', () => { - if (swiper.params.hashNavigation.enabled) { - init(); - } - }); - on('destroy', () => { - if (swiper.params.hashNavigation.enabled) { - destroy(); - } - }); - on('transitionEnd _freeModeNoMomentumRelease', () => { - if (initialized) { - setHash(); - } - }); - on('slideChange', () => { - if (initialized && swiper.params.cssMode) { - setHash(); - } - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/history/history.js": -/*!********************************************************!*\ - !*** ./node_modules/swiper/modules/history/history.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ History) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -function History({ - swiper, - extendParams, - on -}) { - extendParams({ - history: { - enabled: false, - root: '', - replaceState: false, - key: 'slides' - } - }); - let initialized = false; - let paths = {}; - - const slugify = text => { - return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); - }; - - const getPathValues = urlOverride => { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let location; - - if (urlOverride) { - location = new URL(urlOverride); - } else { - location = window.location; - } - - const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); - const total = pathArray.length; - const key = pathArray[total - 2]; - const value = pathArray[total - 1]; - return { - key, - value - }; - }; - - const setHistory = (key, index) => { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - if (!initialized || !swiper.params.history.enabled) return; - let location; - - if (swiper.params.url) { - location = new URL(swiper.params.url); - } else { - location = window.location; - } - - const slide = swiper.slides.eq(index); - let value = slugify(slide.attr('data-history')); - - if (swiper.params.history.root.length > 0) { - let root = swiper.params.history.root; - if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); - value = `${root}/${key}/${value}`; - } else if (!location.pathname.includes(key)) { - value = `${key}/${value}`; - } - - const currentState = window.history.state; - - if (currentState && currentState.value === value) { - return; - } - - if (swiper.params.history.replaceState) { - window.history.replaceState({ - value - }, null, value); - } else { - window.history.pushState({ - value - }, null, value); - } - }; - - const scrollToSlide = (speed, value, runCallbacks) => { - if (value) { - for (let i = 0, length = swiper.slides.length; i < length; i += 1) { - const slide = swiper.slides.eq(i); - const slideHistory = slugify(slide.attr('data-history')); - - if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { - const index = slide.index(); - swiper.slideTo(index, speed, runCallbacks); - } - } - } else { - swiper.slideTo(0, speed, runCallbacks); - } - }; - - const setHistoryPopState = () => { - paths = getPathValues(swiper.params.url); - scrollToSlide(swiper.params.speed, swiper.paths.value, false); - }; - - const init = () => { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - if (!swiper.params.history) return; - - if (!window.history || !window.history.pushState) { - swiper.params.history.enabled = false; - swiper.params.hashNavigation.enabled = true; - return; - } - - initialized = true; - paths = getPathValues(swiper.params.url); - if (!paths.key && !paths.value) return; - scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); - - if (!swiper.params.history.replaceState) { - window.addEventListener('popstate', setHistoryPopState); - } - }; - - const destroy = () => { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - if (!swiper.params.history.replaceState) { - window.removeEventListener('popstate', setHistoryPopState); - } - }; - - on('init', () => { - if (swiper.params.history.enabled) { - init(); - } - }); - on('destroy', () => { - if (swiper.params.history.enabled) { - destroy(); - } - }); - on('transitionEnd _freeModeNoMomentumRelease', () => { - if (initialized) { - setHistory(swiper.params.history.key, swiper.activeIndex); - } - }); - on('slideChange', () => { - if (initialized && swiper.params.cssMode) { - setHistory(swiper.params.history.key, swiper.activeIndex); - } - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/keyboard/keyboard.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/modules/keyboard/keyboard.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Keyboard) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* eslint-disable consistent-return */ - - -function Keyboard({ - swiper, - extendParams, - on, - emit -}) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - swiper.keyboard = { - enabled: false - }; - extendParams({ - keyboard: { - enabled: false, - onlyInViewport: true, - pageUpDown: true - } - }); - - function handle(event) { - if (!swiper.enabled) return; - const { - rtlTranslate: rtl - } = swiper; - let e = event; - if (e.originalEvent) e = e.originalEvent; // jquery fix - - const kc = e.keyCode || e.charCode; - const pageUpDown = swiper.params.keyboard.pageUpDown; - const isPageUp = pageUpDown && kc === 33; - const isPageDown = pageUpDown && kc === 34; - const isArrowLeft = kc === 37; - const isArrowRight = kc === 39; - const isArrowUp = kc === 38; - const isArrowDown = kc === 40; // Directions locks - - if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { - return false; - } - - if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { - return false; - } - - if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { - return undefined; - } - - if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { - return undefined; - } - - if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { - let inView = false; // Check that swiper should be inside of visible area of window - - if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) { - return undefined; - } - - const $el = swiper.$el; - const swiperWidth = $el[0].clientWidth; - const swiperHeight = $el[0].clientHeight; - const windowWidth = window.innerWidth; - const windowHeight = window.innerHeight; - const swiperOffset = swiper.$el.offset(); - if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; - const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; - - for (let i = 0; i < swiperCoord.length; i += 1) { - const point = swiperCoord[i]; - - if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { - if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line - - inView = true; - } - } - - if (!inView) return undefined; - } - - if (swiper.isHorizontal()) { - if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { - if (e.preventDefault) e.preventDefault();else e.returnValue = false; - } - - if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); - if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); - } else { - if (isPageUp || isPageDown || isArrowUp || isArrowDown) { - if (e.preventDefault) e.preventDefault();else e.returnValue = false; - } - - if (isPageDown || isArrowDown) swiper.slideNext(); - if (isPageUp || isArrowUp) swiper.slidePrev(); - } - - emit('keyPress', kc); - return undefined; - } - - function enable() { - if (swiper.keyboard.enabled) return; - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document).on('keydown', handle); - swiper.keyboard.enabled = true; - } - - function disable() { - if (!swiper.keyboard.enabled) return; - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document).off('keydown', handle); - swiper.keyboard.enabled = false; - } - - on('init', () => { - if (swiper.params.keyboard.enabled) { - enable(); - } - }); - on('destroy', () => { - if (swiper.keyboard.enabled) { - disable(); - } - }); - Object.assign(swiper.keyboard, { - enable, - disable - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/lazy/lazy.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/modules/lazy/lazy.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Lazy) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function Lazy({ - swiper, - extendParams, - on, - emit -}) { - extendParams({ - lazy: { - checkInView: false, - enabled: false, - loadPrevNext: false, - loadPrevNextAmount: 1, - loadOnTransitionStart: false, - scrollingElement: '', - elementClass: 'swiper-lazy', - loadingClass: 'swiper-lazy-loading', - loadedClass: 'swiper-lazy-loaded', - preloaderClass: 'swiper-lazy-preloader' - } - }); - swiper.lazy = {}; - let scrollHandlerAttached = false; - let initialImageLoaded = false; - - function loadInSlide(index, loadInDuplicate = true) { - const params = swiper.params.lazy; - if (typeof index === 'undefined') return; - if (swiper.slides.length === 0) return; - const isVirtual = swiper.virtual && swiper.params.virtual.enabled; - const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`) : swiper.slides.eq(index); - const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`); - - if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { - $images.push($slideEl[0]); - } - - if ($images.length === 0) return; - $images.each(imageEl => { - const $imageEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(imageEl); - $imageEl.addClass(params.loadingClass); - const background = $imageEl.attr('data-background'); - const src = $imageEl.attr('data-src'); - const srcset = $imageEl.attr('data-srcset'); - const sizes = $imageEl.attr('data-sizes'); - const $pictureEl = $imageEl.parent('picture'); - swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => { - if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return; - - if (background) { - $imageEl.css('background-image', `url("${background}")`); - $imageEl.removeAttr('data-background'); - } else { - if (srcset) { - $imageEl.attr('srcset', srcset); - $imageEl.removeAttr('data-srcset'); - } - - if (sizes) { - $imageEl.attr('sizes', sizes); - $imageEl.removeAttr('data-sizes'); - } - - if ($pictureEl.length) { - $pictureEl.children('source').each(sourceEl => { - const $source = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(sourceEl); - - if ($source.attr('data-srcset')) { - $source.attr('srcset', $source.attr('data-srcset')); - $source.removeAttr('data-srcset'); - } - }); - } - - if (src) { - $imageEl.attr('src', src); - $imageEl.removeAttr('data-src'); - } - } - - $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); - $slideEl.find(`.${params.preloaderClass}`).remove(); - - if (swiper.params.loop && loadInDuplicate) { - const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); - - if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { - const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`); - loadInSlide(originalSlide.index(), false); - } else { - const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`); - loadInSlide(duplicatedSlide.index(), false); - } - } - - emit('lazyImageReady', $slideEl[0], $imageEl[0]); - - if (swiper.params.autoHeight) { - swiper.updateAutoHeight(); - } - }); - emit('lazyImageLoad', $slideEl[0], $imageEl[0]); - }); - } - - function load() { - const { - $wrapperEl, - params: swiperParams, - slides, - activeIndex - } = swiper; - const isVirtual = swiper.virtual && swiperParams.virtual.enabled; - const params = swiperParams.lazy; - let slidesPerView = swiperParams.slidesPerView; - - if (slidesPerView === 'auto') { - slidesPerView = 0; - } - - function slideExist(index) { - if (isVirtual) { - if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) { - return true; - } - } else if (slides[index]) return true; - - return false; - } - - function slideIndex(slideEl) { - if (isVirtual) { - return (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).attr('data-swiper-slide-index'); - } - - return (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).index(); - } - - if (!initialImageLoaded) initialImageLoaded = true; - - if (swiper.params.watchSlidesProgress) { - $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => { - const index = isVirtual ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).attr('data-swiper-slide-index') : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).index(); - loadInSlide(index); - }); - } else if (slidesPerView > 1) { - for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) { - if (slideExist(i)) loadInSlide(i); - } - } else { - loadInSlide(activeIndex); - } - - if (params.loadPrevNext) { - if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) { - const amount = params.loadPrevNextAmount; - const spv = slidesPerView; - const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); - const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides - - for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) { - if (slideExist(i)) loadInSlide(i); - } // Prev Slides - - - for (let i = minIndex; i < activeIndex; i += 1) { - if (slideExist(i)) loadInSlide(i); - } - } else { - const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`); - if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide)); - const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`); - if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide)); - } - } - } - - function checkInViewOnLoad() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - if (!swiper || swiper.destroyed) return; - const $scrollElement = swiper.params.lazy.scrollingElement ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.lazy.scrollingElement) : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window); - const isWindow = $scrollElement[0] === window; - const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth; - const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight; - const swiperOffset = swiper.$el.offset(); - const { - rtlTranslate: rtl - } = swiper; - let inView = false; - if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; - const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]]; - - for (let i = 0; i < swiperCoord.length; i += 1) { - const point = swiperCoord[i]; - - if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) { - if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line - - inView = true; - } - } - - const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? { - passive: true, - capture: false - } : false; - - if (inView) { - load(); - $scrollElement.off('scroll', checkInViewOnLoad, passiveListener); - } else if (!scrollHandlerAttached) { - scrollHandlerAttached = true; - $scrollElement.on('scroll', checkInViewOnLoad, passiveListener); - } - } - - on('beforeInit', () => { - if (swiper.params.lazy.enabled && swiper.params.preloadImages) { - swiper.params.preloadImages = false; - } - }); - on('init', () => { - if (swiper.params.lazy.enabled) { - if (swiper.params.lazy.checkInView) { - checkInViewOnLoad(); - } else { - load(); - } - } - }); - on('scroll', () => { - if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) { - load(); - } - }); - on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => { - if (swiper.params.lazy.enabled) { - if (swiper.params.lazy.checkInView) { - checkInViewOnLoad(); - } else { - load(); - } - } - }); - on('transitionStart', () => { - if (swiper.params.lazy.enabled) { - if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) { - if (swiper.params.lazy.checkInView) { - checkInViewOnLoad(); - } else { - load(); - } - } - } - }); - on('transitionEnd', () => { - if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { - if (swiper.params.lazy.checkInView) { - checkInViewOnLoad(); - } else { - load(); - } - } - }); - on('slideChange', () => { - const { - lazy, - cssMode, - watchSlidesProgress, - touchReleaseOnEdges, - resistanceRatio - } = swiper.params; - - if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) { - load(); - } - }); - Object.assign(swiper.lazy, { - load, - loadInSlide - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/manipulation.js": -/*!******************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/manipulation.js ***! - \******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Manipulation) -/* harmony export */ }); -/* harmony import */ var _methods_appendSlide_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./methods/appendSlide.js */ "./node_modules/swiper/modules/manipulation/methods/appendSlide.js"); -/* harmony import */ var _methods_prependSlide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./methods/prependSlide.js */ "./node_modules/swiper/modules/manipulation/methods/prependSlide.js"); -/* harmony import */ var _methods_addSlide_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./methods/addSlide.js */ "./node_modules/swiper/modules/manipulation/methods/addSlide.js"); -/* harmony import */ var _methods_removeSlide_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./methods/removeSlide.js */ "./node_modules/swiper/modules/manipulation/methods/removeSlide.js"); -/* harmony import */ var _methods_removeAllSlides_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./methods/removeAllSlides.js */ "./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js"); - - - - - -function Manipulation({ - swiper -}) { - Object.assign(swiper, { - appendSlide: _methods_appendSlide_js__WEBPACK_IMPORTED_MODULE_0__["default"].bind(swiper), - prependSlide: _methods_prependSlide_js__WEBPACK_IMPORTED_MODULE_1__["default"].bind(swiper), - addSlide: _methods_addSlide_js__WEBPACK_IMPORTED_MODULE_2__["default"].bind(swiper), - removeSlide: _methods_removeSlide_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind(swiper), - removeAllSlides: _methods_removeAllSlides_js__WEBPACK_IMPORTED_MODULE_4__["default"].bind(swiper) - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/methods/addSlide.js": -/*!**********************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/methods/addSlide.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ addSlide) -/* harmony export */ }); -function addSlide(index, slides) { - const swiper = this; - const { - $wrapperEl, - params, - activeIndex - } = swiper; - let activeIndexBuffer = activeIndex; - - if (params.loop) { - activeIndexBuffer -= swiper.loopedSlides; - swiper.loopDestroy(); - swiper.slides = $wrapperEl.children(`.${params.slideClass}`); - } - - const baseLength = swiper.slides.length; - - if (index <= 0) { - swiper.prependSlide(slides); - return; - } - - if (index >= baseLength) { - swiper.appendSlide(slides); - return; - } - - let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; - const slidesBuffer = []; - - for (let i = baseLength - 1; i >= index; i -= 1) { - const currentSlide = swiper.slides.eq(i); - currentSlide.remove(); - slidesBuffer.unshift(currentSlide); - } - - if (typeof slides === 'object' && 'length' in slides) { - for (let i = 0; i < slides.length; i += 1) { - if (slides[i]) $wrapperEl.append(slides[i]); - } - - newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; - } else { - $wrapperEl.append(slides); - } - - for (let i = 0; i < slidesBuffer.length; i += 1) { - $wrapperEl.append(slidesBuffer[i]); - } - - if (params.loop) { - swiper.loopCreate(); - } - - if (!params.observer) { - swiper.update(); - } - - if (params.loop) { - swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); - } else { - swiper.slideTo(newActiveIndex, 0, false); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/methods/appendSlide.js": -/*!*************************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/methods/appendSlide.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ appendSlide) -/* harmony export */ }); -function appendSlide(slides) { - const swiper = this; - const { - $wrapperEl, - params - } = swiper; - - if (params.loop) { - swiper.loopDestroy(); - } - - if (typeof slides === 'object' && 'length' in slides) { - for (let i = 0; i < slides.length; i += 1) { - if (slides[i]) $wrapperEl.append(slides[i]); - } - } else { - $wrapperEl.append(slides); - } - - if (params.loop) { - swiper.loopCreate(); - } - - if (!params.observer) { - swiper.update(); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/methods/prependSlide.js": -/*!**************************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/methods/prependSlide.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ prependSlide) -/* harmony export */ }); -function prependSlide(slides) { - const swiper = this; - const { - params, - $wrapperEl, - activeIndex - } = swiper; - - if (params.loop) { - swiper.loopDestroy(); - } - - let newActiveIndex = activeIndex + 1; - - if (typeof slides === 'object' && 'length' in slides) { - for (let i = 0; i < slides.length; i += 1) { - if (slides[i]) $wrapperEl.prepend(slides[i]); - } - - newActiveIndex = activeIndex + slides.length; - } else { - $wrapperEl.prepend(slides); - } - - if (params.loop) { - swiper.loopCreate(); - } - - if (!params.observer) { - swiper.update(); - } - - swiper.slideTo(newActiveIndex, 0, false); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js ***! - \*****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ removeAllSlides) -/* harmony export */ }); -function removeAllSlides() { - const swiper = this; - const slidesIndexes = []; - - for (let i = 0; i < swiper.slides.length; i += 1) { - slidesIndexes.push(i); - } - - swiper.removeSlide(slidesIndexes); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/manipulation/methods/removeSlide.js": -/*!*************************************************************************!*\ - !*** ./node_modules/swiper/modules/manipulation/methods/removeSlide.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ removeSlide) -/* harmony export */ }); -function removeSlide(slidesIndexes) { - const swiper = this; - const { - params, - $wrapperEl, - activeIndex - } = swiper; - let activeIndexBuffer = activeIndex; - - if (params.loop) { - activeIndexBuffer -= swiper.loopedSlides; - swiper.loopDestroy(); - swiper.slides = $wrapperEl.children(`.${params.slideClass}`); - } - - let newActiveIndex = activeIndexBuffer; - let indexToRemove; - - if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { - for (let i = 0; i < slidesIndexes.length; i += 1) { - indexToRemove = slidesIndexes[i]; - if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); - if (indexToRemove < newActiveIndex) newActiveIndex -= 1; - } - - newActiveIndex = Math.max(newActiveIndex, 0); - } else { - indexToRemove = slidesIndexes; - if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); - if (indexToRemove < newActiveIndex) newActiveIndex -= 1; - newActiveIndex = Math.max(newActiveIndex, 0); - } - - if (params.loop) { - swiper.loopCreate(); - } - - if (!params.observer) { - swiper.update(); - } - - if (params.loop) { - swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); - } else { - swiper.slideTo(newActiveIndex, 0, false); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/mousewheel/mousewheel.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/modules/mousewheel/mousewheel.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Mousewheel) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* eslint-disable consistent-return */ - - - -function Mousewheel({ - swiper, - extendParams, - on, - emit -}) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - extendParams({ - mousewheel: { - enabled: false, - releaseOnEdges: false, - invert: false, - forceToAxis: false, - sensitivity: 1, - eventsTarget: 'container', - thresholdDelta: null, - thresholdTime: null - } - }); - swiper.mousewheel = { - enabled: false - }; - let timeout; - let lastScrollTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); - let lastEventBeforeSnap; - const recentWheelEvents = []; - - function normalize(e) { - // Reasonable defaults - const PIXEL_STEP = 10; - const LINE_HEIGHT = 40; - const PAGE_HEIGHT = 800; - let sX = 0; - let sY = 0; // spinX, spinY - - let pX = 0; - let pY = 0; // pixelX, pixelY - // Legacy - - if ('detail' in e) { - sY = e.detail; - } - - if ('wheelDelta' in e) { - sY = -e.wheelDelta / 120; - } - - if ('wheelDeltaY' in e) { - sY = -e.wheelDeltaY / 120; - } - - if ('wheelDeltaX' in e) { - sX = -e.wheelDeltaX / 120; - } // side scrolling on FF with DOMMouseScroll - - - if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { - sX = sY; - sY = 0; - } - - pX = sX * PIXEL_STEP; - pY = sY * PIXEL_STEP; - - if ('deltaY' in e) { - pY = e.deltaY; - } - - if ('deltaX' in e) { - pX = e.deltaX; - } - - if (e.shiftKey && !pX) { - // if user scrolls with shift he wants horizontal scroll - pX = pY; - pY = 0; - } - - if ((pX || pY) && e.deltaMode) { - if (e.deltaMode === 1) { - // delta in LINE units - pX *= LINE_HEIGHT; - pY *= LINE_HEIGHT; - } else { - // delta in PAGE units - pX *= PAGE_HEIGHT; - pY *= PAGE_HEIGHT; - } - } // Fall-back if spin cannot be determined - - - if (pX && !sX) { - sX = pX < 1 ? -1 : 1; - } - - if (pY && !sY) { - sY = pY < 1 ? -1 : 1; - } - - return { - spinX: sX, - spinY: sY, - pixelX: pX, - pixelY: pY - }; - } - - function handleMouseEnter() { - if (!swiper.enabled) return; - swiper.mouseEntered = true; - } - - function handleMouseLeave() { - if (!swiper.enabled) return; - swiper.mouseEntered = false; - } - - function animateSlider(newEvent) { - if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { - // Prevent if delta of wheel scroll delta is below configured threshold - return false; - } - - if (swiper.params.mousewheel.thresholdTime && (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { - // Prevent if time between scrolls is below configured threshold - return false; - } // If the movement is NOT big enough and - // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): - // Don't go any further (avoid insignificant scroll movement). - - - if (newEvent.delta >= 6 && (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)() - lastScrollTime < 60) { - // Return false as a default - return true; - } // If user is scrolling towards the end: - // If the slider hasn't hit the latest slide or - // if the slider is a loop and - // if the slider isn't moving right now: - // Go to next slide and - // emit a scroll event. - // Else (the user is scrolling towards the beginning) and - // if the slider hasn't hit the first slide or - // if the slider is a loop and - // if the slider isn't moving right now: - // Go to prev slide and - // emit a scroll event. - - - if (newEvent.direction < 0) { - if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { - swiper.slideNext(); - emit('scroll', newEvent.raw); - } - } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { - swiper.slidePrev(); - emit('scroll', newEvent.raw); - } // If you got here is because an animation has been triggered so store the current time - - - lastScrollTime = new window.Date().getTime(); // Return false as a default - - return false; - } - - function releaseScroll(newEvent) { - const params = swiper.params.mousewheel; - - if (newEvent.direction < 0) { - if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { - // Return true to animate scroll on edges - return true; - } - } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { - // Return true to animate scroll on edges - return true; - } - - return false; - } - - function handle(event) { - let e = event; - let disableParentSwiper = true; - if (!swiper.enabled) return; - const params = swiper.params.mousewheel; - - if (swiper.params.cssMode) { - e.preventDefault(); - } - - let target = swiper.$el; - - if (swiper.params.mousewheel.eventsTarget !== 'container') { - target = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.mousewheel.eventsTarget); - } - - if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true; - if (e.originalEvent) e = e.originalEvent; // jquery fix - - let delta = 0; - const rtlFactor = swiper.rtlTranslate ? -1 : 1; - const data = normalize(e); - - if (params.forceToAxis) { - if (swiper.isHorizontal()) { - if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; - } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; - } else { - delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; - } - - if (delta === 0) return true; - if (params.invert) delta = -delta; // Get the scroll positions - - let positions = swiper.getTranslate() + delta * params.sensitivity; - if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); - if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true: - // the disableParentSwiper will be true. - // When loop is false: - // if the scroll positions is not on edge, - // then the disableParentSwiper will be true. - // if the scroll on edge positions, - // then the disableParentSwiper will be false. - - disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); - if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); - - if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { - // Register the new event in a variable which stores the relevant data - const newEvent = { - time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), - delta: Math.abs(delta), - direction: Math.sign(delta), - raw: event - }; // Keep the most recent events - - if (recentWheelEvents.length >= 2) { - recentWheelEvents.shift(); // only store the last N events - } - - const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; - recentWheelEvents.push(newEvent); // If there is at least one previous recorded event: - // If direction has changed or - // if the scroll is quicker than the previous one: - // Animate the slider. - // Else (this is the first time the wheel is moved): - // Animate the slider. - - if (prevEvent) { - if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { - animateSlider(newEvent); - } - } else { - animateSlider(newEvent); - } // If it's time to release the scroll: - // Return now so you don't hit the preventDefault. - - - if (releaseScroll(newEvent)) { - return true; - } - } else { - // Freemode or scrollContainer: - // If we recently snapped after a momentum scroll, then ignore wheel events - // to give time for the deceleration to finish. Stop ignoring after 500 msecs - // or if it's a new scroll (larger delta or inverse sign as last event before - // an end-of-momentum snap). - const newEvent = { - time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), - delta: Math.abs(delta), - direction: Math.sign(delta) - }; - const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; - - if (!ignoreWheelEvents) { - lastEventBeforeSnap = undefined; - - if (swiper.params.loop) { - swiper.loopFix(); - } - - let position = swiper.getTranslate() + delta * params.sensitivity; - const wasBeginning = swiper.isBeginning; - const wasEnd = swiper.isEnd; - if (position >= swiper.minTranslate()) position = swiper.minTranslate(); - if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); - swiper.setTransition(0); - swiper.setTranslate(position); - swiper.updateProgress(); - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - - if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { - swiper.updateSlidesClasses(); - } - - if (swiper.params.freeMode.sticky) { - // When wheel scrolling starts with sticky (aka snap) enabled, then detect - // the end of a momentum scroll by storing recent (N=15?) wheel events. - // 1. do all N events have decreasing or same (absolute value) delta? - // 2. did all N events arrive in the last M (M=500?) msecs? - // 3. does the earliest event have an (absolute value) delta that's - // at least P (P=1?) larger than the most recent event's delta? - // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? - // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. - // Snap immediately and ignore remaining wheel events in this scroll. - // See comment above for "remaining wheel events in this scroll" determination. - // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. - clearTimeout(timeout); - timeout = undefined; - - if (recentWheelEvents.length >= 15) { - recentWheelEvents.shift(); // only store the last N events - } - - const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; - const firstEvent = recentWheelEvents[0]; - recentWheelEvents.push(newEvent); - - if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { - // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. - recentWheelEvents.splice(0); - } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { - // We're at the end of the deceleration of a momentum scroll, so there's no need - // to wait for more events. Snap ASAP on the next tick. - // Also, because there's some remaining momentum we'll bias the snap in the - // direction of the ongoing scroll because it's better UX for the scroll to snap - // in the same direction as the scroll instead of reversing to snap. Therefore, - // if it's already scrolled more than 20% in the current direction, keep going. - const snapToThreshold = delta > 0 ? 0.8 : 0.2; - lastEventBeforeSnap = newEvent; - recentWheelEvents.splice(0); - timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { - swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); - }, 0); // no delay; move on next tick - } - - if (!timeout) { - // if we get here, then we haven't detected the end of a momentum scroll, so - // we'll consider a scroll "complete" when there haven't been any wheel events - // for 500ms. - timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { - const snapToThreshold = 0.5; - lastEventBeforeSnap = newEvent; - recentWheelEvents.splice(0); - swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); - }, 500); - } - } // Emit event - - - if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay - - if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions - - if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; - } - } - - if (e.preventDefault) e.preventDefault();else e.returnValue = false; - return false; - } - - function events(method) { - let target = swiper.$el; - - if (swiper.params.mousewheel.eventsTarget !== 'container') { - target = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.mousewheel.eventsTarget); - } - - target[method]('mouseenter', handleMouseEnter); - target[method]('mouseleave', handleMouseLeave); - target[method]('wheel', handle); - } - - function enable() { - if (swiper.params.cssMode) { - swiper.wrapperEl.removeEventListener('wheel', handle); - return true; - } - - if (swiper.mousewheel.enabled) return false; - events('on'); - swiper.mousewheel.enabled = true; - return true; - } - - function disable() { - if (swiper.params.cssMode) { - swiper.wrapperEl.addEventListener(event, handle); - return true; - } - - if (!swiper.mousewheel.enabled) return false; - events('off'); - swiper.mousewheel.enabled = false; - return true; - } - - on('init', () => { - if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { - disable(); - } - - if (swiper.params.mousewheel.enabled) enable(); - }); - on('destroy', () => { - if (swiper.params.cssMode) { - enable(); - } - - if (swiper.mousewheel.enabled) disable(); - }); - Object.assign(swiper.mousewheel, { - enable, - disable - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/navigation/navigation.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/modules/navigation/navigation.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Navigation) -/* harmony export */ }); -/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function Navigation({ - swiper, - extendParams, - on, - emit -}) { - extendParams({ - navigation: { - nextEl: null, - prevEl: null, - hideOnClick: false, - disabledClass: 'swiper-button-disabled', - hiddenClass: 'swiper-button-hidden', - lockClass: 'swiper-button-lock' - } - }); - swiper.navigation = { - nextEl: null, - $nextEl: null, - prevEl: null, - $prevEl: null - }; - - function getEl(el) { - let $el; - - if (el) { - $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el); - - if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) { - $el = swiper.$el.find(el); - } - } - - return $el; - } - - function toggleEl($el, disabled) { - const params = swiper.params.navigation; - - if ($el && $el.length > 0) { - $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass); - if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled; - - if (swiper.params.watchOverflow && swiper.enabled) { - $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); - } - } - } - - function update() { - // Update Navigation Buttons - if (swiper.params.loop) return; - const { - $nextEl, - $prevEl - } = swiper.navigation; - toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind); - toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind); - } - - function onPrevClick(e) { - e.preventDefault(); - if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; - swiper.slidePrev(); - } - - function onNextClick(e) { - e.preventDefault(); - if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; - swiper.slideNext(); - } - - function init() { - const params = swiper.params.navigation; - swiper.params.navigation = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper, swiper.originalParams.navigation, swiper.params.navigation, { - nextEl: 'swiper-button-next', - prevEl: 'swiper-button-prev' - }); - if (!(params.nextEl || params.prevEl)) return; - const $nextEl = getEl(params.nextEl); - const $prevEl = getEl(params.prevEl); - - if ($nextEl && $nextEl.length > 0) { - $nextEl.on('click', onNextClick); - } - - if ($prevEl && $prevEl.length > 0) { - $prevEl.on('click', onPrevClick); - } - - Object.assign(swiper.navigation, { - $nextEl, - nextEl: $nextEl && $nextEl[0], - $prevEl, - prevEl: $prevEl && $prevEl[0] - }); - - if (!swiper.enabled) { - if ($nextEl) $nextEl.addClass(params.lockClass); - if ($prevEl) $prevEl.addClass(params.lockClass); - } - } - - function destroy() { - const { - $nextEl, - $prevEl - } = swiper.navigation; - - if ($nextEl && $nextEl.length) { - $nextEl.off('click', onNextClick); - $nextEl.removeClass(swiper.params.navigation.disabledClass); - } - - if ($prevEl && $prevEl.length) { - $prevEl.off('click', onPrevClick); - $prevEl.removeClass(swiper.params.navigation.disabledClass); - } - } - - on('init', () => { - init(); - update(); - }); - on('toEdge fromEdge lock unlock', () => { - update(); - }); - on('destroy', () => { - destroy(); - }); - on('enable disable', () => { - const { - $nextEl, - $prevEl - } = swiper.navigation; - - if ($nextEl) { - $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); - } - - if ($prevEl) { - $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); - } - }); - on('click', (_s, e) => { - const { - $nextEl, - $prevEl - } = swiper.navigation; - const targetEl = e.target; - - if (swiper.params.navigation.hideOnClick && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(targetEl).is($prevEl) && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(targetEl).is($nextEl)) { - if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; - let isHidden; - - if ($nextEl) { - isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); - } else if ($prevEl) { - isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); - } - - if (isHidden === true) { - emit('navigationShow'); - } else { - emit('navigationHide'); - } - - if ($nextEl) { - $nextEl.toggleClass(swiper.params.navigation.hiddenClass); - } - - if ($prevEl) { - $prevEl.toggleClass(swiper.params.navigation.hiddenClass); - } - } - }); - Object.assign(swiper.navigation, { - update, - init, - destroy - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/pagination/pagination.js": -/*!**************************************************************!*\ - !*** ./node_modules/swiper/modules/pagination/pagination.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Pagination) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/classes-to-selector.js */ "./node_modules/swiper/shared/classes-to-selector.js"); -/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); - - - -function Pagination({ - swiper, - extendParams, - on, - emit -}) { - const pfx = 'swiper-pagination'; - extendParams({ - pagination: { - el: null, - bulletElement: 'span', - clickable: false, - hideOnClick: false, - renderBullet: null, - renderProgressbar: null, - renderFraction: null, - renderCustom: null, - progressbarOpposite: false, - type: 'bullets', - // 'bullets' or 'progressbar' or 'fraction' or 'custom' - dynamicBullets: false, - dynamicMainBullets: 1, - formatFractionCurrent: number => number, - formatFractionTotal: number => number, - bulletClass: `${pfx}-bullet`, - bulletActiveClass: `${pfx}-bullet-active`, - modifierClass: `${pfx}-`, - currentClass: `${pfx}-current`, - totalClass: `${pfx}-total`, - hiddenClass: `${pfx}-hidden`, - progressbarFillClass: `${pfx}-progressbar-fill`, - progressbarOppositeClass: `${pfx}-progressbar-opposite`, - clickableClass: `${pfx}-clickable`, - lockClass: `${pfx}-lock`, - horizontalClass: `${pfx}-horizontal`, - verticalClass: `${pfx}-vertical` - } - }); - swiper.pagination = { - el: null, - $el: null, - bullets: [] - }; - let bulletSize; - let dynamicBulletIndex = 0; - - function isPaginationDisabled() { - return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0; - } - - function setSideBullets($bulletEl, position) { - const { - bulletActiveClass - } = swiper.params.pagination; - $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`); - } - - function update() { - // Render || Update Pagination bullets/items - const rtl = swiper.rtl; - const params = swiper.params.pagination; - if (isPaginationDisabled()) return; - const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; - const $el = swiper.pagination.$el; // Current/Total - - let current; - const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; - - if (swiper.params.loop) { - current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); - - if (current > slidesLength - 1 - swiper.loopedSlides * 2) { - current -= slidesLength - swiper.loopedSlides * 2; - } - - if (current > total - 1) current -= total; - if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; - } else if (typeof swiper.snapIndex !== 'undefined') { - current = swiper.snapIndex; - } else { - current = swiper.activeIndex || 0; - } // Types - - - if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { - const bullets = swiper.pagination.bullets; - let firstIndex; - let lastIndex; - let midIndex; - - if (params.dynamicBullets) { - bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); - $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`); - - if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { - dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0); - - if (dynamicBulletIndex > params.dynamicMainBullets - 1) { - dynamicBulletIndex = params.dynamicMainBullets - 1; - } else if (dynamicBulletIndex < 0) { - dynamicBulletIndex = 0; - } - } - - firstIndex = Math.max(current - dynamicBulletIndex, 0); - lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); - midIndex = (lastIndex + firstIndex) / 2; - } - - bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' ')); - - if ($el.length > 1) { - bullets.each(bullet => { - const $bullet = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(bullet); - const bulletIndex = $bullet.index(); - - if (bulletIndex === current) { - $bullet.addClass(params.bulletActiveClass); - } - - if (params.dynamicBullets) { - if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { - $bullet.addClass(`${params.bulletActiveClass}-main`); - } - - if (bulletIndex === firstIndex) { - setSideBullets($bullet, 'prev'); - } - - if (bulletIndex === lastIndex) { - setSideBullets($bullet, 'next'); - } - } - }); - } else { - const $bullet = bullets.eq(current); - const bulletIndex = $bullet.index(); - $bullet.addClass(params.bulletActiveClass); - - if (params.dynamicBullets) { - const $firstDisplayedBullet = bullets.eq(firstIndex); - const $lastDisplayedBullet = bullets.eq(lastIndex); - - for (let i = firstIndex; i <= lastIndex; i += 1) { - bullets.eq(i).addClass(`${params.bulletActiveClass}-main`); - } - - if (swiper.params.loop) { - if (bulletIndex >= bullets.length) { - for (let i = params.dynamicMainBullets; i >= 0; i -= 1) { - bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`); - } - - bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`); - } else { - setSideBullets($firstDisplayedBullet, 'prev'); - setSideBullets($lastDisplayedBullet, 'next'); - } - } else { - setSideBullets($firstDisplayedBullet, 'prev'); - setSideBullets($lastDisplayedBullet, 'next'); - } - } - } - - if (params.dynamicBullets) { - const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); - const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; - const offsetProp = rtl ? 'right' : 'left'; - bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`); - } - } - - if (params.type === 'fraction') { - $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.currentClass)).text(params.formatFractionCurrent(current + 1)); - $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.totalClass)).text(params.formatFractionTotal(total)); - } - - if (params.type === 'progressbar') { - let progressbarDirection; - - if (params.progressbarOpposite) { - progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; - } else { - progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; - } - - const scale = (current + 1) / total; - let scaleX = 1; - let scaleY = 1; - - if (progressbarDirection === 'horizontal') { - scaleX = scale; - } else { - scaleY = scale; - } - - $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed); - } - - if (params.type === 'custom' && params.renderCustom) { - $el.html(params.renderCustom(swiper, current + 1, total)); - emit('paginationRender', $el[0]); - } else { - emit('paginationUpdate', $el[0]); - } - - if (swiper.params.watchOverflow && swiper.enabled) { - $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); - } - } - - function render() { - // Render Container - const params = swiper.params.pagination; - if (isPaginationDisabled()) return; - const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; - const $el = swiper.pagination.$el; - let paginationHTML = ''; - - if (params.type === 'bullets') { - let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; - - if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) { - numberOfBullets = slidesLength; - } - - for (let i = 0; i < numberOfBullets; i += 1) { - if (params.renderBullet) { - paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); - } else { - paginationHTML += `<${params.bulletElement} class="${params.bulletClass}">`; - } - } - - $el.html(paginationHTML); - swiper.pagination.bullets = $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass)); - } - - if (params.type === 'fraction') { - if (params.renderFraction) { - paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); - } else { - paginationHTML = `` + ' / ' + ``; - } - - $el.html(paginationHTML); - } - - if (params.type === 'progressbar') { - if (params.renderProgressbar) { - paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); - } else { - paginationHTML = ``; - } - - $el.html(paginationHTML); - } - - if (params.type !== 'custom') { - emit('paginationRender', swiper.pagination.$el[0]); - } - } - - function init() { - swiper.params.pagination = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_2__["default"])(swiper, swiper.originalParams.pagination, swiper.params.pagination, { - el: 'swiper-pagination' - }); - const params = swiper.params.pagination; - if (!params.el) return; - let $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params.el); - if ($el.length === 0) return; - - if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) { - $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper - - if ($el.length > 1) { - $el = $el.filter(el => { - if ((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(el).parents('.swiper')[0] !== swiper.el) return false; - return true; - }); - } - } - - if (params.type === 'bullets' && params.clickable) { - $el.addClass(params.clickableClass); - } - - $el.addClass(params.modifierClass + params.type); - $el.addClass(params.modifierClass + swiper.params.direction); - - if (params.type === 'bullets' && params.dynamicBullets) { - $el.addClass(`${params.modifierClass}${params.type}-dynamic`); - dynamicBulletIndex = 0; - - if (params.dynamicMainBullets < 1) { - params.dynamicMainBullets = 1; - } - } - - if (params.type === 'progressbar' && params.progressbarOpposite) { - $el.addClass(params.progressbarOppositeClass); - } - - if (params.clickable) { - $el.on('click', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass), function onClick(e) { - e.preventDefault(); - let index = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this).index() * swiper.params.slidesPerGroup; - if (swiper.params.loop) index += swiper.loopedSlides; - swiper.slideTo(index); - }); - } - - Object.assign(swiper.pagination, { - $el, - el: $el[0] - }); - - if (!swiper.enabled) { - $el.addClass(params.lockClass); - } - } - - function destroy() { - const params = swiper.params.pagination; - if (isPaginationDisabled()) return; - const $el = swiper.pagination.$el; - $el.removeClass(params.hiddenClass); - $el.removeClass(params.modifierClass + params.type); - $el.removeClass(params.modifierClass + swiper.params.direction); - if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass); - - if (params.clickable) { - $el.off('click', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass)); - } - } - - on('init', () => { - init(); - render(); - update(); - }); - on('activeIndexChange', () => { - if (swiper.params.loop) { - update(); - } else if (typeof swiper.snapIndex === 'undefined') { - update(); - } - }); - on('snapIndexChange', () => { - if (!swiper.params.loop) { - update(); - } - }); - on('slidesLengthChange', () => { - if (swiper.params.loop) { - render(); - update(); - } - }); - on('snapGridLengthChange', () => { - if (!swiper.params.loop) { - render(); - update(); - } - }); - on('destroy', () => { - destroy(); - }); - on('enable disable', () => { - const { - $el - } = swiper.pagination; - - if ($el) { - $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass); - } - }); - on('lock unlock', () => { - update(); - }); - on('click', (_s, e) => { - const targetEl = e.target; - const { - $el - } = swiper.pagination; - - if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(targetEl).hasClass(swiper.params.pagination.bulletClass)) { - if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; - const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass); - - if (isHidden === true) { - emit('paginationShow'); - } else { - emit('paginationHide'); - } - - $el.toggleClass(swiper.params.pagination.hiddenClass); - } - }); - Object.assign(swiper.pagination, { - render, - update, - init, - destroy - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/parallax/parallax.js": -/*!**********************************************************!*\ - !*** ./node_modules/swiper/modules/parallax/parallax.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Parallax) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - -function Parallax({ - swiper, - extendParams, - on -}) { - extendParams({ - parallax: { - enabled: false - } - }); - - const setTransform = (el, progress) => { - const { - rtl - } = swiper; - const $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(el); - const rtlFactor = rtl ? -1 : 1; - const p = $el.attr('data-swiper-parallax') || '0'; - let x = $el.attr('data-swiper-parallax-x'); - let y = $el.attr('data-swiper-parallax-y'); - const scale = $el.attr('data-swiper-parallax-scale'); - const opacity = $el.attr('data-swiper-parallax-opacity'); - - if (x || y) { - x = x || '0'; - y = y || '0'; - } else if (swiper.isHorizontal()) { - x = p; - y = '0'; - } else { - y = p; - x = '0'; - } - - if (x.indexOf('%') >= 0) { - x = `${parseInt(x, 10) * progress * rtlFactor}%`; - } else { - x = `${x * progress * rtlFactor}px`; - } - - if (y.indexOf('%') >= 0) { - y = `${parseInt(y, 10) * progress}%`; - } else { - y = `${y * progress}px`; - } - - if (typeof opacity !== 'undefined' && opacity !== null) { - const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); - $el[0].style.opacity = currentOpacity; - } - - if (typeof scale === 'undefined' || scale === null) { - $el.transform(`translate3d(${x}, ${y}, 0px)`); - } else { - const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); - $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`); - } - }; - - const setTranslate = () => { - const { - $el, - slides, - progress, - snapGrid - } = swiper; - $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { - setTransform(el, progress); - }); - slides.each((slideEl, slideIndex) => { - let slideProgress = slideEl.progress; - - if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { - slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); - } - - slideProgress = Math.min(Math.max(slideProgress, -1), 1); - (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { - setTransform(el, slideProgress); - }); - }); - }; - - const setTransition = (duration = swiper.params.speed) => { - const { - $el - } = swiper; - $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => { - const $parallaxEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parallaxEl); - let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; - if (duration === 0) parallaxDuration = 0; - $parallaxEl.transition(parallaxDuration); - }); - }; - - on('beforeInit', () => { - if (!swiper.params.parallax.enabled) return; - swiper.params.watchSlidesProgress = true; - swiper.originalParams.watchSlidesProgress = true; - }); - on('init', () => { - if (!swiper.params.parallax.enabled) return; - setTranslate(); - }); - on('setTranslate', () => { - if (!swiper.params.parallax.enabled) return; - setTranslate(); - }); - on('setTransition', (_swiper, duration) => { - if (!swiper.params.parallax.enabled) return; - setTransition(duration); - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/scrollbar/scrollbar.js": -/*!************************************************************!*\ - !*** ./node_modules/swiper/modules/scrollbar/scrollbar.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Scrollbar) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); - - - - -function Scrollbar({ - swiper, - extendParams, - on, - emit -}) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - let isTouched = false; - let timeout = null; - let dragTimeout = null; - let dragStartPos; - let dragSize; - let trackSize; - let divider; - extendParams({ - scrollbar: { - el: null, - dragSize: 'auto', - hide: false, - draggable: false, - snapOnRelease: true, - lockClass: 'swiper-scrollbar-lock', - dragClass: 'swiper-scrollbar-drag' - } - }); - swiper.scrollbar = { - el: null, - dragEl: null, - $el: null, - $dragEl: null - }; - - function setTranslate() { - if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; - const { - scrollbar, - rtlTranslate: rtl, - progress - } = swiper; - const { - $dragEl, - $el - } = scrollbar; - const params = swiper.params.scrollbar; - let newSize = dragSize; - let newPos = (trackSize - dragSize) * progress; - - if (rtl) { - newPos = -newPos; - - if (newPos > 0) { - newSize = dragSize - newPos; - newPos = 0; - } else if (-newPos + dragSize > trackSize) { - newSize = trackSize + newPos; - } - } else if (newPos < 0) { - newSize = dragSize + newPos; - newPos = 0; - } else if (newPos + dragSize > trackSize) { - newSize = trackSize - newPos; - } - - if (swiper.isHorizontal()) { - $dragEl.transform(`translate3d(${newPos}px, 0, 0)`); - $dragEl[0].style.width = `${newSize}px`; - } else { - $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`); - $dragEl[0].style.height = `${newSize}px`; - } - - if (params.hide) { - clearTimeout(timeout); - $el[0].style.opacity = 1; - timeout = setTimeout(() => { - $el[0].style.opacity = 0; - $el.transition(400); - }, 1000); - } - } - - function setTransition(duration) { - if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; - swiper.scrollbar.$dragEl.transition(duration); - } - - function updateSize() { - if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; - const { - scrollbar - } = swiper; - const { - $dragEl, - $el - } = scrollbar; - $dragEl[0].style.width = ''; - $dragEl[0].style.height = ''; - trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; - divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); - - if (swiper.params.scrollbar.dragSize === 'auto') { - dragSize = trackSize * divider; - } else { - dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); - } - - if (swiper.isHorizontal()) { - $dragEl[0].style.width = `${dragSize}px`; - } else { - $dragEl[0].style.height = `${dragSize}px`; - } - - if (divider >= 1) { - $el[0].style.display = 'none'; - } else { - $el[0].style.display = ''; - } - - if (swiper.params.scrollbar.hide) { - $el[0].style.opacity = 0; - } - - if (swiper.params.watchOverflow && swiper.enabled) { - scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); - } - } - - function getPointerPosition(e) { - if (swiper.isHorizontal()) { - return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX; - } - - return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY; - } - - function setDragPosition(e) { - const { - scrollbar, - rtlTranslate: rtl - } = swiper; - const { - $el - } = scrollbar; - let positionRatio; - positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); - positionRatio = Math.max(Math.min(positionRatio, 1), 0); - - if (rtl) { - positionRatio = 1 - positionRatio; - } - - const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; - swiper.updateProgress(position); - swiper.setTranslate(position); - swiper.updateActiveIndex(); - swiper.updateSlidesClasses(); - } - - function onDragStart(e) { - const params = swiper.params.scrollbar; - const { - scrollbar, - $wrapperEl - } = swiper; - const { - $el, - $dragEl - } = scrollbar; - isTouched = true; - dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; - e.preventDefault(); - e.stopPropagation(); - $wrapperEl.transition(100); - $dragEl.transition(100); - setDragPosition(e); - clearTimeout(dragTimeout); - $el.transition(0); - - if (params.hide) { - $el.css('opacity', 1); - } - - if (swiper.params.cssMode) { - swiper.$wrapperEl.css('scroll-snap-type', 'none'); - } - - emit('scrollbarDragStart', e); - } - - function onDragMove(e) { - const { - scrollbar, - $wrapperEl - } = swiper; - const { - $el, - $dragEl - } = scrollbar; - if (!isTouched) return; - if (e.preventDefault) e.preventDefault();else e.returnValue = false; - setDragPosition(e); - $wrapperEl.transition(0); - $el.transition(0); - $dragEl.transition(0); - emit('scrollbarDragMove', e); - } - - function onDragEnd(e) { - const params = swiper.params.scrollbar; - const { - scrollbar, - $wrapperEl - } = swiper; - const { - $el - } = scrollbar; - if (!isTouched) return; - isTouched = false; - - if (swiper.params.cssMode) { - swiper.$wrapperEl.css('scroll-snap-type', ''); - $wrapperEl.transition(''); - } - - if (params.hide) { - clearTimeout(dragTimeout); - dragTimeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { - $el.css('opacity', 0); - $el.transition(400); - }, 1000); - } - - emit('scrollbarDragEnd', e); - - if (params.snapOnRelease) { - swiper.slideToClosest(); - } - } - - function events(method) { - const { - scrollbar, - touchEventsTouch, - touchEventsDesktop, - params, - support - } = swiper; - const $el = scrollbar.$el; - const target = $el[0]; - const activeListener = support.passiveListener && params.passiveListeners ? { - passive: false, - capture: false - } : false; - const passiveListener = support.passiveListener && params.passiveListeners ? { - passive: true, - capture: false - } : false; - if (!target) return; - const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; - - if (!support.touch) { - target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener); - document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener); - document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener); - } else { - target[eventMethod](touchEventsTouch.start, onDragStart, activeListener); - target[eventMethod](touchEventsTouch.move, onDragMove, activeListener); - target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener); - } - } - - function enableDraggable() { - if (!swiper.params.scrollbar.el) return; - events('on'); - } - - function disableDraggable() { - if (!swiper.params.scrollbar.el) return; - events('off'); - } - - function init() { - const { - scrollbar, - $el: $swiperEl - } = swiper; - swiper.params.scrollbar = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_3__["default"])(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { - el: 'swiper-scrollbar' - }); - const params = swiper.params.scrollbar; - if (!params.el) return; - let $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el); - - if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { - $el = $swiperEl.find(params.el); - } - - let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`); - - if ($dragEl.length === 0) { - $dragEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(`
`); - $el.append($dragEl); - } - - Object.assign(scrollbar, { - $el, - el: $el[0], - $dragEl, - dragEl: $dragEl[0] - }); - - if (params.draggable) { - enableDraggable(); - } - - if ($el) { - $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); - } - } - - function destroy() { - disableDraggable(); - } - - on('init', () => { - init(); - updateSize(); - setTranslate(); - }); - on('update resize observerUpdate lock unlock', () => { - updateSize(); - }); - on('setTranslate', () => { - setTranslate(); - }); - on('setTransition', (_s, duration) => { - setTransition(duration); - }); - on('enable disable', () => { - const { - $el - } = swiper.scrollbar; - - if ($el) { - $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); - } - }); - on('destroy', () => { - destroy(); - }); - Object.assign(swiper.scrollbar, { - updateSize, - setTranslate, - init, - destroy - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/thumbs/thumbs.js": -/*!******************************************************!*\ - !*** ./node_modules/swiper/modules/thumbs/thumbs.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Thumb) -/* harmony export */ }); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); - - -function Thumb({ - swiper, - extendParams, - on -}) { - extendParams({ - thumbs: { - swiper: null, - multipleActiveThumbs: true, - autoScrollOffset: 0, - slideThumbActiveClass: 'swiper-slide-thumb-active', - thumbsContainerClass: 'swiper-thumbs' - } - }); - let initialized = false; - let swiperCreated = false; - swiper.thumbs = { - swiper: null - }; - - function onThumbClick() { - const thumbsSwiper = swiper.thumbs.swiper; - if (!thumbsSwiper) return; - const clickedIndex = thumbsSwiper.clickedIndex; - const clickedSlide = thumbsSwiper.clickedSlide; - if (clickedSlide && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return; - if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; - let slideToIndex; - - if (thumbsSwiper.params.loop) { - slideToIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); - } else { - slideToIndex = clickedIndex; - } - - if (swiper.params.loop) { - let currentIndex = swiper.activeIndex; - - if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { - swiper.loopFix(); // eslint-disable-next-line - - swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; - currentIndex = swiper.activeIndex; - } - - const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); - const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); - if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex; - } - - swiper.slideTo(slideToIndex); - } - - function init() { - const { - thumbs: thumbsParams - } = swiper.params; - if (initialized) return false; - initialized = true; - const SwiperClass = swiper.constructor; - - if (thumbsParams.swiper instanceof SwiperClass) { - swiper.thumbs.swiper = thumbsParams.swiper; - Object.assign(swiper.thumbs.swiper.originalParams, { - watchSlidesProgress: true, - slideToClickedSlide: false - }); - Object.assign(swiper.thumbs.swiper.params, { - watchSlidesProgress: true, - slideToClickedSlide: false - }); - } else if ((0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(thumbsParams.swiper)) { - const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); - Object.assign(thumbsSwiperParams, { - watchSlidesProgress: true, - slideToClickedSlide: false - }); - swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); - swiperCreated = true; - } - - swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); - swiper.thumbs.swiper.on('tap', onThumbClick); - return true; - } - - function update(initial) { - const thumbsSwiper = swiper.thumbs.swiper; - if (!thumbsSwiper) return; - const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; - const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; - const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; - - if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { - let currentThumbsIndex = thumbsSwiper.activeIndex; - let newThumbsIndex; - let direction; - - if (thumbsSwiper.params.loop) { - if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { - thumbsSwiper.loopFix(); // eslint-disable-next-line - - thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; - currentThumbsIndex = thumbsSwiper.activeIndex; - } // Find actual thumbs index to slide to - - - const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); - const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); - - if (typeof prevThumbsIndex === 'undefined') { - newThumbsIndex = nextThumbsIndex; - } else if (typeof nextThumbsIndex === 'undefined') { - newThumbsIndex = prevThumbsIndex; - } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { - newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex; - } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { - newThumbsIndex = nextThumbsIndex; - } else { - newThumbsIndex = prevThumbsIndex; - } - - direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; - } else { - newThumbsIndex = swiper.realIndex; - direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; - } - - if (useOffset) { - newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; - } - - if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { - if (thumbsSwiper.params.centeredSlides) { - if (newThumbsIndex > currentThumbsIndex) { - newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; - } else { - newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; - } - } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1; - } - - thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); - } - } // Activate thumbs - - - let thumbsToActivate = 1; - const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; - - if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { - thumbsToActivate = swiper.params.slidesPerView; - } - - if (!swiper.params.thumbs.multipleActiveThumbs) { - thumbsToActivate = 1; - } - - thumbsToActivate = Math.floor(thumbsToActivate); - thumbsSwiper.slides.removeClass(thumbActiveClass); - - if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { - for (let i = 0; i < thumbsToActivate; i += 1) { - thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass); - } - } else { - for (let i = 0; i < thumbsToActivate; i += 1) { - thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass); - } - } - } - - on('beforeInit', () => { - const { - thumbs - } = swiper.params; - if (!thumbs || !thumbs.swiper) return; - init(); - update(true); - }); - on('slideChange update resize observerUpdate', () => { - if (!swiper.thumbs.swiper) return; - update(); - }); - on('setTransition', (_s, duration) => { - const thumbsSwiper = swiper.thumbs.swiper; - if (!thumbsSwiper) return; - thumbsSwiper.setTransition(duration); - }); - on('beforeDestroy', () => { - const thumbsSwiper = swiper.thumbs.swiper; - if (!thumbsSwiper) return; - - if (swiperCreated && thumbsSwiper) { - thumbsSwiper.destroy(); - } - }); - Object.assign(swiper.thumbs, { - init, - update - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/virtual/virtual.js": -/*!********************************************************!*\ - !*** ./node_modules/swiper/modules/virtual/virtual.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Virtual) -/* harmony export */ }); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - -function Virtual({ - swiper, - extendParams, - on -}) { - extendParams({ - virtual: { - enabled: false, - slides: [], - cache: true, - renderSlide: null, - renderExternal: null, - renderExternalUpdate: true, - addSlidesBefore: 0, - addSlidesAfter: 0 - } - }); - let cssModeTimeout; - swiper.virtual = { - cache: {}, - from: undefined, - to: undefined, - slides: [], - offset: 0, - slidesGrid: [] - }; - - function renderSlide(slide, index) { - const params = swiper.params.virtual; - - if (params.cache && swiper.virtual.cache[index]) { - return swiper.virtual.cache[index]; - } - - const $slideEl = params.renderSlide ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params.renderSlide.call(swiper, slide, index)) : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`
${slide}
`); - if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index); - if (params.cache) swiper.virtual.cache[index] = $slideEl; - return $slideEl; - } - - function update(force) { - const { - slidesPerView, - slidesPerGroup, - centeredSlides - } = swiper.params; - const { - addSlidesBefore, - addSlidesAfter - } = swiper.params.virtual; - const { - from: previousFrom, - to: previousTo, - slides, - slidesGrid: previousSlidesGrid, - offset: previousOffset - } = swiper.virtual; - - if (!swiper.params.cssMode) { - swiper.updateActiveIndex(); - } - - const activeIndex = swiper.activeIndex || 0; - let offsetProp; - if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; - let slidesAfter; - let slidesBefore; - - if (centeredSlides) { - slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; - slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; - } else { - slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; - slidesBefore = slidesPerGroup + addSlidesBefore; - } - - const from = Math.max((activeIndex || 0) - slidesBefore, 0); - const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); - const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); - Object.assign(swiper.virtual, { - from, - to, - offset, - slidesGrid: swiper.slidesGrid - }); - - function onRendered() { - swiper.updateSlides(); - swiper.updateProgress(); - swiper.updateSlidesClasses(); - - if (swiper.lazy && swiper.params.lazy.enabled) { - swiper.lazy.load(); - } - } - - if (previousFrom === from && previousTo === to && !force) { - if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { - swiper.slides.css(offsetProp, `${offset}px`); - } - - swiper.updateProgress(); - return; - } - - if (swiper.params.virtual.renderExternal) { - swiper.params.virtual.renderExternal.call(swiper, { - offset, - from, - to, - slides: function getSlides() { - const slidesToRender = []; - - for (let i = from; i <= to; i += 1) { - slidesToRender.push(slides[i]); - } - - return slidesToRender; - }() - }); - - if (swiper.params.virtual.renderExternalUpdate) { - onRendered(); - } - - return; - } - - const prependIndexes = []; - const appendIndexes = []; - - if (force) { - swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove(); - } else { - for (let i = previousFrom; i <= previousTo; i += 1) { - if (i < from || i > to) { - swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove(); - } - } - } - - for (let i = 0; i < slides.length; i += 1) { - if (i >= from && i <= to) { - if (typeof previousTo === 'undefined' || force) { - appendIndexes.push(i); - } else { - if (i > previousTo) appendIndexes.push(i); - if (i < previousFrom) prependIndexes.push(i); - } - } - } - - appendIndexes.forEach(index => { - swiper.$wrapperEl.append(renderSlide(slides[index], index)); - }); - prependIndexes.sort((a, b) => b - a).forEach(index => { - swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); - }); - swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`); - onRendered(); - } - - function appendSlide(slides) { - if (typeof slides === 'object' && 'length' in slides) { - for (let i = 0; i < slides.length; i += 1) { - if (slides[i]) swiper.virtual.slides.push(slides[i]); - } - } else { - swiper.virtual.slides.push(slides); - } - - update(true); - } - - function prependSlide(slides) { - const activeIndex = swiper.activeIndex; - let newActiveIndex = activeIndex + 1; - let numberOfNewSlides = 1; - - if (Array.isArray(slides)) { - for (let i = 0; i < slides.length; i += 1) { - if (slides[i]) swiper.virtual.slides.unshift(slides[i]); - } - - newActiveIndex = activeIndex + slides.length; - numberOfNewSlides = slides.length; - } else { - swiper.virtual.slides.unshift(slides); - } - - if (swiper.params.virtual.cache) { - const cache = swiper.virtual.cache; - const newCache = {}; - Object.keys(cache).forEach(cachedIndex => { - const $cachedEl = cache[cachedIndex]; - const cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); - - if (cachedElIndex) { - $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); - } - - newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; - }); - swiper.virtual.cache = newCache; - } - - update(true); - swiper.slideTo(newActiveIndex, 0); - } - - function removeSlide(slidesIndexes) { - if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; - let activeIndex = swiper.activeIndex; - - if (Array.isArray(slidesIndexes)) { - for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { - swiper.virtual.slides.splice(slidesIndexes[i], 1); - - if (swiper.params.virtual.cache) { - delete swiper.virtual.cache[slidesIndexes[i]]; - } - - if (slidesIndexes[i] < activeIndex) activeIndex -= 1; - activeIndex = Math.max(activeIndex, 0); - } - } else { - swiper.virtual.slides.splice(slidesIndexes, 1); - - if (swiper.params.virtual.cache) { - delete swiper.virtual.cache[slidesIndexes]; - } - - if (slidesIndexes < activeIndex) activeIndex -= 1; - activeIndex = Math.max(activeIndex, 0); - } - - update(true); - swiper.slideTo(activeIndex, 0); - } - - function removeAllSlides() { - swiper.virtual.slides = []; - - if (swiper.params.virtual.cache) { - swiper.virtual.cache = {}; - } - - update(true); - swiper.slideTo(0, 0); - } - - on('beforeInit', () => { - if (!swiper.params.virtual.enabled) return; - swiper.virtual.slides = swiper.params.virtual.slides; - swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); - swiper.params.watchSlidesProgress = true; - swiper.originalParams.watchSlidesProgress = true; - - if (!swiper.params.initialSlide) { - update(); - } - }); - on('setTranslate', () => { - if (!swiper.params.virtual.enabled) return; - - if (swiper.params.cssMode && !swiper._immediateVirtual) { - clearTimeout(cssModeTimeout); - cssModeTimeout = setTimeout(() => { - update(); - }, 100); - } else { - update(); - } - }); - on('init update resize', () => { - if (!swiper.params.virtual.enabled) return; - - if (swiper.params.cssMode) { - (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.setCSSProperty)(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); - } - }); - Object.assign(swiper.virtual, { - appendSlide, - prependSlide, - removeSlide, - removeAllSlides, - update - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/modules/zoom/zoom.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/modules/zoom/zoom.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Zoom) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); -/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); - - - -function Zoom({ - swiper, - extendParams, - on, - emit -}) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - extendParams({ - zoom: { - enabled: false, - maxRatio: 3, - minRatio: 1, - toggle: true, - containerClass: 'swiper-zoom-container', - zoomedSlideClass: 'swiper-slide-zoomed' - } - }); - swiper.zoom = { - enabled: false - }; - let currentScale = 1; - let isScaling = false; - let gesturesEnabled; - let fakeGestureTouched; - let fakeGestureMoved; - const gesture = { - $slideEl: undefined, - slideWidth: undefined, - slideHeight: undefined, - $imageEl: undefined, - $imageWrapEl: undefined, - maxRatio: 3 - }; - const image = { - isTouched: undefined, - isMoved: undefined, - currentX: undefined, - currentY: undefined, - minX: undefined, - minY: undefined, - maxX: undefined, - maxY: undefined, - width: undefined, - height: undefined, - startX: undefined, - startY: undefined, - touchesStart: {}, - touchesCurrent: {} - }; - const velocity = { - x: undefined, - y: undefined, - prevPositionX: undefined, - prevPositionY: undefined, - prevTime: undefined - }; - let scale = 1; - Object.defineProperty(swiper.zoom, 'scale', { - get() { - return scale; - }, - - set(value) { - if (scale !== value) { - const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined; - const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined; - emit('zoomChange', value, imageEl, slideEl); - } - - scale = value; - } - - }); - - function getDistanceBetweenTouches(e) { - if (e.targetTouches.length < 2) return 1; - const x1 = e.targetTouches[0].pageX; - const y1 = e.targetTouches[0].pageY; - const x2 = e.targetTouches[1].pageX; - const y2 = e.targetTouches[1].pageY; - const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); - return distance; - } // Events - - - function onGestureStart(e) { - const support = swiper.support; - const params = swiper.params.zoom; - fakeGestureTouched = false; - fakeGestureMoved = false; - - if (!support.gestures) { - if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { - return; - } - - fakeGestureTouched = true; - gesture.scaleStart = getDistanceBetweenTouches(e); - } - - if (!gesture.$slideEl || !gesture.$slideEl.length) { - gesture.$slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).closest(`.${swiper.params.slideClass}`); - if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); - gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); - gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); - gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; - - if (gesture.$imageWrapEl.length === 0) { - gesture.$imageEl = undefined; - return; - } - } - - if (gesture.$imageEl) { - gesture.$imageEl.transition(0); - } - - isScaling = true; - } - - function onGestureChange(e) { - const support = swiper.support; - const params = swiper.params.zoom; - const zoom = swiper.zoom; - - if (!support.gestures) { - if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { - return; - } - - fakeGestureMoved = true; - gesture.scaleMove = getDistanceBetweenTouches(e); - } - - if (!gesture.$imageEl || gesture.$imageEl.length === 0) { - if (e.type === 'gesturechange') onGestureStart(e); - return; - } - - if (support.gestures) { - zoom.scale = e.scale * currentScale; - } else { - zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; - } - - if (zoom.scale > gesture.maxRatio) { - zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; - } - - if (zoom.scale < params.minRatio) { - zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; - } - - gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`); - } - - function onGestureEnd(e) { - const device = swiper.device; - const support = swiper.support; - const params = swiper.params.zoom; - const zoom = swiper.zoom; - - if (!support.gestures) { - if (!fakeGestureTouched || !fakeGestureMoved) { - return; - } - - if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) { - return; - } - - fakeGestureTouched = false; - fakeGestureMoved = false; - } - - if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; - zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); - gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`); - currentScale = zoom.scale; - isScaling = false; - if (zoom.scale === 1) gesture.$slideEl = undefined; - } - - function onTouchStart(e) { - const device = swiper.device; - if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; - if (image.isTouched) return; - if (device.android && e.cancelable) e.preventDefault(); - image.isTouched = true; - image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; - image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; - } - - function onTouchMove(e) { - const zoom = swiper.zoom; - if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; - swiper.allowClick = false; - if (!image.isTouched || !gesture.$slideEl) return; - - if (!image.isMoved) { - image.width = gesture.$imageEl[0].offsetWidth; - image.height = gesture.$imageEl[0].offsetHeight; - image.startX = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.getTranslate)(gesture.$imageWrapEl[0], 'x') || 0; - image.startY = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.getTranslate)(gesture.$imageWrapEl[0], 'y') || 0; - gesture.slideWidth = gesture.$slideEl[0].offsetWidth; - gesture.slideHeight = gesture.$slideEl[0].offsetHeight; - gesture.$imageWrapEl.transition(0); - } // Define if we need image drag - - - const scaledWidth = image.width * zoom.scale; - const scaledHeight = image.height * zoom.scale; - if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; - image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); - image.maxX = -image.minX; - image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); - image.maxY = -image.minY; - image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; - image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; - - if (!image.isMoved && !isScaling) { - if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { - image.isTouched = false; - return; - } - - if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { - image.isTouched = false; - return; - } - } - - if (e.cancelable) { - e.preventDefault(); - } - - e.stopPropagation(); - image.isMoved = true; - image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX; - image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY; - - if (image.currentX < image.minX) { - image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; - } - - if (image.currentX > image.maxX) { - image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; - } - - if (image.currentY < image.minY) { - image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; - } - - if (image.currentY > image.maxY) { - image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; - } // Velocity - - - if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; - if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; - if (!velocity.prevTime) velocity.prevTime = Date.now(); - velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; - velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; - if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; - if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; - velocity.prevPositionX = image.touchesCurrent.x; - velocity.prevPositionY = image.touchesCurrent.y; - velocity.prevTime = Date.now(); - gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); - } - - function onTouchEnd() { - const zoom = swiper.zoom; - if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; - - if (!image.isTouched || !image.isMoved) { - image.isTouched = false; - image.isMoved = false; - return; - } - - image.isTouched = false; - image.isMoved = false; - let momentumDurationX = 300; - let momentumDurationY = 300; - const momentumDistanceX = velocity.x * momentumDurationX; - const newPositionX = image.currentX + momentumDistanceX; - const momentumDistanceY = velocity.y * momentumDurationY; - const newPositionY = image.currentY + momentumDistanceY; // Fix duration - - if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); - if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); - const momentumDuration = Math.max(momentumDurationX, momentumDurationY); - image.currentX = newPositionX; - image.currentY = newPositionY; // Define if we need image drag - - const scaledWidth = image.width * zoom.scale; - const scaledHeight = image.height * zoom.scale; - image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); - image.maxX = -image.minX; - image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); - image.maxY = -image.minY; - image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); - image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); - gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); - } - - function onTransitionEnd() { - const zoom = swiper.zoom; - - if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { - if (gesture.$imageEl) { - gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); - } - - if (gesture.$imageWrapEl) { - gesture.$imageWrapEl.transform('translate3d(0,0,0)'); - } - - zoom.scale = 1; - currentScale = 1; - gesture.$slideEl = undefined; - gesture.$imageEl = undefined; - gesture.$imageWrapEl = undefined; - } - } - - function zoomIn(e) { - const zoom = swiper.zoom; - const params = swiper.params.zoom; - - if (!gesture.$slideEl) { - if (e && e.target) { - gesture.$slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).closest(`.${swiper.params.slideClass}`); - } - - if (!gesture.$slideEl) { - if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { - gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); - } else { - gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); - } - } - - gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); - gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); - } - - if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; - - if (swiper.params.cssMode) { - swiper.wrapperEl.style.overflow = 'hidden'; - swiper.wrapperEl.style.touchAction = 'none'; - } - - gesture.$slideEl.addClass(`${params.zoomedSlideClass}`); - let touchX; - let touchY; - let offsetX; - let offsetY; - let diffX; - let diffY; - let translateX; - let translateY; - let imageWidth; - let imageHeight; - let scaledWidth; - let scaledHeight; - let translateMinX; - let translateMinY; - let translateMaxX; - let translateMaxY; - let slideWidth; - let slideHeight; - - if (typeof image.touchesStart.x === 'undefined' && e) { - touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; - touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; - } else { - touchX = image.touchesStart.x; - touchY = image.touchesStart.y; - } - - zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; - currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; - - if (e) { - slideWidth = gesture.$slideEl[0].offsetWidth; - slideHeight = gesture.$slideEl[0].offsetHeight; - offsetX = gesture.$slideEl.offset().left + window.scrollX; - offsetY = gesture.$slideEl.offset().top + window.scrollY; - diffX = offsetX + slideWidth / 2 - touchX; - diffY = offsetY + slideHeight / 2 - touchY; - imageWidth = gesture.$imageEl[0].offsetWidth; - imageHeight = gesture.$imageEl[0].offsetHeight; - scaledWidth = imageWidth * zoom.scale; - scaledHeight = imageHeight * zoom.scale; - translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); - translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); - translateMaxX = -translateMinX; - translateMaxY = -translateMinY; - translateX = diffX * zoom.scale; - translateY = diffY * zoom.scale; - - if (translateX < translateMinX) { - translateX = translateMinX; - } - - if (translateX > translateMaxX) { - translateX = translateMaxX; - } - - if (translateY < translateMinY) { - translateY = translateMinY; - } - - if (translateY > translateMaxY) { - translateY = translateMaxY; - } - } else { - translateX = 0; - translateY = 0; - } - - gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`); - gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`); - } - - function zoomOut() { - const zoom = swiper.zoom; - const params = swiper.params.zoom; - - if (!gesture.$slideEl) { - if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { - gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); - } else { - gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); - } - - gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); - gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); - } - - if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; - - if (swiper.params.cssMode) { - swiper.wrapperEl.style.overflow = ''; - swiper.wrapperEl.style.touchAction = ''; - } - - zoom.scale = 1; - currentScale = 1; - gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); - gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); - gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`); - gesture.$slideEl = undefined; - } // Toggle Zoom - - - function zoomToggle(e) { - const zoom = swiper.zoom; - - if (zoom.scale && zoom.scale !== 1) { - // Zoom Out - zoomOut(); - } else { - // Zoom In - zoomIn(e); - } - } - - function getListeners() { - const support = swiper.support; - const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? { - passive: true, - capture: false - } : false; - const activeListenerWithCapture = support.passiveListener ? { - passive: false, - capture: true - } : true; - return { - passiveListener, - activeListenerWithCapture - }; - } - - function getSlideSelector() { - return `.${swiper.params.slideClass}`; - } - - function toggleGestures(method) { - const { - passiveListener - } = getListeners(); - const slideSelector = getSlideSelector(); - swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener); - swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener); - swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener); - } - - function enableGestures() { - if (gesturesEnabled) return; - gesturesEnabled = true; - toggleGestures('on'); - } - - function disableGestures() { - if (!gesturesEnabled) return; - gesturesEnabled = false; - toggleGestures('off'); - } // Attach/Detach Events - - - function enable() { - const zoom = swiper.zoom; - if (zoom.enabled) return; - zoom.enabled = true; - const support = swiper.support; - const { - passiveListener, - activeListenerWithCapture - } = getListeners(); - const slideSelector = getSlideSelector(); // Scale image - - if (support.gestures) { - swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener); - swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener); - } else if (swiper.touchEvents.start === 'touchstart') { - swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); - swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); - swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); - - if (swiper.touchEvents.cancel) { - swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); - } - } // Move image - - - swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); - } - - function disable() { - const zoom = swiper.zoom; - if (!zoom.enabled) return; - const support = swiper.support; - zoom.enabled = false; - const { - passiveListener, - activeListenerWithCapture - } = getListeners(); - const slideSelector = getSlideSelector(); // Scale image - - if (support.gestures) { - swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener); - swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener); - } else if (swiper.touchEvents.start === 'touchstart') { - swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); - swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); - swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); - - if (swiper.touchEvents.cancel) { - swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); - } - } // Move image - - - swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); - } - - on('init', () => { - if (swiper.params.zoom.enabled) { - enable(); - } - }); - on('destroy', () => { - disable(); - }); - on('touchStart', (_s, e) => { - if (!swiper.zoom.enabled) return; - onTouchStart(e); - }); - on('touchEnd', (_s, e) => { - if (!swiper.zoom.enabled) return; - onTouchEnd(e); - }); - on('doubleTap', (_s, e) => { - if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { - zoomToggle(e); - } - }); - on('transitionEnd', () => { - if (swiper.zoom.enabled && swiper.params.zoom.enabled) { - onTransitionEnd(); - } - }); - on('slideChange', () => { - if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { - onTransitionEnd(); - } - }); - Object.assign(swiper.zoom, { - enable, - disable, - in: zoomIn, - out: zoomOut, - toggle: zoomToggle - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/classes-to-selector.js": -/*!***********************************************************!*\ - !*** ./node_modules/swiper/shared/classes-to-selector.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ classesToSelector) -/* harmony export */ }); -function classesToSelector(classes = '') { - return `.${classes.trim().replace(/([\.:!\/])/g, '\\$1') // eslint-disable-line - .replace(/ /g, '.')}`; -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/create-element-if-not-defined.js": -/*!*********************************************************************!*\ - !*** ./node_modules/swiper/shared/create-element-if-not-defined.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ createElementIfNotDefined) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -function createElementIfNotDefined(swiper, originalParams, params, checkProps) { - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - - if (swiper.params.createElements) { - Object.keys(checkProps).forEach(key => { - if (!params[key] && params.auto === true) { - let element = swiper.$el.children(`.${checkProps[key]}`)[0]; - - if (!element) { - element = document.createElement('div'); - element.className = checkProps[key]; - swiper.$el.append(element); - } - - params[key] = element; - originalParams[key] = element; - } - }); - } - - return params; -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/create-shadow.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/shared/create-shadow.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ createShadow) -/* harmony export */ }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/swiper/shared/dom.js"); - -function createShadow(params, $slideEl, side) { - const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`; - const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl; - let $shadowEl = $shadowContainer.children(`.${shadowClass}`); - - if (!$shadowEl.length) { - $shadowEl = (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`
`); - $shadowContainer.append($shadowEl); - } - - return $shadowEl; -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/dom.js": -/*!*******************************************!*\ - !*** ./node_modules/swiper/shared/dom.js ***! - \*******************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var dom7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7 */ "./node_modules/dom7/dom7.esm.js"); - -const Methods = { - addClass: dom7__WEBPACK_IMPORTED_MODULE_0__.addClass, - removeClass: dom7__WEBPACK_IMPORTED_MODULE_0__.removeClass, - hasClass: dom7__WEBPACK_IMPORTED_MODULE_0__.hasClass, - toggleClass: dom7__WEBPACK_IMPORTED_MODULE_0__.toggleClass, - attr: dom7__WEBPACK_IMPORTED_MODULE_0__.attr, - removeAttr: dom7__WEBPACK_IMPORTED_MODULE_0__.removeAttr, - transform: dom7__WEBPACK_IMPORTED_MODULE_0__.transform, - transition: dom7__WEBPACK_IMPORTED_MODULE_0__.transition, - on: dom7__WEBPACK_IMPORTED_MODULE_0__.on, - off: dom7__WEBPACK_IMPORTED_MODULE_0__.off, - trigger: dom7__WEBPACK_IMPORTED_MODULE_0__.trigger, - transitionEnd: dom7__WEBPACK_IMPORTED_MODULE_0__.transitionEnd, - outerWidth: dom7__WEBPACK_IMPORTED_MODULE_0__.outerWidth, - outerHeight: dom7__WEBPACK_IMPORTED_MODULE_0__.outerHeight, - styles: dom7__WEBPACK_IMPORTED_MODULE_0__.styles, - offset: dom7__WEBPACK_IMPORTED_MODULE_0__.offset, - css: dom7__WEBPACK_IMPORTED_MODULE_0__.css, - each: dom7__WEBPACK_IMPORTED_MODULE_0__.each, - html: dom7__WEBPACK_IMPORTED_MODULE_0__.html, - text: dom7__WEBPACK_IMPORTED_MODULE_0__.text, - is: dom7__WEBPACK_IMPORTED_MODULE_0__.is, - index: dom7__WEBPACK_IMPORTED_MODULE_0__.index, - eq: dom7__WEBPACK_IMPORTED_MODULE_0__.eq, - append: dom7__WEBPACK_IMPORTED_MODULE_0__.append, - prepend: dom7__WEBPACK_IMPORTED_MODULE_0__.prepend, - next: dom7__WEBPACK_IMPORTED_MODULE_0__.next, - nextAll: dom7__WEBPACK_IMPORTED_MODULE_0__.nextAll, - prev: dom7__WEBPACK_IMPORTED_MODULE_0__.prev, - prevAll: dom7__WEBPACK_IMPORTED_MODULE_0__.prevAll, - parent: dom7__WEBPACK_IMPORTED_MODULE_0__.parent, - parents: dom7__WEBPACK_IMPORTED_MODULE_0__.parents, - closest: dom7__WEBPACK_IMPORTED_MODULE_0__.closest, - find: dom7__WEBPACK_IMPORTED_MODULE_0__.find, - children: dom7__WEBPACK_IMPORTED_MODULE_0__.children, - filter: dom7__WEBPACK_IMPORTED_MODULE_0__.filter, - remove: dom7__WEBPACK_IMPORTED_MODULE_0__.remove -}; -Object.keys(Methods).forEach(methodName => { - Object.defineProperty(dom7__WEBPACK_IMPORTED_MODULE_0__.$.fn, methodName, { - value: Methods[methodName], - writable: true - }); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dom7__WEBPACK_IMPORTED_MODULE_0__.$); - -/***/ }), - -/***/ "./node_modules/swiper/shared/effect-init.js": -/*!***************************************************!*\ - !*** ./node_modules/swiper/shared/effect-init.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ effectInit) -/* harmony export */ }); -function effectInit(params) { - const { - effect, - swiper, - on, - setTranslate, - setTransition, - overwriteParams, - perspective - } = params; - on('beforeInit', () => { - if (swiper.params.effect !== effect) return; - swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); - - if (perspective && perspective()) { - swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); - } - - const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; - Object.assign(swiper.params, overwriteParamsResult); - Object.assign(swiper.originalParams, overwriteParamsResult); - }); - on('setTranslate', () => { - if (swiper.params.effect !== effect) return; - setTranslate(); - }); - on('setTransition', (_s, duration) => { - if (swiper.params.effect !== effect) return; - setTransition(duration); - }); -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/effect-target.js": -/*!*****************************************************!*\ - !*** ./node_modules/swiper/shared/effect-target.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ effectTarget) -/* harmony export */ }); -function effectTarget(effectParams, $slideEl) { - if (effectParams.transformEl) { - return $slideEl.find(effectParams.transformEl).css({ - 'backface-visibility': 'hidden', - '-webkit-backface-visibility': 'hidden' - }); - } - - return $slideEl; -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/effect-virtual-transition-end.js": -/*!*********************************************************************!*\ - !*** ./node_modules/swiper/shared/effect-virtual-transition-end.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ effectVirtualTransitionEnd) -/* harmony export */ }); -function effectVirtualTransitionEnd({ - swiper, - duration, - transformEl, - allSlides -}) { - const { - slides, - activeIndex, - $wrapperEl - } = swiper; - - if (swiper.params.virtualTranslate && duration !== 0) { - let eventTriggered = false; - let $transitionEndTarget; - - if (allSlides) { - $transitionEndTarget = transformEl ? slides.find(transformEl) : slides; - } else { - $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex); - } - - $transitionEndTarget.transitionEnd(() => { - if (eventTriggered) return; - if (!swiper || swiper.destroyed) return; - eventTriggered = true; - swiper.animating = false; - const triggerEvents = ['webkitTransitionEnd', 'transitionend']; - - for (let i = 0; i < triggerEvents.length; i += 1) { - $wrapperEl.trigger(triggerEvents[i]); - } - }); - } -} - -/***/ }), - -/***/ "./node_modules/swiper/shared/get-browser.js": -/*!***************************************************!*\ - !*** ./node_modules/swiper/shared/get-browser.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getBrowser: () => (/* binding */ getBrowser) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -let browser; - -function calcBrowser() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - - function isSafari() { - const ua = window.navigator.userAgent.toLowerCase(); - return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; - } - - return { - isSafari: isSafari(), - isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) - }; -} - -function getBrowser() { - if (!browser) { - browser = calcBrowser(); - } - - return browser; -} - - - -/***/ }), - -/***/ "./node_modules/swiper/shared/get-device.js": -/*!**************************************************!*\ - !*** ./node_modules/swiper/shared/get-device.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getDevice: () => (/* binding */ getDevice) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); -/* harmony import */ var _get_support_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-support.js */ "./node_modules/swiper/shared/get-support.js"); - - -let deviceCached; - -function calcDevice({ - userAgent -} = {}) { - const support = (0,_get_support_js__WEBPACK_IMPORTED_MODULE_1__.getSupport)(); - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const platform = window.navigator.platform; - const ua = userAgent || window.navigator.userAgent; - const device = { - ios: false, - android: false - }; - const screenWidth = window.screen.width; - const screenHeight = window.screen.height; - const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line - - let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); - const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); - const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); - const windows = platform === 'Win32'; - let macos = platform === 'MacIntel'; // iPadOs 13 fix - - const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; - - if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { - ipad = ua.match(/(Version)\/([\d.]+)/); - if (!ipad) ipad = [0, 1, '13_0_0']; - macos = false; - } // Android - - - if (android && !windows) { - device.os = 'android'; - device.android = true; - } - - if (ipad || iphone || ipod) { - device.os = 'ios'; - device.ios = true; - } // Export object - - - return device; -} - -function getDevice(overrides = {}) { - if (!deviceCached) { - deviceCached = calcDevice(overrides); - } - - return deviceCached; -} - - - -/***/ }), - -/***/ "./node_modules/swiper/shared/get-support.js": -/*!***************************************************!*\ - !*** ./node_modules/swiper/shared/get-support.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ getSupport: () => (/* binding */ getSupport) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - -let support; - -function calcSupport() { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); - return { - smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style, - touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch), - passiveListener: function checkPassiveListener() { - let supportsPassive = false; - - try { - const opts = Object.defineProperty({}, 'passive', { - // eslint-disable-next-line - get() { - supportsPassive = true; - } - - }); - window.addEventListener('testPassiveListener', null, opts); - } catch (e) {// No support - } - - return supportsPassive; - }(), - gestures: function checkGestures() { - return 'ongesturestart' in window; - }() - }; -} - -function getSupport() { - if (!support) { - support = calcSupport(); - } - - return support; -} - - - -/***/ }), - -/***/ "./node_modules/swiper/shared/utils.js": -/*!*********************************************!*\ - !*** ./node_modules/swiper/shared/utils.js ***! - \*********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ animateCSSModeScroll: () => (/* binding */ animateCSSModeScroll), -/* harmony export */ deleteProps: () => (/* binding */ deleteProps), -/* harmony export */ extend: () => (/* binding */ extend), -/* harmony export */ getComputedStyle: () => (/* binding */ getComputedStyle), -/* harmony export */ getTranslate: () => (/* binding */ getTranslate), -/* harmony export */ isObject: () => (/* binding */ isObject), -/* harmony export */ nextTick: () => (/* binding */ nextTick), -/* harmony export */ now: () => (/* binding */ now), -/* harmony export */ setCSSProperty: () => (/* binding */ setCSSProperty) -/* harmony export */ }); -/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); - - -function deleteProps(obj) { - const object = obj; - Object.keys(object).forEach(key => { - try { - object[key] = null; - } catch (e) {// no getter for object - } - - try { - delete object[key]; - } catch (e) {// something got wrong - } - }); -} - -function nextTick(callback, delay = 0) { - return setTimeout(callback, delay); -} - -function now() { - return Date.now(); -} - -function getComputedStyle(el) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let style; - - if (window.getComputedStyle) { - style = window.getComputedStyle(el, null); - } - - if (!style && el.currentStyle) { - style = el.currentStyle; - } - - if (!style) { - style = el.style; - } - - return style; -} - -function getTranslate(el, axis = 'x') { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - let matrix; - let curTransform; - let transformMatrix; - const curStyle = getComputedStyle(el, null); - - if (window.WebKitCSSMatrix) { - curTransform = curStyle.transform || curStyle.webkitTransform; - - if (curTransform.split(',').length > 6) { - curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); - } // Some old versions of Webkit choke when 'none' is passed; pass - // empty string instead in this case - - - transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); - } else { - transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); - matrix = transformMatrix.toString().split(','); - } - - if (axis === 'x') { - // Latest Chrome and webkits Fix - if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix - else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers - else curTransform = parseFloat(matrix[4]); - } - - if (axis === 'y') { - // Latest Chrome and webkits Fix - if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix - else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers - else curTransform = parseFloat(matrix[5]); - } - - return curTransform || 0; -} - -function isObject(o) { - return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; -} - -function isNode(node) { - // eslint-disable-next-line - if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { - return node instanceof HTMLElement; - } - - return node && (node.nodeType === 1 || node.nodeType === 11); -} - -function extend(...args) { - const to = Object(args[0]); - const noExtend = ['__proto__', 'constructor', 'prototype']; - - for (let i = 1; i < args.length; i += 1) { - const nextSource = args[i]; - - if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { - const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); - - for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { - const nextKey = keysArray[nextIndex]; - const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - - if (desc !== undefined && desc.enumerable) { - if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { - if (nextSource[nextKey].__swiper__) { - to[nextKey] = nextSource[nextKey]; - } else { - extend(to[nextKey], nextSource[nextKey]); - } - } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { - to[nextKey] = {}; - - if (nextSource[nextKey].__swiper__) { - to[nextKey] = nextSource[nextKey]; - } else { - extend(to[nextKey], nextSource[nextKey]); - } - } else { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - } - - return to; -} - -function setCSSProperty(el, varName, varValue) { - el.style.setProperty(varName, varValue); -} - -function animateCSSModeScroll({ - swiper, - targetPosition, - side -}) { - const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); - const startPosition = -swiper.translate; - let startTime = null; - let time; - const duration = swiper.params.speed; - swiper.wrapperEl.style.scrollSnapType = 'none'; - window.cancelAnimationFrame(swiper.cssModeFrameID); - const dir = targetPosition > startPosition ? 'next' : 'prev'; - - const isOutOfBound = (current, target) => { - return dir === 'next' && current >= target || dir === 'prev' && current <= target; - }; - - const animate = () => { - time = new Date().getTime(); - - if (startTime === null) { - startTime = time; - } - - const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); - const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; - let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); - - if (isOutOfBound(currentPosition, targetPosition)) { - currentPosition = targetPosition; - } - - swiper.wrapperEl.scrollTo({ - [side]: currentPosition - }); - - if (isOutOfBound(currentPosition, targetPosition)) { - swiper.wrapperEl.style.overflow = 'hidden'; - swiper.wrapperEl.style.scrollSnapType = ''; - setTimeout(() => { - swiper.wrapperEl.style.overflow = ''; - swiper.wrapperEl.scrollTo({ - [side]: currentPosition - }); - }); - window.cancelAnimationFrame(swiper.cssModeFrameID); - return; - } - - swiper.cssModeFrameID = window.requestAnimationFrame(animate); - }; - - animate(); -} - - - -/***/ }), - -/***/ "./node_modules/swiper/swiper.esm.js": -/*!*******************************************!*\ - !*** ./node_modules/swiper/swiper.esm.js ***! - \*******************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A11y: () => (/* reexport safe */ _modules_a11y_a11y_js__WEBPACK_IMPORTED_MODULE_11__["default"]), -/* harmony export */ Autoplay: () => (/* reexport safe */ _modules_autoplay_autoplay_js__WEBPACK_IMPORTED_MODULE_14__["default"]), -/* harmony export */ Controller: () => (/* reexport safe */ _modules_controller_controller_js__WEBPACK_IMPORTED_MODULE_10__["default"]), -/* harmony export */ EffectCards: () => (/* reexport safe */ _modules_effect_cards_effect_cards_js__WEBPACK_IMPORTED_MODULE_24__["default"]), -/* harmony export */ EffectCoverflow: () => (/* reexport safe */ _modules_effect_coverflow_effect_coverflow_js__WEBPACK_IMPORTED_MODULE_22__["default"]), -/* harmony export */ EffectCreative: () => (/* reexport safe */ _modules_effect_creative_effect_creative_js__WEBPACK_IMPORTED_MODULE_23__["default"]), -/* harmony export */ EffectCube: () => (/* reexport safe */ _modules_effect_cube_effect_cube_js__WEBPACK_IMPORTED_MODULE_20__["default"]), -/* harmony export */ EffectFade: () => (/* reexport safe */ _modules_effect_fade_effect_fade_js__WEBPACK_IMPORTED_MODULE_19__["default"]), -/* harmony export */ EffectFlip: () => (/* reexport safe */ _modules_effect_flip_effect_flip_js__WEBPACK_IMPORTED_MODULE_21__["default"]), -/* harmony export */ FreeMode: () => (/* reexport safe */ _modules_free_mode_free_mode_js__WEBPACK_IMPORTED_MODULE_16__["default"]), -/* harmony export */ Grid: () => (/* reexport safe */ _modules_grid_grid_js__WEBPACK_IMPORTED_MODULE_17__["default"]), -/* harmony export */ HashNavigation: () => (/* reexport safe */ _modules_hash_navigation_hash_navigation_js__WEBPACK_IMPORTED_MODULE_13__["default"]), -/* harmony export */ History: () => (/* reexport safe */ _modules_history_history_js__WEBPACK_IMPORTED_MODULE_12__["default"]), -/* harmony export */ Keyboard: () => (/* reexport safe */ _modules_keyboard_keyboard_js__WEBPACK_IMPORTED_MODULE_2__["default"]), -/* harmony export */ Lazy: () => (/* reexport safe */ _modules_lazy_lazy_js__WEBPACK_IMPORTED_MODULE_9__["default"]), -/* harmony export */ Manipulation: () => (/* reexport safe */ _modules_manipulation_manipulation_js__WEBPACK_IMPORTED_MODULE_18__["default"]), -/* harmony export */ Mousewheel: () => (/* reexport safe */ _modules_mousewheel_mousewheel_js__WEBPACK_IMPORTED_MODULE_3__["default"]), -/* harmony export */ Navigation: () => (/* reexport safe */ _modules_navigation_navigation_js__WEBPACK_IMPORTED_MODULE_4__["default"]), -/* harmony export */ Pagination: () => (/* reexport safe */ _modules_pagination_pagination_js__WEBPACK_IMPORTED_MODULE_5__["default"]), -/* harmony export */ Parallax: () => (/* reexport safe */ _modules_parallax_parallax_js__WEBPACK_IMPORTED_MODULE_7__["default"]), -/* harmony export */ Scrollbar: () => (/* reexport safe */ _modules_scrollbar_scrollbar_js__WEBPACK_IMPORTED_MODULE_6__["default"]), -/* harmony export */ Swiper: () => (/* reexport safe */ _core_core_js__WEBPACK_IMPORTED_MODULE_0__["default"]), -/* harmony export */ Thumbs: () => (/* reexport safe */ _modules_thumbs_thumbs_js__WEBPACK_IMPORTED_MODULE_15__["default"]), -/* harmony export */ Virtual: () => (/* reexport safe */ _modules_virtual_virtual_js__WEBPACK_IMPORTED_MODULE_1__["default"]), -/* harmony export */ Zoom: () => (/* reexport safe */ _modules_zoom_zoom_js__WEBPACK_IMPORTED_MODULE_8__["default"]), -/* harmony export */ "default": () => (/* reexport safe */ _core_core_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _core_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/core.js */ "./node_modules/swiper/core/core.js"); -/* harmony import */ var _modules_virtual_virtual_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/virtual/virtual.js */ "./node_modules/swiper/modules/virtual/virtual.js"); -/* harmony import */ var _modules_keyboard_keyboard_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/keyboard/keyboard.js */ "./node_modules/swiper/modules/keyboard/keyboard.js"); -/* harmony import */ var _modules_mousewheel_mousewheel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/mousewheel/mousewheel.js */ "./node_modules/swiper/modules/mousewheel/mousewheel.js"); -/* harmony import */ var _modules_navigation_navigation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/navigation/navigation.js */ "./node_modules/swiper/modules/navigation/navigation.js"); -/* harmony import */ var _modules_pagination_pagination_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pagination/pagination.js */ "./node_modules/swiper/modules/pagination/pagination.js"); -/* harmony import */ var _modules_scrollbar_scrollbar_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/scrollbar/scrollbar.js */ "./node_modules/swiper/modules/scrollbar/scrollbar.js"); -/* harmony import */ var _modules_parallax_parallax_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/parallax/parallax.js */ "./node_modules/swiper/modules/parallax/parallax.js"); -/* harmony import */ var _modules_zoom_zoom_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/zoom/zoom.js */ "./node_modules/swiper/modules/zoom/zoom.js"); -/* harmony import */ var _modules_lazy_lazy_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/lazy/lazy.js */ "./node_modules/swiper/modules/lazy/lazy.js"); -/* harmony import */ var _modules_controller_controller_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/controller/controller.js */ "./node_modules/swiper/modules/controller/controller.js"); -/* harmony import */ var _modules_a11y_a11y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/a11y/a11y.js */ "./node_modules/swiper/modules/a11y/a11y.js"); -/* harmony import */ var _modules_history_history_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/history/history.js */ "./node_modules/swiper/modules/history/history.js"); -/* harmony import */ var _modules_hash_navigation_hash_navigation_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/hash-navigation/hash-navigation.js */ "./node_modules/swiper/modules/hash-navigation/hash-navigation.js"); -/* harmony import */ var _modules_autoplay_autoplay_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/autoplay/autoplay.js */ "./node_modules/swiper/modules/autoplay/autoplay.js"); -/* harmony import */ var _modules_thumbs_thumbs_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./modules/thumbs/thumbs.js */ "./node_modules/swiper/modules/thumbs/thumbs.js"); -/* harmony import */ var _modules_free_mode_free_mode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./modules/free-mode/free-mode.js */ "./node_modules/swiper/modules/free-mode/free-mode.js"); -/* harmony import */ var _modules_grid_grid_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./modules/grid/grid.js */ "./node_modules/swiper/modules/grid/grid.js"); -/* harmony import */ var _modules_manipulation_manipulation_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./modules/manipulation/manipulation.js */ "./node_modules/swiper/modules/manipulation/manipulation.js"); -/* harmony import */ var _modules_effect_fade_effect_fade_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./modules/effect-fade/effect-fade.js */ "./node_modules/swiper/modules/effect-fade/effect-fade.js"); -/* harmony import */ var _modules_effect_cube_effect_cube_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./modules/effect-cube/effect-cube.js */ "./node_modules/swiper/modules/effect-cube/effect-cube.js"); -/* harmony import */ var _modules_effect_flip_effect_flip_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./modules/effect-flip/effect-flip.js */ "./node_modules/swiper/modules/effect-flip/effect-flip.js"); -/* harmony import */ var _modules_effect_coverflow_effect_coverflow_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./modules/effect-coverflow/effect-coverflow.js */ "./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js"); -/* harmony import */ var _modules_effect_creative_effect_creative_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./modules/effect-creative/effect-creative.js */ "./node_modules/swiper/modules/effect-creative/effect-creative.js"); -/* harmony import */ var _modules_effect_cards_effect_cards_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./modules/effect-cards/effect-cards.js */ "./node_modules/swiper/modules/effect-cards/effect-cards.js"); -/** - * Swiper 7.4.1 - * Most modern mobile touch slider and framework with hardware accelerated transitions - * https://swiperjs.com - * - * Copyright 2014-2021 Vladimir Kharlampidi - * - * Released under the MIT License - * - * Released on: December 24, 2021 - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. -(() => { -"use strict"; -/*!************************!*\ - !*** ./src/js/main.js ***! - \************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _fancyapps_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @fancyapps/ui */ "./node_modules/@fancyapps/ui/dist/fancybox.esm.js"); -/* harmony import */ var _components_burger_menu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/burger-menu */ "./src/js/components/burger-menu.js"); -/* harmony import */ var _js_components_scroll_smooth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../js/components/scroll-smooth */ "./src/js/components/scroll-smooth.js"); -/* harmony import */ var _js_components_sliders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../js/components/sliders */ "./src/js/components/sliders.js"); -/* harmony import */ var _js_components_accordion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../js/components/accordion */ "./src/js/components/accordion.js"); -/* harmony import */ var _js_components_video_player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../js/components/video-player */ "./src/js/components/video-player.js"); -/* harmony import */ var _js_components_paint_btn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../js/components/paint-btn */ "./src/js/components/paint-btn.js"); - - - - - - - -(0,_components_burger_menu__WEBPACK_IMPORTED_MODULE_1__.changeMenu)(); -(0,_js_components_video_player__WEBPACK_IMPORTED_MODULE_5__.addVideoPlayer)(); -(0,_js_components_sliders__WEBPACK_IMPORTED_MODULE_3__.initializationSliders)(); -(0,_js_components_scroll_smooth__WEBPACK_IMPORTED_MODULE_2__.addSmoothScroll)(); -(0,_js_components_accordion__WEBPACK_IMPORTED_MODULE_4__.toggleAccordion)(); -(0,_js_components_paint_btn__WEBPACK_IMPORTED_MODULE_6__.paintBtn)(); -})(); - -/******/ })() -; -//# sourceMappingURL=main.js.map \ No newline at end of file +/*! For license information please see main.js.LICENSE.txt */ +(()=>{var e={490:(e,t,i)=>{"use strict";var s=i(908);e.exports=function(e,t){return void 0===t&&(t=!1),function(i,n,r){if(i)e(i);else if(n.statusCode>=400&&n.statusCode<=599){var a=r;if(t)if(s.TextDecoder){var o=(void 0===(l=n.headers&&n.headers["content-type"])&&(l=""),l.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),s=i[0],n=i[1];return"charset"===s.trim()?n.trim():e}),"utf-8"));try{a=new TextDecoder(o).decode(r)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(r));e({cause:a})}else e(null,r);var l}}},603:(e,t,i)=>{"use strict";var s=i(908),n=i(434),r=i(376);l.httpHandler=i(490);var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();void 0===t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function o(e,t,i){var s=e;return r(t)?(i=t,"string"==typeof e&&(s={uri:e})):s=n({},t,{uri:e}),s.callback=i,s}function l(e,t,i){return c(t=o(e,t,i))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,s,n){t||(t=!0,e.callback(i,s,n))};function s(){var e=void 0;if(e=d.response?d.response:d.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(d),y)try{e=JSON.parse(e)}catch(e){}return e}function n(e){return clearTimeout(h),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,v)}function r(){if(!c){var t;clearTimeout(h),t=e.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var n=v,r=null;return 0!==t?(n={body:s(),statusCode:t,method:p,headers:{},url:u,rawRequest:d},d.getAllResponseHeaders&&(n.headers=a(d.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),i(r,n,n.body)}}var o,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var h,u=d.url=e.uri||e.url,p=d.method=e.method||"GET",m=e.body||e.data,g=d.headers=e.headers||{},f=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:p,url:u,rawRequest:d};if("json"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=JSON.stringify(!0===e.json?m:e.json))),d.onreadystatechange=function(){4===d.readyState&&setTimeout(r,0)},d.onload=r,d.onerror=n,d.onprogress=function(){},d.onabort=function(){c=!0},d.ontimeout=n,d.open(p,u,!f,e.username,e.password),f||(d.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(h=setTimeout((function(){if(!c){c=!0,d.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),d.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&d.setRequestHeader(o,g[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(d.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(d),d.send(m||null),d}e.exports=l,e.exports.default=l,l.XMLHttpRequest=s.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:s.XDomainRequest,function(e,t){for(var i=0;i{var s,n=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},r=i(893);"undefined"!=typeof document?s=document:(s=n["__GLOBAL_DOCUMENT_CACHE@4"])||(s=n["__GLOBAL_DOCUMENT_CACHE@4"]=r),e.exports=s},908:(e,t,i)=>{var s;s="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=s},376:e=>{e.exports=function(e){if(!e)return!1;var i=t.call(e);return"[object Function]"===i||"function"==typeof e&&"[object RegExp]"!==i||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},537:(e,t)=>{function i(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var i,r=String(e);return(i=s[r.toLowerCase()])?i:(i=n[r.toLowerCase()])||(1===r.length?r.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if("string"==typeof t){var r;if(r=s[t.toLowerCase()])return r===i;if(r=n[t.toLowerCase()])return r===i}else if("number"==typeof t)return t===i;return!1}};var s=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)s[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)s[r-48]=r;for(r=1;r<13;r++)s["f"+r]=r+111;for(r=0;r<10;r++)s["numpad "+r]=r+96;var a=t.names=t.title={};for(r in s)a[s[r]]=r;for(var o in n)s[o]=n[o]},541:(e,t)=>{"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var s=i({HTML:"text/html",isHTML:function(e){return e===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),n=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===n.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var s=0;s{var s=i(541),n=i(772),r=i(604),a=i(201),o=n.DOMImplementation,l=s.NAMESPACE,c=a.ParseError,d=a.XMLReader;function h(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function u(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function f(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}u.prototype.parseFromString=function(e,t){var i=this.options,s=new d,n=i.domBuilder||new p,a=i.errorHandler,o=i.locator,c=i.xmlns||{},u=/\/x?html?$/.test(t),m=u?r.HTML_ENTITIES:r.XML_ENTITIES;o&&n.setDocumentLocator(o),s.errorHandler=function(e,t,i){if(!e){if(t instanceof p)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},r("warning"),r("error"),r("fatalError"),s}(a,n,o),s.domBuilder=i.domBuilder||n,u&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var f=i.normalizeLineEndings||h;return e&&"string"==typeof e?s.parse(f(e),c,m):s.errorHandler.error("invalid doc source"),n.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;y(this,r),this.currentElement=r,this.locator&&m(this.locator,r);for(var o=0;o{var s=i(541),n=s.find,r=s.NAMESPACE;function a(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(o,{}))}function c(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function d(e,t){var i=e.prototype;if(!(i instanceof t)){function s(){}s.prototype=t.prototype,c(i,s=new s),e.prototype=i=s}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var h={},u=h.ELEMENT_NODE=1,p=h.ATTRIBUTE_NODE=2,m=h.TEXT_NODE=3,g=h.CDATA_SECTION_NODE=4,f=h.ENTITY_REFERENCE_NODE=5,y=h.ENTITY_NODE=6,v=h.PROCESSING_INSTRUCTION_NODE=7,b=h.COMMENT_NODE=8,_=h.DOCUMENT_NODE=9,T=h.DOCUMENT_TYPE_NODE=10,S=h.DOCUMENT_FRAGMENT_NODE=11,w=h.NOTATION_NODE=12,E={},C={},x=(E.INDEX_SIZE_ERR=(C[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(C[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(C[3]="Hierarchy request error",3)),k=(E.WRONG_DOCUMENT_ERR=(C[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(C[5]="Invalid character",5),E.NO_DATA_ALLOWED_ERR=(C[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(C[7]="No modification allowed",7),E.NOT_FOUND_ERR=(C[8]="Not found",8)),I=(E.NOT_SUPPORTED_ERR=(C[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(C[10]="Attribute in use",10));function L(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,C[e]),this.message=C[e],Error.captureStackTrace&&Error.captureStackTrace(this,L);return i.code=e,t&&(this.message=this.message+": "+t),i}function A(){}function P(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(ve(e,"length",i.length),!e.$$length||i.length=0))throw new L(k,new Error(e.tagName+"@"+i));for(var n=t.length-1;s"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function j(){this.ownerDocument=this}function q(e,t,i,s){e&&e._inc++,i.namespaceURI===r.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function z(e,t,i){if(e&&e._inc){e._inc++;var s=t.childNodes;if(i)s[s.length++]=i;else{for(var n=t.firstChild,r=0;n;)s[r++]=n,n=n.nextSibling;s.length=r,delete s[s.length]}}}function H(e,t){var i=t.previousSibling,s=t.nextSibling;return i?i.nextSibling=s:e.firstChild=s,s?s.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,z(e.ownerDocument,e),t}function V(e){return e&&e.nodeType===$.DOCUMENT_TYPE_NODE}function W(e){return e&&e.nodeType===$.ELEMENT_NODE}function G(e){return e&&e.nodeType===$.TEXT_NODE}function X(e,t){var i=e.childNodes||[];if(n(i,W)||V(t))return!1;var s=n(i,V);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function Y(e,t){var i=e.childNodes||[];if(n(i,(function(e){return W(e)&&e!==t})))return!1;var s=n(i,V);return!(t&&s&&i.indexOf(s)>i.indexOf(t))}function K(e,t,i){var s=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===$.DOCUMENT_FRAGMENT_NODE){var a=r.filter(W);if(a.length>1||n(r,G))throw new L(x,"More than one element or text in fragment");if(1===a.length&&!X(e,i))throw new L(x,"Element in fragment can not be inserted before doctype")}if(W(t)&&!X(e,i))throw new L(x,"Only one element can be added and only after doctype");if(V(t)){if(n(s,V))throw new L(x,"Only one doctype is allowed");var o=n(s,W);if(i&&s.indexOf(o)1||n(r,G))throw new L(x,"More than one element or text in fragment");if(1===a.length&&!Y(e,i))throw new L(x,"Element in fragment can not be inserted before doctype")}if(W(t)&&!Y(e,i))throw new L(x,"Only one element can be added and only after doctype");if(V(t)){if(n(s,(function(e){return V(e)&&e!==i})))throw new L(x,"Only one doctype is allowed");var o=n(s,W);if(i&&s.indexOf(o)=0;w--)if(""===(E=n[w]).prefix&&E.namespace===e.namespaceURI){h=E.namespace;break}if(h!==e.namespaceURI)for(w=n.length-1;w>=0;w--){var E;if((E=n[w]).namespace===e.namespaceURI){E.prefix&&(d=E.prefix+":"+c);break}}}t.push("<",d);for(var C=0;C"),i&&/^script$/i.test(c))for(;l;)l.data?t.push(l.data):ge(l,t,i,s,n.slice()),l=l.nextSibling;else for(;l;)ge(l,t,i,s,n.slice()),l=l.nextSibling;t.push("")}else t.push("/>");return;case _:case S:for(l=e.firstChild;l;)ge(l,t,i,s,n.slice()),l=l.nextSibling;return;case p:return me(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,B));case g:return t.push("");case b:return t.push("\x3c!--",e.data,"--\x3e");case T:var L=e.publicId,A=e.systemId;if(t.push("");else if(A&&"."!=A)t.push(" SYSTEM ",A,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case v:return t.push("");case f:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function fe(e,t,i){var s;switch(t.nodeType){case u:(s=t.cloneNode(!1)).ownerDocument=e;case S:break;case p:i=!0}if(s||(s=t.cloneNode(!1)),s.ownerDocument=e,s.parentNode=null,i)for(var n=t.firstChild;n;)s.appendChild(fe(e,n,i)),n=n.nextSibling;return s}function ye(e,t,i){var s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];"object"!=typeof r&&r!=s[n]&&(s[n]=r)}switch(t.childNodes&&(s.childNodes=new A),s.ownerDocument=e,s.nodeType){case u:var a=t.attributes,o=s.attributes=new D,l=a.length;o._ownerElement=s;for(var c=0;c=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===e)return s;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},c(h,$),c(h,$.prototype),j.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var i=e.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,t),i=s}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===u&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),H(this,e)},replaceChild:function(e,t){Z(this,e,t,Q),e.ownerDocument=this,t&&this.removeChild(t),W(e)&&(this.documentElement=e)},importNode:function(e,t){return fe(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(i){if(i.nodeType==u&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=l(e);return new P(this,(function(i){var s=[];return t.length>0&&F(i.documentElement,(function(n){if(n!==i&&n.nodeType===u){var r=n.getAttribute("class");if(r){var a=e===r;if(!a){var o=l(r);a=t.every((c=o,function(e){return c&&-1!==c.indexOf(e)}))}a&&s.push(n)}}var c})),s}))},createElement:function(e){var t=new J;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ce;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new de;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new J,s=t.split(":"),n=i.attributes=new D;return i.childNodes=new A,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new ee,s=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==s.length?(i.prefix=s[0],i.localName=s[1]):i.localName=t,i}},d(j,$),J.prototype={nodeType:u,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,z(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=""+i,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,(function(t){var i=[];return F(t,(function(s){s===t||s.nodeType!=u||"*"!==e&&s.tagName!=e||i.push(s)})),i}))},getElementsByTagNameNS:function(e,t){return new P(this,(function(i){var s=[];return F(i,(function(n){n===i||n.nodeType!==u||"*"!==e&&n.namespaceURI!==e||"*"!==t&&n.localName!=t||s.push(n)})),s}))}},j.prototype.getElementsByTagName=J.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,d(J,$),ee.prototype.nodeType=p,d(ee,$),te.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(C[x])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},d(te,$),ie.prototype={nodeName:"#text",nodeType:m,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},d(ie,te),se.prototype={nodeName:"#comment",nodeType:b},d(se,te),ne.prototype={nodeName:"#cdata-section",nodeType:g},d(ne,te),re.prototype.nodeType=T,d(re,$),ae.prototype.nodeType=w,d(ae,$),oe.prototype.nodeType=y,d(oe,$),le.prototype.nodeType=f,d(le,$),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=S,d(ce,$),de.prototype.nodeType=v,d(de,$),he.prototype.serializeToString=function(e,t,i){return ue.call(e,t,i)},$.prototype.toString=ue;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case u:case S:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(P.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty($.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case u:case S:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ve=function(e,t,i){e["$$"+t]=i}}}catch(_e){}t.DocumentType=re,t.DOMException=L,t.DOMImplementation=U,t.Element=J,t.Node=$,t.NodeList=A,t.XMLSerializer=he},604:(e,t,i)=>{"use strict";var s=i(541).freeze;t.XML_ENTITIES=s({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=s({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},340:(e,t,i)=>{var s=i(772);s.DOMImplementation,s.XMLSerializer,t.DOMParser=i(377).DOMParser},201:(e,t,i)=>{var s=i(541).NAMESPACE,n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function c(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function d(e,t,i,n,r,a){function o(e,t,s){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,r),s)}for(var l,c=++t,d=0;;){var h=e.charAt(c);switch(h){case"=":if(1===d)l=e.slice(t,c),d=3;else{if(2!==d)throw new Error("attribute equal must after attrName");d=3}break;case"'":case'"':if(3===d||1===d){if(1===d&&(a.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,!((c=e.indexOf(h,t))>0))throw new Error("attribute value no end '"+h+"' match");o(l,u=e.slice(t,c),t-1),d=5}else{if(4!=d)throw new Error('attribute value must after "="');o(l,u=e.slice(t,c),t),a.warning('attribute "'+l+'" missed start quot('+h+")!!"),t=c+1,d=5}break;case"/":switch(d){case 0:i.setTagName(e.slice(t,c));case 5:case 6:case 7:d=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==d&&i.setTagName(e.slice(t,c)),c;case">":switch(d){case 0:i.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(u=e.slice(t,c)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===d&&(u=l),4==d?(a.warning('attribute "'+u+'" missed quot(")!'),o(l,u,t)):(s.isHTML(n[""])&&u.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":h=" ";default:if(h<=" ")switch(d){case 0:i.setTagName(e.slice(t,c)),d=6;break;case 1:l=e.slice(t,c),d=2;break;case 4:var u=e.slice(t,c);a.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,t);case 5:d=6}else switch(d){case 2:i.tagName,s.isHTML(n[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=c,d=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:d=1,t=c;break;case 3:d=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function h(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var o=e[a],l=o.qName,c=o.value;if((p=l.indexOf(":"))>0)var d=o.prefix=l.slice(0,p),h=l.slice(p+1),u="xmlns"===d&&h;else h=l,d=null,u="xmlns"===l&&"";o.localName=h,!1!==u&&(null==r&&(r={},m(i,i={})),i[u]=r[u]=c,o.uri=s.XMLNS,t.startPrefixMapping(u,c))}for(a=e.length;a--;)(d=(o=e[a]).prefix)&&("xml"===d&&(o.uri=s.XML),"xmlns"!==d&&(o.uri=i[d||""]));var p;(p=n.indexOf(":"))>0?(d=e.prefix=n.slice(0,p),h=e.localName=n.slice(p+1)):(d=null,h=e.localName=n);var g=e.uri=i[d||""];if(t.startElement(g,h,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,!0;if(t.endElement(g,h,n),r)for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&t.endPrefixMapping(d)}function u(e,t,i,s,n){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf("",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(n.characters(a,0,a.length),r):(a=a.replace(/&#?\w+;/g,s),n.characters(a,0,a.length),r)}return t+1}function p(e,t,i,s){var n=s[i];return null==n&&((n=e.lastIndexOf(""))t?(i.comment(e,t+4,n-t-4),n+3):(s.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var n=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var r=function(e,t){var i,s=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);i=n.exec(e);)if(s.push(i),i[1])return s}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],c=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(c=r[3][0]));var d=r[a-1];return i.startDTD(o,l,c),i.endDTD(),d.index+d[0].length}return-1}function f(e,t,i){var s=e.indexOf("?>",t);if(s){var n=e.substring(t,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,i.processingInstruction(n[1],n[2]),s+2):-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),m(t,t={}),function(e,t,i,n,r){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(r.error("entity not found:"+e),e)}function l(t){if(t>E){var i=e.substring(E,t).replace(/&#?\w+;/g,a);T&&m(E),n.characters(i,0,t-E),E=t}}function m(t,i){for(;t>=b&&(i=_.exec(e));)v=i.index,b=v+i[0].length,T.lineNumber++;T.columnNumber=t-v+1}for(var v=0,b=0,_=/.*(?:\r\n?|\n)|.*$/g,T=n.locator,S=[{currentNSMap:t}],w={},E=0;;){try{var C=e.indexOf("<",E);if(C<0){if(!e.substr(E).match(/^\s*$/)){var x=n.doc,k=x.createTextNode(e.substr(E));x.appendChild(k),n.currentElement=k}return}switch(C>E&&l(C),e.charAt(C+1)){case"/":var I=e.indexOf(">",C+3),L=e.substring(C+2,I).replace(/[ \t\n\r]+$/g,""),A=S.pop();I<0?(L=e.substring(C+2).replace(/[\s<].*/,""),r.error("end tag name: "+L+" is not complete:"+A.tagName),I=C+1+L.length):L.match(/\sE?E=I:l(Math.max(C,E)+1)}}(e,t,i,n,this.errorHandler),n.endDocument()}},y.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},221:(e,t,i)=>{var s=i(894).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=s(e.subarray(n)),i.firstOffset=s(e.subarray(n+8)),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;r>0;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i}},489:e=>{var t,i,s,n,r,a,o,l=9e4;t=function(e){return e*l},i=function(e,t){return e*t},s=function(e){return e/l},n=function(e,t){return e/t},r=function(e,i){return t(n(e,i))},a=function(e,t){return i(s(e),t)},o=function(e,t,i){return s(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:t,secondsToAudioTs:i,videoTsToSeconds:s,audioTsToSeconds:n,audioTsToVideoTs:r,videoTsToAudioTs:a,metadataTsToSeconds:o}},894:e=>{var t=Math.pow(2,32);e.exports={getUint64:function(e){var i,s=new DataView(e.buffer,e.byteOffset,e.byteLength);return s.getBigUint64?(i=s.getBigUint64(0)){e.exports=function(e,t){var i,s=null;try{i=JSON.parse(e,t)}catch(e){s=e}return[s,i]}},888:function(e,t,i){var s,n;n=void 0!==i.g?i.g:"undefined"!=typeof window?window:this,s=function(){return function(e){"use strict";var t={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},i=function(){var e={};return Array.prototype.forEach.call(arguments,(function(t){for(var i in t){if(!t.hasOwnProperty(i))return;e[i]=t[i]}})),e},s=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,i=String(e),s=i.length,n=-1,r="",a=i.charCodeAt(0);++n=1&&t<=31||127==t||0===n&&t>=48&&t<=57||1===n&&t>=48&&t<=57&&45===a?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?i.charAt(n):"\\"+i.charAt(n)}return"#"+r},n=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},r=function(t){return t?(i=t,parseInt(e.getComputedStyle(i).height,10)+t.offsetTop):0;var i},a=function(t,i,s){0===t&&document.body.focus(),s||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,i))},o=function(t,i,s,n){if(i.emitEvents&&"function"==typeof e.CustomEvent){var r=new CustomEvent(t,{bubbles:!0,detail:{anchor:s,toggle:n}});document.dispatchEvent(r)}};return function(l,c){var d,h,u,p,m={cancelScroll:function(e){cancelAnimationFrame(p),p=null,e||o("scrollCancel",d)},animateScroll:function(s,l,c){m.cancelScroll();var h=i(d||t,c||{}),g="[object Number]"===Object.prototype.toString.call(s),f=g||!s.tagName?null:s;if(g||f){var y=e.pageYOffset;h.header&&!u&&(u=document.querySelector(h.header));var v,b,_,T=r(u),S=g?s:function(t,i,s,r){var a=0;if(t.offsetParent)do{a+=t.offsetTop,t=t.offsetParent}while(t);return a=Math.max(a-i-s,0),r&&(a=Math.min(a,n()-e.innerHeight)),a}(f,T,parseInt("function"==typeof h.offset?h.offset(s,l):h.offset,10),h.clip),w=S-y,E=n(),C=0,x=function(e,t){var i=t.speedAsDuration?t.speed:Math.abs(e/1e3*t.speed);return t.durationMax&&i>t.durationMax?t.durationMax:t.durationMin&&i1?1:b),e.scrollTo(0,Math.floor(_)),function(t,i){var n=e.pageYOffset;if(t==i||n==i||(y=E)return m.cancelScroll(!0),a(s,i,g),o("scrollStop",h,s,l),v=null,p=null,!0}(_,S)||(p=e.requestAnimationFrame(k),v=t)};0===e.pageYOffset&&e.scrollTo(0,0),function(e,t,i){t||history.pushState&&i.updateURL&&history.pushState({smoothScroll:JSON.stringify(i),anchor:e.id},document.title,e===document.documentElement?"#top":"#"+e.id)}(s,g,h),"matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches?a(s,Math.floor(S),!1):(o("scrollStart",h,s,l),m.cancelScroll(!0),e.requestAnimationFrame(k))}}},g=function(t){if(!t.defaultPrevented&&!(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)&&"closest"in t.target&&(h=t.target.closest(l))&&"a"===h.tagName.toLowerCase()&&!t.target.closest(d.ignore)&&h.hostname===e.location.hostname&&h.pathname===e.location.pathname&&/#/.test(h.href)){var i,n;try{i=s(decodeURIComponent(h.hash))}catch(e){i=s(h.hash)}if("#"===i){if(!d.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(i);(n=n||"#top"!==i?n:document.documentElement)&&(t.preventDefault(),function(t){if(history.replaceState&&t.updateURL&&!history.state){var i=e.location.hash;i=i||"",history.replaceState({smoothScroll:JSON.stringify(t),anchor:i||e.pageYOffset},document.title,i||e.location.href)}}(d),m.animateScroll(n,h))}},f=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(d)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(s(history.state.anchor)))||m.animateScroll(t,null,{updateURL:!1})}};return m.destroy=function(){d&&(document.removeEventListener("click",g,!1),e.removeEventListener("popstate",f,!1),m.cancelScroll(),d=null,h=null,u=null,p=null)},function(){if(!("querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";m.destroy(),d=i(t,c||{}),u=d.header?document.querySelector(d.header):null,document.addEventListener("click",g,!1),d.updateURL&&d.popstate&&e.addEventListener("popstate",f,!1)}(),m}}(n)}.apply(t,[]),void 0===s||(e.exports=s)},945:function(e){var t,i,s,n,r;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,r={buildAbsoluteURL:function(e,t,s){if(s=s||{},e=e.trim(),!(t=t.trim())){if(!s.alwaysNormalize)return e;var n=r.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=r.normalizePath(n.path),r.buildURLFromParts(n)}var a=r.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return s.alwaysNormalize?(a.path=r.normalizePath(a.path),r.buildURLFromParts(a)):t;var o=r.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var d=o.path,h=d.substring(0,d.lastIndexOf("/")+1)+a.path;c.path=r.normalizePath(h)}else c.path=o.path,a.params||(c.params=o.params,a.query||(c.query=o.query));return null===c.path&&(c.path=s.alwaysNormalize?r.normalizePath(a.path):a.path),r.buildURLFromParts(c)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(s,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=r},407:(e,t,i)=>{var s=i(908),n=e.exports={WebVTT:i(706),VTTCue:i(230),VTTRegion:i(710)};s.vttjs=n,s.WebVTT=n.WebVTT;var r=n.VTTCue,a=n.VTTRegion,o=s.VTTCue,l=s.VTTRegion;n.shim=function(){s.VTTCue=r,s.VTTRegion=a},n.restore=function(){s.VTTCue=o,s.VTTRegion=l},s.VTTCue||n.shim()},706:(e,t,i)=>{var s=i(144),n=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function r(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+(0|s)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=n(null)}function l(e,t,i,s){var n=s?e.split(s):[e];for(var r in n)if("string"==typeof n[r]){var a=n[r].split(i);2===a.length&&t(a[0].trim(),a[1].trim())}}function c(e,t,i){var s=e;function n(){var t=a(e);if(null===t)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=n(),c(),"--\x3e"!==e.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.substr(3),c(),t.endTime=n(),c(),function(e,t){var s=new o;l(e,(function(e,t){switch(e){case"region":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":var r=t.split(","),a=r[0];s.integer(e,a),s.percent(e,a)&&s.set("snapToLines",!1),s.alt(e,a,["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start","center","end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start","center","end"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");try{t.line=s.get("line","auto")}catch(e){}t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100);try{t.align=s.get("align","center")}catch(e){t.align=s.get("align","middle")}try{t.position=s.get("position","auto")}catch(e){t.position=s.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}r.prototype=n(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var s=0;s=0&&t<=100)&&(this.set(e,t),!0)}};var d=s.createElement&&s.createElement("textarea"),h={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},m={rt:"ruby"};function g(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e,t){return!m[t.localName]||m[t.localName]===e.localName}function n(t,i){var s=h[t];if(!s)return null;var n=e.document.createElement(s),r=p[t];return r&&i&&(n[r]=i.trim()),n}for(var r,o,l=e.document.createElement("div"),c=l,g=[];null!==(r=i());)if("<"!==r[0])c.appendChild(e.document.createTextNode((o=r,d.innerHTML=o,o=d.textContent,d.textContent="",o)));else{if("/"===r[1]){g.length&&g[g.length-1]===r.substr(2).replace(">","")&&(g.pop(),c=c.parentNode);continue}var f,y=a(r.substr(1,r.length-2));if(y){f=e.document.createProcessingInstruction("timestamp",y),c.appendChild(f);continue}var v=r.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(f=n(v[1],v[3])))continue;if(!s(c,f))continue;if(v[2]){var b=v[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(u.hasOwnProperty(i)){var s=t?"background-color":"color",n=u[i];f.style[s]=n}})),f.className=b.join(" ")}g.push(v[1]),c.appendChild(f),c=f}return l}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function y(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function v(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}for(s(t,e);i=n(t);)for(var r=0;r=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,s=0,n=0;nh&&(d=d<0?-1:1,d*=Math.ceil(h/c)*c),a<0&&(d+=""===r.vertical?i.height:i.width,o=o.reverse()),n.move(u,d)}else{var p=n.lineHeight/i.height*100;switch(r.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],n=new T(t)}var m=function(e,t){for(var n,r=new T(e),a=1,o=0;ol&&(n=new T(e),a=l),e=new T(r)}return n||r}(n,o);t.move(m.toCSSCompatValues(i))}function w(){}b.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=n(b.prototype),_.prototype.constructor=_,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},T.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,s=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||s,height:e.height||t,bottom:e.bottom||s+(e.height||t),width:e.width||i}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},w.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=e.document.createElement("div");if(s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",i.appendChild(s),function(e){for(var t=0;t{var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function s(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function n(e,i,n){this.hasBeenReset=!1;var r="",a=!1,o=e,l=i,c=n,d=null,h="",u=!0,p="auto",m="start",g="auto",f="auto",y=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return u},set:function(e){u=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=s(e);t?(m=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=s(e);t?(f=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=s(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}n.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=n},710:e=>{var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,s=3,n=0,r=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");s=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===i?console.warn("Scroll: an invalid or illegal string was specified."):l=i}}})}},893:()=>{},434:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),t=(...i)=>{let s=!1;"boolean"==typeof i[0]&&(s=i.shift());let n=i[0];if(!n||"object"!=typeof n)throw new Error("extendee must be an object");const r=i.slice(1),a=r.length;for(let i=0;i(e=parseFloat(e)||0,Math.round((e+Number.EPSILON)*t)/t),n=function(e){return!!(e&&"object"==typeof e&&e instanceof Element&&e!==document.body)&&!e.__Panzoom&&(function(e){const t=getComputedStyle(e)["overflow-y"],i=getComputedStyle(e)["overflow-x"],s=("scroll"===t||"auto"===t)&&Math.abs(e.scrollHeight-e.clientHeight)>1,n=("scroll"===i||"auto"===i)&&Math.abs(e.scrollWidth-e.clientWidth)>1;return s||n}(e)?e:n(e.parentNode))},r="undefined"!=typeof window&&window.ResizeObserver||class{constructor(e){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=e}observe(e){if(this.observables.some((t=>t.el===e)))return;const t={el:e,size:{height:e.clientHeight,width:e.clientWidth}};this.observables.push(t)}unobserve(e){this.observables=this.observables.filter((t=>t.el!==e))}disconnect(){this.observables=[]}check(){const e=this.observables.filter((e=>{const t=e.el.clientHeight,i=e.el.clientWidth;if(e.size.height!==t||e.size.width!==i)return e.size.height=t,e.size.width=i,!0})).map((e=>e.el));e.length>0&&this.callback(e),window.requestAnimationFrame(this.boundCheck)}};class a{constructor(e){this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY}}const o=(e,t)=>t?Math.sqrt((t.clientX-e.clientX)**2+(t.clientY-e.clientY)**2):0,l=(e,t)=>t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e;class c{constructor(e,{start:t=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=e=>{if(e.buttons>0&&0!==e.button)return;const t=new a(e);this.currentPointers.some((e=>e.id===t.id))||this._triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerStart(new a(t),e)},this._move=e=>{const t=this.currentPointers.slice(),i=(e=>"changedTouches"in e)(e)?Array.from(e.changedTouches).map((e=>new a(e))):[new a(e)];for(const e of i){const t=this.currentPointers.findIndex((t=>t.id===e.id));t<0||(this.currentPointers[t]=e)}this._moveCallback(t,this.currentPointers.slice(),e)},this._triggerPointerEnd=(e,t)=>{const i=this.currentPointers.findIndex((t=>t.id===e.id));return!(i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(e,t),0))},this._pointerEnd=e=>{e.buttons>0&&0!==e.button||this._triggerPointerEnd(new a(e),e)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerEnd(new a(t),e)},this._startCallback=t,this._moveCallback=i,this._endCallback=s,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(e,t){return!!this._startCallback(e,t)&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}}class d{constructor(e={}){this.options=t(!0,{},e),this.plugins=[],this.events={};for(const e of["on","once"])for(const t of Object.entries(this.options[e]||{}))this[e](...t)}option(e,t,...i){let s=(n=e=String(e),r=this.options,n.split(".").reduce((function(e,t){return e&&e[t]}),r));var n,r;return"function"==typeof s&&(s=s.call(this,this,...i)),void 0===s?t:s}localize(e,t=[]){return(e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,i,s)=>{let n="";s?n=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(n=this.option(`l10n.${i}`)),n||(n=e);for(let e=0;et))}on(t,i){if(e(t)){for(const e of Object.entries(t))this.on(...e);return this}return String(t).split(" ").forEach((e=>{const t=this.events[e]=this.events[e]||[];-1==t.indexOf(i)&&t.push(i)})),this}once(t,i){if(e(t)){for(const e of Object.entries(t))this.once(...e);return this}return String(t).split(" ").forEach((e=>{const t=(...s)=>{this.off(e,t),i.call(this,this,...s)};t._=i,this.on(e,t)})),this}off(t,i){if(!e(t))return t.split(" ").forEach((e=>{const t=this.events[e];if(!t||!t.length)return this;let s=-1;for(let e=0,n=t.length;e1||Math.abs(t.left-this.dragStart.rect.left)>1))return e.preventDefault(),void e.stopPropagation();!1!==this.trigger("click",e)&&this.option("zoom")&&"toggleZoom"===this.option("click")&&(e.preventDefault(),e.stopPropagation(),this.zoomWithClick(e))}onWheel(e){!1!==this.trigger("wheel",e)&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(e)}zoomWithWheel(e){void 0===this.changedDelta&&(this.changedDelta=0);const t=Math.max(-1,Math.min(1,-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)),i=this.content.scale;let s=i*(100+t*this.option("wheelFactor"))/100;if(t<0&&Math.abs(i-this.option("minScale"))<.01||t>0&&Math.abs(i-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(t),s=i):(this.changedDelta=0,s=Math.max(Math.min(s,this.option("maxScale")),this.option("minScale"))),this.changedDelta>this.option("wheelLimit"))return;if(e.preventDefault(),s===i)return;const n=this.$content.getBoundingClientRect(),r=e.clientX-n.left,a=e.clientY-n.top;this.zoomTo(s,{x:r,y:a})}zoomWithClick(e){const t=this.$content.getClientRects()[0],i=e.clientX-t.left,s=e.clientY-t.top;this.toggleZoom({x:i,y:s})}attachEvents(){this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();const e=new c(this.$container,{start:(t,i)=>{if(!this.option("touch"))return!1;if(this.velocity.scale<0)return!1;const s=i.composedPath()[0];if(!e.currentPointers.length){if(-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName))return!1;if(this.option("textSelection")&&((e,t,i)=>{const s=e.childNodes,n=document.createRange();for(let e=0;e=a.left&&i>=a.top&&t<=a.right&&i<=a.bottom)return r}return!1})(s,t.clientX,t.clientY))return!1}return!n(s)&&!1!==this.trigger("touchStart",i)&&("mousedown"===i.type&&i.preventDefault(),this.state="pointerdown",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0)},move:(t,i,s)=>{if("pointerdown"!==this.state)return;if(!1===this.trigger("touchMove",s))return void s.preventDefault();if(i.length<2&&!0===this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale"))return;if(i.length>1&&(!this.option("zoom")||!1===this.option("pinchToZoom")))return;const n=l(t[0],t[1]),r=l(i[0],i[1]),a=r.clientX-n.clientX,c=r.clientY-n.clientY,d=o(t[0],t[1]),h=o(i[0],i[1]),u=d&&h?h/d:1;this.dragOffset.x+=a,this.dragOffset.y+=c,this.dragOffset.scale*=u,this.dragOffset.time=Date.now()-this.dragPosition.time;const p=1===this.dragStart.scale&&this.option("lockAxis");if(p&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=e>45&&e<135?"y":"x"}if("xy"===p||"y"!==this.lockAxis){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset["x"===this.lockAxis?"y":"x"]=0),this.$container.classList.add(this.option("draggingClass")),this.transform.scale===this.option("baseScale")&&"y"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option("baseScale")&&"x"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const t=l(e.startPointers[0],e.startPointers[1]),i=t.clientX-this.dragStart.rect.x,s=t.clientY-this.dragStart.rect.y,{deltaX:n,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,s);this.dragPosition.x-=n,this.dragPosition.y-=a,this.dragPosition.midPoint=r}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(t,i)=>{if("pointerdown"!==this.state)return;if(this._dragOffset={...this.dragOffset},e.currentPointers.length)return void this.resetDragPosition();if(this.state="decel",this.friction=this.option("decelFriction"),this.recalculateTransform(),this.$container.classList.remove(this.option("draggingClass")),!1===this.trigger("touchEnd",i))return;if("decel"!==this.state)return;const s=this.option("minScale");if(this.transform.scale.01){const e=this.dragPosition.midPoint||t,i=this.$content.getClientRects()[0];this.zoomTo(n,{friction:.64,x:e.clientX-i.left,y:e.clientY-i.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new r((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:i},this.dragPosition={...this.dragPosition,x:e,y:t,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){!0!==e&&this.trigger("beforeUpdate");const t=this.$container,i=this.$content,n=this.$viewport,r=i instanceof HTMLImageElement,a=this.option("zoom"),o=this.option("resizeParent",a);let l=this.option("width"),c=this.option("height"),d=l||(h=i,Math.max(parseFloat(h.naturalWidth||0),parseFloat(h.width&&h.width.baseVal&&h.width.baseVal.value||0),parseFloat(h.offsetWidth||0),parseFloat(h.scrollWidth||0)));var h;let u=c||(e=>Math.max(parseFloat(e.naturalHeight||0),parseFloat(e.height&&e.height.baseVal&&e.height.baseVal.value||0),parseFloat(e.offsetHeight||0),parseFloat(e.scrollHeight||0)))(i);Object.assign(i.style,{width:l?`${l}px`:"",height:c?`${c}px`:"",maxWidth:"",maxHeight:""}),o&&Object.assign(n.style,{width:"",height:""});const p=this.option("ratio");d=s(d*p),u=s(u*p),l=d,c=u;const m=i.getBoundingClientRect(),g=n.getBoundingClientRect(),f=n==t?g:t.getBoundingClientRect();let y=Math.max(n.offsetWidth,s(g.width)),v=Math.max(n.offsetHeight,s(g.height)),b=window.getComputedStyle(n);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,a){if(Math.abs(d-m.width)>.1||Math.abs(u-m.height)>.1){const e=((e,t,i,s)=>{const n=Math.min(i/e||0,s/t);return{width:e*n||0,height:t*n||0}})(d,u,Math.min(d,m.width),Math.min(u,m.height));l=s(e.width),c=s(e.height)}Object.assign(i.style,{width:`${l}px`,height:`${c}px`,transform:""})}if(o&&(Object.assign(n.style,{width:`${l}px`,height:`${c}px`}),this.viewport={...this.viewport,width:l,height:c}),r&&a&&"function"!=typeof this.options.maxScale){const e=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:e}}this.content={...this.content,origWidth:d,origHeight:u,fitWidth:l,fitHeight:c,width:l,height:c,scale:1,isZoomable:a},this.container={width:f.width,height:f.height},!0!==e&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),i=this.option("baseScale"),s=this.content.scale>i+.5*(t-i)?i:t;this.zoomTo(s,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:i=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const n=s(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===t&&(t=this.content.width*n*.5),null===i&&(i=this.content.height*n*.5);const{deltaX:r,deltaY:a}=this.getZoomDelta(e,t,i);t=this.content.x-r,i=this.content.y-a,this.panTo({x:t,y:i,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,i=0){const s=this.content.fitWidth*this.content.scale,n=this.content.fitHeight*this.content.scale,r=t>0&&s?t/s:0,a=i>0&&n?i/n:0;return{deltaX:(this.content.fitWidth*e-s)*r,deltaY:(this.content.fitHeight*e-n)*a}}panTo({x:e=this.content.x,y:t=this.content.y,scale:i,friction:s=this.option("friction"),ignoreBounds:n=!1}={}){if(i=i||this.content.scale||1,!n){const{boundX:s,boundY:n}=this.getBounds(i);s&&(e=Math.max(Math.min(e,s.to),s.from)),n&&(t=Math.max(Math.min(t,n.to),n.from))}this.friction=s,this.transform={...this.transform,x:e,y:t,scale:i},s?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(e){let t=this.boundX,i=this.boundY;if(void 0!==t&&void 0!==i)return{boundX:t,boundY:i};t={from:0,to:0},i={from:0,to:0},e=e||this.transform.scale;const n=this.content.fitWidth*e,r=this.content.fitHeight*e,a=this.viewport.width,o=this.viewport.height;if(nt.to),i&&(r=this.content.yi.to),s||n){let i=((s?t.from:t.to)-this.content.x)*e;const n=this.content.x+(this.velocity.x+i)/this.friction;n>=t.from&&n<=t.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(r||a){let t=((r?i.from:i.to)-this.content.y)*e;const s=this.content.y+(t+this.velocity.y)/this.friction;s>=i.from&&s<=i.to&&(t+=this.velocity.y),this.velocity.y=t,this.recalculateTransform()}}setDragResistance(){if("pointerdown"!==this.state)return;const{boundX:e,boundY:t}=this.getBounds(this.dragPosition.scale);let i,s,n,r;if(e&&(i=this.dragPosition.xe.to),t&&(n=this.dragPosition.yt.to),(i||s)&&(!i||!s)){const t=i?e.from:e.to,s=t-this.dragPosition.x;this.dragPosition.x=t-.3*s}if((n||r)&&(!n||!r)){const e=n?t.from:t.to,i=e-this.dragPosition.y;this.dragPosition.y=e-.3*i}}setDragForce(){"pointerdown"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(e){let t,i,n;if(e?(t=s(this.transform.x),i=s(this.transform.y),n=this.transform.scale,this.content={...this.content,x:t,y:i,scale:n}):(t=s(this.content.x),i=s(this.content.y),n=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:t,y:i}),this.trigger("beforeTransform"),t=s(this.content.x),i=s(this.content.y),e&&this.option("zoom")){let e,r;e=s(this.content.fitWidth*n),r=s(this.content.fitHeight*n),this.content.width=e,this.content.height=r,this.transform={...this.transform,width:e,height:r,scale:n},Object.assign(this.$content.style,{width:`${e}px`,height:`${r}px`,maxWidth:"none",maxHeight:"none",transform:`translate3d(${t}px, ${i}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${t}px, ${i}px, 0) scale(${n})`;this.trigger("afterTransform")}endAnimation(e){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state="ready",this.handleCursor(),!0!==e&&this.trigger("endAnimation")}handleCursor(){const e=this.option("draggableClass");e&&this.option("touch")&&(1==this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(e):this.$container.classList.add(e))}detachEvents(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){"destroy"!==this.state&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}u.version="4.0.31",u.Plugins={};const p=(e,t)=>{let i=0;return function(...s){const n=(new Date).getTime();if(!(n-i{t.preventDefault(),t.stopPropagation(),this.carousel["slide"+("next"===e?"Next":"Prev")]()})),t}build(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add(...this.option("classNames.main").split(" ")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}onRefresh(){const e=this.carousel.pages.length;e<=1||e>1&&this.carousel.elemDimWidth=e-1&&this.$next.setAttribute("disabled","")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on("refresh change",this.onRefresh)}detach(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}m.defaults={prevTpl:'',nextTpl:'',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};class g{constructor(e){this.carousel=e,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(e){this.target=this.carousel,this.nav=e,this.attachEvents()}addAsNavFor(e){this.target=e,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(e,t,i){const s=i.target.closest(".carousel__slide");if(!s)return;i.stopPropagation();const n=parseInt(s.dataset.index,10),r=this.target.findPageForSlide(n);this.target.page!==r&&this.target.slideTo(r,{friction:this.friction}),this.markSelectedSlide(n)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){const e=this.target.pages[this.target.page].indexes[0],t=this.nav.findPageForSlide(e);this.nav.slideTo(t),this.markSelectedSlide(e)}markSelectedSlide(e){this.selectedIndex=e,[...this.nav.slides].filter((e=>e.$el&&e.$el.classList.remove("is-nav-selected")));const t=this.nav.slides[e];t&&t.$el&&t.$el.classList.add("is-nav-selected")}attach(e){const t=e.options.Sync;(t.target||t.nav)&&(t.target?this.addAsNavFor(t.target):t.nav&&this.addAsTargetFor(t.nav),this.friction=t.friction)}detach(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}g.defaults={friction:.92};const f={Navigation:m,Dots:class{constructor(e){this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length{if(!("page"in e.target.dataset))return;e.preventDefault(),e.stopPropagation();const t=parseInt(e.target.dataset.page,10),i=this.carousel;t!==i.page&&(i.pages.length<3&&i.option("infinite")?i[0==t?"slidePrev":"slideNext"]():i.slideTo(t))})),this.$list=e,this.carousel.$container.appendChild(e),this.carousel.$container.classList.add("has-dots"),e}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}rebuildDots(){let e=this.$list;const t=!!e,i=this.carousel.pages.length;if(i<2)return void(t&&this.removeList());t||(e=this.buildList());const s=this.$list.children.length;if(s>i)for(let e=i;e{const i=e.code;let s;"Enter"===i||"NumpadEnter"===i?s=t:"ArrowRight"===i?s=t.nextSibling:"ArrowLeft"===i&&(s=t.previousSibling),s&&s.click()})),this.$list.appendChild(t)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((e=>{e.classList.remove("is-selected")}));const e=this.$list.childNodes[this.carousel.page];e&&e.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:g},y={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class v extends d{constructor(e,i={}){if(super(i=t(!0,{},y,i)),this.state="init",this.$container=e,!(this.$container instanceof HTMLElement))throw new Error("No root element provided");this.slideNext=p(this.slideNext.bind(this),250),this.slidePrev=p(this.slidePrev.bind(this),250),this.init(),e.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(v.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=t(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,i=[];this.slides.forEach(((s,n)=>{const r=s.$el,a=s.isDom||!e?this.getSlideMetrics(r):e;s.index=n,s.width=a,s.left=t,e=a,t+=a,i.push(n)}));let n=Math.max(this.$track.offsetWidth,s(this.$track.getBoundingClientRect().width)),r=getComputedStyle(this.$track);n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),this.contentWidth=t,this.viewportWidth=n;const a=[],o=this.option("slidesPerPage");if(Number.isInteger(o)&&t>n)for(let e=0;en)&&(a.push({indexes:[],slides:[]}),e=a.length-1,t=0),t+=s.width,a[e].indexes.push(i),a[e].slides.push(s)}}const l=this.option("center"),c=this.option("fill");a.forEach(((e,i)=>{e.index=i,e.width=e.slides.reduce(((e,t)=>e+t.width),0),e.left=e.slides[0].left,l&&(e.left+=.5*(n-e.width)*-1),c&&!this.option("infiniteX",this.option("infinite"))&&t>n&&(e.left=Math.max(e.left,0),e.left=Math.min(e.left,t-n))}));const d=[];let h;a.forEach((e=>{const t={...e};h&&t.left===h.left?(h.width+=t.width,h.slides=[...h.slides,...t.slides],h.indexes=[...h.indexes,...t.indexes]):(t.index=d.length,h=t,d.push(t))})),this.pages=d;let u=this.page;if(null===u){const e=this.option("initialSlide");u=null!==e?this.findPageForSlide(e):parseInt(this.option("initialPage",0),10)||0,d[u]||(u=d.length&&u>d.length?d[d.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger("refresh")}getSlideMetrics(e){if(!e){const t=this.slides[0];(e=document.createElement("div")).dataset.isTestEl=1,e.style.visibility="hidden",e.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),t.customClass&&e.classList.add(...t.customClass.split(" ")),this.$track.prepend(e)}let t=Math.max(e.offsetWidth,s(e.getBoundingClientRect().width));const i=e.currentStyle||window.getComputedStyle(e);return t=t+(parseFloat(i.marginLeft)||0)+(parseFloat(i.marginRight)||0),e.dataset.isTestEl&&e.remove(),t}findPageForSlide(e){e=parseInt(e,10)||0;const t=this.pages.find((t=>t.indexes.indexOf(e)>-1));return t?t.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(e,t={}){const{x:i=-1*this.setPage(e,!0),y:s=0,friction:n=this.option("friction")}=t;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&n||(this.Panzoom.panTo({x:i,y:s,friction:n,ignoreBounds:!0}),"ready"===this.state&&"ready"===this.Panzoom.state&&this.trigger("settle"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const e=t(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option("textSelection",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new u(this.$container,e),this.Panzoom.on({"*":(e,...t)=>this.trigger(`Panzoom.${e}`,...t),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const e=this.contentWidth,t=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option("preload"),n=this.option("infiniteX",this.option("infinite")),r=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach((o=>{let l,c,d=0;l=i-r,c=i+t+a,l-=s*(t+r+a),c+=s*(t+r+a);const h=o.left+o.width>l&&o.leftl&&o.leftl&&o.lefti&&o.left<=i+t+a&&(d=0)):this.removeSlideEl(o),o.hasDiff=d}));let o=0,l=0;this.slides.forEach(((t,i)=>{let s=0;t.$el?(i!==o||t.hasDiff?s=l+t.hasDiff*e:l=0,t.$el.style.left=Math.abs(s)>.1?`${l+t.hasDiff*e}px`:"",o++):l+=t.width})),this.markSelectedSlides()}createSlideEl(e){if(!e)return;if(e.$el){let t=e.$el.dataset.index;if(!t||parseInt(t,10)!==e.index){let t;e.$el.dataset.index=e.index,e.$el.querySelectorAll("[data-lazy-srcset]").forEach((e=>{e.srcset=e.dataset.lazySrcset})),e.$el.querySelectorAll("[data-lazy-src]").forEach((e=>{let t=e.dataset.lazySrc;e instanceof HTMLImageElement?e.src=t:e.style.backgroundImage=`url('${t}')`})),(t=e.$el.dataset.lazySrc)&&(e.$el.style.backgroundImage=`url('${t}')`),e.state="ready"}return}const t=document.createElement("div");t.dataset.index=e.index,t.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),e.customClass&&t.classList.add(...e.customClass.split(" ")),e.html&&(t.innerHTML=e.html);const i=[];this.slides.forEach(((e,t)=>{e.$el&&i.push(t)}));const s=e.index;let n=null;if(i.length){let e=i.reduce(((e,t)=>Math.abs(t-s){const n=i.$el;if(!n)return;const r=this.pages[this.page];r&&r.indexes&&r.indexes.indexOf(s)>-1?(e&&!n.classList.contains(e)&&(n.classList.add(e),this.trigger("selectSlide",i)),n.removeAttribute(t)):(e&&n.classList.contains(e)&&(n.classList.remove(e),this.trigger("unselectSlide",i)),n.setAttribute(t,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const e=this.contentWidth,t=this.viewportWidth;if(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||et&&(i.content.x-=e,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&"pointerdown"===i.state&&i.resetDragPosition(),s}onTouchEnd(e,t){const i=this.option("dragFree");if(!i&&this.pages.length>1&&e.dragOffset.time<350&&Math.abs(e.dragOffset.y)<1&&Math.abs(e.dragOffset.x)>5)this[e.dragOffset.x<0?"slideNext":"slidePrev"]();else if(i){const[,t]=this.getPageFromPosition(-1*e.transform.x);this.setPage(t)}else this.slideToClosest()}slideToClosest(e={}){let[,t]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(t,e)}getPageFromPosition(e){const t=this.pages.length;this.option("center")&&(e+=.5*this.viewportWidth);const i=Math.floor(e/this.contentWidth);e-=i*this.contentWidth;let s=this.slides.find((t=>t.left<=e&&t.left+t.width>e));if(s){let e=this.findPageForSlide(s.index);return[e,e+i*t]}return[0,0]}setPage(e,t){let i=0,s=parseInt(e,10)||0;const n=this.page,r=this.pageIndex,a=this.pages.length,o=this.contentWidth,l=this.viewportWidth;if(e=(s%a+a)%a,this.option("infiniteX",this.option("infinite"))&&o>l){const n=Math.floor(s/a)||0,r=o;if(i=this.pages[e].left+n*r,!0===t&&a>2){let e=-1*this.Panzoom.content.x;const t=i-r,n=i+r,o=Math.abs(e-i),l=Math.abs(e-t),c=Math.abs(e-n);c{this.removeSlideEl(e)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}v.version="4.0.31",v.Plugins=f;const b=!("undefined"==typeof window||!window.document||!window.document.createElement);let _=null;const T=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],S=e=>{if(e&&b){null===_&&document.createElement("div").focus({get preventScroll(){return _=!0,!1}});try{if(e.setActive)e.setActive();else if(_)e.focus({preventScroll:!0});else{const t=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(e){}}};class w{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const e of["onPrepare","onClosing","onKeydown"])this[e]=this[e].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(e,t){t===e.option("Thumbs.key")&&this.toggle()}build(){if(this.$container)return;const e=document.createElement("div");e.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel.nextSibling),this.Carousel=new v(e,t(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",((e,t)=>{t.preventDefault(),this.fancybox[t.deltaY<0?"prev":"next"]()})),this.$container=e,this.state="visible"}getSlides(){const e=[];for(const t of this.fancybox.items){const i=t.thumb;i&&e.push({html:this.fancybox.option("Thumbs.tpl").replace(/\{\{src\}\}/gi,i),customClass:`has-thumb has-${t.type||"image"}`})}return e}toggle(){"visible"===this.state?this.hide():"hidden"===this.state?this.show():this.build()}show(){"hidden"===this.state&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}hide(){"visible"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}w.defaults={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{},tpl:'
'};const E=(e,t)=>{const i=new URL(e),s=new URLSearchParams(i.search);let n=new URLSearchParams;for(const[e,i]of[...s,...Object.entries(t)])"t"===e?n.set("start",parseInt(i)):n.set(e,i);n=n.toString();let r=e.match(/#t=((.*)?\d+s)/);return r&&(n+=`#t=${r[1]}`),n},C={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'',format:""}};class x{constructor(e){this.fancybox=e;for(const e of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[e]=this[e].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}onInit(){for(const e of this.fancybox.items)this.processType(e)}processType(e){if(e.html)return e.src=e.html,e.type="html",void delete e.html;const i=e.src||"";let s=e.type||this.fancybox.options.type,n=null;if(!i||"string"==typeof i){if(n=i.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const t=E(i,this.fancybox.option("Html.youtube")),r=encodeURIComponent(n[1]);e.videoId=r,e.src=`https://www.youtube-nocookie.com/embed/${r}?${t}`,e.thumb=e.thumb||`https://i.ytimg.com/vi/${r}/mqdefault.jpg`,e.vendor="youtube",s="video"}else if(n=i.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){const t=E(i,this.fancybox.option("Html.vimeo")),r=encodeURIComponent(n[1]);e.videoId=r,e.src=`https://player.vimeo.com/video/${r}?${t}`,e.vendor="vimeo",s="video"}else(n=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`//maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(n[3])+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,s="map"):(n=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`//maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,s="map");s||("#"===i.charAt(0)?s="inline":(n=i.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(s="html5video",e.format=e.format||"video/"+("ogv"===n[1]?"ogg":n[1])):i.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":i.match(/\.(pdf)((\?|#).*)?$/i)&&(s="pdf")),e.type=s||this.fancybox.option("defaultType","image"),"html5video"!==s&&"video"!==s||(e.video=t({},this.fancybox.option("Html.video"),e.video),e._width&&e._height?e.ratio=parseFloat(e._width)/parseFloat(e._height):e.ratio=e.ratio||e.video.ratio||C.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&(this.setContent(e),e.index===this.fancybox.getSlide().index&&this.playVideo(e))}))}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}loadInlineContent(e){let t;if(e.src instanceof HTMLElement)t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2),s=2===i.length&&""===i[0]?i[1]:i[0];t=document.getElementById(s)}if(t){if("clone"===e.type||t.$placeHolder){t=t.cloneNode(!0);let i=t.getAttribute("id");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${e.index}`,t.setAttribute("id",i)}else{const e=document.createElement("div");e.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(e,t),t.$placeHolder=e}this.fancybox.setContent(e,t)}else this.fancybox.setError(e,"{{ELEMENT_NOT_FOUND}}")}loadAjaxContent(e){const t=this.fancybox,i=new XMLHttpRequest;t.showLoading(e),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&"ready"===t.state&&(t.hideLoading(e),200===i.status?t.setContent(e,i.responseText):t.setError(e,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=e.ajax||null;i.open(s?"POST":"GET",e.src),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(s),e.xhr=i}loadIframeContent(e){const t=this.fancybox,i=document.createElement("iframe");if(i.className="fancybox__iframe",i.setAttribute("id",`fancybox__iframe_${t.id}_${e.index}`),i.setAttribute("allow","autoplay; fullscreen"),i.setAttribute("scrolling","auto"),e.$iframe=i,"iframe"!==e.type||!1===e.preload)return i.setAttribute("src",e.src),this.fancybox.setContent(e,i),void this.resizeIframe(e);t.showLoading(e);const s=document.createElement("div");s.style.visibility="hidden",this.fancybox.setContent(e,s),s.appendChild(i),i.onerror=()=>{t.setError(e,"{{IFRAME_ERROR}}")},i.onload=()=>{t.hideLoading(e);let s=!1;i.isReady||(i.isReady=!0,s=!0),i.src.length&&(i.parentNode.style.visibility="",this.resizeIframe(e),s&&t.revealContent(e))},i.setAttribute("src",e.src)}setAspectRatio(e){const t=e.$content,i=e.ratio;if(!t)return;let s=e._width,n=e._height;if(i||s&&n){Object.assign(t.style,{width:s&&n?"100%":"",height:s&&n?"100%":"",maxWidth:"",maxHeight:""});let e=t.offsetWidth,r=t.offsetHeight;if(s=s||e,n=n||r,s>e||n>r){let t=Math.min(e/s,r/n);s*=t,n*=t}Math.abs(s/n-i)>.01&&(i{e.$el&&(e.$iframe&&this.resizeIframe(e),e.ratio&&this.setAspectRatio(e))}))}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,i){"ready"===e.state&&this.playVideo(i)}playVideo(e){if("html5video"===e.type&&e.video.autoplay)try{const t=e.$el.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(e){}if("video"!==e.type||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if("done"===e.state&&e.$iframe&&e.$iframe.contentWindow){let t;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(t="youtube"==e.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(t&&e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"));"youtube"===e.vendor&&(t={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(e){}return}let s=!1;"vimeo"==i.vendor?s={method:"pause",value:"true"}:"youtube"===i.vendor&&(s={event:"command",func:"pauseVideo"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),"*"),clearTimeout(i.poller)}onRemoveSlide(e,t,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const s=i.$content;"inline"===i.type&&s&&(s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const n=s&&s.$placeHolder;n&&(n.parentNode.insertBefore(s,n),n.remove(),s.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of document.getElementsByClassName("fancybox__iframe"))t.contentWindow===e.source&&(t.isReady=1)}else"https://www.youtube-nocookie.com"===e.origin&&"onReady"===t.event&&(document.getElementById(t.id).isReady=1)}catch(e){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}x.defaults=C;class k{constructor(e){this.fancybox=e;for(const e of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[e]=this[e].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&this.setContent(e)}))}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach((e=>{e.$image&&(e.state="destroy"),e.Panzoom&&e.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(e,t,i){i.$image&&(i.$el.classList.remove(e.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&"image"!==e.type)return;if(e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(t=>{t.stopImmediatePropagation(),this.onImageStatusChange(e)})),i.addEventListener("error",(()=>{this.onImageStatusChange(e)})),i.src=e.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),e.srcset&&i.setAttribute("srcset",e.srcset),e.sizes&&i.setAttribute("sizes",e.sizes),e.$image=i;const s=this.fancybox.option("Image.wrap");if(s){const n=document.createElement("div");n.classList.add("string"==typeof s?s:"fancybox__image-wrap"),n.appendChild(i),t.appendChild(n),e.$wrap=n}else t.appendChild(i);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),i.complete||i.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&"loading"===e.state&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",(t=>this.onWheel(e,t)),{passive:!1}),e.$content.addEventListener("click",(t=>this.onClick(e,t)),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new u(e.$el,t(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",e)})),e.Panzoom.on("endAnimation",(()=>{"zoomIn"===e.state&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)})),e.Panzoom.on("afterUpdate",(()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)})))}revealContent(e){null===this.fancybox.Carousel.prevPage&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),i=t.width,s=t.height,n=e.$content.getBoundingClientRect(),r=n.width,a=n.height,o=n.top-t.top,l=n.left-t.left;let c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/s-r/a)>.1),{top:o,left:l,scale:r&&i?i/r:1,opacity:c}}canZoom(e){const t=this.fancybox,i=t.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(e.Panzoom&&!e.Panzoom.content.width)return!1;if(!t.option("Image.zoom")||"contain"!==t.option("Image.fit"))return!1;const s=e.$thumb;if(!s||"loading"===e.state)return!1;i.classList.add("fancybox__no-click");const n=s.getBoundingClientRect();let r;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const e=document.elementFromPoint(n.left+1,n.top+1)===s,t=document.elementFromPoint(n.right-1,n.bottom-1)===s;r=e&&t}else r=document.elementFromPoint(n.left+.5*n.width,n.top+.5*n.height)===s;return i.classList.remove("fancybox__no-click"),r}zoomIn(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom,{top:s,left:n,scale:r,opacity:a}=this.getZoomInfo(t);e.trigger("reveal",t),i.panTo({x:-1*n,y:-1*s,scale:r,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",!0===a&&i.on("afterTransform",(e=>{"zoomIn"!==t.state&&"zoomOut"!==t.state||(e.$content.style.opacity=Math.min(1,1-(1-e.content.scale)/(1-r)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom;if(!i)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let s=this.fancybox.option("Image.zoomFriction");const n=e=>{const{top:n,left:r,scale:a,opacity:o}=this.getZoomInfo(t);e||o||(s*=.82),i.panTo({x:-1*r,y:-1*n,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener("scroll",n),i.once("endAnimation",(()=>{window.removeEventListener("scroll",n),e.destroy()})),n()}handleCursor(e){if("image"!==e.type||!e.$el)return;const t=e.Panzoom,i=this.fancybox.option("Image.click",!1,e),s=this.fancybox.option("Image.touch"),n=e.$el.classList,r=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");n.remove(a),n.remove(r),t&&"toggleZoom"===i?t&&1===t.content.scale&&t.option("maxScale")-t.content.scale>.01?n.add(r):t.content.scale>1&&!s&&n.add(a):"close"===i&&n.add(a)}onWheel(e,t){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",t))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===e.state&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if("ready"!==this.fancybox.state)return;const i=e.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},n=this.fancybox.option("Image.click"),r=this.fancybox.option("Image.doubleClick");r?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(r)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(n)}),300):s(n)}onPageChange(e,t){const i=e.getSlide();t.slides.forEach((e=>{e.Panzoom&&"done"===e.state&&e.index!==i.index&&e.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}k.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class I{constructor(e){this.fancybox=e;for(const e of["onChange","onClosing"])this[e]=this[e].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const i=null===t.prevPage,s=e.getSlide(),n=new URL(document.URL).hash;let r=!1;if(s.slug)r="#"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,n=e.option("slug")||i&&i.fancybox;n&&n.length&&"true"!==n&&(r="#"+n+(t.slides.length>1?"-"+(s.index+1):""))}i&&(this.origHash=n!==r?n:""),r&&n!==r&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+r),i&&(this.hasCreatedHistory=!0)}catch(e){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(e){}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=I.Fancybox;if(!e||e.getInstance()||!1===e.defaults.Hash)return;const{hash:t,slug:i,index:s}=I.getParsedURL();if(!i)return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const r=document.querySelectorAll(`[data-fancybox="${i}"]`);r.length&&(null===s&&1===r.length?n=r[0]:s&&(n=r[s-1]),n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=I.getParsedURL(),i=I.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(e){const i=s.Carousel;if(e===s.option("slug"))return i.slideTo(t-1);for(let t of i.slides)if(t.slug&&t.slug===e)return i.slideTo(t.index);const n=s.getSlide(),r=n.$trigger&&n.$trigger.dataset;if(r&&r.fancybox===e)return i.slideTo(t-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}I.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",I.onHashChange,!1),I.startFromUrl()}I.Fancybox=e,b&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}))}static destroy(){window.removeEventListener("hashchange",I.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),i=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:i}}}const L={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(e){L.pageXOffset=window.pageXOffset,L.pageYOffset=window.pageYOffset,e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class A{constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const P={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:' / ',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'\n \n \n ',click:function(e){e.preventDefault(),L.element()?L.deactivate():L.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'\n \n \n ',click:function(e){e.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'',click:function(e){e.preventDefault();const t=this.fancybox.getSlide().Panzoom;t&&t.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'',click:function(e){e.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'',click:function(e){e.stopPropagation();const t=this.fancybox.plugins.Thumbs;t&&t.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'',attr:{"data-fancybox-close":"",tabindex:0}}}};class O{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const e of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[e]=this[e].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(e,t)=>this.onRefresh(t),"Image.afterUpdate":(e,t)=>this.onRefresh(t)}}onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if("image"===t.type){e=!0;break}if(!e)return void(this.state="disabled")}for(const t of this.fancybox.option("Toolbar.display"))if("close"===(e(t)?t.id:t)){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new A(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!L.element())))try{L.activate(e.$container)}catch(e){}}onFsChange(){window.scrollTo(L.pageXOffset,L.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?"done"===e.getSlide().state&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const i=this.Slideshow;t.index===e.getSlide().index&&(this.update(),i&&i.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&"done"!==e.state||this.Slideshow.deactivate())}onKeydown(e,t,i){" "===t&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;"div"===e.type?t=document.createElement("div"):(t=document.createElement("link"===e.type?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const i in e.attr)t.setAttribute(i,e.attr[i]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),"prev"===e.id&&t.setAttribute("data-fancybox-prev",""),"next"===e.id&&t.setAttribute("data-fancybox-next","");const i=t.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const i=this.fancybox.option("Toolbar.items"),s=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],n=this.fancybox.plugins.Thumbs;for(const r of this.fancybox.option("Toolbar.display")){let a,o;if(e(r)?(a=r.id,o=t({},i[a],r)):(a=r,o=i[a]),["counter","next","prev","slideshow"].includes(a)&&this.fancybox.items.length<2)continue;if("fullscreen"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===a&&(!n||"disabled"===n.state))continue;if(!o)continue;let l=o.position||"right",c=s.find((e=>e.position===l));c&&c.items.push(o)}const r=document.createElement("div");r.classList.add("fancybox__toolbar");for(const e of s)if(e.items.length){const t=document.createElement("div");t.classList.add("fancybox__toolbar__items"),t.classList.add(`fancybox__toolbar__items--${e.position}`);for(const i of e.items)t.appendChild(this.createElement(i));r.appendChild(t)}this.fancybox.$carousel.parentNode.insertBefore(r,this.fancybox.$carousel),this.$container=r}update(){const e=this.fancybox.getSlide(),t=e.index,i=this.fancybox.items.length,s=e.downloadSrc||("image"!==e.type||e.error?null:e.src);for(const e of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex"),e.setAttribute("href",s),e.setAttribute("download",s),e.setAttribute("target","_blank")):(e.setAttribute("disabled",""),e.setAttribute("tabindex",-1),e.removeAttribute("href"),e.removeAttribute("download"));const n=e.Panzoom,r=n&&n.option("maxScale")>n.option("baseScale");for(const e of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))r?e.removeAttribute("disabled"):e.setAttribute("disabled","");for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))t.innerHTML=e.index+1;for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))e.innerHTML=i;if(!this.fancybox.option("infinite")){for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===t?e.setAttribute("disabled",""):e.removeAttribute("disabled");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===i-1?e.setAttribute("disabled",""):e.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}O.defaults=P;const D={ScrollLock:class{constructor(e){this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(const e of["onReady","onResize","onTouchstart","onTouchmove"])this[e]=this[e].bind(this)}onReady(){const e=window.visualViewport;e&&(this.viewport=e,this.startY=0,e.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const e=this.fancybox,t=this.viewport,i=t.scale||1,s=e.$container;if(!s)return;let n="",r="",a="";i-1>.1&&(n=t.width*i+"px",r=t.height*i+"px",a=`translate3d(${t.offsetLeft}px, ${t.offsetTop}px, 0) scale(${1/i})`),s.style.width=n,s.style.height=r,s.style.transform=a}onTouchstart(e){this.startY=e.touches?e.touches[0].screenY:e.screenY}onTouchmove(e){const t=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!e.cancelable)return;if(e.touches.length>1||1!==i)return;const s=n(e.composedPath()[0]);if(!s)return void e.preventDefault();const r=window.getComputedStyle(s),a=parseInt(r.getPropertyValue("height"),10),o=e.touches?e.touches[0].screenY:e.screenY,l=t<=o&&0===s.scrollTop,c=t>=o&&s.scrollHeight-s.scrollTop===a;(l||c)&&e.preventDefault()}onWheel(e){n(e.composedPath()[0])||e.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const e=this.viewport;e&&(e.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}},Thumbs:w,Html:x,Toolbar:O,Image:k,Hash:I},M={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},N=new Map;let R=0;class U extends d{constructor(e,i={}){e=e.map((e=>(e.width&&(e._width=e.width),e.height&&(e._height=e.height),e))),super(t(!0,{},M,i)),this.bindHandlers(),this.state="init",this.setItems(e),this.attachPlugins(U.Plugins),this.trigger("init"),!0===this.option("hideScrollbar")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),N.set(this.id,this),this.trigger("prepare"),this.state="ready",this.trigger("ready"),this.$container.setAttribute("aria-hidden","false"),this.option("trapFocus")&&this.focus()}option(e,...t){const i=this.getSlide();let s=i?i[e]:void 0;return void 0!==s?("function"==typeof s&&(s=s.call(this,this,...t)),s):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((e=>this.$container.setAttribute(...e))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++R,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const i of e){const e=i.$trigger;if(e){const t=e.dataset||{};i.src=t.src||e.getAttribute("href")||i.src,i.type=t.type||i.type,!i.src&&e instanceof HTMLImageElement&&(i.src=e.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let e=i.$trigger&&i.$trigger.origTarget;e&&(s=e instanceof HTMLImageElement?e:e.querySelector("img:not([aria-hidden])")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=s||null;let n=i.thumb;!n&&s&&(n=s.currentSrc||s.src,!n&&s.dataset&&(n=s.dataset.lazySrc||s.dataset.src)),n||"image"!==i.type||(n=i.src),i.thumb=n||null,i.caption=i.caption||"",t.push(i)}this.items=t}initCarousel(){return this.Carousel=new v(this.$carousel,t(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let i=t.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,t)),"string"==typeof i&&i.length){const e=document.createElement("div"),s=`fancybox__caption_${this.id}_${t.index}`;e.className="fancybox__caption",e.innerHTML=i,e.setAttribute("id",s),t.$caption=t.$el.appendChild(e),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",s)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.isTopmost()&&this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void U.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void U.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void U.prev();const i=document.activeElement;if(i){if(i.closest("[contenteditable]"))return;t.matches(T)||i.blur()}if(!t.closest(".fancybox__content")&&!getSelection().toString().length&&!1!==this.trigger("click",e))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||1===e.content.scale}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):"y"===e.lockAxis&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),i=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(!this.isTopmost())return;document.body.classList.remove("is-using-mouse");const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const s=e.composedPath()[0],n=document.activeElement&&document.activeElement.classList,r=n&&n.contains("carousel__button");if("Escape"!==t&&!r&&(e.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)))return;if(!1===this.trigger("keydown",t,e))return;const a=i[t];"function"==typeof this[a]&&this[a]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=null===e.page?e.option("initialPage"):e.page,i=e.pages||[];return i.length&&i[t]?i[t].slides[0]:null}focus(e){if(U.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,i=this.getSlide(),s="done"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;e&&e.preventDefault(),U.ignoreFocusChange=!0;const n=Array.from(t.querySelectorAll(T));let r,a=[];for(let e of n){const t=e.offsetParent,i=s&&s.contains(e),n=!this.Carousel.$viewport.contains(e);t&&(i||n)?(a.push(e),void 0!==e.dataset.origTabindex&&(e.tabIndex=e.dataset.origTabindex,e.removeAttribute("data-orig-tabindex")),(e.hasAttribute("autoFocus")||!r&&i&&!e.classList.contains("carousel__button"))&&(r=e)):(e.dataset.origTabindex=void 0===e.dataset.origTabindex?e.getAttribute("tabindex"):e.dataset.origTabindex,e.tabIndex=-1)}e?a.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?S(a[a.length-1]):S(t):this.option("autoFocus")&&r?S(r):a.indexOf(document.activeElement)<0&&S(t),this.lastFocus=document.activeElement,U.ignoreFocusChange=!1}hideScrollbar(){if(!b)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let i=document.getElementById(t);i||e>0&&(i=document.createElement("style"),i.id=t,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,i={}){let s;const n=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(s=document.createElement("div"),s.appendChild(t)):s=t;else{const e=document.createRange().createContextualFragment(t);s=document.createElement("div"),s.appendChild(e)}if(e.filter&&!e.error&&(s=s.querySelector(e.filter)),s instanceof Element)return e._className=`has-${i.suffix||e.type||"unknown"}`,n.classList.add(e._className),s.classList.add("fancybox__content"),"none"!==s.style.display&&"none"!==getComputedStyle(s).getPropertyValue("display")||(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&s.setAttribute("id",e.id),e.$content=s,n.prepend(s),this.manageCloseButton(e),"loading"!==e.state&&this.revealContent(e),s;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=void 0===e.closeButton?this.option("closeButton"):e.closeButton;if(!t||"top"===t&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(e=>this.close(e))),"inside"===t?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||"loading"===e.state||null!==this.Carousel.prevPage||e.index!==this.options.startIndex||(t=void 0===e.showClass?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,(()=>{this.done(e)}))):this.done(e)}animateCSS(e,t,i){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void("function"==typeof i&&i());const s=function(n){n.currentTarget===this&&(e.removeEventListener("animationend",s),i&&i(),e.classList.remove(t))};e.addEventListener("animationend",s),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"

{{ERROR}}

"),this.setContent(e,i,{suffix:"error"})}showLoading(e){e.state="loading",e.$el.classList.add("is-loading");let t=e.$el.querySelector(".fancybox__spinner");t||(t=document.createElement("div"),t.classList.add("fancybox__spinner"),t.innerHTML=this.option("template.spinner"),t.addEventListener("click",(()=>{this.Carousel.Panzoom.velocity||this.close()})),e.$el.prepend(t))}hideLoading(e){const t=e.$el&&e.$el.querySelector(".fancybox__spinner");t&&(t.remove(),e.$el.classList.remove("is-loading")),"loading"===e.state&&(this.trigger("load",e),e.state="ready")}next(){const e=this.Carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.Carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.Carousel&&this.Carousel.slideTo(...e)}isClosing(){return["closing","customClosing","destroy"].includes(this.state)}isTopmost(){return U.getInstance().id==this.id}close(e){if(e&&e.preventDefault(),this.isClosing())return;if(!1===this.trigger("shouldClose",e))return;if(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",e),"destroy"===this.state)return;this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");const t=this.getSlide();if(this.Carousel.slides.forEach((e=>{e.$content&&e.index!==t.index&&this.Carousel.trigger("removeSlide",e)})),"closing"===this.state){const e=void 0===t.hideClass?this.option("hideClass"):t.hideClass;this.animateCSS(t.$content,e,(()=>{this.destroy()}),!0)}}destroy(){if("destroy"===this.state)return;this.state="destroy",this.trigger("destroy");const e=this.option("placeFocusBack")?this.option("triggerTarget",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,e&&S(e),N.delete(this.id);const t=U.getInstance();t?t.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}static show(e,t={}){return new U(e,t)}static fromEvent(e,t={}){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;const i=e.composedPath()[0];let s,n,r,a=i;if((a.matches("[data-fancybox-trigger]")||(a=a.closest("[data-fancybox-trigger]")))&&(t.triggerTarget=a,s=a&&a.dataset&&a.dataset.fancyboxTrigger),s){const e=document.querySelectorAll(`[data-fancybox="${s}"]`),t=parseInt(a.dataset.fancyboxIndex,10)||0;a=e.length?e[t]:a}Array.from(U.openers.keys()).reverse().some((t=>{r=a||i;let s=!1;try{r instanceof Element&&("string"==typeof t||t instanceof String)&&(s=r.matches(t)||(r=r.closest(t)))}catch(e){}return!!s&&(e.preventDefault(),n=t,!0)}));let o=!1;if(n){t.event=e,t.target=r,r.origTarget=i,o=U.fromOpener(n,t);const s=U.getInstance();s&&"ready"===s.state&&e.detail&&document.body.classList.add("is-using-mouse")}return o}static fromOpener(e,i={}){let s=[],n=i.startIndex||0,r=i.target||null;const a=void 0!==(i=t({},i,U.openers.get(e))).groupAll&&i.groupAll,o=void 0===i.groupAttr?"data-fancybox":i.groupAttr,l=o&&r?r.getAttribute(`${o}`):"";if(!r||l||a){const t=i.root||(r?r.getRootNode():document.body);s=[].slice.call(t.querySelectorAll(e))}if(r&&!a&&(s=l?s.filter((e=>e.getAttribute(`${o}`)===l)):[r]),!s.length)return!1;const c=U.getInstance();return!(c&&s.indexOf(c.options.$trigger)>-1)&&(n=r?s.indexOf(r):n,s=s.map((function(e){const t=["false","0","no","null","undefined"],i=["true","1","yes"],s=Object.assign({},e.dataset),n={};for(let[e,r]of Object.entries(s))if("fancybox"!==e)if("width"===e||"height"===e)n[`_${e}`]=r;else if("string"==typeof r||r instanceof String)if(t.indexOf(r)>-1)n[e]=!1;else if(i.indexOf(n[e])>-1)n[e]=!0;else try{n[e]=JSON.parse(r)}catch(t){n[e]=r}else n[e]=r;return e instanceof Element&&(n.$trigger=e),n})),new U(s,t({},i,{startIndex:n,$trigger:r})))}static bind(e,t={}){function i(){document.body.addEventListener("click",U.fromEvent,!1)}b&&(U.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener("DOMContentLoaded",i)),U.openers.set(e,t))}static unbind(e){U.openers.delete(e),U.openers.size||U.destroy()}static destroy(){let e;for(;e=U.getInstance();)e.destroy();U.openers=new Map,document.body.removeEventListener("click",U.fromEvent,!1)}static getInstance(e){return e?N.get(e):Array.from(N.values()).reverse().find((e=>!e.isClosing()&&e))||null}static close(e=!0,t){if(e)for(const e of N.values())e.close(t);else{const e=U.getInstance();e&&e.close(t)}}static next(){const e=U.getInstance();e&&e.next()}static prev(){const e=U.getInstance();e&&e.prev()}}U.version="4.0.31",U.defaults=M,U.openers=new Map,U.Plugins=D,U.bind("[data-fancybox]");for(const[e,t]of Object.entries(U.Plugins||{}))"function"==typeof t.create&&t.create(U);const $=document.querySelector(".burger-js"),B=document.querySelector(".menu-js"),F=document.querySelectorAll(".nav__link");var j=i(888),q=i.n(j);const z=document.querySelector("header"),H=document.querySelector(".btn-up-wrapper");function V(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function W(e={},t={}){Object.keys(t).forEach((i=>{void 0===e[i]?e[i]=t[i]:V(t[i])&&V(e[i])&&Object.keys(t[i]).length>0&&W(e[i],t[i])}))}const G={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function X(){const e="undefined"!=typeof document?document:{};return W(e,G),e}const Y={document:G,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function K(){const e="undefined"!=typeof window?window:{};return W(e,Y),e}class Q extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Z(e=[]){const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...Z(e)):t.push(e)})),t}function J(e,t){return Array.prototype.filter.call(e,t)}function ee(e,t){const i=K(),s=X();let n=[];if(!t&&e instanceof Q)return e;if(!e)return new Q(n);if("string"==typeof e){const i=e.trim();if(i.indexOf("<")>=0&&i.indexOf(">")>=0){let e="div";0===i.indexOf("e.split(" "))));return this.forEach((e=>{e.classList.add(...t)})),this},removeClass:function(...e){const t=Z(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...t)})),this},hasClass:function(...e){const t=Z(e.map((e=>e.split(" "))));return J(this,(e=>t.filter((t=>e.classList.contains(t))).length>0)).length>0},toggleClass:function(...e){const t=Z(e.map((e=>e.split(" "))));this.forEach((e=>{t.forEach((t=>{e.classList.toggle(t)}))}))},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let i=0;i=0;e-=1){const i=a[e];s&&i.listener===s||s&&i.listener&&i.listener.dom7proxy&&i.listener.dom7proxy===s?(r.removeEventListener(t,i.proxyListener,n),a.splice(e,1)):s||(r.removeEventListener(t,i.proxyListener,n),a.splice(e,1))}}}return this},trigger:function(...e){const t=K(),i=e[0].split(" "),s=e[1];for(let n=0;nt>0)),n.dispatchEvent(i),n.dom7EventData=[],delete n.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",(function i(s){s.target===this&&(e.call(this,s),t.off("transitionend",i))})),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=K();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=K(),t=X(),i=this[0],s=i.getBoundingClientRect(),n=t.body,r=i.clientTop||n.clientTop||0,a=i.clientLeft||n.clientLeft||0,o=i===e?e.scrollY:i.scrollTop,l=i===e?e.scrollX:i.scrollLeft;return{top:s.top+o-r,left:s.left+l-a}}return null},css:function(e,t){const i=K();let s;if(1===arguments.length){if("string"!=typeof e){for(s=0;s{e.apply(t,[t,i])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;tt-1)return ee([]);if(e<0){const i=t+e;return ee(i<0?[]:[this[i]])}return ee([this[e]])},append:function(...e){let t;const i=X();for(let s=0;s=0;s-=1)this[i].insertBefore(n.childNodes[s],this[i].childNodes[0])}else if(e instanceof Q)for(s=0;s0?e?this[0].nextElementSibling&&ee(this[0].nextElementSibling).is(e)?ee([this[0].nextElementSibling]):ee([]):this[0].nextElementSibling?ee([this[0].nextElementSibling]):ee([]):ee([])},nextAll:function(e){const t=[];let i=this[0];if(!i)return ee([]);for(;i.nextElementSibling;){const s=i.nextElementSibling;e?ee(s).is(e)&&t.push(s):t.push(s),i=s}return ee(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&ee(t.previousElementSibling).is(e)?ee([t.previousElementSibling]):ee([]):t.previousElementSibling?ee([t.previousElementSibling]):ee([])}return ee([])},prevAll:function(e){const t=[];let i=this[0];if(!i)return ee([]);for(;i.previousElementSibling;){const s=i.previousElementSibling;e?ee(s).is(e)&&t.push(s):t.push(s),i=s}return ee(t)},parent:function(e){const t=[];for(let i=0;i{Object.defineProperty(ee.fn,e,{value:se[e],writable:!0})}));const ne=ee;function re(e,t=0){return setTimeout(e,t)}function ae(){return Date.now()}function oe(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function le(...e){const t=Object(e[0]),i=["__proto__","constructor","prototype"];for(let n=1;ni.indexOf(e)<0));for(let i=0,s=e.length;in?"next":"prev",c=(e,t)=>"next"===l&&e>=t||"prev"===l&&e<=t,d=()=>{r=(new Date).getTime(),null===a&&(a=r);const l=Math.max(Math.min((r-a)/o,1),0),h=.5-Math.cos(l*Math.PI)/2;let u=n+h*(t-n);if(c(u,t)&&(u=t),e.wrapperEl.scrollTo({[i]:u}),c(u,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout((()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[i]:u})})),void s.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=s.requestAnimationFrame(d)};d()}let he,ue,pe;function me(){return he||(he=function(){const e=K(),t=X();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const i=Object.defineProperty({},"passive",{get(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),he}const ge={on(e,t,i){const s=this;if("function"!=typeof t)return s;const n=i?"unshift":"push";return e.split(" ").forEach((e=>{s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][n](t)})),s},once(e,t,i){const s=this;if("function"!=typeof t)return s;function n(...i){s.off(e,n),n.__emitterProxy&&delete n.__emitterProxy,t.apply(s,i)}return n.__emitterProxy=t,s.on(e,n,i)},onAny(e,t){const i=this;if("function"!=typeof e)return i;const s=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[s](e),i},offAny(e){const t=this;if(!t.eventsAnyListeners)return t;const i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off(e,t){const i=this;return i.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach(((s,n)=>{(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(n,1)}))})),i):i},emit(...e){const t=this;if(!t.eventsListeners)return t;let i,s,n;return"string"==typeof e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),n=t):(i=e[0].events,s=e[0].data,n=e[0].context||t),s.unshift(n),(Array.isArray(i)?i:i.split(" ")).forEach((e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach((t=>{t.apply(n,[e,...s])})),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach((e=>{e.apply(n,s)}))})),t}},fe={updateSize:function(){const e=this;let t,i;const s=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:s[0].clientWidth,i=void 0!==e.params.height&&null!==e.params.height?e.params.height:s[0].clientHeight,0===t&&e.isHorizontal()||0===i&&e.isVertical()||(t=t-parseInt(s.css("padding-left")||0,10)-parseInt(s.css("padding-right")||0,10),i=i-parseInt(s.css("padding-top")||0,10)-parseInt(s.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(i)&&(i=0),Object.assign(e,{width:t,height:i,size:e.isHorizontal()?t:i}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function i(e,i){return parseFloat(e.getPropertyValue(t(i))||0)}const s=e.params,{$wrapperEl:n,size:r,rtlTranslate:a,wrongRTL:o}=e,l=e.virtual&&s.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=n.children(`.${e.params.slideClass}`),h=l?e.virtual.slides.length:d.length;let u=[];const p=[],m=[];let g=s.slidesOffsetBefore;"function"==typeof g&&(g=s.slidesOffsetBefore.call(e));let f=s.slidesOffsetAfter;"function"==typeof f&&(f=s.slidesOffsetAfter.call(e));const y=e.snapGrid.length,v=e.slidesGrid.length;let b=s.spaceBetween,_=-g,T=0,S=0;if(void 0===r)return;"string"==typeof b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*r),e.virtualSize=-b,a?d.css({marginLeft:"",marginBottom:"",marginTop:""}):d.css({marginRight:"",marginBottom:"",marginTop:""}),s.centeredSlides&&s.cssMode&&(ce(e.wrapperEl,"--swiper-centered-offset-before",""),ce(e.wrapperEl,"--swiper-centered-offset-after",""));const w=s.grid&&s.grid.rows>1&&e.grid;let E;w&&e.grid.initSlides(h);const C="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter((e=>void 0!==s.breakpoints[e].slidesPerView)).length>0;for(let n=0;n1&&u.push(e.virtualSize-r)}if(0===u.length&&(u=[0]),0!==s.spaceBetween){const i=e.isHorizontal()&&a?"marginLeft":t("marginRight");d.filter(((e,t)=>!s.cssMode||t!==d.length-1)).css({[i]:`${b}px`})}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(s.spaceBetween?s.spaceBetween:0)})),e-=s.spaceBetween;const t=e-r;u=u.map((e=>e<0?-g:e>t?t+f:e))}if(s.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(s.spaceBetween?s.spaceBetween:0)})),e-=s.spaceBetween,e{u[i]=e-t})),p.forEach(((e,i)=>{p[i]=e+t}))}}if(Object.assign(e,{slides:d,snapGrid:u,slidesGrid:p,slidesSizesGrid:m}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){ce(e.wrapperEl,"--swiper-centered-offset-before",-u[0]+"px"),ce(e.wrapperEl,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],i=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+i))}h!==c&&e.emit("slidesLengthChange"),u.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==v&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset()},updateAutoHeight:function(e){const t=this,i=[],s=t.virtual&&t.params.virtual.enabled;let n,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>s?t.slides.filter((t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e))[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)t.visibleSlides.each((e=>{i.push(e)}));else for(n=0;nt.slides.length&&!s)break;i.push(a(e))}else i.push(a(t.activeIndex));for(n=0;nr?e:r}(r||0===r)&&t.$wrapperEl.css("height",`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides;for(let i=0;i=0&&h1&&u<=t.size||h<=0&&u>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e),s.eq(e).addClass(i.slideVisibleClass)),o.progress=n?-c:c,o.originalProgress=n?-d:d}t.visibleSlides=ne(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}const i=t.params,s=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:r,isEnd:a}=t;const o=r,l=a;0===s?(n=0,r=!0,a=!0):(n=(e-t.minTranslate())/s,r=n<=0,a=n>=1),Object.assign(t,{progress:n,isBeginning:r,isEnd:a}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),a&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!a)&&t.emit("fromEdge"),t.emit("progress",n)},updateSlidesClasses:function(){const e=this,{slides:t,params:i,$wrapperEl:s,activeIndex:n,realIndex:r}=e,a=e.virtual&&i.virtual.enabled;let o;t.removeClass(`${i.slideActiveClass} ${i.slideNextClass} ${i.slidePrevClass} ${i.slideDuplicateActiveClass} ${i.slideDuplicateNextClass} ${i.slideDuplicatePrevClass}`),o=a?e.$wrapperEl.find(`.${i.slideClass}[data-swiper-slide-index="${n}"]`):t.eq(n),o.addClass(i.slideActiveClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${r}"]`).addClass(i.slideDuplicateActiveClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${r}"]`).addClass(i.slideDuplicateActiveClass));let l=o.nextAll(`.${i.slideClass}`).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=t.eq(0),l.addClass(i.slideNextClass));let c=o.prevAll(`.${i.slideClass}`).eq(0).addClass(i.slidePrevClass);i.loop&&0===c.length&&(c=t.eq(-1),c.addClass(i.slidePrevClass)),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicateNextClass),c.hasClass(i.slideDuplicateClass)?s.children(`.${i.slideClass}:not(.${i.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass):s.children(`.${i.slideClass}.${i.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(i.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,i=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:s,snapGrid:n,params:r,activeIndex:a,realIndex:o,snapIndex:l}=t;let c,d=e;if(void 0===d){for(let e=0;e=s[e]&&i=s[e]&&i=s[e]&&(d=e);r.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(n.indexOf(i)>=0)c=n.indexOf(i);else{const e=Math.min(r.slidesPerGroupSkip,d);c=e+Math.floor((d-e)/r.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),d===a)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const h=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:c,realIndex:h,previousIndex:a,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),o!==h&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,i=t.params,s=ne(e).closest(`.${i.slideClass}`)[0];let n,r=!1;if(s)for(let e=0;e6&&(n=n.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new i.WebKitCSSMatrix("none"===n?"":n)):(r=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),s=r.toString().split(",")),"x"===t&&(n=i.WebKitCSSMatrix?r.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===t&&(n=i.WebKitCSSMatrix?r.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),n||0}(n[0],e);return i&&(r=-r),r||0},setTranslate:function(e,t){const i=this,{rtlTranslate:s,params:n,$wrapperEl:r,wrapperEl:a,progress:o}=i;let l,c=0,d=0;i.isHorizontal()?c=s?-e:e:d=e,n.roundLengths&&(c=Math.floor(c),d=Math.floor(d)),n.cssMode?a[i.isHorizontal()?"scrollLeft":"scrollTop"]=i.isHorizontal()?-c:-d:n.virtualTranslate||r.transform(`translate3d(${c}px, ${d}px, 0px)`),i.previousTranslate=i.translate,i.translate=i.isHorizontal()?c:d;const h=i.maxTranslate()-i.minTranslate();l=0===h?0:(e-i.minTranslate())/h,l!==o&&i.updateProgress(e),i.emit("setTranslate",i.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,i=!0,s=!0,n){const r=this,{params:a,wrapperEl:o}=r;if(r.animating&&a.preventInteractionOnTransition)return!1;const l=r.minTranslate(),c=r.maxTranslate();let d;if(d=s&&e>l?l:s&&er?"next":n=l.length&&(f=l.length-1),(h||o.initialSlide||0)===(d||0)&&i&&r.emit("beforeSlideChangeStart");const y=-l[f];if(r.updateProgress(y),o.normalizeSlideIndex)for(let e=0;e=i&&t=i&&t=i&&(a=e)}if(r.initialized&&a!==h){if(!r.allowSlideNext&&yr.translate&&y>r.maxTranslate()&&(h||0)!==a)return!1}let v;if(v=a>h?"next":a{r.wrapperEl.style.scrollSnapType="",r._swiperImmediateVirtual=!1}))}else{if(!r.support.smoothScroll)return de({swiper:r,targetPosition:i,side:e?"left":"top"}),!0;p.scrollTo({[e?"left":"top"]:i,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(y),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,s),r.transitionStart(i,v),0===t?r.transitionEnd(i,v):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(i,v))}),r.$wrapperEl[0].addEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t=this.params.speed,i=!0,s){const n=this;let r=e;return n.params.loop&&(r+=n.loopedSlides),n.slideTo(r,t,i,s)},slideNext:function(e=this.params.speed,t=!0,i){const s=this,{animating:n,enabled:r,params:a}=s;if(!r)return s;let o=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(o=Math.max(s.slidesPerViewDynamic("current",!0),1));const l=s.activeIndexd(e)));let p=a[u.indexOf(h)-1];if(void 0===p&&n.cssMode){let e;a.forEach(((t,i)=>{h>=t&&(e=i)})),void 0!==e&&(p=a[e>0?e-1:e])}let m=0;return void 0!==p&&(m=o.indexOf(p),m<0&&(m=s.activeIndex-1),"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(m=m-s.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),n.rewind&&s.isBeginning?s.slideTo(s.slides.length-1,e,t,i):s.slideTo(m,e,t,i)},slideReset:function(e=this.params.speed,t=!0,i){return this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e=this.params.speed,t=!0,i,s=.5){const n=this;let r=n.activeIndex;const a=Math.min(n.params.slidesPerGroupSkip,r),o=a+Math.floor((r-a)/n.params.slidesPerGroup),l=n.rtlTranslate?n.translate:-n.translate;if(l>=n.snapGrid[o]){const e=n.snapGrid[o];l-e>(n.snapGrid[o+1]-e)*s&&(r+=n.params.slidesPerGroup)}else{const e=n.snapGrid[o-1];l-e<=(n.snapGrid[o]-e)*s&&(r-=n.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,n.slidesGrid.length-1),n.slideTo(r,e,t,i)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:i}=e,s="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let n,r=e.clickedIndex;if(t.loop){if(e.animating)return;n=parseInt(ne(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?re.slides.length-e.loopedSlides+s/2?(e.loopFix(),r=i.children(`.${t.slideClass}[data-swiper-slide-index="${n}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),re((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-s?(e.loopFix(),r=i.children(`.${t.slideClass}[data-swiper-slide-index="${n}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),re((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}},Te={loopCreate:function(){const e=this,t=X(),{params:i,$wrapperEl:s}=e,n=s.children().length>0?ne(s.children()[0].parentNode):s;n.children(`.${i.slideClass}.${i.slideDuplicateClass}`).remove();let r=n.children(`.${i.slideClass}`);if(i.loopFillGroupWithBlank){const e=i.slidesPerGroup-r.length%i.slidesPerGroup;if(e!==i.slidesPerGroup){for(let s=0;sr.length&&(e.loopedSlides=r.length);const a=[],o=[];r.each(((t,i)=>{const s=ne(t);i=r.length-e.loopedSlides&&a.push(t),s.attr("data-swiper-slide-index",i)}));for(let e=0;e=0;e-=1)n.prepend(ne(a[e].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:i,loopedSlides:s,allowSlidePrev:n,allowSlideNext:r,snapGrid:a,rtlTranslate:o}=e;let l;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-a[t]-e.getTranslate();t=i.length-s&&(l=-i.length+t+s,l+=s,e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((o?-e.translate:e.translate)-c)),e.allowSlidePrev=n,e.allowSlideNext=r,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:i}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),i.removeAttr("data-swiper-slide-index")}};function Se(e){const t=this,i=X(),s=K(),n=t.touchEventsData,{params:r,touches:a,enabled:o}=t;if(!o)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=e;l.originalEvent&&(l=l.originalEvent);let c=ne(l.target);if("wrapper"===r.touchEventsTarget&&!c.closest(t.wrapperEl).length)return;if(n.isTouchEvent="touchstart"===l.type,!n.isTouchEvent&&"which"in l&&3===l.which)return;if(!n.isTouchEvent&&"button"in l&&l.button>0)return;if(n.isTouched&&n.isMoved)return;r.noSwipingClass&&""!==r.noSwipingClass&&l.target&&l.target.shadowRoot&&e.path&&e.path[0]&&(c=ne(e.path[0]));const d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!l.target||!l.target.shadowRoot);if(r.noSwiping&&(h?function(e,t=this){return function t(i){return i&&i!==X()&&i!==K()?(i.assignedSlot&&(i=i.assignedSlot),i.closest(e)||t(i.getRootNode().host)):null}(t)}(d,l.target):c.closest(d)[0]))return void(t.allowClick=!0);if(r.swipeHandler&&!c.closest(r.swipeHandler)[0])return;a.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,a.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;const u=a.currentX,p=a.currentY,m=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,g=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(m&&(u<=g||u>=s.innerWidth-g)){if("prevent"!==m)return;e.preventDefault()}if(Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=u,a.startY=p,n.touchStartTime=ae(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(n.allowThresholdMove=!1),"touchstart"!==l.type){let e=!0;c.is(n.focusableElements)&&(e=!1),i.activeElement&&ne(i.activeElement).is(n.focusableElements)&&i.activeElement!==c[0]&&i.activeElement.blur();const s=e&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!s||c[0].isContentEditable||l.preventDefault()}t.emit("touchStart",l)}function we(e){const t=X(),i=this,s=i.touchEventsData,{params:n,touches:r,rtlTranslate:a,enabled:o}=i;if(!o)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),!s.isTouched)return void(s.startMoving&&s.isScrolling&&i.emit("touchMoveOpposite",l));if(s.isTouchEvent&&"touchmove"!==l.type)return;const c="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),d="touchmove"===l.type?c.pageX:l.pageX,h="touchmove"===l.type?c.pageY:l.pageY;if(l.preventedByNestedSwiper)return r.startX=d,void(r.startY=h);if(!i.allowTouchMove)return i.allowClick=!1,void(s.isTouched&&(Object.assign(r,{startX:d,startY:h,currentX:d,currentY:h}),s.touchStartTime=ae()));if(s.isTouchEvent&&n.touchReleaseOnEdges&&!n.loop)if(i.isVertical()){if(hr.startY&&i.translate>=i.minTranslate())return s.isTouched=!1,void(s.isMoved=!1)}else if(dr.startX&&i.translate>=i.minTranslate())return;if(s.isTouchEvent&&t.activeElement&&l.target===t.activeElement&&ne(l.target).is(s.focusableElements))return s.isMoved=!0,void(i.allowClick=!1);if(s.allowTouchCallbacks&&i.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;r.currentX=d,r.currentY=h;const u=r.currentX-r.startX,p=r.currentY-r.startY;if(i.params.threshold&&Math.sqrt(u**2+p**2)=25&&(e=180*Math.atan2(Math.abs(p),Math.abs(u))/Math.PI,s.isScrolling=i.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(s.isScrolling&&i.emit("touchMoveOpposite",l),void 0===s.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(s.startMoving=!0)),s.isScrolling)return void(s.isTouched=!1);if(!s.startMoving)return;i.allowClick=!1,!n.cssMode&&l.cancelable&&l.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&l.stopPropagation(),s.isMoved||(n.loop&&!n.cssMode&&i.loopFix(),s.startTranslate=i.getTranslate(),i.setTransition(0),i.animating&&i.$wrapperEl.trigger("webkitTransitionEnd transitionend"),s.allowMomentumBounce=!1,!n.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",l)),i.emit("sliderMove",l),s.isMoved=!0;let m=i.isHorizontal()?u:p;r.diff=m,m*=n.touchRatio,a&&(m=-m),i.swipeDirection=m>0?"prev":"next",s.currentTranslate=m+s.startTranslate;let g=!0,f=n.resistanceRatio;if(n.touchReleaseOnEdges&&(f=0),m>0&&s.currentTranslate>i.minTranslate()?(g=!1,n.resistance&&(s.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+s.startTranslate+m)**f)):m<0&&s.currentTranslates.startTranslate&&(s.currentTranslate=s.startTranslate),i.allowSlidePrev||i.allowSlideNext||(s.currentTranslate=s.startTranslate),n.threshold>0){if(!(Math.abs(m)>n.threshold||s.allowThresholdMove))return void(s.currentTranslate=s.startTranslate);if(!s.allowThresholdMove)return s.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,s.currentTranslate=s.startTranslate,void(r.diff=i.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&i.freeMode||n.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),i.params.freeMode&&n.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(s.currentTranslate),i.setTranslate(s.currentTranslate))}function Ee(e){const t=this,i=t.touchEventsData,{params:s,touches:n,rtlTranslate:r,slidesGrid:a,enabled:o}=t;if(!o)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",l),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=ae(),d=c-i.touchStartTime;if(t.allowClick){const e=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(e&&e[0]||l.target),t.emit("tap click",l),d<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(i.lastClickTime=ae(),re((()=>{t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===n.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);let h;if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,h=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,s.cssMode)return;if(t.params.freeMode&&s.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});let u=0,p=t.slidesSizesGrid[0];for(let e=0;e=a[e]&&h=a[e]&&(u=e,p=a[a.length-1]-a[a.length-2])}const m=(h-a[u])/p,g=us.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(m>=s.longSwipesRatio?t.slideTo(u+g):t.slideTo(u)),"prev"===t.swipeDirection&&(m>1-s.longSwipesRatio?t.slideTo(u+g):t.slideTo(u))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||l.target!==t.navigation.nextEl&&l.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(u+g),"prev"===t.swipeDirection&&t.slideTo(u)):l.target===t.navigation.nextEl?t.slideTo(u+g):t.slideTo(u)}}function Ce(){const e=this,{params:t,el:i}=e;if(i&&0===i.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:s,allowSlidePrev:n,snapGrid:r}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=n,e.allowSlideNext=s,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function xe(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function ke(){const e=this,{wrapperEl:t,rtlTranslate:i,enabled:s}=e;if(!s)return;let n;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();n=0===r?0:(e.translate-e.minTranslate())/r,n!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let Ie=!1;function Le(){}const Ae=(e,t)=>{const i=X(),{params:s,touchEvents:n,el:r,wrapperEl:a,device:o,support:l}=e,c=!!s.nested,d="on"===t?"addEventListener":"removeEventListener",h=t;if(l.touch){const t=!("touchstart"!==n.start||!l.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};r[d](n.start,e.onTouchStart,t),r[d](n.move,e.onTouchMove,l.passiveListener?{passive:!1,capture:c}:c),r[d](n.end,e.onTouchEnd,t),n.cancel&&r[d](n.cancel,e.onTouchEnd,t)}else r[d](n.start,e.onTouchStart,!1),i[d](n.move,e.onTouchMove,c),i[d](n.end,e.onTouchEnd,!1);(s.preventClicks||s.preventClicksPropagation)&&r[d]("click",e.onClick,!0),s.cssMode&&a[d]("scroll",e.onScroll),s.updateOnWindowResize?e[h](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",Ce,!0):e[h]("observerUpdate",Ce,!0)},Pe={attachEvents:function(){const e=this,t=X(),{params:i,support:s}=e;e.onTouchStart=Se.bind(e),e.onTouchMove=we.bind(e),e.onTouchEnd=Ee.bind(e),i.cssMode&&(e.onScroll=ke.bind(e)),e.onClick=xe.bind(e),s.touch&&!Ie&&(t.addEventListener("touchstart",Le),Ie=!0),Ae(e,"on")},detachEvents:function(){Ae(this,"off")}},Oe=(e,t)=>e.grid&&t.grid&&t.grid.rows>1,De={setBreakpoint:function(){const e=this,{activeIndex:t,initialized:i,loopedSlides:s=0,params:n,$el:r}=e,a=n.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const o=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const l=(o in a?a[o]:void 0)||e.originalParams,c=Oe(e,n),d=Oe(e,l),h=n.enabled;c&&!d?(r.removeClass(`${n.containerModifierClass}grid ${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&d&&(r.addClass(`${n.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===n.grid.fill)&&r.addClass(`${n.containerModifierClass}grid-column`),e.emitContainerClasses());const u=l.direction&&l.direction!==n.direction,p=n.loop&&(l.slidesPerView!==n.slidesPerView||u);u&&i&&e.changeDirection(),le(e.params,l);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!m?e.disable():!h&&m&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",l),p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t="window",i){if(!e||"container"===t&&!i)return;let s=!1;const n=K(),r="window"===t?n.innerHeight:i.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e{"object"==typeof e?Object.keys(e).forEach((s=>{e[s]&&i.push(t+s)})):"string"==typeof e&&i.push(t+e)})),i}(["initialized",i.direction,{"pointer-events":!a.touch},{"free-mode":e.params.freeMode&&i.freeMode.enabled},{autoheight:i.autoHeight},{rtl:s},{grid:i.grid&&i.grid.rows>1},{"grid-column":i.grid&&i.grid.rows>1&&"column"===i.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":i.cssMode},{centered:i.cssMode&&i.centeredSlides}],i.containerModifierClass);t.push(...o),n.addClass([...t].join(" ")),e.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}},Ne={loadImage:function(e,t,i,s,n,r){const a=K();let o;function l(){r&&r()}ne(e).parent("picture")[0]||e.complete&&n?l():t?(o=new a.Image,o.onload=l,o.onerror=l,s&&(o.sizes=s),i&&(o.srcset=i),t&&(o.src=t)):l()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let i=0;i=0&&!0===e[s]&&(e[s]={auto:!0}),s in e&&"enabled"in n?(!0===e[s]&&(e[s]={enabled:!0}),"object"!=typeof e[s]||"enabled"in e[s]||(e[s].enabled=!0),e[s]||(e[s]={enabled:!1}),le(t,i)):le(t,i)):le(t,i)}}const $e={eventsEmitter:ge,update:fe,translate:ye,transition:be,slide:_e,loop:Te,grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:Pe,breakpoints:De,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:i}=e,{slidesOffsetBefore:s}=i;if(s){const t=e.slides.length-1,i=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*s;e.isLocked=e.size>i}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:Me,images:Ne},Be={};class Fe{constructor(...e){let t,i;if(1===e.length&&e[0].constructor&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?i=e[0]:[t,i]=e,i||(i={}),i=le({},i),t&&!i.el&&(i.el=t),i.el&&ne(i.el).length>1){const e=[];return ne(i.el).each((t=>{const s=le({},i,{el:t});e.push(new Fe(s))})),e}const s=this;s.__swiper__=!0,s.support=me(),s.device=function(e={}){return ue||(ue=function({userAgent:e}={}){const t=me(),i=K(),s=i.navigator.platform,n=e||i.navigator.userAgent,r={ios:!1,android:!1},a=i.screen.width,o=i.screen.height,l=n.match(/(Android);?[\s\/]+([\d.]+)?/);let c=n.match(/(iPad).*OS\s([\d_]+)/);const d=n.match(/(iPod)(.*OS\s([\d_]+))?/),h=!c&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),u="Win32"===s;let p="MacIntel"===s;return!c&&p&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${a}x${o}`)>=0&&(c=n.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),p=!1),l&&!u&&(r.os="android",r.android=!0),(c||h||d)&&(r.os="ios",r.ios=!0),r}(e)),ue}({userAgent:i.userAgent}),s.browser=(pe||(pe=function(){const e=K();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),pe),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],i.modules&&Array.isArray(i.modules)&&s.modules.push(...i.modules);const n={};s.modules.forEach((e=>{e({swiper:s,extendParams:Ue(i,n),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})}));const r=le({},Re,n);return s.params=le({},r,Be,i),s.originalParams=le({},s.params),s.passedParams=le({},i),s.params&&s.params.on&&Object.keys(s.params.on).forEach((e=>{s.on(e,s.params.on[e])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),s.$=ne,Object.assign(s,{enabled:s.params.enabled,el:t,classNames:[],slides:ne(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return s.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},s.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},s.support.touch||!s.params.simulateTouch?s.touchEventsTouch:s.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:ae(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const i=this;e=Math.min(Math.max(e,0),1);const s=i.minTranslate(),n=(i.maxTranslate()-s)*e+s;i.translateTo(n,void 0===t?0:t),i.updateActiveIndex(),i.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each((i=>{const s=e.getSlideClasses(i);t.push({slideEl:i,classNames:s}),e.emit("_slideClass",i,s)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const{params:i,slides:s,slidesGrid:n,slidesSizesGrid:r,size:a,activeIndex:o}=this;let l=1;if(i.centeredSlides){let e,t=s[o].swiperSlideSize;for(let i=o+1;ia&&(e=!0));for(let i=o-1;i>=0;i-=1)s[i]&&!e&&(t+=s[i].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=o+1;e=0;e-=1)n[o]-n[e]1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),n||s()),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const i=this,s=i.params.direction;return e||(e="horizontal"===s?"vertical":"horizontal"),e===s||"horizontal"!==e&&"vertical"!==e||(i.$el.removeClass(`${i.params.containerModifierClass}${s}`).addClass(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.each((t=>{"vertical"===e?t.style.width="":t.style.height=""})),i.emit("changeDirection"),t&&i.update()),i}mount(e){const t=this;if(t.mounted)return!0;const i=ne(e||t.params.el);if(!(e=i[0]))return!1;e.swiper=t;const s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let n=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=ne(e.shadowRoot.querySelector(s()));return t.children=e=>i.children(e),t}return i.children(s())})();if(0===n.length&&t.params.createElements){const e=X().createElement("div");n=ne(e),e.className=t.params.wrapperClass,i.append(e),i.children(`.${t.params.slideClass}`).each((e=>{n.append(e)}))}return Object.assign(t,{$el:i,el:e,$wrapperEl:n,wrapperEl:n[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction")),wrongRTL:"-webkit-box"===n.css("display")}),!0}init(e){const t=this;return t.initialized||!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t}destroy(e=!0,t=!0){const i=this,{params:s,$el:n,$wrapperEl:r,slides:a}=i;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),n.removeAttr("style"),r.removeAttr("style"),a&&a.length&&a.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((e=>{i.off(e)})),!1!==e&&(i.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(i)),i.destroyed=!0),null}static extendDefaults(e){le(Be,e)}static get extendedDefaults(){return Be}static get defaults(){return Re}static installModule(e){Fe.prototype.__modules__||(Fe.prototype.__modules__=[]);const t=Fe.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>Fe.installModule(e))),Fe):(Fe.installModule(e),Fe)}}Object.keys($e).forEach((e=>{Object.keys($e[e]).forEach((t=>{Fe.prototype[t]=$e[e][t]}))})),Fe.use([function({swiper:e,on:t,emit:i}){const s=K();let n=null;const r=()=>{e&&!e.destroyed&&e.initialized&&(i("beforeResize"),i("resize"))},a=()=>{e&&!e.destroyed&&e.initialized&&i("orientationchange")};t("init",(()=>{e.params.resizeObserver&&void 0!==s.ResizeObserver?e&&!e.destroyed&&e.initialized&&(n=new ResizeObserver((t=>{const{width:i,height:s}=e;let n=i,a=s;t.forEach((({contentBoxSize:t,contentRect:i,target:s})=>{s&&s!==e.el||(n=i?i.width:(t[0]||t).inlineSize,a=i?i.height:(t[0]||t).blockSize)})),n===i&&a===s||r()})),n.observe(e.el)):(s.addEventListener("resize",r),s.addEventListener("orientationchange",a))})),t("destroy",(()=>{n&&n.unobserve&&e.el&&(n.unobserve(e.el),n=null),s.removeEventListener("resize",r),s.removeEventListener("orientationchange",a)}))},function({swiper:e,extendParams:t,on:i,emit:s}){const n=[],r=K(),a=(e,t={})=>{const i=new(r.MutationObserver||r.WebkitMutationObserver)((e=>{if(1===e.length)return void s("observerUpdate",e[0]);const t=function(){s("observerUpdate",e[0])};r.requestAnimationFrame?r.requestAnimationFrame(t):r.setTimeout(t,0)}));i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),n.push(i)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(e.params.observer){if(e.params.observeParents){const t=e.$el.parents();for(let e=0;e{n.forEach((e=>{e.disconnect()})),n.splice(0,n.length)}))}]);const je=Fe;function qe(e,t,i,s){const n=X();return e.params.createElements&&Object.keys(s).forEach((r=>{if(!i[r]&&!0===i.auto){let a=e.$el.children(`.${s[r]}`)[0];a||(a=n.createElement("div"),a.className=s[r],e.$el.append(a)),i[r]=a,t[r]=a}})),i}function ze(e=""){return`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}je.use([function({swiper:e,extendParams:t,on:i,emit:s}){function n(t){let i;return t&&(i=ne(t),e.params.uniqueNavElements&&"string"==typeof t&&i.length>1&&1===e.$el.find(t).length&&(i=e.$el.find(t))),i}function r(t,i){const s=e.params.navigation;t&&t.length>0&&(t[i?"addClass":"removeClass"](s.disabledClass),t[0]&&"BUTTON"===t[0].tagName&&(t[0].disabled=i),e.params.watchOverflow&&e.enabled&&t[e.isLocked?"addClass":"removeClass"](s.lockClass))}function a(){if(e.params.loop)return;const{$nextEl:t,$prevEl:i}=e.navigation;r(i,e.isBeginning&&!e.params.rewind),r(t,e.isEnd&&!e.params.rewind)}function o(t){t.preventDefault(),(!e.isBeginning||e.params.loop||e.params.rewind)&&e.slidePrev()}function l(t){t.preventDefault(),(!e.isEnd||e.params.loop||e.params.rewind)&&e.slideNext()}function c(){const t=e.params.navigation;if(e.params.navigation=qe(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!t.nextEl&&!t.prevEl)return;const i=n(t.nextEl),s=n(t.prevEl);i&&i.length>0&&i.on("click",l),s&&s.length>0&&s.on("click",o),Object.assign(e.navigation,{$nextEl:i,nextEl:i&&i[0],$prevEl:s,prevEl:s&&s[0]}),e.enabled||(i&&i.addClass(t.lockClass),s&&s.addClass(t.lockClass))}function d(){const{$nextEl:t,$prevEl:i}=e.navigation;t&&t.length&&(t.off("click",l),t.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",o),i.removeClass(e.params.navigation.disabledClass))}t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}}),e.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},i("init",(()=>{c(),a()})),i("toEdge fromEdge lock unlock",(()=>{a()})),i("destroy",(()=>{d()})),i("enable disable",(()=>{const{$nextEl:t,$prevEl:i}=e.navigation;t&&t[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),i&&i[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)})),i("click",((t,i)=>{const{$nextEl:n,$prevEl:r}=e.navigation,a=i.target;if(e.params.navigation.hideOnClick&&!ne(a).is(r)&&!ne(a).is(n)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===a||e.pagination.el.contains(a)))return;let t;n?t=n.hasClass(e.params.navigation.hiddenClass):r&&(t=r.hasClass(e.params.navigation.hiddenClass)),s(!0===t?"navigationShow":"navigationHide"),n&&n.toggleClass(e.params.navigation.hiddenClass),r&&r.toggleClass(e.params.navigation.hiddenClass)}})),Object.assign(e.navigation,{update:a,init:c,destroy:d})},function({swiper:e,extendParams:t,on:i,emit:s}){const n="swiper-pagination";let r;t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${n}-bullet`,bulletActiveClass:`${n}-bullet-active`,modifierClass:`${n}-`,currentClass:`${n}-current`,totalClass:`${n}-total`,hiddenClass:`${n}-hidden`,progressbarFillClass:`${n}-progressbar-fill`,progressbarOppositeClass:`${n}-progressbar-opposite`,clickableClass:`${n}-clickable`,lockClass:`${n}-lock`,horizontalClass:`${n}-horizontal`,verticalClass:`${n}-vertical`}}),e.pagination={el:null,$el:null,bullets:[]};let a=0;function o(){return!e.params.pagination.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length}function l(t,i){const{bulletActiveClass:s}=e.params.pagination;t[i]().addClass(`${s}-${i}`)[i]().addClass(`${s}-${i}-${i}`)}function c(){const t=e.rtl,i=e.params.pagination;if(o())return;const n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,c=e.pagination.$el;let d;const h=e.params.loop?Math.ceil((n-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(d=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),d>n-1-2*e.loopedSlides&&(d-=n-2*e.loopedSlides),d>h-1&&(d-=h),d<0&&"bullets"!==e.params.paginationType&&(d=h+d)):d=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const s=e.pagination.bullets;let n,o,h;if(i.dynamicBullets&&(r=s.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),c.css(e.isHorizontal()?"width":"height",r*(i.dynamicMainBullets+4)+"px"),i.dynamicMainBullets>1&&void 0!==e.previousIndex&&(a+=d-(e.previousIndex-e.loopedSlides||0),a>i.dynamicMainBullets-1?a=i.dynamicMainBullets-1:a<0&&(a=0)),n=Math.max(d-a,0),o=n+(Math.min(s.length,i.dynamicMainBullets)-1),h=(o+n)/2),s.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${i.bulletActiveClass}${e}`)).join(" ")),c.length>1)s.each((e=>{const t=ne(e),s=t.index();s===d&&t.addClass(i.bulletActiveClass),i.dynamicBullets&&(s>=n&&s<=o&&t.addClass(`${i.bulletActiveClass}-main`),s===n&&l(t,"prev"),s===o&&l(t,"next"))}));else{const t=s.eq(d),r=t.index();if(t.addClass(i.bulletActiveClass),i.dynamicBullets){const t=s.eq(n),a=s.eq(o);for(let e=n;e<=o;e+=1)s.eq(e).addClass(`${i.bulletActiveClass}-main`);if(e.params.loop)if(r>=s.length){for(let e=i.dynamicMainBullets;e>=0;e-=1)s.eq(s.length-e).addClass(`${i.bulletActiveClass}-main`);s.eq(s.length-i.dynamicMainBullets-1).addClass(`${i.bulletActiveClass}-prev`)}else l(t,"prev"),l(a,"next");else l(t,"prev"),l(a,"next")}}if(i.dynamicBullets){const n=Math.min(s.length,i.dynamicMainBullets+4),a=(r*n-r)/2-h*r,o=t?"right":"left";s.css(e.isHorizontal()?o:"top",`${a}px`)}}if("fraction"===i.type&&(c.find(ze(i.currentClass)).text(i.formatFractionCurrent(d+1)),c.find(ze(i.totalClass)).text(i.formatFractionTotal(h))),"progressbar"===i.type){let t;t=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const s=(d+1)/h;let n=1,r=1;"horizontal"===t?n=s:r=s,c.find(ze(i.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${n}) scaleY(${r})`).transition(e.params.speed)}"custom"===i.type&&i.renderCustom?(c.html(i.renderCustom(e,d+1,h)),s("paginationRender",c[0])):s("paginationUpdate",c[0]),e.params.watchOverflow&&e.enabled&&c[e.isLocked?"addClass":"removeClass"](i.lockClass)}function d(){const t=e.params.pagination;if(o())return;const i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,n=e.pagination.$el;let r="";if("bullets"===t.type){let s=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&!e.params.loop&&s>i&&(s=i);for(let i=0;i`;n.html(r),e.pagination.bullets=n.find(ze(t.bulletClass))}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):` / `,n.html(r)),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):``,n.html(r)),"custom"!==t.type&&s("paginationRender",e.pagination.$el[0])}function h(){e.params.pagination=qe(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=e.params.pagination;if(!t.el)return;let i=ne(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el),i.length>1&&(i=i.filter((t=>ne(t).parents(".swiper")[0]===e.el)))),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),i.addClass(t.modifierClass+e.params.direction),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(`${t.modifierClass}${t.type}-dynamic`),a=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click",ze(t.bulletClass),(function(t){t.preventDefault();let i=ne(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),Object.assign(e.pagination,{$el:i,el:i[0]}),e.enabled||i.addClass(t.lockClass))}function u(){const t=e.params.pagination;if(o())return;const i=e.pagination.$el;i.removeClass(t.hiddenClass),i.removeClass(t.modifierClass+t.type),i.removeClass(t.modifierClass+e.params.direction),e.pagination.bullets&&e.pagination.bullets.removeClass&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&i.off("click",ze(t.bulletClass))}i("init",(()=>{h(),d(),c()})),i("activeIndexChange",(()=>{(e.params.loop||void 0===e.snapIndex)&&c()})),i("snapIndexChange",(()=>{e.params.loop||c()})),i("slidesLengthChange",(()=>{e.params.loop&&(d(),c())})),i("snapGridLengthChange",(()=>{e.params.loop||(d(),c())})),i("destroy",(()=>{u()})),i("enable disable",(()=>{const{$el:t}=e.pagination;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)})),i("lock unlock",(()=>{c()})),i("click",((t,i)=>{const n=i.target,{$el:r}=e.pagination;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r.length>0&&!ne(n).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&n===e.navigation.nextEl||e.navigation.prevEl&&n===e.navigation.prevEl))return;const t=r.hasClass(e.params.pagination.hiddenClass);s(!0===t?"paginationShow":"paginationHide"),r.toggleClass(e.params.pagination.hiddenClass)}})),Object.assign(e.pagination,{render:d,update:c,init:h,destroy:u})},function({swiper:e,extendParams:t,on:i,emit:s}){let n;function r(){const t=e.slides.eq(e.activeIndex);let i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(n),n=re((()=>{let t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),s("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?o():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),s("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),s("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),s("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?o():(t=e.slideTo(0,e.params.speed,!0,!0),s("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),s("autoplay")),(e.params.cssMode&&e.autoplay.running||!1===t)&&r()}),i)}function a(){return void 0===n&&!e.autoplay.running&&(e.autoplay.running=!0,s("autoplayStart"),r(),!0)}function o(){return!!e.autoplay.running&&void 0!==n&&(n&&(clearTimeout(n),n=void 0),e.autoplay.running=!1,s("autoplayStop"),!0)}function l(t){e.autoplay.running&&(e.autoplay.paused||(n&&clearTimeout(n),e.autoplay.paused=!0,0!==t&&e.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].addEventListener(t,d)})):(e.autoplay.paused=!1,r())))}function c(){const t=X();"hidden"===t.visibilityState&&e.autoplay.running&&l(),"visible"===t.visibilityState&&e.autoplay.paused&&(r(),e.autoplay.paused=!1)}function d(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===e.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,d)})),e.autoplay.paused=!1,e.autoplay.running?r():o())}function h(){e.params.autoplay.disableOnInteraction?o():l(),["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,d)}))}function u(){e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,r())}e.autoplay={running:!1,paused:!1},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),i("init",(()=>{e.params.autoplay.enabled&&(a(),X().addEventListener("visibilitychange",c),e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",h),e.$el.on("mouseleave",u)))})),i("beforeTransitionStart",((t,i,s)=>{e.autoplay.running&&(s||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(i):o())})),i("sliderFirstMove",(()=>{e.autoplay.running&&(e.params.autoplay.disableOnInteraction?o():l())})),i("touchEnd",(()=>{e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&r()})),i("destroy",(()=>{e.$el.off("mouseenter",h),e.$el.off("mouseleave",u),e.autoplay.running&&o(),X().removeEventListener("visibilitychange",c)})),Object.assign(e.autoplay,{pause:l,run:r,start:a,stop:o})}]);let He=document.querySelectorAll(".accordion__item"),Ve=document.querySelectorAll(".accordion__title-wrapper");var We=i(908),Ge=i.n(We),Xe=i(144),Ye=i.n(Xe),Ke=i(537),Qe=i.n(Ke),Ze=i(974),Je=i.n(Ze),et=i(603),tt=i.n(et),it=i(407),st=i.n(it),nt=i(945),rt=i.n(nt);function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const dt=String.fromCharCode(9),ht=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},ut=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let s,n=i.length;for(;n--;)""!==i[n]&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),t[s[0]]=s[1]);return t};class pt extends ot{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(((t,i)=>{const s=i(e);return s===e?t:t.concat([s])}),[e]).forEach((e=>{for(let t=0;te),this.customParsers.push((n=>{if(e.exec(n))return this.trigger("data",{type:"custom",data:i(n),customType:t,segment:s}),!0}))}addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const mt=function(e){const t={};return Object.keys(e).forEach((function(i){var s;t[(s=i,s.toLowerCase().replace(/-(\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},gt=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:s}=e;if(!t)return;const n="#EXT-X-SERVER-CONTROL",r="holdBack",a="partHoldBack",o=i&&3*i,l=s&&2*s;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]{n.uri||!n.parts&&!n.preloadHints||(!n.map&&i&&(n.map=i),!n.key&&s&&(n.key=s),n.timeline||"number"!=typeof l||(n.timeline=l),this.manifest.preloadSegment=n)})),this.parseStream.on("data",(function(u){let p,m;({tag(){({version(){u.version&&(this.manifest.version=u.version)},"allow-cache"(){this.manifest.allowCache=u.allowed,"allowed"in u||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const e={};"length"in u&&(n.byterange=e,e.length=u.length,"offset"in u||(u.offset=c)),"offset"in u&&(n.byterange=e,e.offset=u.offset),c=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),u.duration>0&&(n.duration=u.duration),0===u.duration&&(n.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=t},key(){if(u.attributes)if("NONE"!==u.attributes.METHOD)if(u.attributes.URI){if("com.apple.streamingkeydelivery"===u.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:u.attributes});if("com.microsoft.playready"===u.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:u.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===u.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(u.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===u.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==u.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):u.attributes.KEYID&&"0x"===u.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:u.attributes.KEYFORMAT,keyId:u.attributes.KEYID.substring(2)},pssh:lt(u.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));u.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:u.attributes.METHOD||"AES-128",uri:u.attributes.URI},void 0!==u.attributes.IV&&(s.iv=u.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else s=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(u.number)?this.manifest.mediaSequence=u.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+u.number})},"discontinuity-sequence"(){isFinite(u.number)?(this.manifest.discontinuitySequence=u.number,l=u.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+u.number})},"playlist-type"(){/VOD|EVENT/.test(u.playlistType)?this.manifest.playlistType=u.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+u.playlist})},map(){i={},u.uri&&(i.uri=u.uri),u.byterange&&(i.byterange=u.byterange),s&&(i.key=s)},"stream-inf"(){this.manifest.playlists=t,this.manifest.mediaGroups=this.manifest.mediaGroups||o,u.attributes?(n.attributes||(n.attributes={}),at(n.attributes,u.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||o,!(u.attributes&&u.attributes.TYPE&&u.attributes["GROUP-ID"]&&u.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const e=this.manifest.mediaGroups[u.attributes.TYPE];e[u.attributes["GROUP-ID"]]=e[u.attributes["GROUP-ID"]]||{},p=e[u.attributes["GROUP-ID"]],m={default:/yes/i.test(u.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(u.attributes.AUTOSELECT),u.attributes.LANGUAGE&&(m.language=u.attributes.LANGUAGE),u.attributes.URI&&(m.uri=u.attributes.URI),u.attributes["INSTREAM-ID"]&&(m.instreamId=u.attributes["INSTREAM-ID"]),u.attributes.CHARACTERISTICS&&(m.characteristics=u.attributes.CHARACTERISTICS),u.attributes.FORCED&&(m.forced=/yes/i.test(u.attributes.FORCED)),p[u.attributes.NAME]=m},discontinuity(){l+=1,n.discontinuity=!0,this.manifest.discontinuityStarts.push(t.length)},"program-date-time"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=u.dateTimeString,this.manifest.dateTimeObject=u.dateTimeObject),n.dateTimeString=u.dateTimeString,n.dateTimeObject=u.dateTimeObject},targetduration(){!isFinite(u.duration)||u.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+u.duration}):(this.manifest.targetDuration=u.duration,gt.call(this,this.manifest))},start(){u.attributes&&!isNaN(u.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:u.attributes["TIME-OFFSET"],precise:u.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){n.cueOut=u.data},"cue-out-cont"(){n.cueOutCont=u.data},"cue-in"(){n.cueIn=u.data},skip(){this.manifest.skip=mt(u.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",u.attributes,["SKIPPED-SEGMENTS"])},part(){r=!0;const e=this.manifest.segments.length,t=mt(u.attributes);n.parts=n.parts||[],n.parts.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=d),d=t.byterange.offset+t.byterange.length);const i=n.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${i} for segment #${e}`,u.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},"server-control"(){const e=this.manifest.serverControl=mt(u.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),gt.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const e=this.manifest.segments.length,t=mt(u.attributes),i=t.type&&"PART"===t.type;n.preloadHints=n.preloadHints||[],n.preloadHints.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=i?d:0,i&&(d=t.byterange.offset+t.byterange.length)));const s=n.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${s} for segment #${e}`,u.attributes,["TYPE","URI"]),t.type)for(let i=0;ic&&(l-=c,l-=c,l-=Ot(2))}return Number(l)}),Nt=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),s=0;s=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))};const Ut=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Ge().location&&Ge().location.href||"");var i="function"==typeof Ge().URL,s=/^\/\//.test(e),n=!Ge().location&&!/\/\//i.test(e);if(i?e=new(Ge().URL)(e,Ge().location||"http://example.com"):/\/\//i.test(e)||(e=rt().buildAbsoluteURL(Ge().location&&Ge().location.href||"",e)),i){var r=new URL(t,e);return n?r.href.slice(18):s?r.href.slice(r.protocol.length):r.href}return rt().buildAbsoluteURL(e,t)};var $t=i(340);const Bt=e=>!!e&&"object"==typeof e,Ft=(...e)=>e.reduce(((e,t)=>("object"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):Bt(e[i])&&Bt(t[i])?e[i]=Ft(e[i],t[i]):e[i]=t[i]})),e)),{}),jt=e=>Object.keys(e).map((t=>e[t])),qt=e=>e.reduce(((e,t)=>e.concat(t)),[]),zt=e=>{if(!e.length)return[];const t=[];for(let i=0;i{const n={uri:t,resolvedUri:Ut(e||"",t)};if(i||s){const e=(i||s).split("-");let t,r=Ge().BigInt?Ge().BigInt(e[0]):parseInt(e[0],10),a=Ge().BigInt?Ge().BigInt(e[1]):parseInt(e[1],10);r(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),Wt={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=Vt(e.endNumber),a=t/i;return"number"==typeof r?{start:0,end:r}:"number"==typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,c=Vt(e.endNumber),d=(t+i)/1e3,h=s+a,u=d+o-h,p=Math.ceil(u*n/r),m=Math.floor((d-h-l)*n/r),g=Math.floor((d-h)*n/r);return{start:Math.max(0,m),end:"number"==typeof c?c:Math.min(p,g)}}},Gt=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=Wt[t](e),l=((e,t)=>{const i=[];for(let s=e;st=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}})(e));if("static"===t){const e=l.length-1,t="number"==typeof n?n:r;l[e].duration=t-i/s*e}return l},Xt=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n="",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error("NO_BASE_URL");const c=Ht({baseUrl:t,source:i.sourceURL,range:i.range}),d=Ht({baseUrl:t,source:t,indexRange:n});if(d.map=c,l){const t=Gt(e);t.length&&(d.duration=t[0].duration,d.timeline=t[0].timeline)}else s&&(d.duration=s,d.timeline=r);return d.presentationTime=a||r,d.number=o,[d]},Yt=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,c=t.references.filter((e=>1!==e.referenceType)),d=[],h=e.endList?"static":"dynamic",u=e.sidx.timeline;let p,m=u,g=e.mediaSequence||0;p="bigint"==typeof t.firstOffset?Ge().BigInt(o)+t.firstOffset:o+t.firstOffset;for(let e=0;e{return(t=e,i=({timeline:e})=>e,jt(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},Zt=e=>{let t=[];var i,s;return i=e,s=(e,i,s,n)=>{t=t.concat(e.playlists||[])},Kt.forEach((function(e){for(var t in i.mediaGroups[e])for(var n in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][n];s(r)}})),t},Jt=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},ei=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?Ge().BigInt(e.offset)+Ge().BigInt(e.length)-Ge().BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),ti=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=jt(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>(e.discontinuityStarts=((e,t)=>e.reduce(((e,t,i)=>(t.discontinuity&&e.push(i),e)),[]))(e.segments||[]),e)))},ii=(e,t)=>{const i=ei(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&Yt(e,s,e.sidx.resolvedUri),e},si=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=ii(e[i],t);return e},ni=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},ri=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,ai=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,oi=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,li=e=>e?Object.keys(e).reduce(((t,i)=>{const s=e[i];return t.concat(s.playlists)}),[]):[],ci=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=e[0].attributes,d=ti(e.filter(ri)).map(ni),h=ti(e.filter(ai)),u=ti(e.filter(oi)),p=e.map((e=>e.attributes.captionServices)).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:si(d,s)};c>=0&&(m.minimumUpdatePeriod=1e3*c),t&&(m.locations=t),i&&(m.contentSteering=i),"dynamic"===o&&(m.suggestedPresentationDelay=l),r&&r.length>0&&(m.eventStream=r);const g=0===m.playlists.length,f=h.length?((e,t={},i=!1)=>{let s;const n=e.reduce(((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"";let o=n.attributes.label||"main";if(a&&!n.attributes.label){const e=r?` (${r})`:"";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===r,playlists:[],uri:""});const l=ii((({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o})(n,i),t);return e[o].playlists.push(l),void 0===s&&"main"===r&&(s=n,s.default=!0),e}),{});return s||(n[Object.keys(n)[0]].default=!0),n})(h,s,g):null,y=u.length?((e,t={})=>e.reduce(((e,i)=>{const s=i.attributes.label||i.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[s].playlists.push(ii((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(u,s):null,v=d.concat(li(f),li(y)),b=v.map((({timelineStarts:e})=>e));var _,T;return m.timelineStarts=Qt(b),_=v,T=m.timelineStarts,_.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=T.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(m.mediaGroups.AUDIO.audio=f),y&&(m.mediaGroups.SUBTITLES.subs=y),p.length&&(m.mediaGroups["CLOSED-CAPTIONS"].cc=p.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[s]["3D"]=t["3D"])})),e):e),{})),n?(({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(Zt(e)),s=t.playlists.concat(Zt(t));return t.timelineStarts=Qt([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=((e,t)=>{for(let i=0;is.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);s.segments[r].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),Jt({playlist:t,mediaSequence:s.segments[r].number})}))})({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t})({oldManifest:n,newManifest:m}):m},di=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,c=(s+n)/1e3+l-(r+o);return Math.ceil((c*a-t)/i)},hi=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n="",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,c=[];let d=-1;for(let h=0;hd&&(d=g),m<0){const o=h+1;f=o===t.length?"dynamic"===i&&s>0&&n.indexOf("$Number$")>0?di(e,d,p):(r*a-d)/p:(t[o].t-d)/p}else f=m+1;const y=o+c.length+f;let v=o+c.length;for(;ve.replace(ui,(e=>(t,i,s,n)=>{if("$$"===t)return"$";if(void 0===e[i])return t;const r=""+e[i];return"RepresentationID"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join("0")}${r}`)})(t)),mi=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:s={sourceURL:"",range:""}}=e,n=Ht({baseUrl:e.baseUrl,source:pi(s.sourceURL,i),range:s.range}),r=((e,t)=>e.duration||t?e.duration?Gt(e):hi(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const s=pi(e.media||"",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:Ut(e.baseUrl||"",s),map:n,number:t.number,presentationTime:o}}))},gi=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");const r=s.map((t=>((e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=Ht({baseUrl:i,source:s.sourceURL,range:s.range}),r=Ht({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r})(e,t)));let a;i&&(a=Gt(e)),t&&(a=hi(e,t));return a.map(((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}})).filter((e=>e))},fi=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=mi,i=Ft(e,t.template)):t.base?(s=Xt,i=Ft(e,t.base)):t.list&&(s=gi,i=Ft(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},yi=(e,t)=>zt(e.childNodes).filter((({tagName:e})=>e===t)),vi=e=>e.textContent.trim(),bi=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,s,n,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(s||0)+86400*parseFloat(n||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},_i={mediaPresentationDuration:e=>bi(e),availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:e=>bi(e),suggestedPresentationDelay:e=>bi(e),type:e=>e,timeShiftBufferDepth:e=>bi(e),start:e=>bi(e),width:e=>parseInt(e,10),height:e=>parseInt(e,10),bandwidth:e=>parseInt(e,10),frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),startNumber:e=>parseInt(e,10),timescale:e=>parseInt(e,10),presentationTimeOffset:e=>parseInt(e,10),duration(e){const t=parseInt(e,10);return isNaN(t)?bi(e):t},d:e=>parseInt(e,10),t:e=>parseInt(e,10),r:e=>parseInt(e,10),presentationTime:e=>parseInt(e,10),DEFAULT:e=>e},Ti=e=>e&&e.attributes?zt(e.attributes).reduce(((e,t)=>{const i=_i[t.name]||_i.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},Si={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},wi=(e,t)=>t.length?qt(e.map((function(e){return t.map((function(t){const i=vi(t),s=Ut(e.baseUrl,i),n=Ft(Ti(t),{baseUrl:s});return s!==i&&!n.serviceLocation&&e.serviceLocation&&(n.serviceLocation=e.serviceLocation),n}))}))):e,Ei=e=>{const t=yi(e,"SegmentTemplate")[0],i=yi(e,"SegmentList")[0],s=i&&yi(i,"SegmentURL").map((e=>Ft({tag:"SegmentURL"},Ti(e)))),n=yi(e,"SegmentBase")[0],r=i||t,a=r&&yi(r,"SegmentTimeline")[0],o=i||n||t,l=o&&yi(o,"Initialization")[0],c=t&&Ti(t);c&&l?c.initialization=l&&Ti(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const d={template:c,segmentTimeline:a&&yi(a,"S").map((e=>Ti(e))),list:i&&Ft(Ti(i),{segmentUrls:s,initialization:Ti(l)}),base:n&&Ft(Ti(n),{initialization:Ti(l)})};return Object.keys(d).forEach((e=>{d[e]||delete d[e]})),d},Ci=e=>qt(yi(e.node,"EventStream").map((t=>{const i=Ti(t),s=i.schemeIdUri;return yi(t,"Event").map((t=>{const n=Ti(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:vi(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),xi=(e,t)=>(i,s)=>{const n=wi(t,yi(i.node,"BaseURL")),r=Ft(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=yi(i.node,"AdaptationSet"),o=Ei(i.node);return qt(a.map(((e,t,i)=>s=>{const n=Ti(s),r=wi(t,yi(s,"BaseURL")),a=yi(s,"Role")[0],o={role:Ti(a)};let l=Ft(e,n,o);const c=yi(s,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(h=Ti(c)).schemeIdUri?("string"!=typeof h.value?[]:h.value.split(";")).map((e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})):"urn:scte:dash:cc:cea-708:2015"===h.schemeIdUri?("string"!=typeof h.value?[]:h.value.split(";")).map((e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,s=""]=e.split("=");t.channel=i,t.language=e,s.split(",").forEach((e=>{const[i,s]=e.split(":");"lang"===i?t.language=s:"er"===i?t.easyReader=Number(s):"war"===i?t.aspectRatio=Number(s):"3D"===i&&(t["3D"]=Number(s))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;var h;d&&(l=Ft(l,{captionServices:d}));const u=yi(s,"Label")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=Ft(l,{label:e})}const p=yi(s,"ContentProtection").reduce(((e,t)=>{const i=Ti(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=Si[i.schemeIdUri];if(s){e[s]={attributes:i};const n=yi(t,"cenc:pssh")[0];if(n){const t=vi(n);e[s].pssh=t&<(t)}}return e}),{});Object.keys(p).length&&(l=Ft(l,{contentProtection:p}));const m=Ei(s),g=yi(s,"Representation"),f=Ft(i,m);return qt(g.map(((e,t,i)=>s=>{const n=yi(s,"BaseURL"),r=wi(t,n),a=Ft(e,Ti(s)),o=Ei(s);return r.map((e=>({segmentInfo:Ft(i,o),attributes:Ft(a,e)})))})(l,r,f)))})(r,n,o)))},ki=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=Ft({serverURL:vi(e[0])},Ti(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},Ii=e=>{if(""===e)throw new Error("DASH_EMPTY_MANIFEST");const t=new $t.DOMParser;let i,s;try{i=t.parseFromString(e,"application/xml"),s=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(e){}if(!s||s&&s.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return s};var Li,Ai=i(221),Pi=i.n(Ai),Oi=Pt([73,68,51]),Di=function e(t,i){return void 0===i&&(i=0),(t=Pt(t)).length-i<10||!Rt(t,Oi,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=Pt(e))[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?s+20:s+10}(t,i),e(t,i))},Mi=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Nt(e):e}),Ni=function(e){e=Pt(e);for(var t=[],i=0;e.length>i;){var s=e[i],n=0,r=0,a=e[++r];for(r++;128&a;)n=(127&a)<<7,a=e[r],r++;n+=127&a;for(var o=0;o>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(s)break;l=t.length}var c=t.subarray(r+8,l);Rt(o,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),s))),r=l}return n},Ui={EBML:Pt([26,69,223,163]),DocType:Pt([66,130]),Segment:Pt([24,83,128,103]),SegmentInfo:Pt([21,73,169,102]),Tracks:Pt([22,84,174,107]),Track:Pt([174]),TrackNumber:Pt([215]),DefaultDuration:Pt([35,227,131]),TrackEntry:Pt([174]),TrackType:Pt([131]),FlagDefault:Pt([136]),CodecID:Pt([134]),CodecPrivate:Pt([99,162]),VideoTrack:Pt([224]),AudioTrack:Pt([225]),Cluster:Pt([31,67,182,117]),Timestamp:Pt([231]),TimestampScale:Pt([42,215,177]),BlockGroup:Pt([160]),BlockDuration:Pt([155]),Block:Pt([161]),SimpleBlock:Pt([163])},$i=[128,64,32,16,8,4,2,1],Bi=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=function(e){for(var t=1,i=0;i<$i.length&&!(e&$i[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+n);return i&&((r=Array.prototype.slice.call(e,t,t+n))[0]^=$i[n-1]),{length:n,value:Mt(r,{signed:s}),bytes:r}},Fi=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?function(e,t){var i=(void 0===t?{}:t).le,s=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var n=function(e){return Math.ceil(function(e){return e.toString(2).length}(e)/8)}(e=Ot(e)),r=new Uint8Array(new ArrayBuffer(n)),a=0;a=i.length)return i.length;var n=Bi(i,s,!1);if(Rt(t.bytes,n.bytes))return s;var r=Bi(i,s+n.length);return e(t,i,s+r.length+r.value+n.length)},qi=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return Fi(e)})):[Fi(e)]}(i),t=Pt(t);var s=[];if(!i.length)return s;for(var n=0;nt.length?t.length:o+a.value,c=t.subarray(o,l);Rt(i[0],r.bytes)&&(1===i.length?s.push(c):s=s.concat(e(c,i.slice(1)))),n+=r.length+a.length+c.length}return s},zi=Pt([0,0,0,1]),Hi=Pt([0,0,1]),Vi=Pt([0,0,3]),Wi=function(e){for(var t=[],i=1;i>1&63),-1!==i.indexOf(l)&&(n=r+o),r+=o+("h264"===t?1:2)}else r++}return e.subarray(0,0)},Xi={webm:Pt([119,101,98,109]),matroska:Pt([109,97,116,114,111,115,107,97]),flac:Pt([102,76,97,67]),ogg:Pt([79,103,103,83]),ac3:Pt([11,119]),riff:Pt([82,73,70,70]),avi:Pt([65,86,73]),wav:Pt([87,65,86,69]),"3gp":Pt([102,116,121,112,51,103]),mp4:Pt([102,116,121,112]),fmp4:Pt([115,116,121,112]),mov:Pt([102,116,121,112,113,116]),moov:Pt([109,111,111,118]),moof:Pt([109,111,111,102])},Yi={aac:function(e){var t=Di(e);return Rt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Di(e);return Rt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=qi(e,[Ui.EBML,Ui.DocType])[0];return Rt(t,Xi.webm)},mkv:function(e){var t=qi(e,[Ui.EBML,Ui.DocType])[0];return Rt(t,Xi.matroska)},mp4:function(e){return!Yi["3gp"](e)&&!Yi.mov(e)&&(!(!Rt(e,Xi.mp4,{offset:4})&&!Rt(e,Xi.fmp4,{offset:4}))||!(!Rt(e,Xi.moof,{offset:4})&&!Rt(e,Xi.moov,{offset:4}))||void 0)},mov:function(e){return Rt(e,Xi.mov,{offset:4})},"3gp":function(e){return Rt(e,Xi["3gp"],{offset:4})},ac3:function(e){var t=Di(e);return Rt(e,Xi.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188(s,n,r)=>{const a=t.levels[n],o=new RegExp(`^(${a})$`);let l=e;if("log"!==s&&r.unshift(s.toUpperCase()+":"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+":"),ls){ls.push([].concat(r));const e=ls.length-1e3;ls.splice(0,e>0?e:0)}if(!Ge().console)return;let c=Ge().console[s];c||"debug"!==s||(c=Ge().console.info||Ge().console.log),c&&a&&o.test(s)&&c[Array.isArray(r)?"apply":"call"](Ge().console,r)})(t,a,s),a.createLogger=(n,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${n}`,o,void 0!==a?a:s)},a.createNewLogger=(t,i,s)=>e(t,i,s),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=e=>{if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);r=e}return r},(a.history=()=>ls?[].concat(ls):[]).filter=e=>(ls||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ls&&(ls.length=0)},a.history.disable=()=>{null!==ls&&(ls.length=0,ls=null)},a.history.enable=()=>{null===ls&&(ls=[])},a.error=(...e)=>n("error",r,e),a.warn=(...e)=>n("warn",r,e),a.debug=(...e)=>n("debug",r,e),a}("VIDEOJS"),ds=cs.createLogger,hs=Object.prototype.toString,us=function(e){return gs(e)?Object.keys(e):[]};function ps(e,t){us(e).forEach((i=>t(e[i],i)))}function ms(e,t,i=0){return us(e).reduce(((i,s)=>t(i,e[s],s)),i)}function gs(e){return!!e&&"object"==typeof e}function fs(e){return gs(e)&&"[object Object]"===hs.call(e)&&e.constructor===Object}function ys(...e){const t={};return e.forEach((e=>{e&&ps(e,((e,i)=>{fs(e)?(fs(t[i])||(t[i]={}),t[i]=ys(t[i],e)):t[i]=e}))})),t}function vs(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];t.push(s)}return t}function bs(e,t,i,s=!0){const n=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return n(e),e}};return s&&(r.set=n),Object.defineProperty(e,t,r)}var _s=Object.freeze({__proto__:null,each:ps,reduce:ms,isObject:gs,isPlain:fs,merge:ys,values:vs,defineLazyProperty:bs});let Ts,Ss=!1,ws=null,Es=!1,Cs=!1,xs=!1,ks=!1,Is=!1,Ls=null,As=null,Ps=null,Os=!1,Ds=!1,Ms=!1,Ns=!1;const Rs=Boolean(qs()&&("ontouchstart"in Ge()||Ge().navigator.maxTouchPoints||Ge().DocumentTouch&&Ge().document instanceof Ge().DocumentTouch)),Us=Ge().navigator&&Ge().navigator.userAgentData;if(Us&&(Es="Android"===Us.platform,xs=Boolean(Us.brands.find((e=>"Microsoft Edge"===e.brand))),ks=Boolean(Us.brands.find((e=>"Chromium"===e.brand))),Is=!xs&&ks,Ls=As=(Us.brands.find((e=>"Chromium"===e.brand))||{}).version||null,Ds="Windows"===Us.platform),!ks){const e=Ge().navigator&&Ge().navigator.userAgent||"";Ss=/iPod/i.test(e),ws=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),Es=/Android/i.test(e),Ts=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),s=t[2]&&parseFloat(t[2]);return i&&s?parseFloat(t[1]+"."+t[2]):i||null}(),Cs=/Firefox/i.test(e),xs=/Edg/i.test(e),ks=/Chrome/i.test(e)||/CriOS/i.test(e),Is=!xs&&ks,Ls=As=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),Ps=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),Os=/Safari/i.test(e)&&!Is&&!Es&&!xs,Ds=/Windows/i.test(e),Ms=/iPad/i.test(e)||Os&&Rs&&!/iPhone/i.test(e),Ns=/iPhone/i.test(e)&&!Ms}const $s=Ns||Ms||Ss,Bs=(Os||$s)&&!Is;var Fs=Object.freeze({__proto__:null,get IS_IPOD(){return Ss},get IOS_VERSION(){return ws},get IS_ANDROID(){return Es},get ANDROID_VERSION(){return Ts},get IS_FIREFOX(){return Cs},get IS_EDGE(){return xs},get IS_CHROMIUM(){return ks},get IS_CHROME(){return Is},get CHROMIUM_VERSION(){return Ls},get CHROME_VERSION(){return As},get IE_VERSION(){return Ps},get IS_SAFARI(){return Os},get IS_WINDOWS(){return Ds},get IS_IPAD(){return Ms},get IS_IPHONE(){return Ns},TOUCH_ENABLED:Rs,IS_IOS:$s,IS_ANY_SAFARI:Bs});function js(e){return"string"==typeof e&&Boolean(e.trim())}function qs(){return Ye()===Ge().document}function zs(e){return gs(e)&&1===e.nodeType}function Hs(){try{return Ge().parent!==Ge().self}catch(e){return!0}}function Vs(e){return function(t,i){if(!js(t))return Ye()[e](null);js(i)&&(i=Ye().querySelector(i));const s=zs(i)?i:Ye();return s[e]&&s[e](t)}}function Ws(e="div",t={},i={},s){const n=Ye().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Gs(n,i):n[e]===i&&"tabIndex"!==e||(n[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){n.setAttribute(e,i[e])})),s&&pn(n,s),n}function Gs(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Xs(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ys(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function Ks(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function Qs(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e):(cs.warn("removeClass was called with an element that doesn't exist"),null)}function Zs(e,t,i){return"function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,i))),e}function Js(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const s=t[i];null==s||!1===s?e.removeAttribute(i):e.setAttribute(i,!0===s?"":s)}))}function en(e){const t={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const n=s[e].name;let r=s[e].value;i.includes(n)&&(r=null!==r),t[n]=r}}return t}function tn(e,t){return e.getAttribute(t)}function sn(e,t,i){e.setAttribute(t,i)}function nn(e,t){e.removeAttribute(t)}function rn(){Ye().body.focus(),Ye().onselectstart=function(){return!1}}function an(){Ye().onselectstart=function(){return!0}}function on(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(vn(e,"height"))),i.width||(i.width=parseFloat(vn(e,"width"))),i}}function ln(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let s=0,n=0;for(;e.offsetParent&&e!==Ye()[ns.fullscreenElement];)s+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:s,top:n,width:t,height:i}}function cn(e,t){const i={x:0,y:0};if($s){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=vn(t,"transform");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}t=t.parentNode}}const s={},n=ln(t.target),r=ln(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-n.top),c=t.offsetX-(r.left-n.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,$s&&(c-=i.x,l-=i.y)),s.y=1-Math.max(0,Math.min(1,l/o)),s.x=Math.max(0,Math.min(1,c/a)),s}function dn(e){return gs(e)&&3===e.nodeType}function hn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function un(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"==typeof e&&(e=e()),zs(e)||dn(e)?e:"string"==typeof e&&/\S/.test(e)?Ye().createTextNode(e):void 0))).filter((e=>e))}function pn(e,t){return un(t).forEach((t=>e.appendChild(t))),e}function mn(e,t){return pn(hn(e),t)}function gn(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}const fn=Vs("querySelector"),yn=Vs("querySelectorAll");function vn(e,t){if(!e||!t)return"";if("function"==typeof Ge().getComputedStyle){let i;try{i=Ge().getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function bn(e){[...Ye().styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(""),s=Ye().createElement("style");s.textContent=i,e.document.head.appendChild(s)}catch(i){const s=Ye().createElement("link");s.rel="stylesheet",s.type=t.type,s.media=t.media.mediaText,s.href=t.href,e.document.head.appendChild(s)}}))}var _n=Object.freeze({__proto__:null,isReal:qs,isEl:zs,isInFrame:Hs,createEl:Ws,textContent:Gs,prependTo:Xs,hasClass:Ys,addClass:Ks,removeClass:Qs,toggleClass:Zs,setAttributes:Js,getAttributes:en,getAttribute:tn,setAttribute:sn,removeAttribute:nn,blockTextSelection:rn,unblockTextSelection:an,getBoundingClientRect:on,findPosition:ln,getPointerPosition:cn,isTextNode:dn,emptyEl:hn,normalizeContent:un,appendContent:pn,insertContent:mn,isSingleLeftClick:gn,$:fn,$$:yn,computedStyle:vn,copyStyleSheetsToWindow:bn});let Tn,Sn=!1;const wn=function(){if(!1===Tn.options.autoSetup)return;const e=Array.prototype.slice.call(Ye().getElementsByTagName("video")),t=Array.prototype.slice.call(Ye().getElementsByTagName("audio")),i=Array.prototype.slice.call(Ye().getElementsByTagName("video-js")),s=e.concat(t,i);if(s&&s.length>0)for(let e=0,t=s.length;e-1&&(i={passive:!0}),e.addEventListener(t,s.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,s.dispatcher)}function $n(e,t,i){if(!In.has(e))return;const s=In.get(e);if(!s.handlers)return;if(Array.isArray(t))return Dn($n,e,t,i);const n=function(e,t){s.handlers[t]=[],On(e,t)};if(void 0===t){for(const t in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},t)&&n(e,t);return}const r=s.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e=t&&(e(...s),i=n)}},Wn=function(e,t,i,s=Ge()){let n;const r=function(){const r=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(r,a)};!n&&i&&e.apply(r,a),s.clearTimeout(n),n=s.setTimeout(o,t)};return r.cancel=()=>{s.clearTimeout(n),n=null},r};var Gn=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:zn,bind_:Hn,throttle:Vn,debounce:Wn});let Xn;class Yn{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Un(this,e,t),this.addEventListener=i}off(e,t){$n(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Fn(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},jn(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"==typeof e&&(e={type:t}),e=Mn(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Bn(this,e)}queueTrigger(e){Xn||(Xn=new Map);const t=e.type||e;let i=Xn.get(this);i||(i=new Map,Xn.set(this,i));const s=i.get(t);i.delete(t),Ge().clearTimeout(s);const n=Ge().setTimeout((()=>{i.delete(t),0===i.size&&(i=null,Xn.delete(this)),this.trigger(e)}),0);i.set(t,n)}}Yn.prototype.allowedEvents_={},Yn.prototype.addEventListener=Yn.prototype.on,Yn.prototype.removeEventListener=Yn.prototype.off,Yn.prototype.dispatchEvent=Yn.prototype.trigger;const Kn=e=>"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,Qn=e=>e instanceof Yn||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"==typeof e[t])),Zn=e=>"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,Jn=(e,t,i)=>{if(!e||!e.nodeName&&!Qn(e))throw new Error(`Invalid target for ${Kn(t)}#${i}; must be a DOM node or evented object.`)},er=(e,t,i)=>{if(!Zn(e))throw new Error(`Invalid event type for ${Kn(t)}#${i}; must be a non-empty string or array.`)},tr=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${Kn(t)}#${i}; must be a function.`)},ir=(e,t,i)=>{const s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let n,r,a;return s?(n=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):[n,r,a]=t,Jn(n,e,i),er(r,e,i),tr(a,e,i),a=Hn(e,a),{isTargetingSelf:s,target:n,type:r,listener:a}},sr=(e,t,i,s)=>{Jn(e,e,t),e.nodeName?qn[t](e,i,s):e[t](i,s)},nr={on(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=ir(this,e,"on");if(sr(i,"on",s,n),!t){const e=()=>this.off(i,s,n);e.guid=n.guid;const t=()=>this.off("dispose",e);t.guid=n.guid,sr(this,"on","dispose",e),sr(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=ir(this,e,"one");if(t)sr(i,"one",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,sr(i,"one",s,e)}},any(...e){const{isTargetingSelf:t,target:i,type:s,listener:n}=ir(this,e,"any");if(t)sr(i,"any",s,n);else{const e=(...t)=>{this.off(i,s,e),n.apply(null,t)};e.guid=n.guid,sr(i,"any",s,e)}},off(e,t,i){if(!e||Zn(e))$n(this.eventBusEl_,e,t);else{const s=e,n=t;Jn(s,this,"off"),er(n,this,"off"),tr(i,this,"off"),i=Hn(this,i),this.off("dispose",i),s.nodeName?($n(s,n,i),$n(s,"dispose",i)):Qn(s)&&(s.off(n,i),s.off("dispose",i))}},trigger(e,t){Jn(this.eventBusEl_,this,"trigger");const i=e&&"string"!=typeof e?e.type:e;if(!Zn(i))throw new Error(`Invalid event type for ${Kn(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return Bn(this.eventBusEl_,e,t)}};function rr(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Ws("span",{className:"vjs-event-bus"});return Object.assign(e,nr),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&In.has(e)&&In.delete(e)})),Ge().setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const ar={state:{},setState(e){let t;return"function"==typeof e&&(e=e()),ps(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&Qn(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function or(e,t){return Object.assign(e,ar),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&Qn(e)&&e.on("statechanged",e.handleStateChanged),e}const lr=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},cr=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},dr=function(e,t){return cr(e)===cr(t)};var hr=Object.freeze({__proto__:null,toLowerCase:lr,toTitleCase:cr,titleCaseEquals:dr});class ur{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ys({},this.options_),t=this.options_=ys(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${Pn()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(rr(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),or(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}on(e,t){}off(e,t){}one(e,t){}any(e,t){}trigger(e,t){}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=ys(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Ws(e,t,i)}localize(e,t,i=e){const s=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[s],a=s&&s.split("-")[0],o=n&&n[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const s=t[i-1];let n=s;return void 0===s&&(n=e),n}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[cr(e.name())]=null,this.childNameIndex_[lr(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let s=e.opts;if(void 0!==t[i]&&(s=t[i]),!1===s)return;!0===s&&(s={}),s.playerOptions=this.options_.playerOptions;const n=this.addChild(i,s);n&&(this[i]=n)};let s;const n=ur.getComponent("Tech");s=Array.isArray(e)?e:Object.keys(e),s.concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,s;return"string"==typeof t?(i=t,s=e[i]||this.options_[i]||{}):(i=t.name,s=t),{name:i,opts:s}})).filter((e=>{const t=ur.getComponent(e.opts.componentClass||cr(e.name));return t&&!n.isTech(t)})).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return fn(e,t||this.contentEl())}$$(e,t){return yn(e,t||this.contentEl())}hasClass(e){return Ys(this.el_,e)}addClass(...e){Ks(this.el_,...e)}removeClass(...e){Qs(this.el_,...e)}toggleClass(e,t){Zs(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return tn(this.el_,e)}setAttribute(e,t){sn(this.el_,e,t)}removeAttribute(e){nn(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;const s=this.el_.style[e],n=s.indexOf("px");return-1!==n?parseInt(s.slice(0,n),10):parseInt(this.el_["offset"+cr(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=vn(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${cr(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(Qe().isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e,t=0,i=null;this.on("touchstart",(function(s){1===s.touches.length&&(i={pageX:s.touches[0].pageX,pageY:s.touches[0].pageY},t=Ge().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(i){const s=t.touches[0].pageX-i.pageX,n=t.touches[0].pageY-i.pageY;Math.sqrt(s*s+n*n)>10&&(e=!1)}}));const s=function(){e=!1};this.on("touchleave",s),this.on("touchcancel",s),this.on("touchend",(function(s){i=null,!0===e&&Ge().performance.now()-t<200&&(s.preventDefault(),this.trigger("tap"))}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Hn(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=Hn(this,e),this.clearTimersOnDispose_(),i=Ge().setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Ge().clearTimeout(e)),e}setInterval(e,t){e=Hn(this,e),this.clearTimersOnDispose_();const i=Ge().setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Ge().clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Hn(this,e),t=Ge().requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),t=Hn(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Ge().cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}static registerComponent(e,t){if("string"!=typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=ur.getComponent("Tech"),s=i&&i.isTech(t),n=ur===t||ur.prototype.isPrototypeOf(t.prototype);if(s||!n){let t;throw t=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=cr(e),ur.components_||(ur.components_={});const r=ur.getComponent("Player");if("Player"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0&&t.map((t=>e[t])).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return ur.components_[e]=t,ur.components_[lr(e)]=t,t}static getComponent(e){if(e&&ur.components_)return ur.components_[e]}}function pr(e,t,i,s){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,s,i.length-1),i[s][t]}function mr(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:pr.bind(null,"start",0,e),end:pr.bind(null,"end",1,e)},Ge().Symbol&&Ge().Symbol.iterator&&(t[Ge().Symbol.iterator]=()=>(e||[]).values()),t}function gr(e,t){return Array.isArray(e)?mr(e):void 0===e||void 0===t?mr():mr([[e,t]])}ur.registerComponent("Component",ur);const fr=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),s=Math.floor(e/60%60),n=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=s=i="-"),n=n>0||a>0?n+":":"",s=((n||r>=10)&&s<10?"0"+s:s)+":",i=i<10?"0"+i:i,n+s+i};let yr=fr;function vr(e){yr=e}function br(){yr=fr}function _r(e,t=e){return yr(e,t)}var Tr=Object.freeze({__proto__:null,createTimeRanges:gr,createTimeRange:gr,setFormatTime:vr,resetFormatTime:br,formatTime:_r});function Sr(e,t){let i,s,n=0;if(!t)return 0;e&&e.length||(e=gr(0,0));for(let r=0;rt&&(s=t),n+=s-i;return n/t}function wr(e){if(e instanceof wr)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:gs(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=wr.defaultMessages[this.code]||"")}wr.prototype.code=0,wr.prototype.message="",wr.prototype.status=null,wr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],wr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(let e=0;e{}))}const xr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,i,s)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};const kr="vjs-modal-dialog";class Ir extends ur{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ws("div",{className:`${kr}-content`},{role:"document"}),this.descEl_=Ws("p",{className:`${kr}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Gs(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${kr} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(!this.opened_){const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}}opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"==typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,s=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),mn(t,e),this.trigger("modalfill"),s?i.insertBefore(t,s):i.appendChild(t);const n=this.getChild("closeButton");n&&i.appendChild(n.el_)}empty(){this.trigger("beforemodalempty"),hn(this.contentEl()),this.trigger("modalempty")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=Ye().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(e.stopPropagation(),Qe().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(!Qe().isEventKey(e,"Tab"))return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let s;for(let e=0;e(e instanceof Ge().HTMLAnchorElement||e instanceof Ge().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof Ge().HTMLInputElement||e instanceof Ge().HTMLSelectElement||e instanceof Ge().HTMLTextAreaElement||e instanceof Ge().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof Ge().HTMLIFrameElement||e instanceof Ge().HTMLObjectElement||e instanceof Ge().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}Ir.prototype.options_={pauseOnOpen:!0,temporary:!0},ur.registerComponent("ModalDialog",Ir);class Lr extends Yn{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t{this.trigger({track:e,type:"labelchange",target:this})},Qn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,s=this.length;ithis.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class Dr{constructor(e){Dr.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const s=e.length;this.cues_=e,this.length_=e.length;const n=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(tt[e],set(){}});Object.defineProperty(this,"label",{get:()=>i,set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const Br=function(e){const t=["protocol","hostname","port","pathname","search","hash","host"],i=Ye().createElement("a");i.href=e;const s={};for(let e=0;e0&&(Ge().console&&Ge().console.groupCollapsed&&Ge().console.groupCollapsed(`Text Track parsing errors for ${t.src}`),s.forEach((e=>cs.error(e))),Ge().console&&Ge().console.groupEnd&&Ge().console.groupEnd()),i.flush()},Vr=function(e,t){const i={uri:e},s=qr(e);s&&(i.cors=s);const n="use-credentials"===t.tech_.crossOrigin();n&&(i.withCredentials=n),tt()(i,Hn(this,(function(e,i,s){if(e)return cs.error(e,i);t.loaded_=!0,"function"!=typeof Ge().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return Hr(s,t);cs.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Hr(s,t)})))};class Wr extends $r{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=ys(e,{kind:Rr[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Ur[t.mode]||"disabled";const s=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const n=new Dr(this.cues_),r=new Dr(this.activeCues_);let a=!1;this.timeupdateHandler=Hn(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))})),this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get:()=>s,set(){}},mode:{get:()=>i,set(e){Ur[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Vr(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,s=this.cues.length;i=e&&t.push(s)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;ei,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class Xr extends $r{constructor(e={}){const t=ys(e,{kind:Mr[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get:()=>i,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Yr extends Yn{constructor(e={}){let t;super();const i=new Wr(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get:()=>t},track:{get:()=>i}}),t=Yr.NONE,i.addEventListener("loadeddata",(()=>{t=Yr.LOADED,this.trigger({type:"load",target:this})}))}}Yr.prototype.allowedEvents_={load:"load"},Yr.NONE=0,Yr.LOADING=1,Yr.LOADED=2,Yr.ERROR=3;const Kr={audio:{ListClass:class extends Lr{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Ar(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Ar(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ar(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}},TrackClass:Gr,capitalName:"Audio"},video:{ListClass:class extends Lr{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Pr(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e{this.changing_||(this.changing_=!0,Pr(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}},TrackClass:Xr,capitalName:"Video"},text:{ListClass:Or,TrackClass:Wr,capitalName:"Text"}};Object.keys(Kr).forEach((function(e){Kr[e].getterName=`${e}Tracks`,Kr[e].privateName=`${e}Tracks_`}));const Qr={remoteText:{ListClass:Or,TrackClass:Wr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;tthis.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),Zr.names.forEach((t=>{const i=Zr[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new Zr.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Hn(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return gr(0,0)}bufferedPercent(){return Sr(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Kr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const s=t[i];"text"===e&&this.removeRemoteTextTrack(s),t.removeTrack(s)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new wr(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?gr(0,0):gr()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Kr.names.forEach((e=>{const t=Kr[e],i=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener("removetrack",i),s.addEventListener("addtrack",i),this.on("dispose",(()=>{s.removeEventListener("removetrack",i),s.removeEventListener("addtrack",i)}))}))}addWebVttScript_(){if(!Ge().WebVTT)if(Ye().body.contains(this.el())){if(!this.options_["vtt.js"]&&fs(st())&&Object.keys(st()).length>0)return void this.trigger("vttjsloaded");const e=Ye().createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),Ge().WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),s=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",s),this.addWebVttScript_();const n=()=>this.trigger("texttrackchange"),r=()=>{n();for(let t=0;tthis.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Pn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Jr.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Jr||e instanceof Jr||e===Jr}static registerTech(e,t){if(Jr.techs_||(Jr.techs_={}),!Jr.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Jr.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Jr.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=cr(e),Jr.techs_[e]=t,Jr.techs_[lr(e)]=t,"Tech"!==e&&Jr.defaultTechOrder_.push(e),t}static getTech(e){if(e)return Jr.techs_&&Jr.techs_[e]?Jr.techs_[e]:(e=cr(e),Ge()&&Ge().videojs&&Ge().videojs[e]?(cs.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Ge().videojs[e]):void 0)}}Zr.names.forEach((function(e){const t=Zr[e];Jr.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Jr.prototype.featuresVolumeControl=!0,Jr.prototype.featuresMuteControl=!0,Jr.prototype.featuresFullscreenResize=!1,Jr.prototype.featuresPlaybackRate=!1,Jr.prototype.featuresProgressEvents=!1,Jr.prototype.featuresSourceset=!1,Jr.prototype.featuresTimeupdateEvents=!1,Jr.prototype.featuresNativeTextTracks=!1,Jr.prototype.featuresVideoFrameCallback=!1,Jr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let s=e.sourceHandlers;s||(s=e.sourceHandlers=[]),void 0===i&&(i=s.length),s.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let s;for(let e=0;eca(t,ea[t.type],i,e)),1)}function na(e,t,i,s=null){const n="call"+cr(i),r=e.reduce(la(n),s),a=r===ia,o=a?null:t[i](r);return function(e,t,i,s){for(let n=e.length-1;n>=0;n--){const r=e[n];r[t]&&r[t](s,i)}}(e,i,o,a),o}const ra={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},aa={setCurrentTime:1,setMuted:1,setVolume:1},oa={play:1,pause:1};function la(e){return(t,i)=>t===ia?ia:i[e]?i[e](t):t}function ca(e={},t=[],i,s,n=[],r=!1){const[a,...o]=t;if("string"==typeof a)ca(e,ea[a],i,s,n,r);else if(a){const t=function(e,t){const i=ta[e.id()];let s=null;if(null==i)return s=t(e),ta[e.id()]=[[t,s]],s;for(let e=0;ethis.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&cs.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const s=Ws(e,t,i);return this.player_.options_.experimentalSvgIcons||s.appendChild(Ws("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ws("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Gs(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){Qe().isEventKey(e,"Space")||Qe().isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ur.registerComponent("ClickableComponent",ma);class ga extends ma{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Ws("div",{className:"vjs-poster"})}crossOrigin(e){if(void 0===e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(Ws("picture",{className:"vjs-poster",tabIndex:-1},{},Ws("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Cr(this.player_.play()):this.player_.pause())}}ga.prototype.crossorigin=ga.prototype.crossOrigin,ur.registerComponent("PosterImage",ga);const fa="#222",ya="#ccc",va={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function ba(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function _a(e,t,i){try{e.style[t]=i}catch(e){return}}function Ta(e){return e?`${e}px`:""}ur.registerComponent("TextTrackDisplay",class extends ur{constructor(e,t,i){super(e,t,i);const s=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("texttrackchange",(e=>this.updateDisplay(e))),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(Hn(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",s),e.on("playerresize",s);const t=Ge().screen.orientation||Ge(),i=Ge().screen.orientation?"change":"orientationchange";t.addEventListener(i,s),e.on("dispose",(()=>t.removeEventListener(i,s)));const n=this.options_.playerOptions.tracks||[];for(let e=0;e.1&&(i>s?n=Math.round((e-t*s)/2):r=Math.round((t-e/s)/2)),_a(this.el_,"insetInline",Ta(n)),_a(this.el_,"insetBlock",Ta(r))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let s=i.length;for(;s--;){const e=i[s];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&_a(n.firstChild,"color",ba(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&_a(n.firstChild,"backgroundColor",ba(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?_a(n,"backgroundColor",ba(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${fa}, 2px 2px 4px ${fa}, 2px 2px 5px ${fa}`:"raised"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${fa}, 2px 2px ${fa}, 3px 3px ${fa}`:"depressed"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${ya}, 0 1px ${ya}, -1px -1px ${fa}, 0 -1px ${fa}`:"uniform"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${fa}, 0 0 4px ${fa}, 0 0 4px ${fa}, 0 0 4px ${fa}`)),t.fontPercent&&1!==t.fontPercent){const e=Ge().parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+"px",n.style.height="auto",n.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?n.firstChild.style.fontVariant="small-caps":n.firstChild.style.fontFamily=va[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!=typeof Ge().WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;ithis.handleMouseDown(e)))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e)return Cr(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),s=i&&i.getChild("playToggle");if(!s)return void this.player_.tech(!0).focus();const n=()=>s.focus();Er(t)?t.then(n,(()=>{})):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}wa.prototype.controlText_="Play Video",ur.registerComponent("BigPlayButton",wa),ur.registerComponent("CloseButton",class extends Sa{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){Qe().isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class Ea extends Sa{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Cr(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}Ea.prototype.controlText_="Play",ur.registerComponent("PlayToggle",Ea);class Ca extends ur{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended"],(e=>this.updateContent(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=Ws("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=Ws("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}updateTextNode_(e=0){e=_r(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,cs.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=Ye().createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}Ca.prototype.labelText_="Time",Ca.prototype.controlText_="Time",ur.registerComponent("TimeDisplay",Ca);class xa extends Ca{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}xa.prototype.labelText_="Current Time",xa.prototype.controlText_="Current Time",ur.registerComponent("CurrentTimeDisplay",xa);class ka extends Ca{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}ka.prototype.labelText_="Duration",ka.prototype.controlText_="Duration",ur.registerComponent("DurationDisplay",ka),ur.registerComponent("TimeDivider",class extends ur{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}});class Ia extends Ca{constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Ws("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}Ia.prototype.labelText_="Remaining Time",Ia.prototype.controlText_="Remaining Time",ur.registerComponent("RemainingTimeDisplay",Ia),ur.registerComponent("LiveDisplay",class extends ur{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ws("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ws("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(Ye().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class La extends Sa{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Ws("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function Aa(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}La.prototype.controlText_="Seek to live, currently playing live",ur.registerComponent("SeekToLive",La);var Pa=Object.freeze({__proto__:null,clamp:Aa});class Oa extends ur{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Is||e.preventDefault(),rn(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;an(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}getProgress(){return Number(Aa(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=cn(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){Qe().isEventKey(e,"Left")||Qe().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):Qe().isEventKey(e,"Right")||Qe().isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ur.registerComponent("Slider",Oa);const Da=(e,t)=>Aa(e/t*100,0,100).toFixed(2)+"%";ur.registerComponent("LoadProgressBar",class extends ur{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Ws("span",{className:"vjs-control-text"}),i=Ws("span",{textContent:this.localize("Loaded")}),s=Ye().createTextNode(": ");return this.percentageEl_=Ws("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),n=this.partEls_,r=Da(s,i);this.percent_!==r&&(this.el_.style.width=r,Gs(this.percentageEl_,r),this.percent_=r);for(let e=0;et.length;e--)this.el_.removeChild(n[e-1]);n.length=t.length}))}}),ur.registerComponent("TimeTooltip",class extends ur{constructor(e,t){super(e,t),this.update=Vn(Hn(this,this.update),zn)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const s=ln(this.el_),n=on(this.player_.el()),r=e.width*t;if(!n||!s)return;const a=e.left-n.left+r,o=e.width-r+(n.right-e.right);let l=s.width/2;as.width&&(l=s.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Gs(this.el_,e)}updateTime(e,t,i,s){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let n;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;n=(i<1?"":"-")+_r(i,e)}else n=_r(i,r);this.update(e,t,n),s&&s()}))}});class Ma extends ur{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=Vn(Hn(this,this.update),zn)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const s=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,s)}}Ma.prototype.options_={children:[]},$s||Es||Ma.prototype.options_.children.push("timeTooltip"),ur.registerComponent("PlayProgressBar",Ma);class Na extends ur{constructor(e,t){super(e,t),this.update=Vn(Hn(this,this.update),zn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+"px"}))}}Na.prototype.options_={children:["timeTooltip"]},ur.registerComponent("MouseTimeDisplay",Na);class Ra extends Oa{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=Hn(this,this.update),this.update=Vn(this.update_,zn),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Ye()&&"visibilityState"in Ye()&&this.on(Ye(),"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===Ye().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,zn))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===Ye().visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let s=this.player_.duration();i&&i.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===s||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[_r(e,s),_r(s,s)],"{1} of {2}")),this.currentTime_=e,this.duration_=s),this.bar&&this.bar.update(on(this.el()),this.getProgress())})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){gn(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!gn(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const s=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(s>=.99)return void n.seekToLiveEdge();const e=n.seekableStart(),t=n.liveCurrentTime();if(i=e+s*n.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=s*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.userSeek_(i)}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Cr(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+5)}stepBack(){this.userSeek_(this.player_.currentTime()-5)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(Qe().isEventKey(e,"Space")||Qe().isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(Qe().isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(Qe().isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(Qe()(e))){e.preventDefault(),e.stopPropagation();const i=10*(Qe().codes[Qe()(e)]-Qe().codes[0])/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else Qe().isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):Qe().isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Ye()&&"visibilityState"in Ye()&&this.off(Ye(),"visibilitychange",this.toggleVisibility_),super.dispose()}}Ra.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},$s||Es||Ra.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),ur.registerComponent("SeekBar",Ra);class Ua extends ur{constructor(e,t){super(e,t),this.handleMouseMove=Vn(Hn(this,this.handleMouseMove),zn),this.throttledHandleMouseSeek=Vn(Hn(this,this.handleMouseSeek),zn),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),s=t.getChild("mouseTimeDisplay");if(!i&&!s)return;const n=t.el(),r=ln(n);let a=cn(n,e).x;a=Aa(a,0,1),s&&s.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Cr(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Ua.prototype.options_={children:["seekBar"]},ur.registerComponent("ProgressControl",Ua);class $a extends Sa{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){Ye().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in Ge()?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"==typeof Ye().exitPictureInPicture&&super.show()}}$a.prototype.controlText_="Picture-in-Picture",ur.registerComponent("PictureInPictureToggle",$a);class Ba extends Sa{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===Ye()[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}Ba.prototype.controlText_="Fullscreen",ur.registerComponent("FullscreenToggle",Ba),ur.registerComponent("VolumeLevel",class extends ur{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}),ur.registerComponent("VolumeLevelTooltip",class extends ur{constructor(e,t){super(e,t),this.update=Vn(Hn(this,this.update),zn)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,s){if(!i){const i=on(this.el_),s=on(this.player_.el()),n=e.width*t;if(!s||!i)return;const r=e.left-s.left+n,a=e.width-n+(s.right-e.right);let o=i.width/2;ri.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${s}%`)}write(e){Gs(this.el_,e)}updateVolume(e,t,i,s,n){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,i,s.toFixed(0)),n&&n()}))}});class Fa extends ur{constructor(e,t){super(e,t),this.update=Vn(Hn(this,this.update),zn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const s=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,s,(()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"}))}}Fa.prototype.options_={children:["volumeLevelTooltip"]},ur.registerComponent("MouseVolumeLevelDisplay",Fa);class ja extends Oa{constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){gn(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),s=on(i),n=this.vertical();let r=cn(i,e);r=n?r.y:r.x,r=Aa(r,0,1),t.update(s,r,n)}gn(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}ja.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},$s||Es||ja.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),ja.prototype.playerEvent="volumechange",ur.registerComponent("VolumeBar",ja);class qa extends ur{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||fs(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=Vn(Hn(this,this.handleMouseMove),zn),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}qa.prototype.options_={children:["volumeBar"]},ur.registerComponent("VolumeControl",qa);class za extends Sa{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),$s&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Qs(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?" ":""}vjs-vol-${t}`),"")),Ks(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}za.prototype.controlText_="Mute",ur.registerComponent("MuteToggle",za);class Ha extends ur{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||fs(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){Qe().isEventKey(e,"Esc")&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),Un(Ye(),"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),$n(Ye(),"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){Qe().isEventKey(e,"Esc")&&this.handleMouseOut()}}Ha.prototype.options_={children:["muteToggle","volumeControl"]},ur.registerComponent("VolumePanel",Ha),ur.registerComponent("SkipForward",class extends Sa{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;n=t+this.skipTime<=s?t+this.skipTime:s,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}});class Va extends Sa{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,s=i&&i.isLive()&&i.seekableStart();let n;n=s&&t-this.skipTime<=s?s:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}Va.prototype.controlText_="Skip Backward",ur.registerComponent("SkipBackward",Va);class Wa extends ur{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof ur&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ur&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ws(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),Un(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||Ye().activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){Qe().isEventKey(e,"Left")||Qe().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(Qe().isEventKey(e,"Right")||Qe().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}ur.registerComponent("Menu",Wa);class Ga extends ur{constructor(e,t={}){super(e,t),this.menuButton_=new Sa(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=Sa.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",s),this.on(this.menuButton_,"click",s),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>{this.addClass("vjs-hover"),this.menu.show(),Un(Ye(),"keyup",this.handleMenuKeyUp_)})),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new Wa(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Ws("li",{className:"vjs-menu-title",textContent:cr(this.options_.title),tabIndex:-1}),i=new ur(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;tQe().isEventKey(e,t)))||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ur.registerComponent("MenuItem",Ka);class Qa extends Ka{constructor(e,t){const i=t.track,s=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],n),s.addEventListener("change",n),s.addEventListener("selectedlanguagechange",r),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],n),s.removeEventListener("change",n),s.removeEventListener("selectedlanguagechange",r)})),void 0===s.onchange){let e;this.on(["tap","click"],(function(){if("object"!=typeof Ge().Event)try{e=new(Ge().Event)("change")}catch(e){}e||(e=Ye().createEvent("Event"),e.initEvent("change",!0,!0)),s.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e-1&&"showing"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,s=t.length;e-1&&"showing"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ur.registerComponent("OffTextTrackMenuItem",Za);class Ja extends Xa{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=Qa){let i;this.label_&&(i=`${this.label_} off`),e.push(new Za(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i-1){const i=new t(this.player_,{track:n,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${n.kind}-menu-item`),e.push(i)}}return e}}ur.registerComponent("TextTrackButton",Ja);class eo extends Ka{constructor(e,t){const i=t.track,s=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=n&&n{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(cr(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,s=t.length;i-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(cr(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new no(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,ao),e}}oo.prototype.kinds_=["captions","subtitles"],oo.prototype.controlText_="Subtitles",ur.registerComponent("SubsCapsButton",oo);class lo extends Ka{constructor(e,t){const i=t.track,s=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...e)=>{this.handleTracksChange.apply(this,e)};s.addEventListener("change",n),this.on("dispose",(()=>{s.removeEventListener("change",n)}))}createEl(e,t,i){const s=super.createEl(e,t,i),n=s.querySelector(".vjs-menu-item-text");return["main-desc","description"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Ws("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),n.appendChild(Ws("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;tthis.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}ho.prototype.contentElType="button",ur.registerComponent("PlaybackRateMenuItem",ho);class uo extends Ga{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ws("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new ho(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}uo.prototype.controlText_="Playback Rate",ur.registerComponent("PlaybackRateMenuButton",uo);class po extends ur{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}ur.registerComponent("Spacer",po),ur.registerComponent("CustomControlSpacer",class extends po{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}});class mo extends ur{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}mo.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},ur.registerComponent("ControlBar",mo);class go extends Ir{constructor(e,t){super(e,t),this.on(e,"error",(e=>this.open(e)))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}go.prototype.options_=Object.assign({},Ir.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ur.registerComponent("ErrorDisplay",go);const fo="vjs-text-track-settings",yo=["#000","Black"],vo=["#00F","Blue"],bo=["#0FF","Cyan"],_o=["#0F0","Green"],To=["#F0F","Magenta"],So=["#F00","Red"],wo=["#FFF","White"],Eo=["#FF0","Yellow"],Co=["1","Opaque"],xo=["0.5","Semi-Transparent"],ko=["0","Transparent"],Io={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[yo,wo,So,_o,vo,Eo,To,bo]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Co,xo,ko]},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[wo,yo,So,_o,vo,Eo,To,bo]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Co,xo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[ko,xo,Co]}};function Lo(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Io.windowColor.options=Io.backgroundColor.options,ur.registerComponent("TextTrackSettings",class extends Ir{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.endDialog=Ws("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.on(this.$(".vjs-done-button"),"click",(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),"click",(()=>{this.setDefaults(),this.updateDisplay()})),ps(Io,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(e,t="",i="label"){const s=Io[e],n=s.id.replace("%s",this.id_),r=[t,n].join(" ").trim();return[`<${i} id="${n}" class="${"label"===i?"vjs-label":""}">`,this.localize(s.label),``,`").join("")}createElFgColor_(){const e=`captions-text-legend-${this.id_}`;return['
',``,this.localize("Text"),"",'',this.createElSelect_("color",e),"",'',this.createElSelect_("textOpacity",e),"","
"].join("")}createElBgColor_(){const e=`captions-background-${this.id_}`;return['
',``,this.localize("Text Background"),"",'',this.createElSelect_("backgroundColor",e),"",'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")}createElWinColor_(){const e=`captions-window-${this.id_}`;return['
',``,this.localize("Caption Area Background"),"",'',this.createElSelect_("windowColor",e),"",'',this.createElSelect_("windowOpacity",e),"","
"].join("")}createElColors_(){return Ws("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return Ws("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})}createElControls_(){const e=this.localize("restore all settings to the default values");return Ws("div",{className:"vjs-track-settings-controls",innerHTML:[`",``].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return ms(Io,((e,t,i)=>{const s=(n=this.$(t.selector),r=t.parser,Lo(n.options[n.options.selectedIndex].value,r));var n,r;return void 0!==s&&(e[i]=s),e}),{})}setValues(e){ps(Io,((t,i)=>{!function(e,t,i){if(t)for(let s=0;s{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(Ge().localStorage.getItem(fo))}catch(e){cs.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Ge().localStorage.setItem(fo,JSON.stringify(e)):Ge().localStorage.removeItem(fo)}catch(e){cs.warn(e)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()}handleLanguagechange(){this.fill()}}),ur.registerComponent("ResizeManager",class extends ur{constructor(e,t){let i=t.ResizeObserver||Ge().ResizeObserver;null===t.ResizeObserver&&(i=!1),super(e,ys({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||Ge().ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Wn((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){$n(this,"resize",e),$n(this,"unload",t),t=null};Un(this.el_.contentWindow,"unload",t),Un(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const Ao={trackingThreshold:20,liveTolerance:15};ur.registerComponent("LiveTracker",class extends ur{constructor(e,t){super(e,ys(Ao,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(Ge().performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const s=this.liveCurrentTime(),n=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-n)>this.options_.liveTolerance;this.timeupdateSeen_&&s!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,zn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}),ur.registerComponent("TitleBar",class extends ur{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:Ws("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Pn()}`}),description:Ws("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Pn()}`})},Ws("div",{className:"vjs-title-bar"},{},vs(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const s=this.state[e],n=this.els[e],r=i[e];hn(n),s&&Gs(n,s),t&&(t.removeAttribute(r),s&&t.setAttribute(r,n.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const Po=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),s=[];let n="";if(!i.length)return!1;for(let e=0;e{let i={};for(let s=0;sDo([e.el(),Ge().HTMLMediaElement.prototype,Ge().Element.prototype,Oo],"innerHTML"))(e),n=i=>(...s)=>{const n=i.apply(t,s);return Po(e),n};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=n(i[e]))})),Object.defineProperty(t,"innerHTML",ys(s,{set:n(s.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,"innerHTML",s)},e.one("sourceset",t.resetSourceWatch_)},No=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Fr(Ge().Element.prototype.getAttribute.call(this,"src")):""},set(e){return Ge().Element.prototype.setAttribute.call(this,"src",e),e}});class Ro extends Jr{constructor(e,t){super(e,t);const i=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const n=e[t];"track"===n.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),this.textTracks().addTrack(n.track),s||this.el_.hasAttribute("crossorigin")||!qr(n.src)||(s=!0)):i.push(n))}for(let e=0;eDo([e.el(),Ge().HTMLMediaElement.prototype,No],"src"))(e),s=t.setAttribute,n=t.load;Object.defineProperty(t,"src",ys(i,{set:s=>{const n=i.set.call(t,s);return e.triggerSourceset(t.src),n}})),t.setAttribute=(i,n)=>{const r=s.call(t,i,n);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=n.call(t);return Po(e)||(e.triggerSourceset(""),Mo(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Po(e)||Mo(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=n,t.setAttribute=s,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;ie.removeEventListener("change",i)));const s=()=>{for(let e=0;e{e.removeEventListener("change",i),e.removeEventListener("change",s),e.addEventListener("change",s)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",s)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Kr[e],i=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:t=>{const i={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(i),"text"===e&&this[Qr.remoteText.getterName]().trigger(i)},addtrack(e){s.addTrack(e.track)},removetrack(e){s.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t{const t=n[e];i.addEventListener(e,t),this.on("dispose",(s=>i.removeEventListener(e,t)))})),this.on("loadstart",r),this.on("dispose",(e=>this.off("loadstart",r)))}proxyNativeTracks_(){Kr.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),Ro.disposeMediaElement(e),e=t}else{e=Ye().createElement("video");const t=ys({},this.options_.tag&&en(this.options_.tag));Rs&&!0===this.options_.nativeControlsForTouch||delete t.controls,Js(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&sn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Bs?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){cs(e,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Es&&Is&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Cr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}reset(){Ro.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=Ye().createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Ge().performance&&(e.creationTime=Ge().performance.now()),e}}bs(Ro,"TEST_VID",(function(){if(!qs())return;const e=Ye().createElement("video"),t=Ye().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),Ro.isSupported=function(){try{Ro.TEST_VID.volume=.5}catch(e){return!1}return!(!Ro.TEST_VID||!Ro.TEST_VID.canPlayType)},Ro.canPlayType=function(e){return Ro.TEST_VID.canPlayType(e)},Ro.canPlaySource=function(e,t){return Ro.canPlayType(e.type)},Ro.canControlVolume=function(){try{const e=Ro.TEST_VID.volume;Ro.TEST_VID.volume=e/2+.1;const t=e!==Ro.TEST_VID.volume;return t&&$s?(Ge().setTimeout((()=>{Ro&&Ro.prototype&&(Ro.prototype.featuresVolumeControl=e!==Ro.TEST_VID.volume)})),!1):t}catch(e){return!1}},Ro.canMuteVolume=function(){try{const e=Ro.TEST_VID.muted;return Ro.TEST_VID.muted=!e,Ro.TEST_VID.muted?sn(Ro.TEST_VID,"muted","muted"):nn(Ro.TEST_VID,"muted"),e!==Ro.TEST_VID.muted}catch(e){return!1}},Ro.canControlPlaybackRate=function(){if(Es&&Is&&As<58)return!1;try{const e=Ro.TEST_VID.playbackRate;return Ro.TEST_VID.playbackRate=e/2+.1,e!==Ro.TEST_VID.playbackRate}catch(e){return!1}},Ro.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(Ye().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(Ye().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(Ye().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(Ye().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ro.supportsNativeTextTracks=function(){return Bs||$s&&Is},Ro.supportsNativeVideoTracks=function(){return!(!Ro.TEST_VID||!Ro.TEST_VID.videoTracks)},Ro.supportsNativeAudioTracks=function(){return!(!Ro.TEST_VID||!Ro.TEST_VID.audioTracks)},Ro.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function([e,t]){bs(Ro.prototype,e,(()=>Ro[t]()),!0)})),Ro.prototype.featuresVolumeControl=Ro.canControlVolume(),Ro.prototype.movingMediaElementInDOM=!$s,Ro.prototype.featuresFullscreenResize=!0,Ro.prototype.featuresProgressEvents=!0,Ro.prototype.featuresTimeupdateEvents=!0,Ro.prototype.featuresVideoFrameCallback=!(!Ro.TEST_VID||!Ro.TEST_VID.requestVideoFrameCallback),Ro.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Ro.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ro.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ro.prototype["set"+cr(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Ro.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Ro.prototype["set"+cr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ro.prototype[e]=function(){return this.el_[e]()}})),Jr.withSourceHandlers(Ro),Ro.nativeSourceHandler={},Ro.nativeSourceHandler.canPlayType=function(e){try{return Ro.TEST_VID.canPlayType(e)}catch(e){return""}},Ro.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ro.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=jr(e.src);return Ro.nativeSourceHandler.canPlayType(`video/${t}`)}return""},Ro.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Ro.nativeSourceHandler.dispose=function(){},Ro.registerSourceHandler(Ro.nativeSourceHandler),Jr.registerTech("Html5",Ro);const Uo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],$o={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Bo=["tiny","xsmall","small","medium","large","xlarge","huge"],Fo={};Bo.forEach((e=>{const t="x"===e.charAt(0)?`x-${e.substring(1)}`:e;Fo[e]=`vjs-layout-${t}`}));const jo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class qo extends ur{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${Pn()}`,(t=Object.assign(qo.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.isFullscreen_=!1,this.log=ds(this.id_),this.fsApi_=ns,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&en(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=qo.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),rr(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Un(Ye(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const s=ys(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new(Ge().DOMParser)).parseFromString('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',"image/svg+xml");if(e.querySelector("parsererror"))cs.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),Rs&&this.addClass("vjs-touch-enabled"),$s||this.addClass("vjs-workinghover"),qo.players[this.id_]=this;const n=es.split(".")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){this.trigger("dispose"),this.off("dispose"),$n(Ye(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$n(Ye(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),qo.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),ta[this.id()]=null,Zr.names.forEach((e=>{const t=this[Zr[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const s="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:s||(e=this.el_=super.createEl("div"));const n=en(t);if(s){for(e=this.el_=t,t=this.tag=Ye().createElement("video");e.children.length;)t.appendChild(e.firstChild);Ys(e,"video-js")||Ks(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}if(t.setAttribute("tabindex","-1"),n.tabindex="-1",Is&&Ds&&(t.setAttribute("role","application"),n.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in n&&delete n.width,"height"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){s&&"class"===i||e.setAttribute(i,n[i]),s&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused"),!0!==Ge().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=xn("vjs-styles-dimensions");const e=fn(".vjs-styles-defaults"),t=fn("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const r=t.getElementsByTagName("a");for(let e=0;e{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},Qn(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===Ge().VIDEOJS_NO_DYNAMIC_STYLE){const e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,s;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const n=i.split(":"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),kn(this.styleEl_,`\n .${s} {\n width: ${e}px;\n height: ${t}px;\n }\n\n .${s}.vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ${100*r}%;\n }\n `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=cr(e),s=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(Jr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(n=!1);const r={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Zr.names.forEach((e=>{const t=Zr[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[s]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=Jr.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);var o,l;this.tech_=new a(r),this.tech_.ready(Hn(this,this.handleTechReady_),!0),o=this.textTracksJson_||[],l=this.tech_,o.forEach((function(e){const t=l.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>t.addCue(e)))})),l.textTracks(),Uo.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${cr(e)}_`](t)))})),Object.keys($o).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${$o[e]}_`].bind(this),event:t}):this[`handleTech${$o[e]}_`](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Xs(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Zr.names.forEach((e=>{const t=Zr[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=xr(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(xr))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&cs.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Er(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||""}`)}))};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),Er(i)&&(i=i.catch(t))),Er(i)?i.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const s=e.$$("source");for(let e=0;ee.src&&e.src===t)),n=[],r=this.$$("source"),a=[];for(let e=0;ethis.updateSourceCaches_(e);const i=this.currentSource().src,s=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==i)&&(t=()=>{}),t(s),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Cr(this.play()):this.pause()))}handleTechDoubleClick_(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let s=Ye()[this.fsApi_.fullscreenElement]===i;!s&&i.matches&&(s=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in aa)return function(e,t,i,s){return t[i](e.reduce(la(i),s))}(this.middleware_,this.tech_,e,t);if(e in oa)return na(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw cs(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in ra)return function(e,t,i){return e.reduceRight(la(i),t[i]())}(this.middleware_,this.tech_,e);if(e in oa)return na(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw cs(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw cs(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw cs(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Cr){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Bs||$s);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&i&&this.load());const s=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===s?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||gr(0,0)}scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=gr(0,0)),e}bufferedPercent(){return Sr(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,s)=>{function n(){t.off("fullscreenerror",a),t.off("fullscreenchange",r)}function r(){n(),i()}function a(e,t){n(),s(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(n,n),o.then(i,s))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function s(){e.off("fullscreenerror",r),e.off("fullscreenchange",n)}function n(){s(),t()}function r(e,t){s(),i(t)}e.one("fullscreenchange",n),e.one("fullscreenerror",r);const a=e.exitFullscreenHelper_();a&&(a.then(s,s),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Ye()[this.fsApi_.exitFullscreen]();return e&&Cr(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Ye().documentElement.style.overflow,Un(Ye(),"keydown",this.boundFullWindowOnEscKey_),Ye().documentElement.style.overflow="hidden",Ks(Ye().body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){Qe().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,$n(Ye(),"keydown",this.boundFullWindowOnEscKey_),Ye().documentElement.style.overflow=this.docOrigOverflow,Qs(Ye().body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Ge().documentPictureInPicture){const e=Ye().createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Ws("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),Ge().documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(bn(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger("enterpictureinpicture"),t.addEventListener("pagehide",(t=>{const i=t.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in Ye()&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return Ge().documentPictureInPicture&&Ge().documentPictureInPicture.window?(Ge().documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in Ye()?Ye().exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;t&&t.hotkeys&&((e=>{const t=e.tagName.toLowerCase();return!!e.isContentEditable||("input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t))})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=(e=>Qe().isEventKey(e,"f")),muteKey:s=(e=>Qe().isEventKey(e,"m")),playPauseKey:n=(e=>Qe().isEventKey(e,"k")||Qe().isEventKey(e,"Space"))}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=ur.getComponent("FullscreenToggle");!1!==Ye()[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),ur.getComponent("MuteToggle").prototype.handleClick.call(this,e)):n.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ur.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,s=this.options_.techOrder;i[e,Jr.getTech(e)])).filter((([e,t])=>t?t.isSupported():(cs.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let s;return e.some((e=>t.some((t=>{if(s=i(e,t),s)return!0})))),s};let s;const n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return s=this.options_.sourceOrder?i(e,t,(r=n,(e,t)=>r(t,e))):i(t,e,n),s||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=ua(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),sa(this,i[0],((e,s)=>{if(this.middleware_=s,t||(this.cache_.sources=i),this.updateSourceCaches_(e),this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var n,r;n=s,r=this.tech_,n.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(dr(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():Cr(this.play().then((()=>this.doReset_())))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Qn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(is("beforeerror").forEach((t=>{const i=t(this,e);gs(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new wr(e),this.addClass("vjs-error"),cs.error(`(CODE:${this.error_.code} ${wr.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),is("error").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const s=Hn(this,this.reportUserActivity),n=function(t){s(),this.clearInterval(e)};this.on("mousedown",(function(){s(),this.clearInterval(e),e=this.setInterval(s,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,s())})),this.on("mouseup",n),this.on("mouseleave",n);const r=this.getChild("controlBar");let a;!r||$s||Es||(r.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",s),this.on("keyup",s),this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return"boolean"!=typeof e||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.disablePosterModeUI_()})))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Qn(this)&&this.trigger("languagechange"))}languages(){return ys(qo.prototype.options_.languages,this.languages_)}toJSON(){const e=ys(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;ithis.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:c,description:r||s||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:ha(t.poster)}]),t}return ys(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=en(e),s=i["data-setup"];if(Ys(e,"vjs-fill")&&(i.fill=!0),Ys(e,"vjs-fluid")&&(i.fluid=!0),null!==s){const[e,t]=Je()(s||"{}");e&&cs.error(e),Object.assign(i,t)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,s=i.length;e"number"==typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Zr.names.forEach((function(e){const t=Zr[e];qo.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),qo.prototype.crossorigin=qo.prototype.crossOrigin,qo.players={};const zo=Ge().navigator;qo.prototype.options_={techOrder:Jr.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:zo&&(zo.languages&&zo.languages[0]||zo.userLanguage||zo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){qo.prototype[e]=function(){return this.techGet_(e)}})),Uo.forEach((function(e){qo.prototype[`handleTech${cr(e)}_`]=function(){return this.trigger(e)}})),ur.registerComponent("Player",qo);const Ho="plugin",Vo="activePlugins_",Wo={},Go=e=>Wo.hasOwnProperty(e),Xo=e=>Go(e)?Wo[e]:void 0,Yo=(e,t)=>{e[Vo]=e[Vo]||{},e[Vo][t]=!0},Ko=(e,t,i)=>{const s=(i?"before":"")+"pluginsetup";e.trigger(s,t),e.trigger(s+":"+t.name,t)},Qo=(e,t)=>(t.prototype.name=e,function(...i){Ko(this,{name:e,plugin:t,instance:null},!0);const s=new t(...[this,...i]);return this[e]=()=>s,Ko(this,s.getEventHash()),s});class Zo{constructor(e){if(this.constructor===Zo)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),rr(this),delete this.trigger,or(this,this.constructor.defaultState),Yo(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return Bn(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Vo][e]=!1,this.player=this.state=null,t[e]=Qo(e,Wo[e])}static isBasic(e){const t="string"==typeof e?Xo(e):e;return"function"==typeof t&&!Zo.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(Go(e))cs.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(qo.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return Wo[e]=t,e!==Ho&&(Zo.isBasic(t)?qo.prototype[e]=function(e,t){const i=function(){Ko(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return Yo(this,e),Ko(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):qo.prototype[e]=Qo(e,t)),t}static deregisterPlugin(e){if(e===Ho)throw new Error("Cannot de-register base plugin.");Go(e)&&(delete Wo[e],delete qo.prototype[e])}static getPlugins(e=Object.keys(Wo)){let t;return e.forEach((e=>{const i=Xo(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=Xo(e);return t&&t.VERSION||""}}function Jo(e,t,i,s){return function(e,t){let i=!1;return function(...s){return i||cs.warn(e),i=!0,t.apply(this,s)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,s)}Zo.getPlugin=Xo,Zo.BASE_PLUGIN_NAME=Ho,Zo.registerPlugin(Ho,Zo),qo.prototype.usingPlugin=function(e){return!!this[Vo]&&!0===this[Vo][e]},qo.prototype.hasPlugin=function(e){return!!Go(e)};const el=e=>0===e.indexOf("#")?e.slice(1):e;function tl(e,t,i){let s=tl.getPlayer(e);if(s)return t&&cs.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const n="string"==typeof e?fn("#"+el(e)):e;if(!zs(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");const r="getRootNode"in n&&n.getRootNode()instanceof Ge().ShadowRoot?n.getRootNode():n.ownerDocument.body;n.ownerDocument.defaultView&&r.contains(n)||cs.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(n.parentNode&&n.parentNode.hasAttribute("data-vjs-player")?n.parentNode:n).cloneNode(!0)),is("beforesetup").forEach((e=>{const i=e(n,ys(t));gs(i)&&!Array.isArray(i)?t=ys(t,i):cs.error("please return an object in beforesetup hooks")}));const a=ur.getComponent("Player");return s=new a(n,t,i),is("setup").forEach((e=>e(s))),s}if(tl.hooks_=ts,tl.hooks=is,tl.hook=function(e,t){is(e,t)},tl.hookOnce=function(e,t){is(e,[].concat(t).map((t=>{const i=(...s)=>(ss(e,i),t(...s));return i})))},tl.removeHook=ss,!0!==Ge().VIDEOJS_NO_DYNAMIC_STYLE&&qs()){let e=fn(".vjs-styles-defaults");if(!e){e=xn("vjs-styles-defaults");const t=fn("head");t&&t.insertBefore(e,t.firstChild),kn(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}En(1,tl),tl.VERSION=es,tl.options=qo.prototype.options_,tl.getPlayers=()=>qo.players,tl.getPlayer=e=>{const t=qo.players;let i;if("string"==typeof e){const s=el(e),n=t[s];if(n)return n;i=fn("#"+s)}else i=e;if(zs(i)){const{player:e,playerId:s}=i;if(e||t[s])return e||t[s]}},tl.getAllPlayers=()=>Object.keys(qo.players).map((e=>qo.players[e])).filter(Boolean),tl.players=qo.players,tl.getComponent=ur.getComponent,tl.registerComponent=(e,t)=>(Jr.isTech(t)&&cs.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ur.registerComponent.call(ur,e,t)),tl.getTech=Jr.getTech,tl.registerTech=Jr.registerTech,tl.use=function(e,t){ea[e]=ea[e]||[],ea[e].push(t)},Object.defineProperty(tl,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(tl.middleware,"TERMINATOR",{value:ia,writeable:!1,enumerable:!0}),tl.browser=Fs,tl.obj=_s,tl.mergeOptions=Jo(9,"videojs.mergeOptions","videojs.obj.merge",ys),tl.defineLazyProperty=Jo(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",bs),tl.bind=Jo(9,"videojs.bind","native Function.prototype.bind",Hn),tl.registerPlugin=Zo.registerPlugin,tl.deregisterPlugin=Zo.deregisterPlugin,tl.plugin=(e,t)=>(cs.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Zo.registerPlugin(e,t)),tl.getPlugins=Zo.getPlugins,tl.getPlugin=Zo.getPlugin,tl.getPluginVersion=Zo.getPluginVersion,tl.addLanguage=function(e,t){return e=(""+e).toLowerCase(),tl.options.languages=ys(tl.options.languages,{[e]:t}),tl.options.languages[e]},tl.log=cs,tl.createLogger=ds,tl.time=Tr,tl.createTimeRange=Jo(9,"videojs.createTimeRange","videojs.time.createTimeRanges",gr),tl.createTimeRanges=Jo(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",gr),tl.formatTime=Jo(9,"videojs.formatTime","videojs.time.formatTime",_r),tl.setFormatTime=Jo(9,"videojs.setFormatTime","videojs.time.setFormatTime",vr),tl.resetFormatTime=Jo(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",br),tl.parseUrl=Jo(9,"videojs.parseUrl","videojs.url.parseUrl",Br),tl.isCrossOrigin=Jo(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",qr),tl.EventTarget=Yn,tl.any=jn,tl.on=Un,tl.one=Fn,tl.off=$n,tl.trigger=Bn,tl.xhr=tt(),tl.TextTrack=Wr,tl.AudioTrack=Gr,tl.VideoTrack=Xr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{tl[e]=function(){return cs.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),_n[e].apply(null,arguments)}})),tl.computedStyle=Jo(9,"videojs.computedStyle","videojs.dom.computedStyle",vn),tl.dom=_n,tl.fn=Gn,tl.num=Pa,tl.str=hr,tl.url=zr;class il{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class sl extends tl.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new il(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,s=this.length;ii&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;ts,e.qualityLevels.VERSION=nl,s}(this,tl.obj.merge({},e))};tl.registerPlugin("qualityLevels",rl),rl.VERSION=nl;const al=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=Ge().location&&Ge().location.href||"");var i="function"==typeof Ge().URL,s=/^\/\//.test(e),n=!Ge().location&&!/\/\//i.test(e);if(i?e=new(Ge().URL)(e,Ge().location||"http://example.com"):/\/\//i.test(e)||(e=rt().buildAbsoluteURL(Ge().location&&Ge().location.href||"",e)),i){var r=new URL(t,e);return n?r.href.slice(18):s?r.href.slice(r.protocol.length):r.href}return rt().buildAbsoluteURL(e,t)},ol=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,ll=e=>tl.log.debug?tl.log.debug.bind(tl,"VHS:",`${e} >`):function(){};function cl(...e){const t=tl.obj||tl;return(t.merge||t.mergeOptions).apply(t,e)}function dl(...e){const t=tl.time||tl;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const hl=1/30,ul=.1,pl=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s=t}))},gl=function(e,t){return pl(e,(function(e){return e-hl>=t}))},fl=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i "+e.end(i));return t.join(", ")},yl=e=>{const t=[];for(let i=0;ir||(i+=t>n&&t<=r?r-t:r-n)}return i},_l=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Tl=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),Sl=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},wl=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return s+=t&&t.length?t.length:0,s},El=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Sl(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Cl=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),ts&&([i,s]=[s,i]),i<0){for(let t=i;tDate.now()},Al=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Pl=function(e){const t=Ll(e);return!e.disabled&&!t},Ol=function(e,t){return t.attributes&&t.attributes[e]},Dl=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!Pl(e)&&(e.attributes.BANDWIDTH||0)!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri)),Nl=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const e in i){for(const n in i[e])if(s=t(i[e][n]),s)break;if(s)break}return!!s},Rl=e=>{if(!e||!e.playlists||!e.playlists.length)return Nl(e,(e=>e.playlists&&e.playlists.length||e.uri));for(let t=0;tSt(e))))&&!Nl(e,(e=>Ml(i,e))))return!1}return!0};var Ul={liveEdgeDelay:El,duration:xl,seekable:function(e,t,i){const s=t||0;let n=Il(e,t,!0,i);return null===n?dl():(n0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+hl<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-kl({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t0)continue}else if(a-hl>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n+kl({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:Pl,isDisabled:function(e){return e.disabled},isExcluded:Ll,isIncompatible:Al,playlistEnd:Il,isAes:function(e){for(let t=0;t`${e}-${t}`,Fl=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,jl=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}}))},ql=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},zl=(e,t,i=Fl)=>{e.uri=t;for(let t=0;t{if(!t.playlists||!t.playlists.length){if(s&&"AUDIO"===n&&!t.uri)for(let t=0;t{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ql({playlist:i,id:Bl(t,i.uri)}),i.resolvedUri=al(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||$l.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{jl(e,(t=>{t.uri&&(t.resolvedUri=al(e.uri,t.uri))}))})(e)};class Hl{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime(){if(!e)return t;const i=cl(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s{!e.resolvedUri&&e.uri&&(e.resolvedUri=al(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=al(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=al(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=al(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=al(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=al(t,e.uri))}))},Xl=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;ee===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Kl=(e,t,i=Yl)=>{const s=cl(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=Xl(t);const r=cl(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let e=0;e{Gl(e,r.resolvedUri)}));for(let e=0;e{if(e.playlists)for(let i=0;i{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)};class Zl extends Vl{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=ll("PlaylistLoader");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new Hl,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=al(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=wl(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new(Ge().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new ft;e&&a.on("warn",e),t&&a.on("info",t),s.forEach((e=>a.addParser(e))),n.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e(`manifest has no targetDuration defaulting to ${t}`),o.targetDuration=t}const l=Sl(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e(`manifest has no partTargetDuration defaulting to ${t}`),$l.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state="HAVE_METADATA";const n=t||this.parseManifest_({url:i,manifestString:e});n.lastRequest=Date.now(),ql({playlist:n,uri:i,id:s});const r=Kl(this.main,n);this.targetDuration=n.partTargetDuration||n.targetDuration,this.pendingMedia_=null,r?(this.main=r,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ql(this.media(),!!r)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),Ge().clearTimeout(this.mediaUpdateTimeout),Ge().clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Hl,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(Ge().clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=Ge().setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Ql(e,!0)),s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},((t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=ol(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}}pause(){this.mediaUpdateTimeout&&(Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Ge().setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=Ge().setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}start(){if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=Ge().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},((e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.src=ol(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)}))}srcUri(){return"string"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,zl(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=Xl(e),e.segments.forEach((t=>{Gl(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||Ge().location.href;this.main=((e,t)=>{const i=Bl(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:Ge().location.href,resolvedUri:Ge().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}}const{xhr:Jl}=tl,ec=function(e,t,i,s){const n="arraybuffer"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(n||e.responseText)))),s(t,e)},tc=function(){const e=function e(t,i){t=cl({timeout:45e3},t);const s=e.beforeRequest||tl.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||tl.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||tl.Vhs.xhr._responseCallbackSet;s&&"function"==typeof s&&(tl.log.warn("beforeRequest is deprecated, use onRequest instead."),n.add(s));const a=!0===tl.Vhs.xhr.original?Jl:tl.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(n,t);n.delete(s);const l=a(o||t,(function(e,t){return((e,t,i,s)=>{e&&e.size&&e.forEach((e=>{e(t,i,s)}))})(r,l,e,t),ec(l,e,t,i)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestTime=Date.now(),l};return e.original=!0,e},ic=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?Ge().BigInt(e.offset)+Ge().BigInt(e.length)-Ge().BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t}(e.byterange)),t},sc=function(e,t){return e.start(t)+"-"+e.end(t)},nc=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},rc=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},ac=function(e){const t={};return Object.keys(e).forEach((i=>{const s=e[i];At(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t},oc=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},lc=function(e){return e.resolvedUri},cc=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r="";for(let e=0;ecc(e),textRanges:e=>{let t,i="";for(t=0;t{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(void 0===e||!t||!s)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!r.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(inew Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:Ul.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,c=((e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(e){}const n=i.getTime();return(s.getTime()-n)/1e3})(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(s(o.estimatedStart+c),void r.one("seeked",(()=>{hc({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})})));const d=l.start+c;r.one("seeked",(()=>a(null,r.currentTime()))),n&&r.pause(),s(d)},uc=(e,t)=>{if(4===e.readyState)return t()},{EventTarget:pc}=tl,mc=function(e,t){if(!Yl(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i`placeholder-uri-${e}-${t}-${s.attributes.NAME||i}`,fc=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,yc=(e,t)=>{const i={};for(const s in e){const n=e[s].sidx;if(n){const e=ei(n);if(!t[e])break;const s=t[e].sidxInfo;fc(s,n)&&(i[e]=t[e])}}return i};class vc extends pc{constructor(e,t,i={},s){super(),this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.media().attributes.serviceLocation||this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=ll("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&ei(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return void(this.mediaRequest_=Ge().setTimeout((()=>i(!1)),0));const n=ol(e.sidx.resolvedUri),r=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_;let o;try{o=Pi()(Pt(r.response).subarray(8))}catch(e){return void this.requestErrored_(e,r,t)}return a[s]={sidxInfo:e.sidx,sidx:o},Yt(e,o,e.sidx.resolvedUri),i(!0)};this.request=((e,t,i)=>{let s,n=[],r=!1;const a=function(e,t,s,n){return t.abort(),r=!0,i(e,t,s,n)},o=function(e,t){if(r)return;if(e)return a(e,t,"",n);const i=t.responseText.substring(n&&n.byteLength||0,t.responseText.length);if(n=function(){for(var e=arguments.length,t=new Array(e),i=0;ia(e,t,"",n)));const o=Zi(n);return"ts"===o&&n.length<188||!o&&n.length<376?uc(t,(()=>a(e,t,"",n))):a(null,t,o,n)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return ec(e,null,{statusCode:e.status},o)}))}},c=t(l,(function(e,t){return ec(c,e,t,o)}));return c})(n,this.vhs_.xhr,((t,i,s,a)=>{if(t)return r(t,i);if(!s||"mp4"!==s)return r({status:i.status,message:`Unsupported ${s||"unknown"} container type for sidx segment at URL: ${n}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i);const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:"arraybuffer",headers:ic({byterange:e.sidx.byterange})},r)}))}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},Ge().clearTimeout(this.minimumUpdatePeriodTimeout_),Ge().clearTimeout(this.mediaRequest_),Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Ge().clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){Ge().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Ge().setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])})):this.mediaRequest_=Ge().setTimeout((()=>this.haveMain_()),0)}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},((t,i)=>{if(this.requestErrored_(t,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));const s=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=ol(this.mainPlaylistLoader_.srcUrl,i),s?(this.handleMain_(),void this.syncClientServerClock_((()=>e(i,s)))):e(i,s)}))}syncClientServerClock_(e){const t=(i=this.mainPlaylistLoader_.mainXml_,(e=>{const t=yi(e,"UTCTiming")[0];if(!t)return null;const i=Ti(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return i})(Ii(i)));var i;return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:al(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},((i,s)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let n;n="HEAD"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=((e,t={})=>{const i=((e,t={})=>{const{manifestUri:i="",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=yi(e,"Period");if(!a.length)throw new Error("INVALID_NUMBER_OF_PERIOD");const o=yi(e,"Location"),l=Ti(e),c=wi([{baseUrl:i}],yi(e,"BaseURL")),d=yi(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(vi));const h=[];return a.forEach(((e,t)=>{const i=Ti(e),s=h[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0)({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),h.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:ki(d,r),representationInfo:qt(h.map(xi(l,c))),eventStream:qt(h.map(Ci))}})(Ii(e),t),s=i.representationInfo.map(fi);return ci({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})})(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return zl(r,t,gc),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=((e,t,i)=>{let s=!0,n=cl(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Kl(n,e.playlists[0],mc);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}})),((e,t)=>{jl(e,((i,s,n,r)=>{r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]}))})(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n})(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(t),Boolean(t)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Ge().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Ge().setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=yc(e.playlists,t);return jl(e,((e,s,n,r)=>{if(e.playlists&&e.playlists.length){const s=e.playlists;i=cl(i,yc(s,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=Ge().setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),Ql(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}}var bc={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const _c=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Tc=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=_c(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Sc=function(e){return`var browserWorkerPolyFill = ${_c.toString()};\nbrowserWorkerPolyFill(self);\n`+e},wc=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Ec=Sc(wc((function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t])if(2===arguments.length)for(n=i.length,s=0;s>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},y=function(e){return s(E.hdlr,A[e])},f=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),s(E.mdhd,t)},g=function(e){return s(E.mdia,f(e),y(e.type),l(e))},o=function(e){return s(E.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){return s(E.minf,"video"===e.type?s(E.vmhd,P):s(E.smhd,O),n(),b(e))},c=function(e,t){for(var i=[],n=t.length;n--;)i[n]=T(t[n]);return s.apply(null,[E.moof,o(e)].concat(i))},d=function(e){for(var t=e.length,i=[];t--;)i[t]=p(e[t]);return s.apply(null,[E.moov,u(4294967295)].concat(i).concat(h(e)))},h=function(e){for(var t=e.length,i=[];t--;)i[t]=S(e[t]);return s.apply(null,[E.mvex].concat(i))},u=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return s(E.mvhd,t)},v=function(e){var t,i,n=e.samples||[],r=new Uint8Array(4+n.length);for(i=0;i>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(i=[E.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s(E.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),s(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];i.push(s(E.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return s.apply(null,i)},B=function(e){return s(E.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return s(E.tkhd,t)},T=function(e){var t,i,n,r,a,o;return t=s(E.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),i=s(E.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(n=w(e,92),s(E.traf,t,i,n)):(r=v(e),n=w(e,r.length+92),s(E.traf,t,i,n,r))},p=function(e){return e.duration=e.duration||4294967295,s(E.trak,m(e),g(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),s(E.trex,t)},q=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},j=function(e,t){var i,n,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=q(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),i=r.length,l=0;l>>24,n[i++]=(16711680&o.duration)>>>16,n[i++]=(65280&o.duration)>>>8,n[i++]=255&o.duration,n[i++]=(4278190080&o.size)>>>24,n[i++]=(16711680&o.size)>>>16,n[i++]=(65280&o.size)>>>8,n[i++]=255&o.size,n[i++]=o.flags.isLeading<<2|o.flags.dependsOn,n[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[i++]=61440&o.flags.degradationPriority,n[i++]=15&o.flags.degradationPriority,n[i++]=(4278190080&o.compositionTimeOffset)>>>24,n[i++]=(16711680&o.compositionTimeOffset)>>>16,n[i++]=(65280&o.compositionTimeOffset)>>>8,n[i++]=255&o.compositionTimeOffset;return s(E.trun,n)},F=function(e,t){var i,n,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=q(a,t),(i=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,l=0;l>>24,i[n++]=(16711680&o.duration)>>>16,i[n++]=(65280&o.duration)>>>8,i[n++]=255&o.duration,i[n++]=(4278190080&o.size)>>>24,i[n++]=(16711680&o.size)>>>16,i[n++]=(65280&o.size)>>>8,i[n++]=255&o.size;return s(E.trun,i)},w=function(e,t){return"audio"===e.type?F(e,t):j(e,t)};var G,X,Y,K,Q,Z,J,ee,te={ftyp:a=function(){return s(E.ftyp,C,x,C,k)},mdat:function(e){return s(E.mdat,e)},moof:c,moov:d,initSegment:function(e){var t,i=a(),s=d(e);return(t=new Uint8Array(i.byteLength+s.byteLength)).set(i),t.set(s,i.byteLength),t}},ie=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},se={groupNalsIntoFrames:function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;ice.ONE_SECOND_IN_TS/2))){for((a=function(){if(!G){var e={96e3:[ne,[227,64],ae(154),[56]],88200:[ne,[231],ae(170),[56]],64e3:[ne,[248,192],ae(240),[56]],48e3:[ne,[255,192],ae(268),[55,148,128],ae(54),[112]],44100:[ne,[255,192],ae(268),[55,163,128],ae(84),[112]],32e3:[ne,[255,192],ae(268),[55,234],ae(226),[112]],24e3:[ne,[255,192],ae(268),[55,255,128],ae(268),[111,112],ae(126),[224]],16e3:[ne,[255,192],ae(268),[55,255,128],ae(268),[111,255],ae(269),[223,108],ae(195),[1,192]],12e3:[re,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,253,128],ae(259),[56]],11025:[re,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,255,192],ae(268),[55,175,128],ae(108),[112]],8e3:[re,ae(268),[3,121,16],ae(47),[7]]};t=e,G=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return G}()[e.samplerate])||(a=t[0].data),o=0;o=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,s=[];for(t=0;t=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},be.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},be.prototype.addText=function(e){this.rows[this.rowIdx]+=e},be.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var _e=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new be(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};_e.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new be(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},_e.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},_e.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach((e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)})),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new me,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n>5)&&s>0&&(i=r=t[n++]),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Te.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n("0"+(255&e).toString(16)).slice(-2))).join("");s=String.fromCharCode(parseInt(e,16))}else a=ye[r=d|h]||r,s=4096&r&&r===a?"":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(s),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return ve(s)&&ve(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)i&1<>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},we=function(e){return null===e?"":(e=Se[e]||e,String.fromCharCode(e))},Ee=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ce=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},xe=function(e,t){xe.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ce();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ce();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ce()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=we((s=(3&s)<<8)|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&n)&&this.addFormatting(e.pts,["i"]),1==(1&n)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=Ee.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&14==(14&n)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(s)&&(0===n&&(n=null),r=we(s),r+=we(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};xe.prototype=new me,xe.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach(((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(s)})),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},xe.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ce(),this.nonDisplayed_=Ce(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},xe.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},xe.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},xe.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},xe.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},xe.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},xe.prototype.isPAC=function(e,t){return e>=this.BASE_&&e=64&&t<=127},xe.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},xe.prototype.isNormalChar=function(e){return e>=32&&e<=127},xe.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ce(),this.displayed_=Ce()),void 0!==t&&t!==this.row_)for(var i=0;i"}),"");this[this.mode_](e,i)},xe.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+""}),"");this.formatting_=[],this[this.mode_](e,t)}},xe.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},xe.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},xe.prototype.shiftRowsUp_=function(){var e;for(e=0;et&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Oe=function(e){var t,i;Oe.prototype.init.call(this),this.type_=e||Ae,this.push=function(e){this.type_!==Ae&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Pe(e.dts,i),e.pts=Pe(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Oe.prototype=new Le;var De,Me={TimestampRolloverStream:Oe,handleRollover:Pe},Ne=(e,t,i)=>{if(!e)return-1;for(var s=i;s>>2;d*=4,d+=3&c[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i>>4>1&&(s+=t[s]+1),0===i.pid)i.type="pat",e(t.subarray(s),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(s),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Qe.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Qe.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new Ye,We.STREAM_TYPES={h264:27,adts:15},Ge=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,i,s){var n,r,a=new Uint8Array(e.size),o={type:i},l=0,c=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),n="video"===i||o.packetLength<=e.size,(s||n)&&(e.size=0,e.data.length=0),n&&t.trigger("data",o)}};Ge.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Qe.H264_STREAM_TYPE:e=s,t="video";break;case Qe.ADTS_STREAM_TYPE:e=n,t="audio";break;case Qe.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var s={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",s)}})[o.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(s,"video"),a(n,"audio"),a(r,"timed-metadata")},this.flush=function(){if(!i&&e){var s={type:"metadata",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",s)}i=!1,this.flushStreams_(),this.trigger("done")}},Ge.prototype=new Ye;var et={PAT_PID:0,MP2T_PACKET_LENGTH:Je,TransportPacketStream:Ve,TransportParseStream:We,ElementaryStream:Ge,TimestampRolloverStream:Ze,CaptionStream:Ke.CaptionStream,Cea608Stream:Ke.Cea608Stream,Cea708Stream:Ke.Cea708Stream,MetadataStream:Xe};for(var tt in Qe)Qe.hasOwnProperty(tt)&&(et[tt]=Qe[tt]);var it,st=et,nt=z,rt=le.ONE_SECOND_IN_TS,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];it=function(e){var t,i=0;it.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,c=0;if(e||(i=0),"audio"===s.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;c+7>5,l=(o=1024*(1+(3&t[c+6])))*rt/at[(60&t[c+2])>>>2],t.byteLength-c>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:at[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+r,c+n)}),i++,c+=n}else"number"!=typeof d&&(d=c),c++;"number"==typeof d&&(this.skipWarn_(d,c),d=null),t=t.subarray(c)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},it.prototype=new nt;var ot,lt,ct,dt=it,ht=z,ut=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return(s-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?r<>>e))return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};lt=function(){var e,t,i=0;lt.prototype.init.call(this),this.push=function(s){var n;t?((n=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},lt.prototype=new ht,ct={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ot=function(){var e,t,i,s,n,r,a,o=new lt;ot.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s=8,n=8;for(i=0;i=0?i:0,(16&e[t+5])>>4?i+20:i+10},yt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=ft(e,t),yt(e,t))},vt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},bt={isLikelyAacData:function(e){var t=yt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:ft,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,i,s;t=10,64&e[5]&&(t+=4,t+=vt(e.subarray(10,14)));do{if((i=vt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){s=e.subarray(t+10,t+i+10);for(var n=0;n>>2;return(o*=4)+(3&a[7])}break}}t+=10,t+=i}while(t=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=_t.parseAdtsSize(e,l))>e.length)break;r={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",r),l+=o}else{if(e.length-l<10)break;if(l+(o=_t.parseId3TagSize(e,l))>e.length)break;n={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new z;var Tt,St,wt,Et,Ct=z,xt=te,kt=se,It=de,Lt=ue,At=st,Pt=le,Ot=dt,Dt=mt.H264Stream,Mt=pt,Nt=bt.isLikelyAacData,Rt=le.ONE_SECOND_IN_TS,Ut=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],$t=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Bt=function(e,t){t.stream=e,this.trigger("log",t)},Ft=function(e,t){for(var i=Object.keys(t),s=0;s=-1e4&&i<=45e3&&(!s||o>i)&&(s=r,o=i));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,c;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;ts.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration);return 0===i?e:i===e.length?null:((c=e.slice(i)).byteLength=r,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var c=e.slice(l),d=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=d.byteLength,c.duration=d.duration,c.nalCount=d.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},Tt.prototype=new Ct,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Et.prototype=new Ct,Et.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,$t.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ut.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,s=xt.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},wt=function(e){var t,i,s=this,n=!0;wt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="aac",n.metadataStream=new At.MetadataStream,n.aacStream=new Mt,n.audioTimestampRolloverStream=new At.TimestampRolloverStream("audio"),n.timedMetadataTimestampRolloverStream=new At.TimestampRolloverStream("timed-metadata"),n.adtsStream=new Ot,n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on("timestamp",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new St(i,e),n.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),Ft(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="ts",n.metadataStream=new At.MetadataStream,n.packetStream=new At.TransportPacketStream,n.parseStream=new At.TransportParseStream,n.elementaryStream=new At.ElementaryStream,n.timestampRolloverStream=new At.TimestampRolloverStream,n.adtsStream=new Ot,n.h264Stream=new Dt,n.captionStream=new At.CaptionStream(e),n.coalesceStream=new Et(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on("data",(function(r){var a;if("metadata"===r.type){for(a=r.tracks.length;a--;)t||"video"!==r.tracks[a].type?i||"audio"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new Tt(t,e),n.videoSegmentStream.on("log",s.getLogTrigger_("videoSegmentStream")),n.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),n.videoSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"videoSegmentTimingInfo")),n.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on("timingInfo",s.trigger.bind(s,"videoTimingInfo")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new St(i,e),n.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),n.audioSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"audioSegmentTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("id3Frame",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger("id3Frame",e)})),n.coalesceStream.on("caption",this.trigger.bind(this,"caption")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),Ft(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Lt.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Lt.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(n){var t=Nt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},wt.prototype=new Ct;var zt,Ht,Vt,Wt,Gt={Transmuxer:wt,VideoSegmentStream:Tt,AudioSegmentStream:St,AUDIO_PROPERTIES:Ut,VIDEO_PROPERTIES:$t,generateSegmentTimingInfo:qt},Xt=function(e){return e>>>0},Yt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Kt=Xt,Qt=Yt,Zt=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=Zt(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},Jt=Xt,ei=V.getUint64,ti=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ei(e.subarray(4)):t.baseMediaDecodeTime=Jt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},ii=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},si=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],d=s.getUint32(4),h=8;for(n&&(i.dataOffset=s.getInt32(h),h+=4),r&&d&&(t={flags:ii(e.subarray(h,h+4))},h+=4,a&&(t.duration=s.getUint32(h),h+=4),o&&(t.size=s.getUint32(h),h+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(h):t.compositionTimeOffset=s.getUint32(h),h+=4),i.samples.push(t),d--);d--;)t={},a&&(t.duration=s.getUint32(h),h+=4),o&&(t.size=s.getUint32(h),h+=4),l&&(t.flags=ii(e.subarray(h,h+4)),h+=4),c&&(1===i.version?t.compositionTimeOffset=s.getInt32(h):t.compositionTimeOffset=s.getUint32(h),h+=4),i.samples.push(t);return i},ni=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],c=65536&s.flags[0],d=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),c&&(s.durationIsEmpty=!0),!n&&d&&(s.baseDataOffsetIsMoof=!0),s},ri=(zt="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},pe.discardEmulationPreventionBytes),ai=ke.CaptionStream,oi=Zt,li=ti,ci=si,di=ni,hi=zt,ui=function(e,t){for(var i=e,s=0;s0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var s=function(e,t){var i=oi(e,["moof","traf"]),s=oi(e,["mdat"]),n={},r=[];return s.forEach((function(e,t){var s=i[t];r.push({mdat:e,traf:s})})),r.forEach((function(e){var i,s,r=e.mdat,a=e.traf,o=oi(a,["tfhd"]),l=di(o[0]),c=l.trackId,d=oi(a,["tfdt"]),h=d.length>0?li(d[0]).baseMediaDecodeTime:0,u=oi(a,["trun"]);t===c&&u.length>0&&(i=function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ci(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof s?(e.pts=s+hi.BigInt(e.compositionTimeOffset),s+=hi.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(t)})),o}(u,h,l),s=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+41)&&s||n}(c,h)?h:void 0},scaleTime:function(e,t,i,s){return e||0===e?e/t:s+i/t}},vi=Xt,bi=function(e){return("00"+e.toString(16)).slice(-2)},_i=Zt,Ti=Yt,Si=yi,wi=V.getUint64,Ei=zt,Ci=je.parseId3Frames;Ht=function(e,t){var i=_i(t,["moof","traf"]).reduce((function(t,i){var s,n=_i(i,["tfhd"])[0],r=vi(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=_i(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let c;return"bigint"==typeof(s=1===o[0]?wi(o.subarray(4,12)):l.getUint32(4))?c=s/Ei.BigInt(a):"number"!=typeof s||isNaN(s)||(c=s/a),c11?(n.codec+=".",n.codec+=bi(d[9]),n.codec+=bi(d[10]),n.codec+=bi(d[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)?(d=h.subarray(28),"esds"===Ti(d.subarray(4,8))&&d.length>20&&0!==d[19]?(n.codec+="."+bi(d[19]),n.codec+="."+bi(d[20]>>>2&63).replace(/^0/,"")):n.codec="mp4a.40.2"):n.codec=n.codec.toLowerCase())}var u=_i(e,["mdia","mdhd"])[0];u&&(n.timescale=Wt(u)),i.push(n)})),i};var xi=Ht,ki=Vt,Ii=function(e,t=0){return _i(e,["emsg"]).map((e=>{var i=Si.parseEmsgBox(new Uint8Array(e)),s=Ci(i.message_data);return{cueTime:Si.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Si.scaleTime(i.event_duration,i.timescale),frames:s}}))},Li=Ie,Ai=function(e){var t=31&e[1];return(t<<=8)|e[2]},Pi=function(e){return!!(64&e[1])},Oi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Di=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Mi={parseType:function(e,t){var i=Ai(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=Pi(e),i=4+Oi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Pi(e),s=4+Oi(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n;n=3+((15&e[s+1])<<8|e[s+2])-4;for(var r=12+((15&e[s+10])<<8|e[s+11]);r=e.byteLength)return null;var i,s=null;return 192&(i=e[t+7])&&((s={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,s.pts*=4,s.pts+=(6&e[t+13])>>>1,s.dts=s.pts,64&i&&(s.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,s.dts*=4,s.dts+=(6&e[t+18])>>>1)),s},videoPacketContainsKeyFrame:function(e){for(var t=4+Oi(e),i=e.subarray(t),s=0,n=0,r=!1;n3&&"slice_layer_without_partitioning_rbsp_idr"===Di(31&i[n+3])&&(r=!0),r}},Ni=Ie,Ri=Me.handleRollover,Ui={};Ui.ts=Mi,Ui.aac=bt;var $i=le.ONE_SECOND_IN_TS,Bi=188,Fi=71,ji=function(e,t,i){for(var s,n,r,a,o=0,l=Bi,c=!1;l<=e.byteLength;)if(e[o]!==Fi||e[l]!==Fi&&l!==e.byteLength)o++,l++;else{if(s=e.subarray(o,l),"pes"===Ui.ts.parseType(s,t.pid)&&(n=Ui.ts.parsePesType(s,t.table),r=Ui.ts.parsePayloadUnitStartIndicator(s),"audio"===n&&r&&(a=Ui.ts.parsePesTime(s))&&(a.type="audio",i.audio.push(a),c=!0)),c)break;o+=Bi,l+=Bi}for(o=(l=e.byteLength)-Bi,c=!1;o>=0;)if(e[o]!==Fi||e[l]!==Fi&&l!==e.byteLength)o--,l--;else{if(s=e.subarray(o,l),"pes"===Ui.ts.parseType(s,t.pid)&&(n=Ui.ts.parsePesType(s,t.table),r=Ui.ts.parsePayloadUnitStartIndicator(s),"audio"===n&&r&&(a=Ui.ts.parsePesTime(s))&&(a.type="audio",i.audio.push(a),c=!0)),c)break;o-=Bi,l-=Bi}},qi=function(e,t,i){for(var s,n,r,a,o,l,c,d=0,h=Bi,u=!1,p={data:[],size:0};h=0;)if(e[d]!==Fi||e[h]!==Fi)d--,h--;else{if(s=e.subarray(d,h),"pes"===Ui.ts.parseType(s,t.pid)&&(n=Ui.ts.parsePesType(s,t.table),r=Ui.ts.parsePayloadUnitStartIndicator(s),"video"===n&&r&&(a=Ui.ts.parsePesTime(s))&&(a.type="video",i.video.push(a),u=!0)),u)break;d-=Bi,h-=Bi}},zi=function(e,t){var i;return i=Ui.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,s=0,n=null,r=null,a=0,o=0;e.length-o>=3;){switch(Ui.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=Ui.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=Ui.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=Ui.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=Ui.aac.parseSampleRate(t)),s++,o+=a;break;default:o++}if(i)return null}if(null===n||null===r)return null;var l=$i/n;return{audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+1024*s*l,pts:r+1024*s*l}]}}(e):function(e){var t={pid:null,table:null},i={};for(var s in function(e,t){for(var i,s=0,n=Bi;n{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:h,onId3:u,onCaptions:p,onDone:m,onEndedTimeline:g,onTransmuxerLog:f,isEndOfTimeline:y}=e,v={buffer:[]};let b=y;if(t.onmessage=i=>{t.currentTransmux===e&&("data"===i.data.action&&((e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:c}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const d=e.data.segment.boxes||{data:e.data.segment.data},h={type:s,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),i(h)})(i,v,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,v),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&c(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&d(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&h(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&u([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,g()),"log"===i.data.action&&f(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:v,callback:m}),kc(t))))},s&&t.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(n)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),void 0!==r&&t.postMessage({action:"setRemux",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},kc=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():xc(e.currentTransmux))},Ic=(e,t)=>{e.postMessage({action:t}),kc(e)};var Lc=e=>{((e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Ic(t,e);t.transmuxQueue.push(Ic.bind(null,t,e))})("reset",e)};const Ac=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=at({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener("message",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener("message",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},Pc=-101,Oc=-102,Dc=e=>{e.forEach((e=>{e.abort()}))},Mc=(e,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Pc,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Oc,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t}:null,Nc=(e,t,i)=>(s,n)=>{const r=n.response,a=Mc(s,n);if(a)return i(a,e);if(16!==r.byteLength)return i({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:2,xhr:n},e);const o=new DataView(r),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let e=0;e{const i=Zi(e.map.bytes);if("mp4"!==i){const s=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:`Found unsupported ${i||"unknown"} container for initialization segment at URL: ${s}`,code:2})}Ac({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null))})},Uc=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})=>{const p=e.map&&e.map.tracks||{},m=Boolean(p.audio&&p.video);let g=s.bind(null,e,"audio","start");const f=s.bind(null,e,"audio","end");let y=s.bind(null,e,"video","start");const v=s.bind(null,e,"video","end");Ac({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const p=s.result;p&&(i(e,{hasAudio:p.hasAudio,hasVideo:p.hasVideo,isMuxed:m}),i=null),(e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void xc(e);e.transmuxer.transmuxQueue.push(e)})({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:m,onData:t=>{t.type="combined"===t.type?"video":t.type,d(e,t)},onTrackInfo:t=>{i&&(m&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{g&&void 0!==e.start&&(g(e.start),g=null),f&&void 0!==e.end&&f(e.end)},onVideoTimingInfo:e=>{y&&void 0!==e.start&&(y(e.start),y=null),v&&void 0!==e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{n(e)},onAudioSegmentTimingInfo:e=>{r(e)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:u,onDone:t=>{h&&(t.type="combined"===t.type?"video":t.type,h(null,e,t))}})}})},$c=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})=>{let p=new Uint8Array(t);if(function(e){return Ri(e,["moof"]).length>0}(p)){e.isFmp4=!0;const{tracks:n}=e.map,r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&"enca"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&"encv"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{d(e,{data:p,type:r.hasAudio&&!r.isMuxed?"audio":"video"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),h(null,e,{})};Ac({action:"probeMp4StartTime",timescales:e.map.timescales,data:p,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=p=i,r.hasAudio&&!r.isMuxed&&s(e,"audio","start",a),r.hasVideo&&s(e,"video","start",a),Ac({action:"probeEmsgID3",data:p,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=p=i,n.video&&i.byteLength&&e.transmuxer?Ac({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:p,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=p=i.data,i.logs.forEach((function(e){u(cl(e,{stream:"mp4CaptionParser"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Zi(p)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void h(null,e,{});Uc({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})}else h(null,e,{})},Bc=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s},n){const r=t=>{if(t.data.source===e){s.removeEventListener("message",r);const e=t.data.decrypted;n(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let a;s.addEventListener("message",r),a=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(ac({source:e,encrypted:i,key:a,iv:t.iv}),[i.buffer,a.buffer])},Fc=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f})=>{const y=[],v=(({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})=>{let p=0,m=!1;return(g,f)=>{if(!m){if(g)return m=!0,Dc(e),h(g,f);if(p+=1,p===e.length){const p=function(){if(f.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})=>{Bc({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e},(e=>{t.bytes=e,$c({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})}))})({decryptionWorker:t,segment:f,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u});$c({segment:f,bytes:f.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:u})};if(f.endOfAllRequests=Date.now(),f.map&&f.map.encryptedBytes&&!f.map.bytes)return Bc({decryptionWorker:t,id:f.requestId+"-init",encryptedBytes:f.map.encryptedBytes,key:f.map.key},(t=>{f.map.bytes=t,Rc(f,(t=>{if(t)return Dc(e),h(t,f);p()}))}));p()}}}})({activeXhrs:y,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:f});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=e(cl(t,{uri:s.key.resolvedUri,responseType:"arraybuffer"}),Nc(s,i,v));y.push(n)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const i=e(cl(t,{uri:s.map.key.resolvedUri,responseType:"arraybuffer"}),Nc(s,[s.map.key],v));y.push(i)}const i=cl(t,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:ic(s.map)}),n=(({segment:e,finishProcessingFn:t})=>(i,s)=>{const n=Mc(i,s);if(n)return t(n,e);const r=new Uint8Array(s.response);if(e.map.key)return e.map.encryptedBytes=r,t(null,e);e.map.bytes=r,Rc(e,(function(i){if(i)return i.xhr=s,i.status=s.status,t(i,e);t(null,e)}))})({segment:s,finishProcessingFn:v}),r=e(i,n);y.push(r)}const b=cl(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:ic(s)}),_=e(b,(({segment:e,finishProcessingFn:t,responseType:i})=>(s,n)=>{const r=Mc(s,n);if(r)return t(r,e);const a="arraybuffer"!==i&&n.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(n),e.key?e.encryptedBytes=new Uint8Array(a):e.bytes=new Uint8Array(a),t(null,e)})({segment:s,finishProcessingFn:v,responseType:b.responseType}));_.addEventListener("progress",(({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>i=>{if(!i.target.aborted)return e.stats=cl(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)})({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:u,endedTimelineFn:p,dataFn:m})),y.push(_);const T={};return y.forEach((e=>{e.addEventListener("loadend",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:T,abortFn:n}))})),()=>Dc(y)},jc=ll("CodecUtils"),qc=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},zc=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(_t(`${i}${s}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return jc(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},Hc=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},Vc=function(e,t){const i=t.attributes||{},s=zc(function(e){const t=e.attributes||{};if(t.CODECS)return Tt(t.CODECS)}(t)||[]);if(qc(e,t)&&!s.audio&&!((e,t)=>{if(!qc(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const e in s)if(!s[e].uri&&!s[e].playlists)return!0;return!1})(e,t)){const t=zc(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var s in i){var n=i[s];if(n.default&&n.playlists)return Tt(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},Wc=ll("PlaylistSelector"),Gc=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Xc=function(e,t){if(!e)return"";const i=Ge().getComputedStyle(e);return i?i[t]:""},Yc=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Kc=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Ge().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||Ge().Number.MAX_VALUE,i-s};let Qc=function(e,t,i,s,n,r){if(!e)return;const a={bandwidth:t,width:i,height:s,limitRenditionByPlayerDimensions:n};let o=e.playlists;Ul.isAudioOnly(e)&&(o=r.getAudioTrackPlaylists_(),a.audioOnly=!0);let l=o.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||Ge().Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}}));Yc(l,((e,t)=>e.bandwidth-t.bandwidth)),l=l.filter((e=>!Ul.isIncompatible(e.playlist)));let c=l.filter((e=>Ul.isEnabled(e.playlist)));c.length||(c=l.filter((e=>!Ul.isDisabled(e.playlist))));const d=c.filter((e=>e.bandwidth*bc.BANDWIDTH_VARIANCEe.bandwidth===h.bandwidth))[0];if(!1===n){const e=u||c[0]||l[0];if(e&&e.playlist){let t="sortedPlaylistReps";return u&&(t="bandwidthBestRep"),c[0]&&(t="enabledPlaylistReps"),Wc(`choosing ${Gc(e)} using ${t} with options`,a),e.playlist}return Wc("could not choose a playlist with options",a),null}const p=d.filter((e=>e.width&&e.height));Yc(p,((e,t)=>e.width-t.width));const m=p.filter((e=>e.width===i&&e.height===s));h=m[m.length-1];const g=m.filter((e=>e.bandwidth===h.bandwidth))[0];let f,y,v,b;if(g||(f=p.filter((e=>e.width>i||e.height>s)),y=f.filter((e=>e.width===f[0].width&&e.height===f[0].height)),h=y[y.length-1],v=y.filter((e=>e.bandwidth===h.bandwidth))[0]),r.leastPixelDiffSelector){const e=p.map((e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-s),e)));Yc(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),b=e[0]}const _=b||v||g||u||c[0]||l[0];if(_&&_.playlist){let e="sortedPlaylistReps";return b?e="leastPixelDiffRep":v?e="resolutionPlusOneRep":g?e="resolutionBestRep":u?e="bandwidthBestRep":c[0]&&(e="enabledPlaylistReps"),Wc(`choosing ${Gc(_)} using ${e} with options`,a),_.playlist}return Wc("could not choose a playlist with options",a),null};const Zc=function(){const e=this.useDevicePixelRatio&&Ge().devicePixelRatio||1;return Qc(this.playlists.main,this.systemBandwidth,parseInt(Xc(this.tech_.el(),"width"),10)*e,parseInt(Xc(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)},Jc={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},ed=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),td=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,tl.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},id=function(e,t,i){let s,n;if(i&&i.cues)for(s=i.cues.length;s--;)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)},sd=e=>"number"==typeof e&&isFinite(e),nd=1/60,rd=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:c,timeline:d}=e,h=o.length-1;let u="mediaIndex/partIndex increment";e.getMediaInfoForTime?u=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(u="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(u+=` with independent ${e.independent}`);const p="number"==typeof c,m=e.segment.uri?"segment":"pre-segment",g=p?wl({preloadSegment:s})-1:0;return`${m} [${r+l}/${r+h}]`+(p?` part [${c}/${g}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${d}]`+` selected by [${u}]`+` playlist [${a}]`},ad=e=>`${e}TimingInfo`,od=(e,t)=>e.length?e.end(e.length-1):t,ld=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if("audio"===s){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===s&&n){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},cd=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+hl;class dd extends tl.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.calculateTimestampOffsetForEachSegment_=e.calculateTimestampOffsetForEachSegment,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.replaceSegmentsUntil_=-1,this.logger_=ll(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}))}createTransmuxer_(){return(e=>{const t=new Cc;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t})({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Ge().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Ge().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Lc(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return dl();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=oc(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=lc(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList||"number"!=typeof e.partTargetDuration?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(Ge().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetLoaderProperties(){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0}}resetEverything(e){this.resetLoaderProperties(),this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&Lc(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=(()=>{}),s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,s)=>{const n=Math.ceil((t-s)*Ji.ONE_SECOND_IN_TS),r=Math.ceil((i-s)*Ji.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=n););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)id(e,t,this.inbandTextTracks_[i]);id(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&Ge().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Ge().setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Ge().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Ge().setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s="number"==typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=vl(e)||0,i=bl(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;ri))return r}return 0===s.length?0:s[s.length-1]}(this.currentTimeline_,r,t);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{const{segmentIndex:e,startTime:i,partIndex:s}=Ul.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${t}`:`currentTime ${this.currentTime_()}`,a.mediaIndex=e,a.startOfSegment=i,a.partIndex=s}const o=r[a.mediaIndex];let l=o&&"number"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"==typeof a.partIndex&&!l)return null;"number"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!c&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&d&&!this.seeking_()?null:this.generateSegmentInfo_(a)}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,c=i.segments[s],d="number"==typeof a&&c.parts[a],h={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||c.resolvedUri,mediaIndex:s,partIndex:d?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:d&&d.duration||c.duration,segment:c,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},u=void 0!==o?o:this.isPendingTimestampOffset_;h.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),calculateTimestampOffsetForEachSegment:this.calculateTimestampOffsetForEachSegment_,overrideCheck:u});const p=vl(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(h.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(h.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const s=Math.ceil((t-i+3)*Ji.ONE_SECOND_IN_TS);let n;for(n=0;ns);n++);return e.slice(n)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),h}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,calculateTimestampOffsetForEachSegment:n,overrideCheck:r})=>n?od(s,i):r||e!==t?e!Ul.isIncompatible(e)));let d=c.filter(Ul.isEnabled);d.length||(d=c.filter((e=>!Ul.isDisabled(e))));const h=d.filter(Ul.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=l.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:Ul.estimateSegmentRequestTime(r,s,e)*t-a}})),u=h.filter((e=>e.rebufferingImpact<=0));return Yc(u,((e,t)=>Kc(t.playlist,e.playlist))),u.length?u[0]:(Yc(h,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),h[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r-a.rebufferingImpact;let l=.5;r<=hl&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(s).forEach((e=>{const{startTime:t,endTime:n,captions:r}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${n} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let s=i;/^cc708_/.test(i)&&(s="SERVICE"+i.split("_")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{let n=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[s];o&&(n=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:s,default:a,label:n,language:r},!1).track}}}(a,this.vhs_.tech_,e),id(t,n,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=Ge().WebKitDataCue||Ge().VTTCue;t.forEach((t=>{const n=t.stream;t.content?t.content.forEach((r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",e[n].addCue(a)})):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!(!e||this.getCurrentMediaInfo_()&&ld({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo||ld({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[ad(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=oc(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const n=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+yl(n).join(", ")),r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+yl(r).join(", "));const a=n.length?n.start(0):0,o=n.length?n.end(n.length-1):0,l=r.length?r.start(0):0,c=r.length?r.end(r.length-1):0;if(o-a<=1&&c-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${yl(n).join(", ")}, video buffer: ${yl(r).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=Ge().setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(22!==s.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error(`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=`${e}TimingInfo`;s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((()=>{const t=at({},e,{forceTimestampOffset:!0});at(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}))}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_(`Requesting ${rd(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Fc({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${rd(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)}})}trimBackBuffer_(e){const t=((e,t,i)=>{let s=t-bc.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},n=e.playlist.segments[e.mediaIndex-1];if(n&&n.timeline===t.timeline&&(n.videoTimingInfo?s.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(s.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=i}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(;n=s);n++);return e.slice(0,n).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r="main"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!=typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=((e,t)=>{if("hls"!==t)return null;const i=(e=>{let t=0;return["video","audio"].forEach((function(i){const s=e[`${i}TimingInfo`];if(!s)return;const{start:n,end:r}=s;let a;"bigint"==typeof n||"bigint"==typeof r?a=Ge().BigInt(r)-Ge().BigInt(n):"number"==typeof n&&"number"==typeof r&&(a=r-n),void 0!==a&&a>t&&(t=a)})),"bigint"==typeof t&&t=this.replaceSegmentsUntil_&&(this.replaceSegmentsUntil_=-1,this.fetchAtBuffer_=!0),this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?"segment":"part"} ${rd(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duratione.toUpperCase()))},pd=["video","audio"],md=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},gd=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if("mediaSource"!==s.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!md(e,t)){if(s.type!==e){if(i=((e,t)=>{for(let i=0;i{const i=t[`${e}Buffer`],s=ud(e);i&&(i.removeEventListener("updateend",t[`on${s}UpdateEnd_`]),i.removeEventListener("error",t[`on${s}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},yd=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),vd=(e,t,i)=>(s,n)=>{const r=n[`${s}Buffer`];if(yd(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(e){n.logger_(`Error with code ${e.code} `+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(e)}}},bd=(e,t)=>(i,s)=>{const n=s[`${i}Buffer`];if(yd(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(n){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},_d=e=>(t,i)=>{const s=i[`${t}Buffer`];yd(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},Td=e=>(t,i)=>{e()},Sd=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(e){tl.log.warn("Failed to call media source endOfStream",e)}}},wd=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){tl.log.warn("Failed to set media source duration",e)}},Ed=(e,t)=>i=>{const s=ud(e),n=wt(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener("updateend",i[`on${s}UpdateEnd_`]),r.addEventListener("error",i[`on${s}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},Cd=e=>t=>{const i=t[`${e}Buffer`];if(fd(e,t),yd(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){tl.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},xd=e=>(t,i)=>{const s=i[`${t}Buffer`],n=wt(e);yd(i.mediaSource,s)&&i.codecs[t]!==e&&(i.logger_(`changing ${t}Buffer codec from ${i.codecs[t]} to ${e}`),s.changeType(n),i.codecs[t]=e)},kd=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),gd(e,t)},Id=(e,t)=>i=>{const s=function(e){let t="";for(let i=0;i ${n})`}return t||"empty"}(t[`${e}Buffered`]());if(t.logger_(`${e} source buffer update end. Buffered: \n`,s),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}gd(e,t)};class Ld extends tl.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>gd("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=ll("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Id("video",this),this.onAudioUpdateEnd_=Id("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){kd({type:"mediaSource",sourceUpdater:this,action:Ed(e,t),name:"addSourceBuffer"})}abort(e){kd({type:e,sourceUpdater:this,action:(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(yd(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){tl.log.warn(`Failed to abort on ${e}Buffer`,t)}}},name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?kd({type:"mediaSource",sourceUpdater:this,action:Cd(e),name:"removeSourceBuffer"}):tl.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!tl.browser.IS_FIREFOX&&Ge().MediaSource&&Ge().MediaSource.prototype&&"function"==typeof Ge().MediaSource.prototype.removeSourceBuffer}static canChangeType(){return Ge().SourceBuffer&&Ge().SourceBuffer.prototype&&"function"==typeof Ge().SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?kd({type:e,sourceUpdater:this,action:xd(t),name:"changeType"}):tl.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,"audio"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);if(kd({type:s,sourceUpdater:this,action:vd(n,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return yd(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:dl()}videoBuffered(){return yd(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:dl()}buffered(){const e=yd(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=yd(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return dl();let o=e.length;for(;o--;)r.push({time:e.start(o),type:"start"}),r.push({time:e.end(o),type:"end"});for(o=t.length;o--;)r.push({time:t.start(o),type:"start"}),r.push({time:t.end(o),type:"end"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>fd(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Ad=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),Pd=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));class Od extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Dd extends dd{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return dl();const e=this.subtitlesTrack_.cues;return dl([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=oc(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=Pd.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(Pd,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){id(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Pc&&this.handleTimeout_(),e.code===Oc?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const n=s.segment;if(n.map&&(n.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!=typeof Ge().WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:"Error loading vtt.js"})));n.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,s.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new(Ge().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if("function"!=typeof Ge().WebVTT)throw new Od;"function"==typeof Ge().TextDecoder?t=new(Ge().TextDecoder)("utf8"):(t=Ge().WebVTT.StringDecoder(),i=!0);const s=new(Ge().WebVTT.Parser)(Ge(),Ge().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{tl.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=Ad(t)),s.parse(t)}let n=e.bytes;i&&(n=Ad(n)),s.parse(n),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const n=e.timestampmap,r=n.MPEGTS/Ji.ONE_SECOND_IN_TS-n.LOCAL+t.mapping;if(e.cues.forEach((e=>{e.startTime+=r,e.endTime+=r})),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}}const Md=function(e,t){const i=e.cues;for(let e=0;e=s.adStartTime&&t<=s.adEndTime)return s}return null},Nd=[{name:"VOD",run:(e,t,i,s,n)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"ProgramDateTime",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Tl(t);n=n||0;for(let i=0;i{let r=null,a=null;n=n||0;const o=Tl(t);for(let e=0;e=e)&&(a=e,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:"Discontinuity",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:"Playlist",run:(e,t,i,s,n)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class Rd extends tl.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.logger_=ll("SyncController")}getSyncPoint(e,t,i,s){const n=this.runStrategies_(e,t,i,s);return n.length?this.selectSyncPoint_(n,{key:"time",value:s}):null}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+kl({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s){const n=[];for(let r=0;r86400)tl.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||ro){let s;s=a<0?i.start-kl({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+kl({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Ud extends tl.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const $d=Sc(wc((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s>7))^r]=r;for(a=o=0;!s[a];a^=d||1,o=c[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,u=l[h=l[d=l[a]]],g=16843009*u^65537*h^257*d^16843008*a,m=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=m=m<<24^m>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const c=e.slice(0),d=[];for(this._key=[c,d],i=o;i<4*o+28;i++)n=c[i-1],(i%o==0||8===o&&i%o==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),c[i]=c[i-o]^n;for(s=0;i;s++,i--)n=c[3&s?i:i-4],d[s]=i<=4||s<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,c,d=e^a[0],h=s^a[1],u=i^a[2],p=t^a[3];const m=a.length/4-2;let g,f=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(g=0;g>>24]^b[h>>16&255]^_[u>>8&255]^T[255&p]^a[f],l=v[h>>>24]^b[u>>16&255]^_[p>>8&255]^T[255&d]^a[f+1],c=v[u>>>24]^b[p>>16&255]^_[d>>8&255]^T[255&h]^a[f+2],p=v[p>>>24]^b[d>>16&255]^_[h>>8&255]^T[255&u]^a[f+3],f+=4,d=o,h=l,u=c;for(g=0;g<4;g++)n[(3&-g)+r]=S[d>>>24]<<24^S[h>>16&255]<<16^S[u>>8&255]<<8^S[255&p]^a[f++],o=d,d=h,h=u,u=p,p=o}}class n extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const r=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class a{constructor(e,t,i,s){const o=a.STEP,l=new Int32Array(e.buffer),c=new Uint8Array(e.byteLength);let d=0;for(this.asyncStream_=new n,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+o),t,i,c)),d=o;d>2),a=new s(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let c,d,h,u,p,m,g,f,y;for(c=i[0],d=i[1],h=i[2],u=i[3],y=0;y{const s=e[i];var n;n=s,("function"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s})),t}({source:t.source,decrypted:i}),[i.buffer])}))}})));var Bd=Tc($d);const Fd=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},jd=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},qd=(e,t)=>{t.activePlaylistLoader=e,e.load()},zd={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(n!==o){tl.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;tl.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const s=i.activeTrack();s&&(s.mode="disabled"),i.onTrackChanged()}},Hd={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on("error",zd[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),n),s.paused()||r.load()})),t.on("error",zd[e](e,i))}},Vd={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:c}},mainPlaylistLoader:d}=t,h=Rl(d.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=d.main.playlists));for(const n in a[e]){o[n]||(o[n]=[]);for(const u in a[e][n]){let p,m=a[e][n][u];if(h?(c(`AUDIO group '${n}' label '${u}' is a main playlist`),m.isMainPlaylist=!0,p=null):p="vhs-json"===s&&m.playlists?new Zl(m.playlists[0],i,r):m.resolvedUri?new Zl(m.resolvedUri,i,r):m.playlists&&"dash"===s?new vc(m.playlists[0],i,r,d):null,m=cl({id:u,playlistLoader:p},m),Hd[e](e,m.playlistLoader,t),o[n].push(m),void 0===l[u]){const e=new tl.AudioTrack({id:u,kind:Fd(m),enabled:!1,language:m.language,default:m.default,label:u});l[u]=e}}}n.on("error",zd[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:c}},mainPlaylistLoader:d}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const h in o[e][r]){if(!s.options_.useForcedSubtitles&&o[e][r][h].forced)continue;let u,p=o[e][r][h];if("hls"===n)u=new Zl(p.resolvedUri,s,a);else if("dash"===n){const e=p.playlists.filter((e=>e.excludeUntil!==1/0));if(!e.length)return;u=new vc(p.playlists[0],s,a,d)}else"vhs-json"===n&&(u=new Zl(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=cl({id:h,playlistLoader:u},p),Hd[e](e,p.playlistLoader,t),l[r].push(p),void 0===c[h]){const e=i.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;c[h]=e}}}r.on("error",zd[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const t in s[e]){n[t]||(n[t]=[]);for(const a in s[e][t]){const o=s[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let c={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[c.instreamId]&&(c=cl(c,l[c.instreamId])),void 0===c.default&&delete c.default,n[t].push(cl({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;r[a]=e}}}}},Wd=(e,t)=>{for(let i=0;i()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}};class Xd{constructor(){this.priority_=[]}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=al(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}}class Yd extends tl.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.availablePathways_=new Set,this.excludedPathways_=new Set,this.steeringManifest=new Xd,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.logger_=ll("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=this.queryBeforeStart?i:al(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart||!1,this.proxyServerUrl_=t.proxyServerURL||null,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"),this.queryBeforeStart&&this.requestSteeringManifest(this.steeringManifest.reloadUri))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!e&&!t)return;const i=e||this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();this.request_=this.xhr_({uri:i},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}const s=JSON.parse(this.request_.responseText);this.startTTLTimeout_(),this.assignSteeringProperties_(s)}))}setProxyServerUrl_(e){const t=new(Ge().URL)(e),i=new(Ge().URL)(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(Ge().atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new(Ge().URL)(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=Ge().setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){Ge().clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.excludedPathways_=new Set,this.steeringManifest=new Xd}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}}let Kd;const Qd=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Zd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Jd extends tl.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:s,bandwidth:n,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:c,cacheEncryptionKeys:d,bufferBasedABR:h,leastPixelDiffSelector:u,captionServices:p}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null==m&&(m=1/0),Kd=r,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(u),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.sourceType_=c,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=l,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:hd,activeTrack:hd,getActiveGroup:hd,onGroupChanged:hd,onTrackChanged:hd,lastTrack_:null,logger_:ll(`MediaGroups[${t}]`)}})),e})(),this.mediaSource=new(Ge().MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=dl(),this.hasPlayed_=!1,this.syncController_=new Rd(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Bd,this.sourceUpdater_=new Ld(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Ud;const g={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,calculateTimestampOffsetForEachSegment:e.calculateTimestampOffsetForEachSegment,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:d,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new vc(t,this.vhs_,cl(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Zl(t,this.vhs_,cl(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new dd(cl(g,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new dd(cl(g,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Dd(cl(g,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){s.off("vttjserror",n),e()}function n(){s.off("vttjsloaded",i),t()}s.one("vttjsloaded",i),s.one("vttjserror",n),s.addWebVttScript_()}))}),e),this.contentSteeringController_=new Yd(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>this.startABRTimer_()))),Qd.forEach((e=>{this[e+"_"]=Zd.bind(this,e)})),this.logger_=ll("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const f="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(f,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e.id||e.uri;n&&n!==r&&(this.logger_(`switch media ${n} -> ${r} from ${t}`),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===s));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Ge().setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Ge().clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const t in i)if(i[t][n.label]){const s=i[t][n.label];if(s.playlists&&s.playlists.length)r.push.apply(r,s.playlists);else if(s.uri)r.push(s);else if(e.playlists.length)for(let i=0;i{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Dl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),(e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{Vd[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{AUDIO:r,main:a}}=e;["AUDIO","SUBTITLES"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if("AUDIO"===e&&o.length>1&&Rl(t.main))for(let e=0;ee.id===i.id))[0]||null})(i,e),t[i].activeTrack=Gd[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,jd(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),qd(a.playlistLoader,n)):o&&s.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,c=r.lastTrack_;if((!c||!a||c.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,jd(s,r),o)){if(o.isMainPlaylist){if(!a||!c||a.id===c.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${c.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if("AUDIO"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),qd(o.playlistLoader,r)):qd(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),i.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:"usage",name:"vhs-audio-change"})};s.audioTracks().addEventListener("change",l),s.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),n.on("dispose",(()=>{s.audioTracks().removeEventListener("change",l),s.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),s.clearTracks("audio");for(const e in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[e])})({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;if(this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial"),"vhs-json"!==this.sourceType_||!this.initialMedia_.segments)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Dl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();"playlist-unchanged"!==e.lastExcludeReason_&&this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e])i.AUDIO[e][t].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Kd.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return tl.log.warn("We received no playlist to switch to. Please check your stream."),!1;const c=`allowing switch ${e&&e.id||"null"} -> ${s.id}`;if(!e)return l(`${c} as current playlist is not set`),!0;if(s.id===e.id)return!1;const d=Boolean(ml(t,i).length);if(!e.endList)return d||"number"!=typeof e.partTargetDuration?(l(`${c} as current playlist is live`),!0):(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const h=bl(t,i),u=o?bc.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:bc.MAX_BUFFER_LOW_WATER_LINE;if(am)&&h>=n){let e=`${c} as forwardBuffer >= bufferLowWaterLine (${h} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${m})`),l(e),!0}return l(`not ${c} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e!==this.mainPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.resetMainLoaderReplaceSegments()):this.logger_("skipping fastQualityChange because new media is same as old")}resetMainLoaderReplaceSegments(){const e=this.tech_.buffered(),t=e.end(e.length-1);this.mainSegmentLoader_.replaceSegmentsUntil=t,this.mainSegmentLoader_.resetLoaderProperties(),this.mainSegmentLoader_.resetLoader()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime(){}))}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=Kd.Playlist.playlistEnd(e,t),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-s<=ul;const r=n.end(n.length-1);return r-s<=ul&&i-r<=ul}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(Pl),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return tl.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;s.forEach((i=>{if(i===e)return;const s=i.excludeUntil;void 0!==s&&s!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(tl.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:tl.log.warn,c=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${c} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const d=o.targetDuration/2*1e3||5e3,h="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=d;return this.switchMedia_(o,"exclude",r||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s="all"===e;(s||"main"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||"audio"===e)&&n.push("AUDIO"),(s||"subtitle"===e)&&(n.push("CLOSED-CAPTIONS"),n.push("SUBTITLES")),n.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((t=>{const s=this[`${t}SegmentLoader_`];!s||e!==t&&"all"!==e||i.push(s)})),i.forEach((e=>t.forEach((t=>{"function"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=ml(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.resetEverything(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.resetEverything(),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Kd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const s=this.mainPlaylistLoader_.main,n=Kd.Playlist.seekable(t,i,Kd.Playlist.liveEdgeDelay(s,t));if(0===n.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Kd.Playlist.seekable(t,i,Kd.Playlist.liveEdgeDelay(s,t)),0===e.length)return}let r,a;this.seekable_&&this.seekable_.length&&(r=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>n.end(0)||n.start(0)>e.end(0)?this.seekable_=n:this.seekable_=dl([[e.start(0)>n.start(0)?e.start(0):n.start(0),e.end(0)0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=Vc(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||"avc1.4d400d"),e.main.isMuxed&&(s.video+=`,${i.audio||e.main.audioCodec||xt}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||xt,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const r={};let a;if(["video","audio"].forEach((function(t){if(s.hasOwnProperty(t)&&(i=e[t].isFmp4,n=s[t],!(i?Et(n):Ct(n)))){const i=e[t].isFmp4?"browser":"muxer";r[i]=r[i]||[],r[i].push(s[t]),"audio"===t&&(a=i)}var i,n})),n&&a&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${a} does not support codec(s): "${s.audio}"`)}if(!Object.keys(r).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const i=(Tt(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,n=(Tt(s[t]||"")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${s[t]}"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(r).reduce(((e,t)=>(e&&(e+=", "),e+`${t} does not support codec(s): "${r[t].join(",")}"`)),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=Vc(this.main,s),r=[];!n.audio||Ct(n.audio)||Et(n.audio)||r.push(`audio codec ${n.audio}`),!n.video||Ct(n.video)||Et(n.video)||r.push(`video codec ${n.video}`),n.text&&"stpp.ttml.im1t"===n.text&&r.push(`text codec ${n.text}`),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(", ")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=zc(Tt(e)),n=Hc(s),r=s.video&&Tt(s.video)[0]||null,a=s.audio&&Tt(s.audio)[0]||null;Object.keys(i).forEach((e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=Vc(this.mainPlaylistLoader_.main,s),c=Hc(l);if(l.audio||l.video){if(c!==n&&o.push(`codec count "${c}" !== "${n}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Tt(l.video)[0]||null,t=l.audio&&Tt(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${r.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(" && ")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let s,n=i;for(let i=0;i{const i=e.metadataTrack_;if(!i)return;const s=Ge().WebKitDataCue||Ge().VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(ed.has(t))continue;const n=new s(e.startTime,e.endTime,"");n.id=e.id,n.type="com.apple.quicktime.HLS",n.value={key:Jc[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();td(this.inbandTextTracks_,e,this.tech_),(({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const n=Ge().WebKitDataCue||Ge().VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!("number"!=typeof t||Ge().isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new n(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(tl.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key)},value:{get:()=>(tl.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data)},privateData:{get:()=>(tl.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let e=0;e{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=l[e],n=isFinite(s)?s:0,r=Number(c[t+1])||n;i.forEach((e=>{e.endTime=r}))}))})({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(!e.contentSteering)return;const t=e=>{for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering)};t(e),this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("mediaupdatetimeout",(()=>{this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id),this.contentSteeringController_.abort(),this.contentSteeringController_.clearTTLTimeout_(),this.contentSteeringController_.clearAvailablePathways(),t(this.main())})),this.contentSteeringController_.queryBeforeStart||this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;const t=this.main().playlists,i=new Set;let s=!1;Object.keys(t).forEach((n=>{const r=t[n],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&"content-steering"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(s=!0)}})),s&&this.changeSegmentPathway_()}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}}class eh{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var r,a,o;this.codecs=Vc(s.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=n,e=>{const t=r.main.playlists[a],i=Al(t),s=Pl(t);return void 0===e?s:(e?delete t.disabled:t.disabled=!0,e===s||i||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})}}const th=["seeking","seeked","pause","playing","error"];class ih{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=ll("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=["main","subtitle","audio"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on("appendsdone",o[e].updateend),r[`${e}SegmentLoader_`].on("playlistupdate",o[e].reset),this.tech_.on(["seeked","seeking"],o[e].reset)}));const l=e=>{["main","audio"].forEach((t=>{r[`${t}SegmentLoader_`][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(th,n),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(th,n),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off("appendsdone",o[e].updateend),r[`${e}SegmentLoader_`].off("playlistupdate",o[e].reset),this.tech_.off(["seeked","seeking"],o[e].reset)})),this.checkCurrentTimeTimeout_&&Ge().clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Ge().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Ge().setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],s=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(i=e.end(e.length-1)),this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:ul)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${fl(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const s=this.playlistController_.sourceUpdater_,n=this.tech_.buffered(),r=s.audioBuffer?s.audioBuffered():null,a=s.videoBuffer?s.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-hl),c=[r,a];for(let e=0;e ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const n=gl(s,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+ul;const r=!i.endList,a="number"==typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:s,end:n}}return null}}const sh={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},nh=function(e,t){let i=0,s=0;const n=cl(sh,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const r=function(){s&&e.currentTime(s)},a=function(t){null!=t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(n.getSource&&"function"==typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);tl.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),nh(e,t)}};var rh="3.7.0";const ah={PlaylistLoader:Zl,Playlist:Ul,utils:dc,STANDARD_PLAYLIST_SELECTOR:Zc,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(Ul.isEnabled);return Yc(e,((e,t)=>Kc(e,t))),e.filter((e=>!!Vc(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Zc,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const s=this.useDevicePixelRatio&&Ge().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Qc(this.playlists.main,t,parseInt(Xc(this.tech_.el(),"width"),10)*s,parseInt(Xc(this.tech_.el(),"height"),10)*s,this.limitRenditionByPlayerDimensions,this.playlistController_)}},comparePlaylistBandwidth:Kc,comparePlaylistResolution:function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Ge().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||Ge().Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s},xhr:tc()};Object.keys(bc).forEach((e=>{Object.defineProperty(ah,e,{get:()=>(tl.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),bc[e]),set(t){tl.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!=typeof t||t<0?tl.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):bc[e]=t}})}));const oh="videojs-vhs",lh=function(e,t){const i=t.media();let s=-1;for(let t=0;t{if(!Ge().localStorage)return null;const e=Ge().localStorage.getItem(oh);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},dh=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},hh=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},uh=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},ph=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};ah.supportsNativeHls=function(){if(!Ye()||!Ye().createElement)return!1;const e=Ye().createElement("video");return!!tl.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),ah.supportsNativeDash=!!(Ye()&&Ye().createElement&&tl.getTech("Html5").isSupported())&&/maybe|probably/i.test(Ye().createElement("video").canPlayType("application/dash+xml")),ah.supportsTypeNatively=e=>"hls"===e?ah.supportsNativeHls:"dash"===e&&ah.supportsNativeDash,ah.isSupported=function(){return tl.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},ah.xhr.onRequest=function(e){dh(ah.xhr,e)},ah.xhr.onResponse=function(e){hh(ah.xhr,e)},ah.xhr.offRequest=function(e){uh(ah.xhr,e)},ah.xhr.offResponse=function(e){ph(ah.xhr,e)};const mh=tl.getComponent("Component");class gh extends mh{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=ll("VhsHandler"),t.options_&&t.options_.playerId){const e=tl.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(Ye(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=Ye().fullscreenElement||Ye().webkitFullscreenElement||Ye().mozFullScreenElement||Ye().msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.calculateTimestampOffsetForEachSegment=this.options_.calculateTimestampOffsetForEachSegment||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=ch();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=bc.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===bc.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","calculateTimestampOffsetForEachSegment","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=ah,this.options_.sourceType=Lt(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new Jd(this.options_);const s=cl({liveRangeSafeTimeDelta:ul},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new ih(s),this.playlistController_.on("error",(()=>{const e=tl.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const n=this.options_.bufferBasedABR?ah.movingAverageBandwidthSelector(.55):ah.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=ah.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=Ge().navigator.connection||Ge().navigator.mozConnection||Ge().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set(){tl.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>yl(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>yl(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!Ge().localStorage)return!1;let t=ch();t=t?cl(t,e):e;try{Ge().localStorage.setItem(oh,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=Rl(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!Al(e))).map(((t,i)=>new eh(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Ge().URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),(({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=(o=i?s.concat([i]):s,l=Object.keys(t),o.reduce(((e,t)=>{if(!t.contentProtection)return e;const i=l.reduce(((e,i)=>{const s=t.contentProtection[i];return s&&s.pssh&&(e[i]={pssh:s.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[])),r=[],a=[];var o,l;return n.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one("keysessioncreated",t)}))),r.push(new Promise(((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?s(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])})({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=(({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=((e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=zc(Tt(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=wt(s.video),r=wt(s.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),n&&(a[i].videoContentType=n),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),"string"==typeof e[i]&&(a[i].url=e[i]);return cl(e,a)})(t,i,s);return!(!n||(e.currentSource().keySystems=n,n&&!e.eme&&(tl.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))})({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{if("output-restricted"!==e.status)return;const t=this.playlistController_.main();if(!t||!t.playlists)return;const i=[];t.playlists.forEach((e=>{e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))})),i.length&&(tl.log.warn('DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.',...i),this.playlistController_.mainSegmentLoader_.resetEverything(),this.playlistController_.fastQualityChange_())})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=tl.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),lh(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on("mediachange",(()=>{lh(this.qualityLevels_,this.playlists)})))}static version(){return{"@videojs/http-streaming":rh,"mux.js":"7.0.1","mpd-parser":"1.2.2","m3u8-parser":"7.1.0","aes-decrypter":"4.0.1"}}version(){return this.constructor.version()}canChangeType(){return Ld.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Ge().URL.revokeObjectURL&&(Ge().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return(({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const s=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let n=0;ns){if(e>s+.25*n.duration)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}})(t,e);if(!s)return i({message:"valid programTime was not found"});if("estimate"===s.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*s)})(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)})({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return hc({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{dh(this.xhr,e)},this.xhr.onResponse=e=>{hh(this.xhr,e)},this.xhr.offRequest=e=>{uh(this.xhr,e)},this.xhr.offResponse=e=>{ph(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}}const fh={name:"videojs-http-streaming",VERSION:rh,canHandleSource(e,t={}){const i=cl(tl.options,t);return fh.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=cl(tl.options,i);return t.vhs=new gh(e,t,s),t.vhs.xhr=tc(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=Lt(e);if(!i)return"";const s=fh.getOverrideNative(t);return!ah.supportsTypeNatively(i)||s?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(tl.browser.IS_ANY_SAFARI||tl.browser.IS_IOS),{overrideNative:s=i}=t;return s}};Et("avc1.4d400d,mp4a.40.2")&&tl.getTech("Html5").registerSourceHandler(fh,0),tl.VhsHandler=gh,tl.VhsSourceHandler=fh,tl.Vhs=ah,tl.use||tl.registerComponent("Vhs",ah),tl.options.vhs=tl.options.vhs||{},tl.getPlugin&&tl.getPlugin("reloadSourceOnError")||tl.registerPlugin("reloadSourceOnError",(function(e){nh(this,e)}));const yh=document.querySelector(".video__btn"),vh=document.querySelector(".video__title"),bh=document.querySelector(".video__text"),_h=document.querySelector(".video__link"),Th=document.querySelector(".video__gradient"),Sh=(document.querySelector(".video__intro"),document.querySelector(".video__mask")),wh=(document.querySelector(".vjs-tech"),document.querySelector(".nav-history__next"));$?.addEventListener("click",(()=>{B?.classList.toggle("active"),$?.classList.toggle("active"),B?.classList.contains("active")?document.body.style.overflowY="hidden":document.body.style.overflowY="auto"})),F.forEach((e=>{e.addEventListener("click",(()=>{B?.classList.remove("active"),document.body.style.overflowY="auto",$?.classList.remove("active")}))})),(()=>{try{let e=!0;const t=tl(document.getElementById("video__player"),{autoplay:!0,loop:!0,muted:!0,controls:!1,playToggle:!1}),i=(e,i)=>{window.screen.width>768?t.src({type:"video/mp4",src:`./videos/${e}`}):t.src({type:"video/mp4",src:`./videos/${i}`})};i("preview.mp4","preview-mobile.mp4"),t.volume(.7);const s=()=>{t.play(),t.addClass("play"),t.muted(!1),t.controls(!0),t.loop(!1),yh.classList.add("hide"),vh.classList.add("hide"),bh.classList.add("hide"),_h.classList.add("hide")};t.on("play",(()=>{t.played()?t.played()&&t.loop()?t.removeClass("play"):t.played()&&!t.loop()&&(t.removeClass("play"),yh?.classList.add("hide")):(t.addClass("play"),t.removeClass("play"),yh?.classList.add("hide"))})),t.on("pause",(()=>{yh?.classList.remove("hide")})),t.on("ended",(()=>{yh?.classList.remove("hide"),Sh?.classList.remove("visible")})),Sh.addEventListener("click",(()=>{yh?.classList.remove("hide"),t.pause(),Sh?.classList.remove("visible")})),yh.addEventListener("click",(()=>{!0===e&&(i("video.mp4","video-mobile.mp4"),e=!1),document.querySelector(".video__inner").classList.add("active"),document.querySelector(".video-js").classList.add("active"),document.querySelector(".vjs-poster").classList.add("active"),t.fluid(!0),Th?.classList.add("hide"),Sh?.classList.add("visible"),yh?.classList.add("center-position"),document.querySelector("video").style.objectFit="contain",t.muted()?(t.currentTime(0),s()):s()}))}catch(e){console.log(e)}})(),(()=>{try{new je(".recommendations__slider",{slidesPerView:"1",navigation:{nextEl:".recommendations__slider-navigation-next",prevEl:".recommendations__slider-navigation-prev"},loop:!0}),new je(".goods__slider",{slidesPerView:3,loop:!0,navigation:{nextEl:".goods__slider-next",prevEl:".goods__slider-prev"},pagination:{clickable:!0,el:".goods__slider-pagination",clickable:!0},breakpoints:{940:{slidesPerView:4},764:{slidesPerView:3},600:{slidesPerView:2},0:{slidesPerView:1}}}),new je(".professional__slider",{navigation:{nextEl:".professional__slider-navigation-next",prevEl:".professional__slider-navigation-prev"},paginationClickable:!0,initialSlide:1,centeredSlides:!0,slidesPerView:2,speed:1e3,zoom:{maxRatio:1.6},pagination:{clickable:!0,el:".professional__slider-pagination",clickable:!0},breakpoints:{993:{spaceBetween:-180},860:{spaceBetween:-260,slidesPerView:2},768:{spaceBetween:-200},500:{spaceBetween:-80},320:{slidesPerView:1.6,spaceBetween:-80}},allowTouchMove:!1}),new je(".interview__slider",{navigation:{nextEl:".interview__slider-navigation-next",prevEl:".interview__slider-navigation-prev"},pagination:{el:".interview__slider-pagination",clickable:!0},allowTouchMove:!1,paginationClickable:!0,centeredSlides:!0,loop:!0,speed:1e3});const e=new je(".partners__wrapper",{freeMode:!0,grabCursor:!0,centeredSlides:!0,slidesPerView:"auto",loop:!0,speed:2e3,autoplay:{enabled:!0,delay:1,disableOnInteraction:!0},freeModeMomentum:!0});document.querySelector(".partners__wrapper").addEventListener("mouseover",(function(){e.autoplay.stop()})),document.querySelector(".partners__wrapper").addEventListener("mouseout",(function(){e.autoplay.start()})),window.addEventListener("scroll",(()=>{e.autoplay.running||e.autoplay.start()}))}catch(e){console.error(e)}})(),(()=>{new(q())('a[href*="#"]',{header:".header",speed:500});const e=()=>{const e=window.scrollY;e>=100?z.classList.add("active"):z.classList.remove("active"),e>=300?H.classList.add("active"):H.classList.remove("active")};e(),window.addEventListener("scroll",(()=>{e()}))})(),Ve.forEach((e=>e.addEventListener("click",(function(){let e=this.parentNode;He.forEach((t=>{e!=t?t.classList.remove("active"):e.classList.toggle("active")}))})))),(()=>{try{const e=()=>{window.scrollY>=100?wh.classList.add("active"):wh.classList.remove("active")};e(),window.addEventListener("scroll",(()=>{e()}))}catch(e){console.log(e)}})()})()})(); \ No newline at end of file diff --git a/app/js/main.js.LICENSE.txt b/app/js/main.js.LICENSE.txt new file mode 100644 index 0000000..454c714 --- /dev/null +++ b/app/js/main.js.LICENSE.txt @@ -0,0 +1,29 @@ +/*! + * Programatically add the following + */ + +/*! + * smooth-scroll v16.1.3 + * Animate scrolling to anchor links + * (c) 2020 Chris Ferdinandi + * MIT License + * http://github.com/cferdinandi/smooth-scroll + */ + +/*! @name @videojs/http-streaming @version 3.7.0 @license Apache-2.0 */ + +/*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */ + +/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */ + +/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */ + +/*! @name videojs-contrib-quality-levels @version 4.0.0 @license Apache-2.0 */ + +/** + * @license + * slighly modified parse-headers 2.0.2 + * Copyright (c) 2014 David Björklund + * Available under the MIT license + * + */ diff --git a/app/js/main.js.map b/app/js/main.js.map deleted file mode 100644 index adf63c6..0000000 --- a/app/js/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA,kIAAkI,SAAS,sCAAsC,WAAW,wEAAwE,8BAA8B,YAAY,IAAI,KAAK,aAAa,uCAAuC,aAAa,gCAAgC,+BAA+B,wCAAwC,aAAa,SAAS,oFAAoF,sGAAsG,4NAA4N,YAAY,wBAAwB,4DAA4D,eAAe,4FAA4F,WAAW,+CAA+C,SAAS,WAAW,4CAA4C,yBAAyB,aAAa,wDAAwD,aAAa,oBAAoB,QAAQ,qCAAqC,6CAA6C,gFAAgF,kBAAkB,6EAA6E,QAAQ,eAAe,4IAA4I,4FAA4F,gEAAgE,GAAG,QAAQ,eAAe,+BAA+B,eAAe,EAAE,GAAG,EAAE,qFAAqF,oCAAoC,iBAAiB,mLAAmL,sBAAsB,sFAAsF,gBAAgB,+HAA+H,kBAAkB,yDAAyD,iCAAiC,qDAAqD,iCAAiC,yDAAyD,0GAA0G,sBAAsB,oHAAoH,WAAW,yDAAyD,WAAW,GAAG,oBAAoB,oFAAoF,+HAA+H,WAAW,gEAAgE,WAAW,yDAAyD,WAAW,yHAAyH,OAAO,kEAAkE,WAAW,mEAAmE,WAAW,4DAA4D,WAAW,yOAAyO,0BAA0B,gGAAgG,QAAQ,gBAAgB,EAAE,oBAAoB,mCAAmC,6EAA6E,gBAAgB,iBAAiB,YAAY,6DAA6D,eAAe,MAAM,QAAQ,sEAAsE,iBAAiB,iCAAiC,EAAE,eAAe,EAAE,cAAc,SAAS,mBAAmB,kCAAkC,QAAQ,EAAE,6BAA6B,EAAE,aAAa,YAAY,WAAW,qCAAqC,SAAS,eAAe,EAAE,MAAM,EAAE,cAAc,QAAQ,SAAS,+CAA+C,YAAY,yCAAyC,0CAA0C,4BAA4B,QAAQ,UAAU,SAAS,iDAAiD,YAAY,yCAAyC,iBAAiB,sCAAsC,mBAAmB,QAAQ,SAAS,0CAA0C,uBAAuB,6BAA6B,SAAS,uBAAuB,IAAI,KAAK,aAAa,wBAAwB,IAAI,OAAO,qBAAqB,QAAQ,gDAAgD,gBAAgB,yFAAyF,6FAA6F,SAAS,iBAAiB,WAAW,qCAAqC,8DAA8D,eAAe,oCAAoC,kDAAkD,oCAAoC,sBAAsB,gBAAgB,6BAA6B,MAAM,iEAAiE,sBAAsB,OAAO,SAAS,sTAAsT,kBAAkB,kBAAkB,EAAE,aAAa,2CAA2C,wEAAwE,wNAAwN,WAAW,mBAAmB,aAAa,wBAAwB,+EAA+E,qEAAqE,oDAAoD,gBAAgB,qEAAqE,mLAAmL,cAAc,uHAAuH,iBAAiB,gBAAgB,iBAAiB,eAAe,mHAAmH,iBAAiB,gBAAgB,0BAA0B,UAAU,iCAAiC,0CAA0C,yBAAyB,WAAW,6BAA6B,sFAAsF,qKAAqK,0CAA0C,iMAAiM,uJAAuJ,WAAW,+FAA+F,iBAAiB,kDAAkD,oGAAoG,+CAA+C,oRAAoR,mCAAmC,mFAAmF,eAAe,QAAQ,EAAE,iBAAiB,+EAA+E,iBAAiB,QAAQ,EAAE,eAAe,0GAA0G,WAAW,yDAAyD,WAAW,sBAAsB,+BAA+B,cAAc,kCAAkC,kCAAkC,4BAA4B,8BAA8B,6FAA6F,4CAA4C,8CAA8C,YAAY,WAAW,KAAK,aAAa,wCAAwC,wBAAwB,kCAAkC,yDAAyD,SAAS,kCAAkC,oNAAoN,gBAAgB,qCAAqC,mEAAmE,4LAA4L,8EAA8E,2HAA2H,0HAA0H,0DAA0D,sBAAsB,+FAA+F,8EAA8E,kCAAkC,kCAAkC,ghBAAghB,sHAAsH,kBAAkB,iEAAiE,2EAA2E,8BAA8B,gBAAgB,0EAA0E,wBAAwB,aAAa,qCAAqC,qBAAqB,mBAAmB,+DAA+D,mMAAmM,+BAA+B,gCAAgC,qDAAqD,aAAa,EAAE,gCAAgC,+BAA+B,0EAA0E,eAAe,kDAAkD,EAAE,OAAO,EAAE,sBAAsB,eAAe,sDAAsD,qDAAqD,gDAAgD,uLAAuL,4EAA4E,gDAAgD,oBAAoB,iDAAiD,oBAAoB,wEAAwE,iBAAiB,MAAM,gBAAgB,cAAc,gBAAgB,2DAA2D,oBAAoB,qCAAqC,kBAAkB,wBAAwB,iBAAiB,qCAAqC,+IAA+I,+NAA+N,MAAM,wLAAwL,uBAAuB,WAAW,EAAE,mBAAmB,EAAE,gCAAgC,4BAA4B,mBAAmB,EAAE,6BAA6B,0BAA0B,iGAAiG,6GAA6G,mKAAmK,oDAAoD,qBAAqB,6BAA6B,OAAO,4BAA4B,gDAAgD,2BAA2B,uBAAuB,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAA8B,SAAS,EAAE,cAAc,EAAE,IAAI,iBAAiB,kCAAkC,kDAAkD,gCAAgC,iCAAiC,yGAAyG,cAAc,sGAAsG,iBAAiB,8BAA8B,qCAAqC,UAAU,yDAAyD,WAAW,yDAAyD,eAAe,EAAE,+FAA+F,iBAAiB,mCAAmC,kBAAkB,GAAG,EAAE,wEAAwE,6EAA6E,6EAA6E,MAAM,kBAAkB,0BAA0B,kDAAkD,qDAAqD,EAAE,wBAAwB,2HAA2H,OAAO,4EAA4E,OAAO,mGAAmG,GAAG,EAAE,kCAAkC,MAAM,kBAAkB,mBAAmB,kFAAkF,gCAAgC,kCAAkC,wCAAwC,mIAAmI,4CAA4C,iBAAiB,4HAA4H,UAAU,2RAA2R,mEAAmE,qDAAqD,aAAa,gCAAgC,iCAAiC,mBAAmB,GAAG,YAAY,IAAI,YAAY,2BAA2B,wGAAwG,QAAQ,oBAAoB,gBAAgB,mBAAmB,QAAQ,iBAAiB,gBAAgB,mBAAmB,OAAO,mBAAmB,eAAe,+BAA+B,oCAAoC,kBAAkB,mEAAmE,YAAY,+GAA+G,yCAAyC,yDAAyD,uFAAuF,SAAS,yCAAyC,yDAAyD,wFAAwF,oBAAoB,qCAAqC,MAAM,kBAAkB,yCAAyC,YAAY,+IAA+I,8CAA8C,2BAA2B,qBAAqB,8CAA8C,4BAA4B,eAAe,mMAAmM,uBAAuB,wNAAwN,cAAc,4HAA4H,gBAAgB,UAAU,uFAAuF,gCAAgC,yHAAyH,wBAAwB,kGAAkG,QAAQ,sHAAsH,2CAA2C,oCAAoC,SAAS,EAAE,cAAc,EAAE,8DAA8D,EAAE,MAAM,EAAE,iBAAiB,EAAE,kDAAkD,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,+BAA+B,gBAAgB,4DAA4D,gBAAgB,mGAAmG,eAAe,sCAAsC,oQAAoQ,eAAe,gHAAgH,WAAW,4DAA4D,WAAW,8JAA8J,UAAU,oNAAoN,gCAAgC,gBAAgB,QAAQ,sBAAsB,6BAA6B,iCAAiC,QAAQ,eAAe,8GAA8G,UAAU,0CAA0C,EAAE,GAAG,gBAAgB,yCAAyC,iDAAiD,EAAE,kBAAkB,IAAI,uEAAuE,EAAE,GAAG,yHAAyH,EAAE,uCAAuC,2FAA2F,KAAK,QAAQ,yXAAyX,YAAY,mCAAmC,2aAA2a,UAAU,+JAA+J,SAAS,kDAAkD,SAAS,mEAAmE,YAAY,oPAAoP,+EAA+E,QAAQ,eAAe,wPAAwP,kBAAkB,yDAAyD,eAAe,yDAAyD,eAAe,wSAAwS,aAAa,wBAAwB,kBAAkB,6CAA6C,aAAa,oBAAoB,uEAAuE,6CAA6C,uBAAuB,4BAA4B,sBAAsB,8DAA8D,iBAAiB,sFAAsF,8CAA8C,qBAAqB,wGAAwG,2BAA2B,iDAAiD,UAAU,uBAAuB,oHAAoH,SAAS,2QAA2Q,YAAY,cAAc,SAAS,wBAAwB,eAAe,6CAA6C,mEAAmE,YAAY,gFAAgF,qCAAqC,yEAAyE,uCAAuC,uCAAuC,2DAA2D,oGAAoG,6GAA6G,aAAa,kIAAkI,cAAc,iBAAiB,yCAAyC,yCAAyC,wBAAwB,mCAAmC,mBAAmB,IAAI,iDAAiD,KAAK,YAAY,IAAI,KAAK,qCAAqC,kKAAkK,MAAM,mDAAmD,eAAe,MAAM,wHAAwH,6BAA6B,qBAAqB,eAAe,sBAAsB,mCAAmC,kCAAkC,GAAG,kDAAkD,kCAAkC,WAAW,oBAAoB,YAAY,mBAAmB,SAAS,8BAA8B,SAAS,qEAAqE,SAAS,SAAS,yJAAyJ,0GAA0G,OAAO,iEAAiE,kBAAkB,kBAAkB,EAAE,kBAAkB,iIAAiI,8HAA8H,OAAO,0QAA0Q,8BAA8B,+GAA+G,aAAa,0DAA0D,0EAA0E,EAAE,EAAE,WAAW,kSAAkS,EAAE,EAAE,QAAQ,0MAA0M,aAAa,eAAe,oCAAoC,sBAAsB,EAAE,gCAAgC,gBAAgB,SAAS,gBAAgB,qEAAqE,gGAAgG,gBAAgB,eAAe,6BAA6B,sDAAsD,gDAAgD,GAAG,qHAAqH,iGAAiG,0CAA0C,wCAAwC,qBAAqB,aAAa,uDAAuD,EAAE,KAAK,YAAY,YAAY,qBAAqB,MAAM,qBAAqB,mCAAmC,qBAAqB,yEAAyE,oDAAoD,mBAAmB,kOAAkO,GAAG,WAAW,MAAM,eAAe,SAAS,MAAM,gJAAgJ,gBAAgB,gBAAgB,aAAa,oCAAoC,mKAAmK,6CAA6C,mBAAmB,OAAO,uBAAuB,2PAA2P,iEAAiE,mDAAmD,yGAAyG,oBAAoB,oBAAoB,sDAAsD,sBAAsB,YAAY,+BAA+B,YAAY,+BAA+B,cAAc,EAAE,MAAM,mEAAmE,GAAG,8EAA8E,mCAAmC,8EAA8E,cAAc,qCAAqC,eAAe,EAAE,+NAA+N,gDAAgD,yBAAyB,uDAAuD,sCAAsC,EAAE,yBAAyB,kBAAkB,yGAAyG,wBAAwB,mDAAmD,gBAAgB,qCAAqC,uGAAuG,yIAAyI,sEAAsE,iGAAiG,YAAY,8BAA8B,uBAAuB,+CAA+C,4FAA4F,6PAA6P,yBAAyB,YAAY,wCAAwC,mCAAmC,+BAA+B,sCAAsC,+BAA+B,sCAAsC,qIAAqI,GAAG,YAAY,6BAA6B,QAAQ,+EAA+E,cAAc,uBAAuB,6BAA6B,iBAAiB,aAAa,UAAU,0BAA0B,iCAAiC,MAAM,sFAAsF,8BAA8B,0DAA0D,wBAAwB,sEAAsE,EAAE,IAAI,mEAAmE,EAAE,qBAAqB,OAAO,sCAAsC,wMAAwM,WAAW,6BAA6B,iBAAiB,GAAG,gBAAgB,WAAW,aAAa,yDAAyD,iBAAiB,mIAAmI,iBAAiB,2EAA2E,qBAAqB,gEAAgE,6BAA6B,cAAc,aAAa,8BAA8B,wPAAwP,GAAG,aAAa,6CAA6C,WAAW,EAAE,oBAAoB,yGAAyG,sBAAsB,+CAA+C,sFAAsF,qBAAqB,SAAS,4OAA4O,gBAAgB,gCAAgC,2JAA2J,WAAW,qDAAqD,gBAAgB,2BAA2B,mBAAmB,EAAE,4DAA4D,kBAAkB,uBAAuB,0BAA0B,kDAAkD,wCAAwC,uBAAuB,yDAAyD,MAAM,qCAAqC,gBAAgB,YAAY,aAAa,4BAA4B,gGAAgG,sEAAsE,+BAA+B,yCAAyC,gCAAgC,kEAAkE,2CAA2C,8EAA8E,yHAAyH,UAAU,8CAA8C,sBAAsB,+DAA+D,+BAA+B,wFAAwF,WAAW,gXAAgX,SAAS,+CAA+C,oBAAoB,gBAAgB,EAAE,IAAI,6BAA6B,mBAAmB,iBAAiB,EAAE,KAAK,mGAAmG,kCAAkC,6BAA6B,GAAG,aAAa,SAAS,oEAAoE,mEAAmE,KAAK,cAAc,QAAQ,eAAe,uDAAuD,+EAA+E,aAAa,sEAAsE,YAAY,sPAAsP,YAAY,oDAAoD,eAAe,0CAA0C,QAAQ,0BAA0B,sCAAsC,uJAAuJ,4BAA4B,WAAW,qEAAqE,0CAA0C,MAAM,8BAA8B,yBAAyB,6CAA6C,6DAA6D,0CAA0C,YAAY,WAAW,oCAAoC,gBAAgB,WAAW,mDAAmD,EAAE,KAAK,EAAE,oCAAoC,gBAAgB,EAAE,EAAE,SAAS,SAAS,kFAAkF,OAAO,oHAAoH,OAAO,wHAAwH,UAAU,+IAA+I,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,gBAAgB,mDAAmD,0BAA0B,0FAA0F,eAAe,gCAAgC,oBAAoB,KAAK,KAAK,IAAI,OAAO,uBAAuB,UAAU,qEAAqE,QAAQ,6DAA6D,aAAa,kGAAkG,QAAQ,qBAAqB,KAAK,UAAU,QAAQ,+EAA+E,QAAQ,eAAe,gBAAgB,wJAAwJ,aAAa,mPAAmP,SAAS,uDAAuD,eAAe,+DAA+D,kBAAkB,gDAAgD,2BAA2B,wIAAwI,GAAG,0CAA0C,6EAA6E,4DAA4D,EAAE,GAAG,EAAE,6CAA6C,EAAE,6CAA6C,wDAAwD,2EAA2E,oDAAoD,EAAE,GAAG,EAAE,6BAA6B,0CAA0C,IAAI,WAAW,EAAE,0GAA0G,KAAK,OAAO,+FAA+F,UAAU,kDAAkD,iDAAiD,IAAI,WAAW,EAAE,yDAAyD,KAAK,UAAU,gDAAgD,wBAAwB,iZAAiZ,oKAAoK,UAAU,2CAA2C,wFAAwF,GAAG,qBAAqB,kDAAkD,qBAAqB,MAAM,wCAAwC,gCAAgC,+DAA+D,6BAA6B,MAAM,qCAAqC,kBAAkB,2BAA2B,OAAO,EAAE,kBAAkB,iBAAiB,GAAG,QAAQ,yBAAyB,KAAK,sCAAsC,wFAAwF,8BAA8B,iCAAiC,mBAAmB,GAAG,mBAAmB,2CAA2C,iDAAiD,sJAAsJ,gBAAgB,KAAK,gBAAgB,KAAK,qBAAqB,8KAA8K,qBAAqB,yDAAyD,0EAA0E,KAAK,GAAG,QAAQ,qCAAqC,yLAAyL,iBAAiB,sCAAsC,0FAA0F,gBAAgB,cAAc,GAAG,eAAe,iBAAiB,SAAS,2HAA2H,6BAA6B,kBAAkB,6BAA6B,aAAa,2BAA2B,YAAY,uBAAuB,oEAAoE,EAAE,qCAAqC,2BAA2B,wBAAwB,UAAU,gEAAgE,SAAS,EAAE,cAAc,EAAE,IAAI,GAAG,gBAAgB,kBAAkB,aAAa,iCAAiC,sBAAsB,kCAAkC,0CAA0C,yNAAyN,qEAAqE,EAAE,sDAAsD,eAAe,uBAAuB,UAAU,SAAS,SAAS,iBAAiB,eAAe,EAAE,qBAAqB,EAAE,yBAAyB,eAAe,sBAAsB,yEAAyE,GAAG,cAAc,gBAAgB,eAAe,6CAA6C,MAAM,mGAAmG,EAAE,KAAK,EAAE,sBAAsB,QAAQ,8DAA8D,QAAQ,0BAA0B,MAAM,mDAAmD,MAAM,mCAAmC,MAAM,6CAA6C,uCAAuC,iCAAiC,qBAAqB,qCAAqC,aAAa,+CAA+C,qCAAqC,MAAM,iBAAiB,0BAA0B,cAAc,oBAAoB,IAAI,UAAU,iEAAiE,aAAa,yDAAyD,MAAM,+EAA+E,iCAAiC,EAAE,2BAA2B,sEAAsE,0BAA0B,kDAAkD,6DAA6D,4BAA4B,IAAI,uBAAuB,0BAA0B,IAAI,qCAAqC,UAAU,OAAO,SAAS,qBAAqB,4BAA4B,2BAA2B,kCAAkC,2HAA2H,qBAAqB,oIAAoI,mBAAmB,iLAAiL,0BAA0B,mEAAmE,aAAa,IAAI,yBAAyB,0CAA0C,gIAAgI,kHAAkH,WAAW,SAAS,mFAAmF,SAAS,wFAAwF,aAAa,QAAQ,eAAe,gBAAgB,+IAA+I,aAAa,oLAAoL,UAAU,2CAA2C,0BAA0B,GAAG,YAAY,qBAAqB,aAAa,kFAAkF,kEAAkE,+EAA+E,qBAAqB,kDAAkD,qBAAqB,yMAAyM,cAAc,oDAAoD,mBAAmB,iCAAiC,sCAAsC,4BAA4B,sCAAsC,+BAA+B,yDAAyD,oCAAoC,4BAA4B,0KAA0K,2CAA2C,MAAM,sCAAsC,yGAAyG,sBAAsB,oKAAoK,uBAAuB,iBAAiB,kOAAkO,WAAW,8DAA8D,WAAW,qDAAqD,aAAa,IAAI,oBAAoB,8EAA8E,GAAG,6KAA6K,uCAAuC,gDAAgD,qCAAqC,6GAA6G,oCAAoC,kEAAkE,IAAI,iBAAiB,iJAAiJ,eAAe,sJAAsJ,gDAAgD,4CAA4C,yCAAyC,WAAW,qCAAqC,mEAAmE,gDAAgD,uEAAuE,iBAAiB,oCAAoC,sCAAsC,kCAAkC,MAAM,yDAAyD,8GAA8G,OAAO,0EAA0E,kDAAkD,SAAS,kDAAkD,+BAA+B,qBAAqB,+BAA+B,iDAAiD,qFAAqF,4GAA4G,YAAY,oEAAoE,EAAE,UAAU,iDAAiD,aAAa,6FAA6F,iDAAiD,YAAY,MAAM,+BAA+B,qBAAqB,wBAAwB,iDAAiD,UAAU,gEAAgE,mDAAmD,OAAO,gBAAgB,mCAAmC,oNAAoN,gDAAgD,0GAA0G,0BAA0B,aAAa,0HAA0H,mEAAmE,MAAM,kCAAkC,MAAM,uDAAuD,aAAa,wCAAwC,kBAAkB,uGAAuG,oDAAoD,YAAY,UAAU,2EAA2E,MAAM,kCAAkC,MAAM,qDAAqD,mFAAmF,6GAA6G,0BAA0B,YAAY,kBAAkB,qBAAqB,sBAAsB,iEAAiE,4BAA4B,EAAE,GAAG,SAAS,8BAA8B,SAAS,gCAAgC,YAAY,2NAA2N,UAAU,QAAQ,eAAe,gBAAgB,kEAAkE,aAAa,kFAAkF,4DAA4D,YAAY,mBAAmB,qCAAqC,sEAAsE,SAAS,uBAAuB,KAAK,yEAAyE,0EAA0E,qEAAqE,IAAI,+CAA+C,kGAAkG,WAAW,QAAQ,YAAY,qEAAqE,0CAA0C,qFAAqF,WAAW,UAAU,kBAAkB,UAAU,mBAAmB,sBAAsB,mBAAmB,oDAAoD,MAAM,sBAAsB,kBAAkB,aAAa,4CAA4C,EAAE,KAAK,+CAA+C,yBAAyB,0BAA0B,qDAAqD,EAAE,KAAK,mGAAmG,yBAAyB,IAAI,sBAAsB,MAAM,eAAe,oDAAoD,sBAAsB,MAAM,mBAAmB,8CAA8C,sEAAsE,sDAAsD,2CAA2C,2CAA2C,iBAAiB,iBAAiB,aAAa,yEAAyE,mDAAmD,4GAA4G,GAAG,iBAAiB,2DAA2D,sBAAsB,iIAAiI,OAAO,kCAAkC,SAAS,gJAAgJ,iQAAiQ,cAAc,+KAA+K,QAAQ,eAAe,kGAAkG,WAAW,mBAAmB,WAAW,mCAAmC,oDAAoD,4BAA4B,uKAAuK,WAAW,EAAE,KAAK,qBAAqB,oNAAoN,EAAE,kCAAkC,aAAa,oKAAoK,WAAW,4NAA4N,yBAAyB,kBAAkB,aAAa,4KAA4K,SAAS,uFAAuF,SAAS,0FAA0F,SAAS,qGAAqG,OAAO,4CAA4C,aAAa,OAAO,iIAAiI,yBAAyB,OAAO,+HAA+H,yBAAyB,aAAa,uWAAuW,oFAAoF,YAAY,+RAA+R,4CAA4C,OAAO,yLAAyL,mBAAmB,yCAAyC,mBAAmB,WAAW,2NAA2N,qBAAqB,SAAS,onBAAonB,oBAAoB,qCAAqC,eAAe,QAAQ,+IAA+I,wCAAwC,QAAQ,eAAe,uDAAuD,mIAAmI,aAAa,wTAAwT,SAAS,+CAA+C,SAAS,wDAAwD,KAAK,MAAM,yCAAyC,wDAAwD,4BAA4B,qCAAqC,QAAQ,YAAY,sBAAsB,mNAAmN,yBAAyB,WAAW,aAAa,6CAA6C,WAAW,uCAAuC,kJAAkJ,WAAW,qFAAqF,YAAY,uBAAuB,wJAAwJ,aAAa,2JAA2J,iBAAiB,sEAAsE,YAAY,6GAA6G,iBAAiB,MAAM,wPAAwP,kDAAkD,0DAA0D,EAAE,UAAU,0KAA0K,+BAA+B,gIAAgI,QAAQ,eAAe,kDAAkD,yBAAyB,EAAE,2BAA2B,EAAE,0BAA0B,iCAAiC,wDAAwD,QAAQ,sBAAsB,gHAAgH,qBAAqB,2DAA2D,8DAA8D,qDAAqD,eAAe,wDAAwD,mBAAmB,sCAAsC,qCAAqC,oCAAoC,sCAAsC,yFAAyF,WAAW,GAAG,4DAA4D,iBAAiB,6FAA6F,SAAS,gIAAgI,uWAAuW,kEAAkE,kJAAkJ,wGAAwG,gGAAgG,sCAAsC,mJAAmJ,sJAAsJ,UAAU,sIAAsI,SAAS,8BAA8B,SAAS,+CAA+C,aAAa,SAAS,iBAAiB,eAAe,2DAA2D,6FAA6F,UAAU,8BAA8B,4JAA4J,WAAW,wDAAwD,WAAW,gDAAgD,WAAW,EAAE,WAAW,sBAAsB,iBAAiB,kEAAkE,aAAa,mBAAmB,6DAA6D,aAAa,MAAM,YAAY,eAAe,IAAI,yDAAyD,gBAAgB,qDAAqD,eAAe,oFAAoF,wBAAwB,oCAAoC,+BAA+B,qCAAqC,yLAAyL,2BAA2B,WAAW,2CAA2C,UAAU,uFAAuF,sBAAsB,iPAAiP,WAAW,EAAE,SAAS,4CAA4C,SAAS,6DAA6D,2CAA2C,SAAS,gQAAgQ,iJAAiJ,WAAW,6RAA6R,OAAO,2gBAA2gB,WAAW,QAAQ,kBAAkB,kBAAkB,EAAE,0FAA0F,mZAAmZ,eAAe,wBAAwB,oBAAoB,4FAA4F,eAAe,6JAA6J,eAAe,mPAAmP,eAAe,qOAAqO,aAAa,kDAAkD,mCAAmC,0TAA0T,+HAA+H,OAAO,GAAG,quBAAquB,iCAAiC,iJAAiJ,YAAY,WAAW,kBAAkB,mBAAmB,MAAM,sBAAsB,6IAA6I,eAAe,OAAO,wCAAwC,0MAA0M,iBAAiB,cAAc,oKAAoK,aAAa,eAAe,iDAAiD,EAAE,sBAAsB,8EAA8E,gOAAgO,YAAY,8EAA8E,UAAU,+IAA+I,kBAAkB,UAAU,gDAAgD,KAAK,uCAAuC,EAAE,qFAAqF,iFAAiF,oFAAoF,oCAAoC,mBAAmB,oBAAoB,mIAAmI,6DAA6D,QAAQ,GAAG,QAAQ,EAAE,iLAAiL,WAAW,uCAAuC,WAAW,gCAAgC,WAAW,6BAA6B,0BAA0B,mFAAmF,6EAA6E,6EAA6E,+BAA+B,MAAM,yCAAyC,uBAAuB,0CAA0C,2CAA2C,uCAAuC,6BAA6B,yBAAyB,MAAM,wBAAwB,cAAc,gCAAgC,8BAA8B,cAAc,uBAAuB,yMAAyM,IAAI,EAAE,eAAe,mBAAmB,6FAA6F,wHAAwH,cAAc,oEAAoE,aAAa,4BAA4B,iDAAiD,wCAAwC,8CAA8C,2HAA2H,qBAAqB,uHAAuH,2CAA2C,aAAa,sCAAsC,WAAW,sBAAsB,kBAAkB,mEAAmE,0CAA0C,SAAS,8BAA8B,8EAA8E,wEAAwE,gDAAgD,6CAA6C,0CAA0C,WAAW,gBAAgB,iFAAiF,mVAAmV,kOAAkO,gBAAgB,aAAa,6GAA6G,iCAAiC,4GAA4G,iBAAiB,EAAE,IAAI,mHAAmH,kBAAkB,2DAA2D,2DAA2D,cAAc,gBAAgB,0MAA0M,mBAAmB,EAAE,MAAM,cAAc,yJAAyJ,KAAK,2DAA2D,iDAAiD,qGAAqG,4BAA4B,6VAA6V,mBAAmB,mBAAmB,GAAG,qBAAqB,wEAAwE,2CAA2C,yCAAyC,2WAA2W,iBAAiB,wDAAwD,SAAS,wNAAwN,aAAa,iBAAiB,kBAAkB,sDAAsD,yBAAyB,iDAAiD,oBAAoB,gGAAgG,wDAAwD,QAAQ,sCAAsC,wBAAwB,6DAA6D,cAAc,mDAAmD,sCAAsC,qEAAqE,OAAO,4BAA4B,eAAe,EAAE,eAAe,oDAAoD,gDAAgD,sJAAsJ,6CAA6C,qBAAqB,eAAe,yDAAyD,mHAAmH,OAAO,sBAAsB,mCAAmC,OAAO,sBAAsB,mCAAmC,aAAa,2CAA2C,YAAY,iEAAiE,YAAY,mCAAmC,SAAS,iDAAiD,6CAA6C,oIAAoI,+FAA+F,wBAAwB,qCAAqC,sEAAsE,2BAA2B,kEAAkE,mCAAmC,eAAe,OAAO,UAAU,iCAAiC,6CAA6C,iGAAiG,+EAA+E,eAAe,uGAAuG,wBAAwB,iJAAiJ,kBAAkB,EAAE,kBAAkB,uBAAuB,EAAE,6BAA6B,iCAAiC,2CAA2C,4BAA4B,cAAc,sJAAsJ,qDAAqD,EAAE,+CAA+C,kBAAkB,iDAAiD,OAAO,SAAS,IAAI,oGAAoG,UAAU,uCAAuC,GAAG,SAAS,MAAM,wDAAwD,wBAAwB,8EAA8E,SAAS,wBAAwB,EAAE,4CAA4C,wBAAwB,uHAAuH,EAAE,MAAM,aAAa,kDAAkD,uCAAuC,8CAA8C,EAAE,iCAAiC,wBAAwB,uFAAuF,qFAAqF,iBAAiB,sFAAsF,EAAE,KAAK,2EAA2E,mCAAmC,SAAS,mBAAmB,SAAS,OAAO,YAAY,8CAA8C,eAAe,IAAI,wBAAwB,IAAI,kBAAkB,EAAE,aAAa,uDAAuD,sJAAsJ,iBAAiB,gDAAgD,iBAAiB,MAAM,KAAK,kBAAkB,aAAa,4EAA4E,sBAAsB,qBAAqB,2EAA2E,qBAAqB,0CAA0C,KAAK,wBAAwB,eAAe,cAAc,wBAAwB,YAAY,cAAc,wBAAwB,aAAa,wFAAwF,6CAA6C,2CAA4F;;;;;;;;;;;;;;;;;;ACD92uF;;AAEnC;AACA,SAAS,2DAAW,GAAG,yDAAW;AAClC;;AAEe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACpBqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;;;;;;AC9CzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;;AAGA;AACA;;AAEA,sBAAsB,YAAY;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC;;;;;;;;;;;;;ACtHY;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;AC7Da;;AAEb,aAAa,mBAAO,CAAC,sDAAe;;AAEpC,eAAe,mBAAO,CAAC,wFAAgC;;AAEvD,iBAAiB,mBAAO,CAAC,wDAAa;;AAEtC,wBAAwB,mBAAO,CAAC,0EAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA,4BAA4B;;AAE5B,yBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB;AACxB;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wFAAwF;;AAExF;AACA,4GAA4G;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;;AAE3B,gCAAgC;AAChC;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;;;;;;;;;;;;;;;ACvSA,IAAIA,KAAK,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,CAAC;AACzD,IAAIC,KAAK,GAAGF,QAAQ,CAACC,gBAAgB,CAAC,2BAA2B,CAAC;AAE3D,MAAME,eAAe,GAAGA,CAAA,KAAM;EACnCD,KAAK,CAACE,OAAO,CAAEC,QAAQ,IACrBA,QAAQ,CAACC,gBAAgB,CAAC,OAAO,EAAE,YAAY;IAC7C,IAAIC,QAAQ,GAAG,IAAI,CAACC,UAAU;IAE9BT,KAAK,CAACK,OAAO,CAAEK,IAAI,IAAK;MACtB,IAAIF,QAAQ,IAAIE,IAAI,EAAE;QACpBF,QAAQ,CAACG,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;QACnC;MACF;MACAF,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACjC,CAAC,CAAC;EACJ,CAAC,CACH,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACjBD,MAAMC,MAAM,GAAGb,QAAQ,CAACc,aAAa,CAAC,YAAY,CAAC;AACnD,MAAMC,IAAI,GAAGf,QAAQ,CAACc,aAAa,CAAC,UAAU,CAAC;AAC/C,MAAME,SAAS,GAAGhB,QAAQ,CAACC,gBAAgB,CAAC,YAAY,CAAC;AAElD,MAAMgB,UAAU,GAAGA,CAAA,KAAM;EAC/BJ,MAAM,EAAEP,gBAAgB,CAAC,OAAO,EAAE,MAAM;IACvCS,IAAI,EAAEL,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAChCE,MAAM,EAAEH,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IAClC,IAAII,IAAI,EAAEL,SAAS,CAACQ,QAAQ,CAAC,QAAQ,CAAC,EAAE;MACvClB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,QAAQ;IACzC,CAAC,MAAM;MACNrB,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;IACvC;EACD,CAAC,CAAC;EAEFL,SAAS,CAACZ,OAAO,CAAEkB,EAAE,IAAK;IACzBA,EAAE,CAAChB,gBAAgB,CAAC,OAAO,EAAE,MAAM;MAClCS,IAAI,EAAEL,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MAChCZ,QAAQ,CAACmB,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,MAAM;MACtCR,MAAM,EAAEH,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC,CAAC,CAAC;EACH,CAAC,CAAC;AACH,CAAC;;;;;;;;;;;;;;;ACtBD,MAAMW,OAAO,GAAGvB,QAAQ,CAACc,aAAa,CAAC,oBAAoB,CAAC;AAErD,MAAMU,QAAQ,GAAGA,CAAA,KAAM;EAC5B,IAAI;IACF,MAAMC,WAAW,GAAGA,CAAA,KAAM;MACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;MAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;QACdH,OAAO,CAACb,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MACjC,CAAC,MAAM;QACLN,OAAO,CAACb,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;MACpC;IACF,CAAC;IAEDa,WAAW,CAAC,CAAC;IACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtCmB,WAAW,CAAC,CAAC;IACf,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOK,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;;;;;;;;ACpBmF;AACpF,MAAMI,MAAM,GAAGlC,QAAQ,CAACc,aAAa,CAAC,QAAQ,CAAC;AAC/C,MAAMqB,YAAY,GAAGnC,QAAQ,CAACc,aAAa,CAAC,iBAAiB,CAAC;AAEvD,MAAMsB,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,MAAM,GAAG,IAAIJ,0FAAY,CAAC,cAAc,EAAE;IAC9CC,MAAM,EAAE,SAAS;IACjBI,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,MAAMb,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAMC,GAAG,GAAGC,MAAM,CAACC,OAAO;IAC1B,IAAIF,GAAG,IAAI,GAAG,EAAE;MACdQ,MAAM,CAACxB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IAChC,CAAC,MAAM;MACLK,MAAM,CAACxB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACnC;IAEA,IAAIc,GAAG,IAAI,GAAG,EAAE;MACdS,YAAY,CAACzB,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;IACtC,CAAC,MAAM;MACLM,YAAY,CAACzB,SAAS,CAACE,MAAM,CAAC,QAAQ,CAAC;IACzC;EACF,CAAC;EACDa,WAAW,CAAC,CAAC;EACbE,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IACtCmB,WAAW,CAAC,CAAC;EACf,CAAC,CAAC;AACJ,CAAC;;;;;;;;;;;;;;;;AC5BgE;AACjEc,8CAAM,CAACI,GAAG,CAAC,CAACH,8CAAU,EAAEC,8CAAU,EAAEC,4CAAQ,CAAC,CAAC;AAEvC,MAAME,qBAAqB,GAAGA,CAAA,KAAM;EACzC,IAAI;IACF,MAAMC,oBAAoB,GAAG,IAAIN,8CAAM,CAAC,0BAA0B,EAAE;MAClEO,aAAa,EAAE,GAAG;MAClBC,UAAU,EAAE;QACVC,MAAM,EAAE,0CAA0C;QAClDC,MAAM,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;IACR,CAAC,CAAC;IAEF,MAAMC,WAAW,GAAG,IAAIZ,8CAAM,CAAC,gBAAgB,EAAE;MAC/CO,aAAa,EAAE,CAAC;MAChBI,IAAI,EAAE,IAAI;MACVH,UAAU,EAAE;QACVC,MAAM,EAAE,qBAAqB;QAC7BC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,2BAA2B;QAC/B+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHR,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,aAAa,EAAE;QACjB,CAAC;QACD,CAAC,EAAE;UACDA,aAAa,EAAE;QACjB;MACF;IACF,CAAC,CAAC;IAEF,MAAMS,kBAAkB,GAAG,IAAIhB,8CAAM,CAAC,uBAAuB,EAAE;MAC7DQ,UAAU,EAAE;QACVC,MAAM,EAAE,uCAAuC;QAC/CC,MAAM,EAAE;MACV,CAAC;MACDO,mBAAmB,EAAE,IAAI;MACzB;MACAC,YAAY,EAAE,CAAC;MACfC,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,CAAC;MAChBR,KAAK,EAAE,IAAI;MACXqB,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ,CAAC;MACDR,UAAU,EAAE;QACVC,SAAS,EAAE,IAAI;QACf/B,EAAE,EAAE,kCAAkC;QACtC+B,SAAS,EAAE;MACb,CAAC;MACDC,WAAW,EAAE;QACX,GAAG,EAAE;UACHO,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC,GAAG;UAClBf,aAAa,EAAE;QACjB,CAAC;QACD,GAAG,EAAE;UACHe,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHA,YAAY,EAAE,CAAC;QACjB,CAAC;QACD,GAAG,EAAE;UACHf,aAAa,EAAE,GAAG;UAClBe,YAAY,EAAE,CAAC;QACjB;MACF,CAAC;MACDC,cAAc,EAAE;IAClB,CAAC,CAAC;IAEF,MAAMC,eAAe,GAAG,IAAIxB,8CAAM,CAAC,oBAAoB,EAAE;MACvDQ,UAAU,EAAE;QACVC,MAAM,EAAE,oCAAoC;QAC5CC,MAAM,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACV9B,EAAE,EAAE,+BAA+B;QACnC+B,SAAS,EAAE;MACb,CAAC;MACDS,cAAc,EAAE,KAAK;MACrBN,mBAAmB,EAAE,IAAI;MACzBE,cAAc,EAAE,IAAI;MACpBR,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE;IACT,CAAC,CAAC;IAEF,MAAM0B,cAAc,GAAG,IAAIzB,8CAAM,CAAC,oBAAoB,EAAE;MACtD0B,QAAQ,EAAE,IAAI;MACdC,UAAU,EAAE,IAAI;MAChBR,cAAc,EAAE,IAAI;MACpBZ,aAAa,EAAE,MAAM;MACrBI,IAAI,EAAE,IAAI;MACVZ,KAAK,EAAE,IAAI;MACX6B,QAAQ,EAAE;QACRC,OAAO,EAAE,IAAI;QACbC,KAAK,EAAE,CAAC;QACRC,oBAAoB,EAAE;MACxB,CAAC;MACDC,gBAAgB,EAAE;IACpB,CAAC,CAAC;IAEFvE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,WAAW,EAAE,YAAY;MACzC0D,cAAc,CAACG,QAAQ,CAACK,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;IAEJxE,QAAQ,CACLc,aAAa,CAAC,oBAAoB,CAAC,CACnCR,gBAAgB,CAAC,UAAU,EAAE,YAAY;MACxC0D,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;IAEJ9C,MAAM,CAACrB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACtC,IAAI,CAAC0D,cAAc,CAACG,QAAQ,CAACO,OAAO,EAAE;QACpCV,cAAc,CAACG,QAAQ,CAACM,KAAK,CAAC,CAAC;MACjC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAO3C,CAAC,EAAE;IACVC,OAAO,CAAC4C,KAAK,CAAC7C,CAAC,CAAC;EAClB;AACF,CAAC;;;;;;;;;;;;;;;;ACtI6B;AAE9B,MAAM+C,OAAO,GAAG7E,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC;AACrD,MAAMgE,UAAU,GAAG9E,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMiE,SAAS,GAAG/E,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMkE,SAAS,GAAGhF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMmE,aAAa,GAAGjF,QAAQ,CAACc,aAAa,CAAC,kBAAkB,CAAC;AAChE,MAAMoE,UAAU,GAAGlF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC;AAC1D,MAAMqE,SAAS,GAAGnF,QAAQ,CAACc,aAAa,CAAC,cAAc,CAAC;AACxD,MAAMsE,WAAW,GAAGpF,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC;AAEhD,MAAMuE,cAAc,GAAGA,CAAA,KAAM;EAClC,IAAI;IACF,IAAIC,cAAc,GAAG,IAAI;IAEzB,MAAMC,WAAW,GAAGX,oDAAO,CAAC5E,QAAQ,CAACwF,cAAc,CAAC,eAAe,CAAC,EAAE;MACpErB,QAAQ,EAAE,IAAI;MACdjB,IAAI,EAAE,IAAI;MACVuC,KAAK,EAAE,IAAI;MACXC,QAAQ,EAAE,KAAK;MACfC,UAAU,EAAE;IACd,CAAC,CAAC;IAEF,MAAMC,aAAa,GAAGA,CAACC,UAAU,EAAEC,SAAS,KAAK;MAC/C,IAAInE,MAAM,CAACoE,MAAM,CAACC,KAAK,GAAG,GAAG,EAAE;QAC7BT,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWJ,UAAW;QAC9B,CAAC,CAAC;MACJ,CAAC,MAAM;QACLN,WAAW,CAACU,GAAG,CAAC;UACdC,IAAI,EAAE,WAAW;UACjBD,GAAG,EAAG,YAAWH,SAAU;QAC7B,CAAC,CAAC;MACJ;IACF,CAAC;IAEDF,aAAa,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAClDL,WAAW,CAACY,MAAM,CAAC,GAAG,CAAC;IACvB,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;MAC/Bb,WAAW,CAACc,IAAI,CAAC,CAAC;MAElBd,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;MAC5Bf,WAAW,CAACE,KAAK,CAAC,KAAK,CAAC;MACxBF,WAAW,CAACG,QAAQ,CAAC,IAAI,CAAC;MAC1BH,WAAW,CAACrC,IAAI,CAAC,KAAK,CAAC;MAEvB2B,OAAO,CAACnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC7BiD,UAAU,CAACpE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChCkD,SAAS,CAACrE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAC/BmD,SAAS,CAACtE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;IACjC,CAAC;IAED0D,WAAW,CAACgB,EAAE,CAAC,MAAM,EAAE,MAAM;MAC3B,IAAI,CAAChB,WAAW,CAACiB,MAAM,CAAC,CAAC,EAAE;QACzBjB,WAAW,CAACe,QAAQ,CAAC,MAAM,CAAC;QAC5Bf,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC,CAAC,MAAM,IAAI0D,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAIjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACrDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;MACjC,CAAC,MAAM,IAAIlB,WAAW,CAACiB,MAAM,CAAC,CAAC,IAAI,CAACjB,WAAW,CAACrC,IAAI,CAAC,CAAC,EAAE;QACtDqC,WAAW,CAACkB,WAAW,CAAC,MAAM,CAAC;QAC/B5B,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MAChC;IACF,CAAC,CAAC;IAEF0D,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;IACnC,CAAC,CAAC;IAEF2E,WAAW,CAACgB,EAAE,CAAC,OAAO,EAAE,MAAM;MAC5B1B,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjCuE,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFuE,SAAS,CAAC7E,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACxCuE,OAAO,EAAEnE,SAAS,CAACE,MAAM,CAAC,MAAM,CAAC;MACjC2E,WAAW,CAACmB,KAAK,CAAC,CAAC;MACnBvB,SAAS,EAAEzE,SAAS,CAACE,MAAM,CAAC,SAAS,CAAC;IACxC,CAAC,CAAC;IAEFiE,OAAO,CAACvE,gBAAgB,CAAC,OAAO,EAAE,MAAM;MACtC,IAAIgF,cAAc,KAAK,IAAI,EAAE;QAC3BM,aAAa,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9CN,cAAc,GAAG,KAAK;MACxB;MACAtF,QAAQ,CAACc,aAAa,CAAC,eAAe,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC/D7B,QAAQ,CAACc,aAAa,CAAC,WAAW,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAC3D7B,QAAQ,CAACc,aAAa,CAAC,aAAa,CAAC,CAACJ,SAAS,CAACmB,GAAG,CAAC,QAAQ,CAAC;MAE7D0D,WAAW,CAACoB,KAAK,CAAC,IAAI,CAAC;MACvB1B,aAAa,EAAEvE,SAAS,CAACmB,GAAG,CAAC,MAAM,CAAC;MACpCsD,SAAS,EAAEzE,SAAS,CAACmB,GAAG,CAAC,SAAS,CAAC;MACnCgD,OAAO,EAAEnE,SAAS,CAACmB,GAAG,CAAC,iBAAiB,CAAC;MACzC7B,QAAQ,CAACc,aAAa,CAAC,OAAO,CAAC,CAACM,KAAK,CAACwF,SAAS,GAAG,SAAS;MAE3D,IAAIrB,WAAW,CAACE,KAAK,CAAC,CAAC,EAAE;QACvBF,WAAW,CAACsB,WAAW,CAAC,CAAC,CAAC;QAC1BT,kBAAkB,CAAC,CAAC;MACtB,CAAC,MAAM;QACLA,kBAAkB,CAAC,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOtE,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;;;;;;;;;;AC1GD,sBAAsB,qBAAM,mBAAmB,qBAAM;AACrD;AACA,aAAa,mBAAO,CAAC,2BAAc;;AAEnC;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA;;AAEA;AACA;AACA,EAAE,gBAAgB,qBAAM;AACxB,UAAU,qBAAM;AAChB,EAAE;AACF;AACA,EAAE;AACF;AACA;;AAEA;;;;;;;;;;;ACZA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,SAAS,QAAQ,YAAY;AAC/C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,2BAA2B;AAC3B,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,YAAY,YAAY,GAAG,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;;AAEtB;AACA,iBAAiB,QAAQ;;AAEzB;AACA,YAAY,QAAQ;;AAEpB;AACA,YAAY,QAAQ;;AAEpB;AACA;AACA;AACA;AACA;;AAEA,YAAY,aAAa,GAAG,aAAa,MAAM;;AAE/C;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC9KA;AACqD;AACC;AACiC;;AAEvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,uEAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;;AAEA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;;AAGN,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,0BAA0B,uEAAM;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA,eAAe;;AAEf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;;;AAGA,2CAA2C;;AAE3C;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB,0EAAQ;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;;AAEA,+DAA+D,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,6CAA6C,EAAE;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;;AAGR;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,KAAK,8CAA8C,kBAAkB;AACvF,KAAK;AACL;;AAEA;AACA;AACA,kBAAkB,KAAK,sBAAsB,kBAAkB,2BAA2B,kBAAkB;AAC5G,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,kBAAkB,KAAK,uDAAuD,mBAAmB;AACjG,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA,kBAAkB,KAAK,2BAA2B,mBAAmB,+BAA+B,gBAAgB;AACpH,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,qBAAqB,uEAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB,oBAAoB;;AAEpB;AACA;;AAEA;;AAEA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,OAAO;AACP;;AAEA,0EAA0E;;AAE1E,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA;;AAEA;AACA,yFAAyF;;AAEzF;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA,+EAA+E;AAC/E;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,kBAAkB;AAClB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,wBAAwB,8FAAqB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB,gBAAgB;;;AAGhB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;;AAEA,cAAc,0EAAQ;AACtB,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gBAAgB;;;AAGhB;AACA;AACA,yEAAyE;;AAEzE;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;;;AAGhB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,aAAa;;AAEb;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4DAA4D,WAAW,eAAe,aAAa;;AAEnG;AACA;AACA;AACA;AACA,2DAA2D,GAAG;AAC9D,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,oEAAoE,OAAO,eAAe,aAAa;;AAEvG;AACA;AACA,gBAAgB;AAChB;;;AAGA,8BAA8B,wCAAwC;AACtE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD,OAAO,eAAe,cAAc,oBAAoB,WAAW,mBAAmB,EAAE;AAC7I,mBAAmB;AACnB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE,MAAM;AAC9E,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,iEAAiE,MAAM;AACvE;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA,WAAW;AACX,SAAS;;AAET;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA,aAAa;AACb;AACA,YAAY;;;AAGZ;AACA;AACA;;AAEA,iDAAiD;;AAEjD;AACA;AACA,YAAY;;;AAGZ,oCAAoC;;AAEpC;AACA,SAAS;;AAET,mBAAmB;AACnB,SAAS;;AAET;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,YAAY;AACZ;AACA;AACA;AACA;;AAEA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,oBAAoB,YAAY,+BAA+B,mBAAmB;AAClF,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;;AAGA;AACA;AACA;;AAEA;;AAE2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/lD3C;AAC2D;AACxB;AACoC;AACa;AACzC;;AAE3C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;AACA;;AAEA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;AACD;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,6EAAU;AAC3B;;AAEA;AACA;AACA,wCAAwC;;AAExC,qBAAqB,6DAAa,GAAG,2DAAa;AAClD,mBAAmB,6DAAa,GAAG,2DAAa,uCAAuC;;AAEvF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,2DAAa,aAAa,2DAAa,eAAe,2DAAa;AAClF,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,2DAAa,qBAAqB,2DAAa,qBAAqB,2DAAa;AAChG,IAAI;AACJ;AACA;;AAEA,YAAY,iBAAiB,GAAG,SAAS;AACzC;;AAEA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,4DAA4D;AAC5D;;AAEA,6CAA6C;AAC7C;;AAEA,+DAA+D;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC,kGAAkG;;AAElG;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;;AAElB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B;AAC7B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,oEAAoE;;AAEpE,iDAAiD;;AAEjD;AACA;AACA,+DAA+D;;AAE/D,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C,kBAAkB;;AAElB;AACA,iBAAiB,2DAAa;AAC9B,IAAI;AACJ;AACA;;AAEA,kBAAkB,4BAA4B;AAC9C,0CAA0C;;AAE1C,2CAA2C;AAC3C;;AAEA,mDAAmD;;AAEnD,kBAAkB;;AAElB;AACA,8BAA8B,2DAAa,SAAS,2DAAa;AACjE,MAAM;AACN;AACA;;AAEA,0BAA0B,WAAW,GAAG,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,2DAAa;AACjC,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,iBAAiB;AAC7B;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA,EAAE,qFAAiB;AACnB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,KAAK;AACzC,iBAAiB,yBAAyB,EAAE,UAAU;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG,IAAI,GAAG;;AAEV;AACA;AACA;AACA;;AAEA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC,IAAI;;AAEL;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,iBAAiB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,eAAe;AACf,6BAA6B;AAC7B;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,uBAAuB,iCAAiC;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA,YAAY,8CAA8C,EAAE,MAAM;AAClE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,aAAa,iEAAiE;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8EAA8E;AAC9E;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6EAAU;AAC7B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;AACA,YAAY,gBAAgB;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+EAA+E;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,6EAAU;AACxC;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,kBAAkB;AAChC;AACA,cAAc,oBAAoB;AAClC;AACA,cAAc,kBAAkB;AAChC;AACA,cAAc,kBAAkB;AAChC;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uIAAuI;AACvI;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,oBAAoB;AAClC;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,2FAAqB;AAC3D;AACA;;AAEA;AACA,GAAG,IAAI;AACP,GAAG;;;AAGH;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA,oBAAoB;;AAEpB;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC,YAAY;AACZ,4CAA4C;AAC5C,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,MAAM;AACpB;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,GAAG,6CAA6C;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,qEAAqE;;AAErE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,qDAAS;AAC9B;AACA;;AAEA;AACA;AACA;AACA,IAAI,WAAW;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;;AAGA;;AAE6K;;;;;;;;;;;;ACzqFjK;;AAEZ;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,WAAW,aAAa,2BAA2B,GAAG;AACtD,WAAW,oDAAoD,2BAA2B,YAAY;AACtG,WAAW,uDAAuD;AAClE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,4CAA4C;AACvD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,2BAA2B;AACtC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,cAAc;AACd,YAAY;AACZ,cAAc;AACd,iBAAiB;AACjB,iBAAiB;;;;;;;;;;;AC1MjB,kBAAkB,mBAAO,CAAC,+FAAe;AACzC,UAAU,mBAAO,CAAC,+EAAO;AACzB,eAAe,mBAAO,CAAC,yFAAY;AACnC,UAAU,mBAAO,CAAC,+EAAO;;AAEzB;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,oBAAoB;AAClC;AACA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB;AAC/D;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA,gCAAgC;AAChC;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,KAAK;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,CAAC;;AAED,mHAAmH;AACnH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,CAAC;;AAED,oBAAoB;AACpB,4BAA4B;AAC5B,iBAAiB;;;;;;;;;;;ACjUjB,kBAAkB,mBAAO,CAAC,+FAAe;;AAEzC;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,oBAAoB,YAAY,QAAQ;AAChF,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,0BAA0B,cAAc;AACxC;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,yBAAyB;AACrC,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,YAAY,MAAM;AAClB,cAAc;AACd;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;;AAGA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,YAAY,QAAQ;AACpB,YAAY,mBAAmB;AAC/B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,EAAE;AACF,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,yBAAyB;AACzB,0BAA0B;AAC1B,2BAA2B;AAC3B,4BAA4B;AAC5B,+BAA+B;AAC/B;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,SAAS;AACT;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,MAAM;AACjB,WAAW,kBAAkB;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ,gEAAgE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA,6BAA6B,+CAA+C;AAC5E,IAAI;AACJ,6BAA6B,mCAAmC;AAChE;AACA;;AAEA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,4EAA4E;AAC5E,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,SAAS;AACV;;AAEA;AACA,CAAC,oBAAoB;AACrB,CAAC,oBAAoB;AACrB,CAAC,yBAAyB;AAC1B,CAAC,eAAe;AAChB,CAAC,YAAY;AACb,CAAC,gBAAgB;AACjB,CAAC,qBAAqB;AACtB;;;;;;;;;;;;AC/yDa;;AAEb,aAAa,6HAA+B;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;ACrnEjB,UAAU,mBAAO,CAAC,+EAAO;AACzB,yBAAyB;AACzB,qBAAqB;AACrB,gJAAqD;;;;;;;;;;;ACHrD,gBAAgB,gIAAkC;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd,eAAe;AACf,mBAAmB;AACnB,aAAa;AACb,4BAA4B;AAC5B,mBAAmB;AACnB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,WAAW;AACX,mBAAmB,MAAM;AACzB;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,IAAI,KAAK;AACT;AACA;AACA;AACA,wBAAwB;AACxB,yBAAyB;AACzB,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,IAAI;AACJ;;AAEA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,KAAK;AACZ,gCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,KAAK;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,EAAE;AACF;AACA,0BAA0B,yBAAyB;AACnD,wBAAwB,uBAAuB;AAC/C,sBAAsB,qBAAqB;AAC3C,oBAAoB,mBAAmB;AACvC,sBAAsB;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ,uBAAuB,0DAA0D;AACjF;AACA,wBAAwB;AACxB;;;;AAIA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,kBAAkB;;;;;;;;;;;ACrpBlB,gBAAgB,wGAAwC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,UAAU;;AAEV;;AAEA,UAAU;;AAEV,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;AAGA;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK,IAA0C;AAC/C,EAAE,iCAAO,EAAE,mCAAG;AACd;AACA,GAAG;AAAA,kGAAE;AACL,GAAG,KAAK,EAIN;AACF,CAAC,SAAS,qBAAM,mBAAmB,qBAAM;;AAEzC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;;AAEA;AACA,+DAA+D;AAC/D,sEAAsE;AACtE,gHAAgH;AAChH,uEAAuE;AACvE,gFAAgF;AAChF,8IAA8I;AAC9I,8EAA8E;AAC9E,uFAAuF;AACvF,0IAA0I;AAC1I,qFAAqF;AACrF,8FAA8F;AAC9F,0JAA0J;;AAE1J;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,yBAAyB;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA,6DAA6D,GAAG;;AAEhE;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA,8MAA8M;AAC9M,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,iBAAiB;;AAE9D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,4CAA4C,GAAG;AAC/C,mFAAmF;;AAEnF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC;;;;;;;;;;;ACzoBD;;AAEA;AACA;AACA,sFAAsF,iBAAiB;AACvG;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,MAAM,IAAyD;AAC/D;AACA,OAAO,EAKgC;AACvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7KD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEqC;AACE;AACT;AACqB;AACpB;AACE;AAC8B;AACT;AACjB;AACqL;AAC1I;AACkC;AACnB;AAC3C;AACa;AACoC;AAC3C;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,wBAAwB;AACxB,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA,sBAAsB,wDAAQ;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,KAAK;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,8DAAgB;AACvB;AACA;;AAEA;AACA;AACA;AACA,WAAW,8DAAgB;AAC3B;AACA;AACA;AACA,SAAS,8DAAgB,SAAS,8DAAgB;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,8DAAgB;AAC7D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,0BAA0B,MAAM,EAAE,iBAAiB,EAAE,QAAQ;AAC7D;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,yBAAyB;AAC/D;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6BAA6B,MAAM;AACnC,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,yDAAyD;AAC7D;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,2CAA2C,wEAA0B,IAAI,gEAAkB,mBAAmB,oEAAsB,IAAI,+DAAiB,YAAY,oEAAsB;AAC3L,YAAY,gEAAkB,IAAI,gEAAkB;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,gEAAkB,IAAI,gEAAkB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,sBAAsB,oBAAoB;AAC1C,2BAA2B,yBAAyB;AACpD,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,uBAAuB,qBAAqB;AAC5C,qBAAqB,mBAAmB;AACxC,4BAA4B,0BAA0B;AACtD,0BAA0B,wBAAwB;AAClD,sBAAsB,oBAAoB;AAC1C,qBAAqB,mBAAmB;AACxC,sBAAsB,oBAAoB;AAC1C,mBAAmB,iBAAiB;AACpC,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS,wDAAQ,KAAK,+DAAiB;AACvC;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6DAAe,KAAK,2DAAa;AAC5C,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa,wDAAQ;AACrB;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA,0CAA0C,wDAAQ;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,YAAY,QAAQ,cAAc;AAClC;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,kDAAkD,iBAAiB;AACnE,aAAa,oEAAsB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,sCAAsC;AAClD,qCAAqC;AACrC;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,2DAAa;AACf,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,sEAAsB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qEAAuB;AACpC;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uEAAyB;AACtC;AACA;AACA,2BAA2B,qEAAyB;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,MAAM,oEAAoB;AAC1B;AACA;AACA,oBAAoB,oEAAsB;AAC1C;AACA;AACA,MAAM;AACN,mBAAmB,oEAAsB;AACzC;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,2EAA6B;AACvE,4CAA4C,2EAA6B;AACzE,0CAA0C,2EAA6B;AACvE;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAAmB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,wEAA4B;AAC9B;AACA;AACA,MAAM,mEAAmB;AACzB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qEAAyB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4DAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,wDAAQ;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wEAAwB;AAC1C,mBAAmB,6DAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,OAAO;AACP,MAAM,qEAAyB;AAC/B,MAAM,wEAA4B;AAClC,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,GAAG;AACjB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa,gEAAoB;AACjC;AACA,gBAAgB,gEAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,4DAA4D,sDAAQ;AACpE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,oBAAoB,+DAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,0CAA0C,aAAa,GAAG,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,8CAA8C,aAAa,GAAG,SAAS;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4CAA4C,aAAa,GAAG,SAAS;AACrE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,OAAO,6BAA6B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc,UAAU;AACxE;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDAAgD;AAC5D;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ,WAAW;AAC/B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,qCAAqC;AACrC;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI,+DAAmB;AACvB;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,sBAAsB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,WAAW;AACX;AACA;AACA,MAAM,iDAAiD;AACvD;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC,KAAK;AAC/C;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,YAAY,mDAAmD;AAC/D;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,GAAG,aAAa,UAAU;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,sBAAsB,YAAY,uBAAuB;AACpE;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,GAAG,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE;AACvE;AACA;AACA;AACA;AACA,sDAAsD,GAAG,SAAS,EAAE;AACpE;AACA,qBAAqB,GAAG,IAAI,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mEAAmE,mBAAmB;AACtF;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,kBAAkB,sEAAwB;AAC1C;AACA,kBAAkB,sEAAwB;AAC1C;AACA,oDAAoD,SAAS;AAC7D;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,mBAAmB;AACjD,oCAAoC,YAAY,mBAAmB;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,0BAA0B;AAClE,0CAA0C,0BAA0B;AACpE;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,uBAAuB;AACrC,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,uBAAuB,KAAK,uBAAuB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,6DAA6D;AAC7D,YAAY,OAAO;AACnB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gEAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,SAAS,yBAAyB;AAClC,uDAAuD;AACvD;AACA;AACA;AACA,cAAc,8BAA8B,IAAI,yBAAyB;AACzE;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+DAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,MAAM,2BAA2B,4BAA4B;AAC7D;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,4BAA4B;AACzC;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,+BAA+B;AAC7D,SAAS,yBAAyB;AAClC,yCAAyC;AACzC;AACA,aAAa,2BAA2B;AACxC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA,cAAc,+BAA+B;AAC7C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB,gEAAoB;AAC3C;AACA;AACA;;AAEA;AACA;AACA,MAAM,4BAA4B,8BAA8B;AAChE;AACA,6CAA6C,wBAAwB;AACrE;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,6BAA6B;AAC1C;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,kEAAsB;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,2BAA2B;AACnC;AACA,sCAAsC,iCAAiC;AACvE;AACA;AACA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,sCAAsC;AACpE;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0EAA8B;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA,uCAAuC,sCAAsC;AAC7E;AACA,0DAA0D,wBAAwB;AAClF;AACA,aAAa,QAAQ;AACrB,sDAAsD,sCAAsC;AAC5F;AACA,cAAc;AACd;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,MAAM,yEAA6B;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc,WAAW,8CAA8C,WAAW;AAClF,yCAAyC,yBAAyB;AAClE,cAAc,mCAAmC;AACjD;AACA;AACA,cAAc,wCAAwC;AACtD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,kDAAkD,KAAK,GAAG;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,6CAA6C,KAAK,GAAG,EAAE,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,iBAAiB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,0CAA0C,OAAO,yCAAyC,MAAM,uCAAuC,SAAS;AAChJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6DAAe,IAAI,6DAAe;AACxC,kBAAkB,6DAAe;AACjC;AACA;AACA;;AAEA;AACA;AACA,IAAI,4FAA4F;AAChG;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA,UAAU;AACV;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mDAAmD,4BAA4B;AAC/E;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,iBAAiB;AACtC,mBAAmB,gBAAgB;AACnC;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B,iBAAiB,gBAAgB;AACjC,IAAI,iDAAiD;AACrD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA,YAAY;AACZ,4DAA4D,WAAW;AACvE,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA,2BAA2B,gBAAgB,QAAQ,YAAY;AAC/D,WAAW,iBAAiB;AAC5B;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,SAAS;AACtB,0DAA0D;AAC1D;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB,iBAAiB;AACrC;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6BAA6B,UAAU;AACvC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc,kBAAkB,aAAa,sBAAsB;AACnE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,SAAS,yDAAkB;AAC3B;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,QAAQ,sEAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wEAA0B,qBAAqB,sEAAwB,qDAAqD,uEAAyB,qBAAqB,wEAA0B,qBAAqB,0EAA4B,qBAAqB,wEAA0B,yDAAyD,wEAA0B,qBAAqB,wEAA0B,qBAAqB,uEAAyB;AACnf,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gCAAgC,oBAAoB,GAAG,qBAAqB;AAC5E,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oBAAoB,mBAAmB;AACvC;AACA;AACA;;AAEA;AACA,YAAY,aAAa;AACzB;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,aAAa;AAC5B;AACA,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA,uDAAuD,mBAAmB;AAC1E;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,kBAAkB;AAC/B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,QAAQ;AACxB,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA,YAAY,kBAAkB;AAC9B;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,mDAAmD,YAAY;AAC/D;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wBAAwB;AACrC,MAAM,gBAAgB;AACtB;AACA,aAAa,WAAW;AACxB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,wBAAwB;AACvC;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE,iBAAiB;AACrF,IAAI,iBAAiB,OAAO,gBAAgB;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;;AAEA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY,oEAAsB;AAClC;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC;;AAEA;AACA;AACA,mBAAmB,+DAAiB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oEAAsB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gDAAgD,IAAI;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,8CAA8C,+DAAiB;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA,qBAAqB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc,EAAE,2DAAe;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB,iDAAiD,UAAU;AACjF;AACA;AACA,QAAQ,8DAAgB,IAAI,8DAAgB;AAC5C,MAAM,4DAAgB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,mDAAG;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA;AACA;AACA,4EAA4E,UAAU;AACtF;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,QAAQ;AAC1B,4DAA4D,qBAAqB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,4DAAc;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA,gBAAgB,qBAAqB,YAAY,kBAAkB;AACnE;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,aAAa,QAAQ;AACrB,qBAAqB;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,gCAAgC,KAAK;AACrC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA,0BAA0B,mDAAmD;AAC7E,6DAA6D;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,uBAAuB,YAAY,iBAAiB,gBAAgB;AACpE;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ,WAAW;AAC9B;AACA;AACA,YAAY;AACZ;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,0BAA0B,wBAAwB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM;AACjC,8BAA8B,MAAM;AACpC;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM,yBAAyB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;;AAEA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,sDAAsD,qBAAqB;AAC3E,MAAM,qBAAqB,OAAO,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA,8CAA8C,gCAAgC;AAC9E;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,4BAA4B,qBAAqB,GAAG,OAAO,eAAe;AAC1E,MAAM,qBAAqB;AAC3B;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,6DAAe;AACvB;AACA;;AAEA;AACA;AACA;AACA,QAAQ,2DAAa;AACrB;AACA;AACA;AACA,8CAA8C,uDAAG,iBAAiB,uDAAG;AACrE;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,oEAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM,6DAAe;AACrB;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA,aAAa,QAAQ;AACrB,iBAAiB,kCAAkC;AACnD;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sDAAQ,IAAI,8DAAgB,IAAI,8DAAgB;AACxD,wBAAwB,MAAM;AAC9B,aAAa,8DAAgB;AAC7B;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,YAAY;AACZ;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD,iBAAiB,4BAA4B;AAC7C;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,8BAA8B;AACpE;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B,IAAI,+CAA+C;AACnD,IAAI,+CAA+C;AACnD,IAAI,mDAAmD;AACvD;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,IAAI,0DAA0D;AAC9D;AACA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,GAAG;AACf;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA,2DAA2D,cAAc;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E,KAAK,kBAAkB;AAClG;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,MAAM;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC,KAAK,2BAA2B;AAC1E;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,SAAS,iCAAiC;AAC1C,MAAM,sCAAsC;AAC5C;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6DAAe,gBAAgB,sDAAQ;AACvE,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,gBAAgB;AACvD,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA,eAAe,6DAAe;AAC9B,MAAM,2DAAe,aAAa,sDAAQ;AAC1C;AACA;;AAEA;AACA,qDAAqD,8BAA8B;AACnF,QAAQ,+BAA+B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,8BAA8B,MAAM,+BAA+B;AAC3E;AACA;AACA;AACA;AACA,wCAAwC,wDAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,iBAAiB,yBAAyB,wBAAwB;AAC9E;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS,gBAAgB,SAAS,gBAAgB,SAAS;AACzH,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS;AAC7G,UAAU;AACV,0DAA0D,UAAU,UAAU,UAAU,cAAc,SAAS,WAAW,SAAS;AACnI,UAAU;AACV,0DAA0D,SAAS,YAAY,SAAS,YAAY,SAAS,YAAY,SAAS;AAClI;AACA;AACA;AACA,yBAAyB,+DAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB,WAAW,WAAW,GAAG,oBAAoB;AAC3E;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;;AAEA;AACA,IAAI,2DAAe,aAAa,sDAAQ;;AAExC;AACA,oBAAoB,mBAAmB;AACvC;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,GAAG;AACtC,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8DAA8D,GAAG;AACjE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8EAA8E,UAAU,oBAAoB;;AAE5G;AACA;AACA;;AAEA;AACA;AACA,MAAM,qBAAqB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,6DAA6D;AAC7D;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,sCAAsC;AAC5C;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,KAAK;AACL;AACA;AACA,sBAAsB,+BAA+B;AACrD,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,oBAAoB,UAAU;AAC9B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qEAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,sBAAsB,6BAA6B;AACnD,KAAK;AACL,gCAAgC,qEAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,cAAc;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,8BAA8B;AACjF,MAAM,2BAA2B;AACjC;AACA,aAAa,YAAY;AACzB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,0BAA0B,KAAK,wBAAwB;AAC7D;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,sBAAsB,qEAAuB;AAC7C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,eAAe;AAC3B,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,sBAAsB;AAC9C;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,wBAAwB;AAChC,IAAI,sBAAsB,kCAAkC;AAC5D;AACA,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,mBAAmB;AACzB;AACA,aAAa,QAAQ;AACrB,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA,+BAA+B,iCAAiC;AAChE,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,cAAc,wDAAQ;AACtB;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,wEAAwB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,GAAG,UAAU,EAAE,0EAA0E,GAAG,IAAI,EAAE;AACnM;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,oBAAoB,yDAAkB;AAChE;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,wBAAwB,8CAAO;AACrC;AACA;AACA,4BAA4B,sDAAa,CAAC,8CAAO,WAAW,sDAAa;AACzE;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM,SAAS,yDAAkB;AACjC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,oEAAoB,IAAI,6EAA6B;AAC7D,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,uCAAuC;AACxE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,sBAAsB;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,QAAQ,gFAAgC,gHAAgH,oFAAsC;AAC9L;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,oCAAoC,IAAI,oCAAoC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,+BAA+B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA,kBAAkB,QAAQ;AAC1B;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,+BAA+B;AACvC,IAAI,oBAAoB,kCAAkC;AAC1D;AACA,IAAI,gBAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,iBAAiB,cAAc;AAC/B;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,QAAQ;AACrB,sCAAsC,iBAAiB;AACvD;AACA,aAAa,QAAQ;AACrB;AACA,uCAAuC;AACvC;AACA,aAAa,SAAS;AACtB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE,QAAQ;AACR,iCAAiC,mCAAmC;AACpE;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,uBAAuB;AAC3D;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,iBAAiB;AACpE,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mEAAmE,aAAa,UAAU,EAAE;AAC5F,kCAAkC,MAAM;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,wDAAQ;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C,oDAAoD,GAAG;AACvD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B,EAAE,sBAAsB;AAClF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C,qDAAqD,GAAG;AACxD;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B,EAAE,sBAAsB;AACpF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mDAAmD,GAAG;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,eAAe;AAChD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,eAAe;AACrD;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gBAAgB;AAC5B;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,iDAAiD,sEAAsB;;AAEvE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,mBAAmB,yDAAkB;AAC/D;AACA;AACA;;AAEA;AACA,MAAM,SAAS,yDAAkB,oBAAoB,yDAAkB;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gBAAgB;AACrC;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,8BAA8B,iBAAiB,EAAE,aAAa,EAAE,sBAAsB;AACtF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,8BAA8B,iBAAiB,EAAE,sBAAsB;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,yDAAkB,iBAAiB,yDAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yDAAkB,kBAAkB,yDAAkB;AAC9D;AACA;AACA;AACA;AACA,WAAW,yDAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,8BAA8B,yDAAkB;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4DAAc;AACjC;AACA;AACA,wBAAwB,4DAAc;AACtC,YAAY;AACZ;AACA;AACA;AACA;AACA,kBAAkB,kEAAoB;AACtC;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,6BAA6B,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA,kCAAkC,6BAA6B;AAC/D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA,mCAAmC,6BAA6B;AAChE;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO,mBAAmB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,qEAAqE;AACrE;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA,aAAa,OAAO;AACpB,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ,WAAW;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA,gCAAgC,6BAA6B;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yBAAyB,sBAAsB;AAC/C;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gCAAgC,sBAAsB;AACtD;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM,MAAM,GAAG,WAAW,oCAAoC,uCAAuC,KAAK,gCAAgC,oBAAoB;AAC9K;AACA,6BAA6B,SAAS,WAAW,KAAK,yBAAyB,qBAAqB,EAAE,SAAS;AAC/G,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD,0EAA0E,SAAS;AACnF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD,8EAA8E,SAAS;AACvF;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,oBAAoB,gEAAgE,oBAAoB,wEAAwE,sBAAsB;AACnR,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iEAAqB;AAC/C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iEAAqB;AAC7B,QAAQ;AACR,QAAQ,iEAAqB;AAC7B;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0FAA0F,4DAA4D;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,8DAA8D,qEAAuB;;AAErF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oDAAoD,qEAAuB;AAC3E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,gEAAoB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C,OAAO;AACP;AACA;AACA,yCAAyC,UAAU;AACnD,OAAO;AACP;AACA;AACA;AACA,KAAK,IAAI;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,oBAAoB;AACjC,aAAa,UAAU;AACvB,aAAa,gCAAgC;AAC7C;AACA;AACA,cAAc,QAAQ,WAAW;AACjC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,GAAG;AACH;AACA;AACA,kBAAkB,oEAAsB;;AAExC;AACA;;AAEA;AACA,oBAAoB,6EAA+B;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI,4DAAgB;;AAEpB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uEAAyB,YAAY,8DAAgB;;AAEtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA,4BAA4B,4DAAgB;AAC5C;AACA;AACA,GAAG;AACH;AACA,IAAI,4DAAgB;AACpB;AACA;AACA,CAAC;AACD,2DAA2D,uEAAyB;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6CAA6C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,KAAK;AAChD;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,0BAA0B,cAAc;AACxC,sCAAsC,cAAc;AACpD,wDAAwD,cAAc;AACtE,OAAO;AACP;AACA,0BAA0B,KAAK;AAC/B,YAAY,cAAc;AAC1B;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,aAAa,oEAAsB;;AAEnC;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM,8BAA8B;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,iBAAiB;AACnD;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc,kBAAkB;AAChC,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kEAAoB;AAC5B,0CAA0C,gEAAoB;AAC9D;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB;AACtC,gBAAgB,oEAAsB;AACtC;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,+DAAmB;AACzB;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,0BAA0B,oEAAsB;AAChD;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU;AACV,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,mDAAmD,0BAA0B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,IAAI,yBAAyB;AAC7B;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,uEAAuE,4BAA4B;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,0DAA0D,WAAW;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,mEAAmE,WAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,2DAA2D,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,oEAAoE,WAAW;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD,wCAAwC,EAAE;AAC1C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,6CAA6C;AAC7C,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA,kDAAkD,UAAU;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS,wDAAQ;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,aAAa;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,QAAQ,wDAAQ;AAChB,QAAQ,wDAAQ;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,MAAM;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,MAAM,qBAAqB,UAAU;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+EAAiC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;;AAEA,SAAS,QAAQ;AACjB,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU,GAAG,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,cAAc,aAAa,cAAc;AACjF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD,qBAAqB;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA,WAAW;AACX;AACA;AACA,0BAA0B,yBAAyB;AACnD,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe;AAC9F,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;AACpE;AACA;AACA;AACA,yEAAyE,WAAW;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,qEAAqE,WAAW;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,8DAA8D,WAAW;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,4DAA4D,WAAW;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wDAAQ;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2BAA2B,QAAQ,yBAAyB,gBAAgB;AAC5E;AACA;;AAEA;AACA;AACA,2BAA2B,QAAQ,iBAAiB,gBAAgB;AACpE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,eAAe;AACf,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,sBAAsB,wDAAQ;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,wEAAwB;;AAEnD;AACA,OAAO,wDAAQ;;AAEf;AACA,IAAI,wEAAwB;;AAE5B;AACA,aAAa,6DAAa;;AAE1B;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,QAAQ,yDAAkB;AAC1B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAQ;;AAEhB;AACA,IAAI,wEAAwB;;AAE5B;AACA,gBAAgB,6DAAa;;AAE7B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wDAAwD,+EAAiC;AACzF,2BAA2B,oEAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX,aAAa,6EAAiC;AAC9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,QAAQ,+EAAiC,IAAI,+EAAiC;AAC9E;AACA,MAAM,6EAAiC;AACvC;AACA;AACA,QAAQ,qFAAqC;AAC7C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,aAAa,2EAA6B;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,yDAAkB;AACxD,gCAAgC,yDAAkB;AAClD,qCAAqC,yDAAkB,uBAAuB,yDAAkB;AAChG,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU,wDAAQ;AAClB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,cAAc;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,QAAQ,KAAK;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,yBAAyB,kBAAkB,EAAE,wCAAwC;;AAErF;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,mCAAmC,iBAAiB;AACpD,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB,QAAQ,uBAAuB;AACtE;AACA,aAAa,QAAQ;AACrB,gCAAgC,wBAAwB;AACxD,aAAa,wBAAwB;AACrC;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,iBAAiB;AACvC,MAAM,qBAAqB,KAAK,2BAA2B;AAC3D;AACA,aAAa,QAAQ;AACrB,oBAAoB,iBAAiB;AACrC;AACA,cAAc;AACd;AACA;AACA,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,aAAa,QAAQ;AACrB,0DAA0D,kBAAkB;AAC5E;AACA,cAAc;AACd,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,yBAAyB;AACzB;AACA,cAAc;AACd;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA,gBAAgB;AAChB,gBAAgB,QAAQ;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,oBAAoB,yGAAyG;AAC7H;AACA;AACA;AACA;AACA,oCAAoC,iCAAiC;AACrE;;AAEA;AACA,kCAAkC,qCAAqC;AACvE;AACA,cAAc,oBAAoB;AAClC;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA,MAAM,0BAA0B;AAChC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4DAAc,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,4BAA4B;AAC/C;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,UAAU;AACV;AACA;AACA,kBAAkB,gEAAkB;;AAEpC;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;AACpE;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA;AACA,cAAc;AACd;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,+DAA+D;AACrE;AACA,eAAe,eAAe;AAC9B;AACA;AACA,eAAe,QAAQ,QAAQ;AAC/B;AACA,eAAe,sCAAsC;AACrD;AACA,cAAc;AACd;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,+CAA+C,KAAK,2BAA2B,YAAY;AAC3F;AACA;AACA,oCAAoC,KAAK;AACzC,MAAM;AACN,+CAA+C,KAAK;AACpD;AACA;AACA,6CAA6C,KAAK,6BAA6B,cAAc;AAC7F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,kBAAkB;AAC9B;AACA;AACA,sBAAsB,SAAS,uCAAuC,MAAM,IAAI,aAAa,SAAS;AACtG;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA,IAAI,cAAc;AAClB;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA,qCAAqC,cAAc,KAAK,YAAY;AACpE;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,YAAY,eAAe;AAC3B,6CAA6C,cAAc,KAAK,YAAY;AAC5E;AACA;AACA,YAAY;AACZ,+CAA+C,qBAAqB;AACpE;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,iEAAmB;AAC3F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,+EAAiC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA,0CAA0C;AAC1C;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,cAAc,QAAQ;AACtB;AACA;AACA,WAAW;AACX;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,uBAAuB,6CAA6C;AACpE;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,wBAAwB;AACnC;AACA;AACA,YAAY;AACZ;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,iBAAiB,EAAE;AAC5D;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;;AAEA;AACA,uBAAuB,uCAAuC;AAC9D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA,UAAU;AACV,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,kBAAkB,kBAAkB,EAAE;AAClE;AACA;AACA,CAAC;AACD;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,mCAAmC;AAC1D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,UAAU;AACV,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB,cAAc,cAAc;AAC5B;AACA;;AAEA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,mBAAmB;AACjC;AACA;;AAEA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW,QAAQ;AACnB,YAAY,kBAAkB;AAC9B;;AAEA;AACA,gDAAgD;AAChD,GAAG;;AAEH,wDAAwD;;AAExD;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,4EAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,gBAAgB;AAC5B;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,OAAO,KAAK,IAAI;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,YAAY,YAAY;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;;AAEA,kBAAkB,wBAAwB;AAC1C;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;AACN,eAAe;AACf;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,YAAY;AACZ;;AAEA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,cAAc;AAChC;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA,8BAA8B;;AAE9B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA,IAAI;AACJ,yCAAyC;AACzC,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,gDAAgD;AAChD;;AAEA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA;AACA,YAAY,SAAS;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA,aAAa,gEAAiB;AAC9B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6BAA6B,2BAA2B;AACxD;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,SAAS;AACrB;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ,kBAAkB,2BAA2B;AAC7C;AACA,sEAAsE;;AAEtE,+CAA+C,6EAAY;AAC3D;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,YAAY,MAAM,GAAG,IAAI;AACzB,GAAG;;AAEH;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,MAAM;AACnD;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB,+CAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,eAAe;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,mBAAmB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4CAA4C;;AAE5C,6CAA6C;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B;AAC3B;AACA,KAAK;AACL,SAAS,+DAAiB;AAC1B,iBAAiB,+DAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA,0CAA0C,EAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0EAAQ,GAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,yBAAyB;AACzB;;AAEA,yCAAyC;;AAEzC;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS;;AAEf,+DAA+D;AAC/D;AACA;;AAEA;AACA,gDAAgD;;AAEhD,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA,IAAI;AACJ,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,+BAA+B;AACxD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wCAAwC;AAC9D;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA,IAAI;;AAEJ;AACA;AACA,mDAAmD;AACnD;;AAEA,sBAAsB,mCAAmC;AACzD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA,oBAAoB,iCAAiC;AACrD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,SAAS;AACpB;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA,OAAO,0CAA0C,IAAI,IAAI,QAAQ;AACjE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,cAAc,UAAU;AACxB;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,mCAAmC,+DAAmB;AACtD;AACA;AACA;AACA;AACA,8DAA8D;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,kEAAkE;;AAElE;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,MAAM;;AAEN;AACA;AACA;AACA,8BAA8B,+DAAmB;AACjD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAAiB;AACxC,QAAQ;AACR;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,yDAAyD,SAAS;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,iCAAiC,+DAAiB;AAClD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY;AACjB;AACA;;AAEA,sFAAsF;AACtF;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,wFAAwF;;AAExF,oFAAoF;;AAEpF,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2DAAe,qBAAqB,2DAAe,qBAAqB,2DAAe;AAC1G,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,sFAAiB;AACzB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,MAAM;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kCAAkC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,2EAA2E;;AAE3E;AACA;AACA,kBAAkB,aAAa;AAC/B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,iHAAiH;;AAEjH,YAAY,sFAAiB,QAAQ,kFAAa;AAClD,6BAA6B,gFAAY,SAAS;AAClD;;AAEA;AACA;AACA;AACA,iBAAiB,0FAAuB,SAAS;AACjD;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,kBAAkB,uBAAuB;AACzC;AACA,oCAAoC;;AAEpC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,KAAK,GAAG,MAAM,GAAG,WAAW;AACxD;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,kDAAK;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN,kBAAkB,8BAA8B;AAChD;AACA;AACA,sBAAsB,4DAAe,iBAAiB;;AAEtD;AACA,QAAQ,sEAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,0DAA0D;AAC1D;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,4DAAe,iBAAiB;;AAErE;AACA;AACA,2BAA2B,+DAAmB;AAC9C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAS,CAAC,4EAAO;AAChC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sEAAyB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wBAAwB,0CAA0C,IAAI;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+BAA+B;;AAE/B,qCAAqC;AACrC;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA,gCAAgC,+DAAmB;AACnD;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA,2BAA2B,+DAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA,sBAAsB,2DAAc,qCAAqC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,6DAA6D,IAAI;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+DAAmB;AACzD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+DAAmB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC,mCAAmC;AAC7G;AACA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,0BAA0B,UAAU;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA,UAAU;AACV;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wQAAwQ;;AAExQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,kBAAkB,gBAAgB;AAClC;AACA,8DAA8D;;AAE9D,kGAAkG;AAClG,QAAQ;;AAER,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uVAAuV;AACvV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,cAAc,YAAY;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,wEAAwE;;AAExE;AACA;AACA;AACA,oEAAoE;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,iBAAiB;AACjC,4BAA4B;;AAE5B,kBAAkB,uBAAuB;AACzC,sCAAsC;;AAEtC,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;;AAEf,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,oCAAoC,SAAS;AAC7C,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA,MAAM;AACN;;AAEA,uEAAuE;;AAEvE,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,MAAM;;AAEN;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,MAAM;;AAEN,oDAAoD;;AAEpD;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN,gDAAgD;;AAEhD;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,WAAW,uBAAuB;AAClC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,oBAAoB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA,oDAAoD;;AAEpD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,mCAAmC;;AAEnC,sCAAsC;;AAEtC,6BAA6B;;AAE7B;AACA,+CAA+C;;AAE/C,mCAAmC;;AAEnC;AACA,8BAA8B;;AAE9B;AACA,uCAAuC;;AAEvC,6BAA6B;;AAE7B;AACA,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C,uCAAuC;;AAEvC,yCAAyC;;AAEzC,iCAAiC;;AAEjC;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC,2CAA2C;;AAE3C,mCAAmC;;AAEnC;AACA,2CAA2C;;AAE3C,wCAAwC;;AAExC,8CAA8C;;AAE9C,+CAA+C;;AAE/C,gCAAgC;;AAEhC;AACA,2CAA2C;;AAE3C,+CAA+C;;AAE/C,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA,4BAA4B;AAC5B;;AAEA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,sCAAsC;;AAEtC,gCAAgC;;AAEhC;AACA,uCAAuC;;AAEvC,yCAAyC;;AAEzC,wCAAwC;;AAExC,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,0CAA0C;;AAE1C,sCAAsC;;AAEtC,wCAAwC;;AAExC,gCAAgC;;AAEhC;AACA,wCAAwC;;AAExC,0CAA0C;;AAE1C,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA,2BAA2B;;AAE3B;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,uBAAuB;AACvB;;AAEA,uIAAuI;AACvI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,qCAAqC,mCAAmC;;AAExE;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C,yCAAyC;;AAEzC;AACA;AACA,mCAAmC;;AAEnC;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB,QAAQ;AACR;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA,gCAAgC;AAChC,QAAQ;AACR;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN,2BAA2B,eAAe;AAC1C;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2DAA2D;AAC3D,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,uFAAuF;;AAEvF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,4BAA4B;AAC5B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,2EAA2E;AAC3E;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,4DAA4D;AAC5D;;AAEA,mBAAmB;;AAEnB;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,gEAAgE;AAChE,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;;AAER;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,yBAAyB;;AAEzB,2EAA2E;;AAE3E;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B,iCAAiC;AACjC,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E;;AAE/E,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;;AAEA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,wCAAwC;AACxC;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;;AAEA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,+DAA+D;;AAE/D;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,6EAA6E;;AAE7E,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA,UAAU;;AAEV,+DAA+D;;AAE/D,gEAAgE;AAChE;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,iDAAiD;;AAEjD;AACA;AACA;AACA,0BAA0B;;AAE1B,mDAAmD;AACnD;AACA,UAAU;AACV;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA,UAAU;;AAEV,qCAAqC;AACrC;;AAEA,iFAAiF;;AAEjF;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO,KAAK,KAAK,WAAW,UAAU;AAC7E,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA,0HAA0H;AAC1H;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,4BAA4B;;AAE5B,iCAAiC,yCAAyC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA,yCAAyC;;AAEzC;AACA,OAAO;;AAEP;AACA,+CAA+C;;AAE/C;AACA;AACA,+BAA+B;AAC/B;;AAEA,gCAAgC;AAChC,OAAO;AACP;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;;AAEd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,mBAAmB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,gCAAgC,QAAQ;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,gBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,kEAAkE;;AAElE,sDAAsD;;AAEtD,gDAAgD;AAChD;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA,kDAAkD;;AAElD,kDAAkD;;AAElD,sCAAsC;;AAEtC;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA,kDAAkD;AAClD,QAAQ;AACR,sCAAsC;;AAEtC,0CAA0C;;AAE1C,0CAA0C;;AAE1C;AACA,oBAAoB,oCAAoC;AACxD,4CAA4C;AAC5C;AACA;;AAEA,gDAAgD;;AAEhD,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,+BAA+B;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ,uEAAuE;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG;;AAExG;AACA;AACA;AACA;AACA;AACA,4HAA4H;;AAE5H,0IAA0I;AAC1I;;AAEA,mEAAmE;;AAEnE;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,qBAAqB,QAAQ;AAC7B,oCAAoC,SAAS;AAC7C;AACA,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,YAAY;AAC5B;AACA;;AAEA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;;AAEd,sEAAsE;;AAEtE,yBAAyB;;AAEzB;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA,mDAAmD;AACnD;;AAEA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO,GAAG;;AAEV,kEAAkE;;AAElE;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX,kBAAkB,2BAA2B;AAC7C;AACA,wCAAwC;;AAExC;AACA;AACA,UAAU;;AAEV;AACA;AACA,UAAU;;AAEV,0EAA0E;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B,4CAA4C,SAAS;AACrD,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,yDAAyD;;AAEzD,kEAAkE;AAClE;;AAEA,0CAA0C;;AAE1C,sDAAsD;;AAEtD,kBAAkB,8BAA8B;AAChD;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,QAAQ;AACR;;AAEA,sEAAsE;;AAEtE;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,kGAAkG;;AAElG,6FAA6F;;AAE7F;AACA;AACA;AACA,SAAS;AACT,OAAO,GAAG;;AAEV,2EAA2E;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,+HAA+H;AAC/H;;AAEA;AACA;AACA,oGAAoG;;AAEpG;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,sGAAsG;;AAEtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH;;AAEpH;AACA,YAAY;;AAEZ;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO,GAAG;;AAEV;AACA;AACA;AACA;AACA,OAAO;AACP,iFAAiF;;AAEjF;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B;AACA,cAAc,QAAQ;AACtB;AACA,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,eAAe,2BAA2B;AAC1C;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;;AAEA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;;AAEvB,sBAAsB;;AAEtB,iBAAiB;;AAEjB,mBAAmB;;AAEnB,wBAAwB;;AAExB;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,gBAAgB,UAAU;AAC1B,gBAAgB,yBAAyB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,mBAAmB;AACnB,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA,eAAe;;AAEf,iDAAiD;;AAEjD;AACA,6CAA6C;;AAE7C,mFAAmF;;AAEnF,yCAAyC;;AAEzC;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA,QAAQ;AACR;AACA,QAAQ;;AAER;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,sBAAsB,YAAY;AAClC,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B,eAAe,UAAU;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA,0DAA0D;;AAE1D,2DAA2D;;AAE3D;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA,sCAAsC;AACtC;;AAEA,+FAA+F;;AAE/F;AACA;AACA,sCAAsC;;AAEtC,gFAAgF;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA,oBAAoB;;AAEpB,qDAAqD;;AAErD;AACA;AACA;AACA,sBAAsB;;AAEtB,uDAAuD;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB,WAAW,6CAA6C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,gBAAgB,UAAU;AAC1B;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0EAAQ,GAAG;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA,eAAe,0FAAuB,qBAAqB;AAC3D;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB,+CAA+C,IAAI;AAC1G;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,kDAAkD;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iEAAiE;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA,MAAM,2FAAwB;AAC9B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,wBAAwB,0FAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,+BAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,2BAA2B,qFAAoB,IAAI,KAAK,EAAE,QAAQ;AAClE,GAAG;AACH;AACA;AACA,0BAA0B,WAAW,8BAA8B,6BAA6B;AAChG;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,iBAAiB,QAAQ;AACzB,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kFAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,qEAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,UAAU;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6DAAe;AAClD;AACA;AACA;AACA,qCAAqC,6DAAe;AACpD;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6DAAe;AAC1C;AACA;AACA;AACA,6BAA6B,6DAAe,YAAY;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,8DAA8D;AAC9D;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,6BAA6B,6DAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,qFAAqF;AACrF;;AAEA,iGAAiG;AACjG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,8FAA8F;AAC9F;;AAEA,6HAA6H;;AAE7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mCAAmC,QAAQ,MAAM;AACzE;AACA;AACA;AACA;AACA,IAAI;;AAEJ,uFAAuF;;AAEvF,yEAAyE;;AAEzE;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA,gHAAgH;;AAEhH,qKAAqK;AACrK;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,sBAAsB,mCAAmC,QAAQ,MAAM;AACvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA,gDAAgD,uEAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,uEAAyB;AAC3E;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;AAChB;;AAEA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2GAA2G;;AAE3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA,8EAA8E;;AAE9E,mEAAmE;AACnE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;;AAEA,oCAAoC,0DAAc;AAClD;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG,IAAI,GAAG;;AAEV,sGAAsG;;AAEtG;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA,KAAK;AACL,GAAG;AACH,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,oEAAsB,IAAI,6DAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,EAAE;AACxE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA,sBAAsB,cAAc,GAAG,YAAY,GAAG,SAAS;AAC/D;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ,iEAAiE,qEAAgB;AACjF;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,SAAS;AACpB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,iDAAiD,qEAAgB;AACjE,6CAA6C,qEAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,0BAA0B;;AAE1B;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE,IAAI;AACJ;AACA;AACA;AACA,sCAAsC,wBAAwB;AAC9D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,YAAY,MAAM,GAAG,YAAY,GAAG,iBAAiB,+BAA+B,UAAU,GAAG,mBAAmB,kCAAkC,eAAe,KAAK,YAAY,yCAAyC,YAAY,KAAK,SAAS,+BAA+B,eAAe,mBAAmB,SAAS,mBAAmB,SAAS,sBAAsB,UAAU,mBAAmB,GAAG;AACrZ;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,aAAa;AACxB;AACA,WAAW,SAAS;AACpB;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,iBAAiB,2DAAe,QAAQ,2DAAe;AACvD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,sDAAsD,wBAAwB,qBAAqB,yBAAyB,yBAAyB,iBAAiB,qCAAqC,sBAAsB,kCAAkC,eAAe;AAClR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,6BAA6B;;AAE7B;AACA;AACA,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER,iCAAiC;;AAEjC;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,0BAA0B,aAAa,KAAK,SAAS;AACrD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,qCAAqC,OAAO,KAAK,kCAAkC,KAAK;AACxF;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA,MAAM;AACN;;AAEA;AACA,uCAAuC,kBAAkB,KAAK;AAC9D;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,kEAAkE;AAClE;AACA;;AAEA;AACA;AACA,2DAA2D,eAAe;AAC1E,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB,aAAa,SAAS;AACtB;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kDAAkD,KAAK,cAAc,MAAM;AAC3E;AACA;AACA;AACA,wFAAwF;;AAExF;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B;AACA,+BAA+B,+DAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA,qFAAqF;;AAErF,6EAA6E;;AAE7E,mGAAmG;AACnG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,sEAAsE,YAAY,mBAAmB,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,0KAA0K;AAC1K;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+IAA+I;AAC/I;AACA;;AAEA,sHAAsH;AACtH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,IAAI,UAAU,IAAI,KAAK,IAAI;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,WAAW,KAAK,SAAS,MAAM,UAAU;AAChF,oFAAoF;AACpF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C,gDAAgD;;AAEhD,6EAA6E;AAC7E;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA,2EAA2E;;AAE3E;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA,kEAAkE;AAClE;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD;;AAExD,6CAA6C;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,iBAAiB,uBAAuB,4CAA4C,uBAAuB,4CAA4C;AACvS;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,6CAA6C;AAC7C;;AAEA;AACA,0EAA0E,kBAAkB;AAC5F;AACA,gEAAgE,gBAAgB;AAChF,qCAAqC;AACrC;;AAEA,6CAA6C,+DAAmB;AAChE;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;;AAEA;AACA;AACA;AACA,kBAAkB,MAAM,YAAY,aAAa,6BAA6B,wBAAwB,cAAc,wBAAwB,IAAI;AAChJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0EAAQ,GAAG;AACnC;AACA,SAAS;AACT,QAAQ,0EAAQ;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA,6BAA6B;;AAE7B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+BAA+B,IAAI;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,wBAAwB,gCAAgC,gCAAgC,QAAQ,OAAO,MAAM,IAAI,QAAQ;AACzH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,6HAA6H;AAC7H;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,SAAS,uCAAuC,mCAAmC;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,QAAQ;;AAER;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA,+DAA+D,+BAA+B;AAC9F;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,GAAG;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,0BAA0B,sCAAsC,EAAE,+BAA+B;AACjG;AACA;AACA;AACA,uDAAuD;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,4EAA4E,qBAAqB,uCAAuC,mCAAmC;AAC3K;AACA;AACA,uCAAuC;AACvC;;AAEA,iFAAiF;;AAEjF,+GAA+G;AAC/G;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,gBAAgB,oEAAsB,IAAI,6DAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,gEAAgE,YAAY;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC,KAAK;AAC7C;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE,yDAAyD,UAAU;AACnE;AACA,mBAAmB,KAAK;AACxB;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,+CAA+C,uBAAuB,KAAK,cAAc,WAAW,KAAK;AACzG;AACA;AACA,MAAM;AACN,+CAA+C,QAAQ,+FAA+F,wBAAwB,KAAK,KAAK;AACxL;AACA;AACA;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA;AACA,MAAM;AACN,sCAAsC,OAAO,KAAK,KAAK,OAAO,KAAK;AACnE;AACA,GAAG;AACH;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,qCAAqC,KAAK,qBAAqB,OAAO;AACtE;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,6DAA6D,YAAY;AACzE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA,6DAA6D,SAAS;AACtE;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,0CAA0C,KAAK,UAAU;AACzD;;AAEA;AACA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA,MAAM;AACN,6CAA6C,KAAK;AAClD;AACA,GAAG;AACH;AACA;AACA,iBAAiB,gFAAe;AAChC,oCAAoC,KAAK,oBAAoB,OAAO;AACpE;AACA,kEAAkE,UAAU;AAC5E,8DAA8D,UAAU;AACxE;AACA,qBAAqB,KAAK;AAC1B,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B;AAC3F;AACA;AACA,MAAM;AACN,uDAAuD,KAAK;AAC5D;AACA,GAAG;AACH;AACA,0CAA0C,KAAK;AAC/C,iBAAiB,gFAAe,SAAS;AACzC;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,sCAAsC,KAAK,oBAAoB,4BAA4B,KAAK,MAAM;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oCAAoC,KAAK;AACzC;AACA,2BAA2B,MAAM,4DAA4D;AAC7F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,KAAK;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,kEAAoB,IAAI,kEAAoB,qBAAqB,kEAAoB;AAC/H;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,WAAW,mEAAqB,IAAI,mEAAqB,qBAAqB,mEAAqB;AACnG;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,cAAc;AAC1D;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gBAAgB,KAAK;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA,oCAAoC;AACpC,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,UAAU;AACvB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA,gFAAgF;;AAEhF;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C,eAAe,6DAAe;AAC9B,uCAAuC;AACvC;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA,uEAAuE,6DAAe;AACtF,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA,eAAe,kEAAoB;AACnC,oBAAoB,kEAAoB;AACxC,MAAM;AACN,gBAAgB,2DAAe;AAC/B;AACA;AACA,uBAAuB,6DAAe,QAAQ,sDAAQ,EAAE,4DAAc;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qEAAgB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA,MAAM;AACN;AACA,kBAAkB,6DAAe;AACjC,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6DAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA,wBAAwB,8BAA8B;AACtD;AACA;AACA;AACA,sDAAsD;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0BAA0B;AAC1B,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mGAAmG;;AAEnG;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA,2BAA2B;;AAE3B,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW,IAAI,aAAa,+BAA+B,aAAa,WAAW,mBAAmB,sBAAsB,2BAA2B,iEAAiE,wBAAwB;AACnR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;;AAEA;AACA,qFAAqF;;AAErF;AACA,8EAA8E,mBAAmB;AACjG;AACA,MAAM;AACN;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0BAA0B,wBAAwB,mCAAmC;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qBAAqB,gBAAgB,gBAAgB,cAAc,mBAAmB;AACxI;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,SAAS;AACzB;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,QAAQ;AACR;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,gBAAgB,SAAS;AACzB;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,MAAM;;AAEN,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,uBAAuB,qBAAqB;AAC5C,6BAA6B;;AAE7B;AACA,oHAAoH;;AAEpH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,GAAG;AACrB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA+D;;AAE/D;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA,kDAAkD;;AAElD,6FAA6F;AAC7F;;AAEA;AACA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,aAAa;AAC1B,aAAa,aAAa;AAC1B,aAAa,UAAU;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,qBAAM,mBAAmB,qBAAM;AACvJ;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;AACA,iEAAiE,cAAc,KAAK,eAAe;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM,YAAY;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,qBAAqB;AAClC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,sEAAsE;;AAEtE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN,gEAAgE;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ,WAAW,aAAa;AAClE;AACA,iCAAiC;AACjC;AACA,UAAU;AACV;AACA,UAAU;AACV,4FAA4F;AAC5F;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;;AAEN;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,8BAA8B;AAC9B,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,MAAM;AACjB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,YAAY;AACvB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,KAAK;AAC1C;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA,iEAAiE;;AAEjE;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;;AAEN,8GAA8G;;AAE9G,uFAAuF;;AAEvF;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD,6EAA6E,KAAK;AAClF;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+CAA+C,MAAM;AACrD,yDAAyD,cAAc;AACvE;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,kCAAkC,0DAAY;AAC9C,qCAAqC,0DAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,4CAA4C,yDAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA;AACA;AACA,kEAAkE;;AAElE,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,+DAAmB;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,IAAI,iEAAqB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,2CAA2C,iDAAiD,KAAK,gBAAgB;AACjH;AACA,WAAW,eAAe;AAC1B;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;;AAEJ,uEAAuE;AACvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA,mIAAmI;AACnI;;AAEA;AACA,WAAW,eAAe,oCAAoC,UAAU,IAAI,sBAAsB;AAClG;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA,qBAAqB,eAAe,yCAAyC,eAAe,IAAI,cAAc;AAC9G;AACA,8DAA8D,eAAe,IAAI,oBAAoB;AACrG;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,qBAAqB,eAAe,0CAA0C,eAAe,KAAK,mBAAmB;AACrH;AACA,6DAA6D,eAAe,IAAI,cAAc;AAC9F;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kEAAoB;AAC/C;AACA;AACA;AACA,qFAAqF;;AAErF;AACA,+EAA+E;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,8CAA8C;AAC9C;;AAEA;AACA;AACA;AACA,KAAK,aAAa;;AAElB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,0EAA0E;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO,KAAK,OAAO,OAAO,MAAM;AACnE;AACA;AACA,sCAAsC,MAAM;AAC5C,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;;AAEzG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,gEAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kEAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA,oDAAoD;AACpD,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gEAAgE;AAChE;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,uCAAuC;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG;;AAEZ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;;AAER,iCAAiC;;AAEjC;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,4EAA4E;;AAE5E;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;;AAEA;AACA,4DAA4D,qBAAqB;AACjF,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;;AAEpD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,uIAAuI;AACvI;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iDAAiD,4BAA4B,qBAAqB,QAAQ,cAAc,wBAAwB,gBAAgB,KAAK;;AAElL;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,gIAAgI;;AAEhI;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6BAA6B,KAAK;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;;AAEA,4GAA4G;;AAE5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA,0FAA0F;;AAE1F;AACA;AACA;AACA;AACA;AACA,sEAAsE,gFAAmB;AACzF;AACA;AACA,0BAA0B,iDAAiD,gFAAmB,CAAC;AAC/F;AACA;AACA,gGAAgG,gFAAmB,EAAE;;AAErH;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN,wDAAwD,qFAAoB,UAAU,mFAAkB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4CAA4C,YAAY,KAAK,kBAAkB,8BAA8B,aAAa;AAC1H,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,8BAA8B,uCAAuC;AAClG;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;AAEN;AACA;AACA;AACA,0BAA0B,4EAAW,iDAAiD;AACtF,0BAA0B,4EAAW,6BAA6B;AAClE;AACA,kCAAkC,iCAAiC,QAAQ,aAAa;AACxF;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,uDAAuD,0BAA0B;AACjF;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA,2BAA2B,mFAAkB,mBAAmB,qFAAoB;AACpF,wCAAwC,aAAa;AACrD;AACA;AACA,uCAAuC,YAAY;AACnD;AACA;AACA;AACA,kCAAkC,YAAY,mBAAmB,uBAAuB;AACxF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,4EAAW;AAC9C;AACA,yCAAyC,4EAAW;AACpD,yCAAyC,4EAAW;AACpD;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,8CAA8C,kBAAkB,SAAS,YAAY;AACrF,QAAQ;AACR;;AAEA;AACA,2DAA2D,4EAAW;AACtE,2DAA2D,4EAAW,kCAAkC;;AAExG;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG,UAAU;;AAEV;AACA,gDAAgD,yBAAyB,SAAS,kBAAkB;AACpG;AACA;AACA;AACA;AACA,kCAAkC,WAAW,IAAI,8BAA8B;AAC/E;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uJAAuJ;AACvJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG;AACvG;;AAEA;AACA;AACA,qFAAqF;;AAErF;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD,gCAAgC,YAAY,MAAM,2BAA2B;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,KAAK,kEAAkE;AACnF;AACA;;AAEA,YAAY,KAAK,iEAAiE;AAClF;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,KAAK;AACnB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB;AACA,OAAO;AACP;AACA,QAAQ,iEAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,iEAAqB;AAC3B,MAAM;;AAEN,oCAAoC,+DAAmB;AACvD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,KAAK;AACpD,gBAAgB,KAAK;AACrB,oEAAoE,MAAM;AAC1E;AACA,YAAY,KAAK;AACjB,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA,yDAAyD,KAAK;AAC9D,YAAY,KAAK,wBAAwB;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,2BAA2B,QAAQ,KAAK,qBAAqB,EAAE,MAAM;AACrE;AACA;AACA,KAAK,GAAG;;AAER,gBAAgB,KAAK;AACrB;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA,mBAAmB,KAAK;AACxB,KAAK;AACL;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,8BAA8B,MAAM;AACpC,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA,+CAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,aAAa,2BAA2B,yBAAyB,oBAAoB,OAAO;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA,sIAAsI;AACtI;;AAEA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA,sEAAsE;AACtE;;AAEA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB,kCAAkC,YAAY,gBAAgB,OAAO;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,aAAa,uCAAuC,uBAAuB,KAAK,oBAAoB,yEAAyE;;AAE9M;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,YAAY,8CAA8C,UAAU;AAC1H;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,4DAA4D;;AAE5D;AACA,iCAAiC,aAAa,iBAAiB,mBAAmB;AAClF;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD,WAAW,KAAK,QAAQ,iCAAiC,YAAY;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ;;AAEvJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oCAAoC,MAAM;AAC1C;AACA,KAAK;AACL;AACA,oCAAoC,MAAM;AAC1C;AACA,yCAAyC,MAAM;AAC/C;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,gBAAgB;AAC3B;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4EAAW;AACxC;AACA;AACA;AACA;AACA,2BAA2B,gFAAe;AAC1C,2BAA2B,gFAAe,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG,GAAG;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA,uBAAuB,iEAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAqB;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAqB;AACzB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gBAAgB,oEAAsB,WAAW;;AAEjD;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,OAAO,wDAAQ,KAAK,sEAAsB;AAC1C;AACA;AACA,gCAAgC,oEAAsB;AACtD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA,YAAY,wDAAQ;AACpB,gCAAgC,0EAA0B,IAAI,gFAAgC,IAAI,6EAA6B,IAAI,4EAA4B;AAC/J;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,MAAM;AACN;;AAEA,6IAA6I;;AAE7I;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,+BAA+B,+FAAwB,QAAQ;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,sIAAsI;AACtI;;AAEA;AACA,+FAA+F;;AAE/F;AACA,6DAA6D;AAC7D;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA,oFAAoF;AACpF;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,qCAAqC,gEAAkB,eAAe,gEAAkB,kBAAkB,gEAAkB;AAC5H;AACA;AACA;AACA;AACA,iGAAiG;AACjG;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6EAA6E;AAC7E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA,KAAK;AACL,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA,2BAA2B,wDAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,4SAA4S;;AAE5S;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kEAAkE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,0DAAY;AAC5C,MAAM,wDAAY;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,uBAAuB,+FAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gCAAgC;AAChC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA,SAAS,qFAAoB;AAC7B,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChgkDK,CAAC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;;AAGO;AACP;AACA,GAAG;;AAEI;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACO;AACP;AACA;;AAEA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,6DAAa;AAC1B;AACO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;AACM;AACA;AACA;AACP,mCAAmC;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,eAAe;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;;AAEA;AACA;AACA,IAAI,WAAW;AACf;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACO;AACP,yEAAyE,aAAa;AACtF;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEO;AACP,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC9Q0E,CAAC;AAC3E;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAQ;;AAEnC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA,iBAAiB,0DAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA;AACO;AACP,kBAAkB,6DAAW;AAC7B,wBAAwB,6DAAW;AACnC,gBAAgB,6DAAW;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA,4BAA4B;;AAE5B,kCAAkC,gEAAc,kDAAkD;;AAElG;AACA,gCAAgC,gEAAc;AAC9C;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/FmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,aAAa;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,GAAG,GAAG;;AAEN,sBAAsB;AACtB;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;;AAGJ,yBAAyB;AACzB;;AAEA;AACA;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;;AAEA,oCAAoC;AACpC;AACO;AACP;AACA;AACA;;AAEA,SAAS,kEAAkB,IAAI,kEAAkB,oBAAoB,gEAAkB;AACvF;AACO;AACP;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,oBAAoB,4BAA4B;AAChD;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACO;AACA;;;;;;;;;;;;;;;;;;;;;;AC5PiD;AACb;AACa;AACR;AACY;AAC5D;AACA;AACA,UAAU,yDAAO;AACjB;AACA,cAAc,yDAAO;AACrB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,SAAS,yDAAO;AAChB;AACA,UAAU,yDAAO;AACjB;AACA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,kBAAkB,0DAAQ,SAAS,uDAAS,OAAO,uDAAS,eAAe;;AAE3E,WAAW,4DAAU;AACrB,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA,MAAM;;;AAGN,QAAQ,4DAAU;AAClB;AACA,KAAK,KAAK,4DAAU;AACpB;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA,iBAAiB,6DAAY;AAC7B,WAAW,4DAAU;AACrB;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU;AACrB,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA,WAAW,4DAAU,2BAA2B,4DAAU;AAC1D;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB,GAAG;AACH;AACA;AACA,WAAW,4DAAW;AACtB;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD,iCAAiC;;AAEjC;AACA;;AAEA;AACA,sBAAsB,yDAAO;AAC7B;AACA,CAAC,GAAG;;AAEG,0BAA0B;AACjC;;AAEO;AACP,UAAU,yDAAO;;AAEjB,kBAAkB,0BAA0B;AAC5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEI;AACP,SAAS,wDAAO;AAChB;;;;;;;;;;;;;;;;;;;;;ACtL4G;AACjC,CAAC;AAC5E;AACA;AACA;;AAEO;AACP,QAAQ,sDAAO;AACf,WAAW,sDAAO;AAClB,WAAW,sDAAO;AAClB,eAAe,sDAAO;AACtB,UAAU,sDAAO;AACjB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB,mBAAmB,sDAAO;AAC1B,cAAc,sDAAO;AACrB,aAAa,sDAAO;AACpB,eAAe,sDAAO;AACtB,WAAW,sDAAO;AAClB,gBAAgB,sDAAO;AACvB,cAAc,sDAAO;AACrB,cAAc,sDAAO;AACrB;AACA;AACA;AACA,WAAW,sDAAO;AAClB,aAAa,sDAAO;AACpB,kBAAkB,sDAAO;AACzB,cAAc,sDAAO;AACrB,iBAAiB,sDAAO;AACxB,SAAS,sDAAO;AAChB,eAAe,sDAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4DAAa;AACxB;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,IAAI;AAC7B;AACA,KAAK;AACL;;AAEA;AACA,WAAW,4DAAa;AACxB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,MAAM,yDAAU;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGO;AACP;AACA,UAAU,sDAAO;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,yDAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA,mEAAmE;;AAEnE;AACA;;AAEA;AACA,GAAG;;AAEI;AACP;;AAEA;AACA;;AAEA;AACA,iBAAiB,4DAAa;AAC9B;AACA;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD,4FAA4F;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;;AAElB;AACA;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;AACA,IAAI;;;AAGJ;AACA,qBAAqB,yBAAyB;AAC9C;;AAEA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEO;AACP,UAAU,sDAAO;AACjB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;;AAGA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA,gBAAgB,4DAAa;AAC7B;AACA;AACA,cAAc,4DAAa;AAC3B,uBAAuB,4DAAa;AACpC;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,8DAAW;AACnC,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,iBAAiB,uDAAQ;AACzB,sBAAsB,uDAAQ,6BAA6B;;AAE3D;AACA;AACA;AACA,4FAA4F;;AAE5F;AACA,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC,yBAAyB,uDAAQ;AACjC;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN,wBAAwB,8DAAW;AACnC,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACO;AACP;AACA;AACA,gGAAgG;;AAEhG;AACA,qBAAqB,4DAAa;AAClC,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,kBAAkB,4DAAa;AAC/B,MAAM;;;AAGN;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChfwD;AACxD,UAAU,yDAAO;AACV;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;;AAEjB,qCAAqC,4DAAU;AAC/C;AACA,GAAG;AACH;AACA;;AAEA,uCAAuC;AACvC;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACnC4H;AACjD;AACzB;;AAElD;AACA;AACA,WAAW,+DAAa;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACO;AACP,UAAU,yDAAO;AACjB;AACA;;AAEA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,iBAAiB,+DAAa;AAC9B;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,yCAAyC;AACpD;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA,UAAU,yDAAO;AACjB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6CAA6C;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,YAAY;AACZ;AACA;;AAEO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+DAAa;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,mBAAmB,+DAAa;;AAEhC,kBAAkB,YAAY;AAC9B;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;AAChC,mBAAmB,+DAAa;AAChC;AACA,GAAG;AACH;AACA;AACA,kBAAkB,+DAAa;AAC/B,uBAAuB,+DAAa;AACpC,8BAA8B,+DAAa;AAC3C;AACA,GAAG;AACH,yCAAyC;;AAEzC;AACA;;AAEA,2BAA2B,kCAAkC;AAC7D;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB,qBAAqB;AAC1C,iDAAiD;;AAEjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACO;AACP,cAAc,+DAAa;;AAE3B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C,mBAAmB,8DAAW;AAC9B,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,qBAAqB,6DAAW;;AAEhC;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA,mBAAmB,8DAAW;AAC9B,IAAI;AACJ;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,mBAAmB,0DAAQ;AAC3B,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,sBAAsB,+DAAa,QAAQ;AAC3C;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+DAAa;;AAEhC;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,+DAAa;AACxC,oBAAoB;;AAEpB;AACA,gBAAgB,+DAAa;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,GAAG;AACH;AACA;AACO;AACP;;AAEA;AACA;AACA;;AAEA,iBAAiB;AACjB;;AAEA;AACA,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC,IAAI;AACJ,0BAA0B,+DAAa;AACvC,oBAAoB,+DAAa;AACjC;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACxiBwD;AACjD,mBAAmB,yDAAO;AAC1B,mBAAmB,yDAAO;AAC1B,2BAA2B,yDAAO;AACzC;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,YAAY,YAAY;AACxB;AACA;;AAEO;AACP;AACA,aAAa;;AAEb;AACA,QAAQ,4DAAU;AAClB;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B;AACA;AACA,qBAAqB;;AAErB;AACA;;AAEA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;;AAEA,UAAU,yDAAO;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA,QAAQ,4DAAU;AAClB;AACA,MAAM,SAAS,4DAAU;AACzB;AACA,MAAM;AACN;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACO;AACP;AACA;AACO;AACP;AACA;;;;;;;;;;;;;;;;;AC/GO;AACP;AACA,0BAA0B;AAC1B;AACA;;AAEO;AACP;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACnDqC;AACF;AACnC;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA,cAAc,+DAAe,IAAI,+DAAe;AAChD,IAAI;AACJ;;;AAGA,yBAAyB,0DAAU;AACnC,4CAA4C;AAC5C;;AAEA,wBAAwB,+DAAe,4BAA4B;;AAEnE;AACA,kBAAkB,0DAAU,UAAU,+DAAe;AACrD,IAAI;AACJ,cAAc,mEAA2B,CAAC,+DAAe,IAAI,+DAAe;AAC5E;;AAEA;AACA,gDAAgD;AAChD;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA,SAAS,mEAA2B;AACpC;;AAEA,iEAAe,UAAU;;;;;;;;;;AC9CzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,mBAAO,CAAC,sDAAe;;AAEpC;AACA,UAAU,mBAAO,CAAC,0DAAU;AAC5B,UAAU,mBAAO,CAAC,gEAAa;AAC/B,aAAa,mBAAO,CAAC,sEAAgB;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc,uBAAuB;AACxD;AACA,eAAe,mBAAO,CAAC,0DAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,IAAI,MAAM,IAAI,QAAQ,EAAE;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gDAAgD;AAClE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,+BAA+B;AAC/B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gDAAgD,aAAa;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACt0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;ACtIA;;;;;;;;;;ACAA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA;AACA,2BAA2B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;;;;;;ACdvE;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoD;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,kCAAkC;AACxD;AACA;AACA,MAAM;AACN;AACA,MAAM;;AAEN,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;;AAEA,4CAA4C,IAAI;;AAEhD;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,IAAI;AACJ,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,sDAAsD;AAC7G;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,+BAA+B;AACrD;AACA;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC,yEAAyE,SAAS;AAClF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wEAAwE;AACxE,2CAA2C;;AAE3C,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,0CAA0C,QAAQ;AAClD;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,qDAAS;AAC5B,qBAAqB,uDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,gBAAgB,gBAAgB;AAChC,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,wBAAwB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;;AAE9B,kBAAkB,gBAAgB;AAClC;;AAEA,oBAAoB,iBAAiB;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,qBAAqB;AAC7C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;;AAEA,cAAc,iBAAiB;AAC/B;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA,MAAM;AACN,kBAAkB,qBAAqB;AACvC;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA,MAAM;AACN,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;;AAE5C;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB,kBAAkB,iBAAiB;AACnC,qCAAqC;;AAErC;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,kBAAkB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB;;AAEvB,kBAAkB,iBAAiB;AACnC;;AAEA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;;AAEA,gBAAgB,kBAAkB;AAClC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH,EAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,SAAS;AACT,0BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,CAAC,EAAC;AACquB;;;;;;;;;;;;;;;;;;;;ACz9CtvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,YAAY;AACZ,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qBAAqB;AACrB,8BAA8B;AAC9B;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B,uBAAuB;AACvB,gBAAgB;AAChB,kBAAkB;AAClB,KAAK;AACL;AACA;AACA,KAAK;AACL,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL,eAAe;AACf,cAAc;AACd,cAAc;AACd,oBAAoB;AACpB,sBAAsB;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEkE;;;;;;;;;;;;;;;;;ACnJ3B;AACxB;AACf;AACA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA,MAAM;;AAEN;AACA,2CAA2C,MAAM;AACjD;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACvC+C;AACA;AAC/C,iEAAe;AACf,eAAe;AACf,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;ACL8C;;AAE/C;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,8BAA8B,OAAO,8BAA8B;AAC1F;AACA,IAAI;AACJ,oBAAoB,8BAA8B;;AAElD;AACA,sBAAsB,8BAA8B;AACpD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,wDAAM;AACR;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA,CAAC;;;;;;;;;;;;;;;ACrCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnDyC;AACM;AAC/C,iEAAe;AACf,YAAY;AACZ,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACyC;AACR;AAC6B;AACR;AACF;AACE;AACN;AACM;AACN;AACT;AACM;AACE;AACV;AACF;AACa;AACT;AACU;AACR;AACF;AACe;AACjB;AACoB;AACzD;AACA,eAAe;AACf,QAAQ;AACR,WAAW;AACX,YAAY;AACZ,OAAO;AACP,MAAM;AACN,YAAY;AACZ,QAAQ;AACR,aAAa;AACb,eAAe;AACf,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,aAAa,wDAAM,GAAG;AACtB;;AAEA,qBAAqB,0DAAC;AACtB;AACA,MAAM,0DAAC;AACP,0BAA0B,wDAAM,GAAG;AACnC;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,MAAM;;;AAGN;AACA;AACA,qBAAqB,kEAAU;AAC/B,oBAAoB,gEAAS;AAC7B;AACA,KAAK;AACL,qBAAqB,kEAAU;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,mEAAkB;AACxC;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,GAAG;;AAER,yBAAyB,wDAAM,GAAG,EAAE,qDAAQ,qBAAqB;;AAEjE,oBAAoB,wDAAM,GAAG;AAC7B,4BAA4B,wDAAM,GAAG;AACrC,0BAA0B,wDAAM,GAAG,WAAW;;AAE9C;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,MAAM;;;AAGN,eAAe,sDAAC,EAAE;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0DAAC;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL,4BAA4B;;AAE5B;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,sCAAsC,mBAAmB;AACzD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B,qCAAqC,EAAE,iBAAiB,eAAe,qCAAqC,EAAE,aAAa;AACzJ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;;AAErC,gBAAgB,0DAAC;AACjB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,+DAA+D;AAChF;;AAEA;AACA;AACA,oBAAoB,0DAAC,qDAAqD;;AAE1E;;AAEA;AACA;;AAEA;AACA,OAAO;;;AAGP;;AAEA;AACA,uBAAuB,uDAAW;AAClC;AACA,mBAAmB,0DAAC;AACpB;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;AACA;AACA,MAAM;;;AAGN,yBAAyB;;AAEzB;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,MAAM;AACN;AACA,MAAM;;;AAGN,2BAA2B;;AAE3B,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA,kCAAkC;;AAElC,gCAAgC;;AAEhC,2BAA2B;;AAE3B;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA,KAAK;;AAEL;AACA;AACA,MAAM,6DAAW;AACjB;;AAEA;AACA;AACA;;AAEA;AACA,IAAI,wDAAM;AACV;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,qDAAQ;AACnB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD,YAAY,iEAAM,EAAE,qEAAQ;AAC5B,iEAAe,MAAM;;;;;;;;;;;;;;;ACjmBrB,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;ACzHD;AACA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;AC3GwC;AACI;AACF;AACF;AACJ;AACF;AACE;AACrC;;AAEA;;AAEA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA,6HAA6H,oDAAQ;AACrI,IAAI;AACJ,2CAA2C,oDAAQ;AACnD;AACA;;AAEA;AACA;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,wDAAY;AACpC,uBAAuB,uDAAW;AAClC,sBAAsB,sDAAU;;AAEhC;AACA,sBAAsB,oDAAQ;AAC9B;;AAEA,mBAAmB,mDAAO;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA,CAAC;;;;;;;;;;;;;;;AChGc;AACf;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACZe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ,0CAA0C;;AAE1C;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA,IAAI,UAAU;;AAEd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Ce;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AClCsD;AACvC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,IAAI;;;AAGJ,uBAAuB,qDAAG;AAC1B,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qDAAG;AAC1B,EAAE,0DAAQ;AACV;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;;AAGJ;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iFAAiF;AACjF;;AAEA;AACA,oFAAoF;AACpF;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC/IyC;AACL;AACQ;AAC7B;AACf,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,4BAA4B,qDAAG;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,+CAA+C,0DAAC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ,gDAAgD;;AAEhD;AACA;;;;;;;;;;;;;;;;;;AC7NoD;AAChB;AACQ,CAAC;;AAE7C;AACA;AACA,sBAAsB,uDAAW,aAAa,qDAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEe;AACf;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C;;AAE9C;;AAEA;AACA,gBAAgB,0DAAC;AACjB;;AAEA,sFAAsF,sBAAsB;AAC5G,8DAA8D;;AAE9D;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wBAAwB,qDAAG;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,0DAAC;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACjH+C;AACI;AACnD,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,CAAC;;;;;;;;;;;;;;;ACLc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACRuC;AACQ;AAC/C,iEAAe;AACf,WAAW;AACX,eAAe;AACf,CAAC;;;;;;;;;;;;;;;;;ACLsC;AACH;AACrB;AACf,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA,oBAAoB,0DAAC;;AAErB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpCe;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClByC;AACN;AACQ;AAC3C,iEAAe;AACf,YAAY;AACZ,SAAS;AACT,aAAa;AACb,CAAC;;;;;;;;;;;;;;;;;ACPwC;AACL;AACrB;AACf;AACA,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA,IAAI,UAAU;;AAEd,uDAAuD,0DAAC;AACxD,yBAAyB,kBAAkB,GAAG,2BAA2B;AACzE,sCAAsC,kBAAkB;;AAExD;AACA;;AAEA;AACA,sBAAsB,oBAAoB;AAC1C,0BAA0B,0DAAC,4CAA4C,mBAAmB,EAAE,uBAAuB;AACnH;AACA;;AAEA,sCAAsC,kBAAkB;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,0DAAC;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH,kBAAkB,yBAAyB;AAC3C,qBAAqB,0DAAC;AACtB;;AAEA,yCAAyC,QAAQ;AACjD,sBAAsB,0DAAC;AACvB;AACA;;;;;;;;;;;;;;;AC1De;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,0BAA0B,kBAAkB,GAAG,2BAA2B,IAAI,kBAAkB,GAAG,uBAAuB;AAC1H;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxC4C;AAC7B;AACf,uCAAuC;AACvC;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,wDAAM;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,wDAAM;AACV;AACA;;;;;;;;;;;;;;;;ACrCuC;AACxB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,iBAAiB,qDAAS;;AAE1B,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB,6BAA6B;AACnD;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;;;;;AC1EuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;ACnEmC;AACQ;AACJ;AACA;AACE;AACQ;AACU;AAC3D,iEAAe;AACf,SAAS;AACT,aAAa;AACb,WAAW;AACX,WAAW;AACX,YAAY;AACZ,gBAAgB;AAChB,qBAAqB;AACrB,CAAC;;;;;;;;;;;;;;;ACfD;AACe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC7BA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA,sBAAsB;;AAEtB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC9DA;AACe;AACf;AACA;AACA;;;;;;;;;;;;;;;;ACJ6D;AAC9C;AACf;AACA,+FAA+F,aAAa;AAC5G;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA,4FAA4F,MAAM;AAClG,MAAM;AACN;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;;AAE1C,oCAAoC;;AAEpC;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,sDAAsD,0BAA0B;;AAEnI;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACpLoC;AACa;AAClC;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,0DAAC;;AAE1B;AACA;AACA;AACA,+CAA+C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC5I,QAAQ,0DAAQ;AAChB;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,6CAA6C,kBAAkB,4BAA4B,UAAU,UAAU,2BAA2B;AAC1I,MAAM,0DAAQ;AACd;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACtCA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC/Be;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACT+C;AACI;AACJ;AAC/C,iEAAe;AACf,eAAe;AACf,iBAAiB;AACjB,eAAe;AACf,CAAC;;;;;;;;;;;;;;;ACPc;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACRe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,kDAAkD,mDAAmD;AACrG;;AAEA,2BAA2B,KAAK;;AAEhC;AACA;AACA,yCAAyC,KAAK;AAC9C;AACA;;AAEA,wCAAwC,KAAK;;AAE7C;AACA,wCAAwC,KAAK;AAC7C,MAAM;AACN,wCAAwC,KAAK;AAC7C;AACA;AACA;;;;;;;;;;;;;;;;AChCiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACfiD;AAClC;AACf;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA,EAAE,8DAAc;AAChB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AClBqD;AACtC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,8DAAY;AACrC;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACrB6C;AACA;AACA;AACA;AACF;AAC3C,iEAAe;AACf,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,aAAa;AACb,CAAC;;;;;;;;;;;;;;;ACXc;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAE;AAC1D;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC/C6D;AAC9C;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA,+EAA+E,kFAAkF,+BAA+B;;AAEhM;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,QAAQ,sEAAoB;AAC5B;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACpFyC;AACI;AACQ;AACI;AACI;AACZ;AACU;AACJ;AACE;AACzD,iEAAe;AACf,YAAY;AACZ,cAAc;AACd,kBAAkB;AAClB,oBAAoB;AACpB,sBAAsB;AACtB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,oBAAoB;AACpB,CAAC;;;;;;;;;;;;;;;ACnBc;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;;AAGL;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;;;AAGJ,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,IAAI;;;AAGJ,uEAAuE,UAAU;AACjF;;;;;;;;;;;;;;;;AChDoC;AACrB;AACf;AACA;AACA,gBAAgB,0DAAC,gBAAgB,kBAAkB;AACnD;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC,0DAAC;AACtC,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnCe;AACf;;AAEA;AACA,qDAAqD;;AAErD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjDe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AChCuD;AACxC;AACf;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA,GAAG,EAAE;AACL;AACA;AACA;AACA,GAAG,GAAG;;AAEN;AACA,IAAI,gEAAc;AAClB,IAAI,gEAAc;AAClB;;AAEA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA,GAAG;;AAEH,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAEA;AACA,yDAAyD,UAAU;AACnE;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,gBAAgB,yCAAyC;AACzD,KAAK;AACL;;AAEA;AACA;AACA,uCAAuC,yCAAyC;AAChF,KAAK;AACL;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,IAAI,gEAAc,yDAAyD,aAAa;AACxF,IAAI,gEAAc,wDAAwD,kEAAkE;AAC5I;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,wBAAwB,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kCAAkC,EAAE,gCAAgC,EAAE,+BAA+B;AAC1M;;AAEA;AACA,6CAA6C,kBAAkB,4BAA4B,YAAY;AACvG,IAAI;AACJ;AACA,IAAI;;;AAGJ;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,UAAU;AAC1H,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,UAAU;AACpH;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA,IAAI;;;AAGJ,0CAA0C,kBAAkB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;;AAEA;AACA,8BAA8B,kBAAkB,QAAQ,2BAA2B,6BAA6B,0CAA0C;AAC1J,MAAM;AACN,8BAA8B,kBAAkB,GAAG,2BAA2B,4BAA4B,0CAA0C;AACpJ;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;;;;;;;;;;;;;;;ACPoC;AACrB;AACf;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yBAAyB,0DAAC;AAC1B;;;;;;;;;;;;;;;;;AC3CoE;AAChC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD,4BAA4B,QAAQ,IAAI,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,0DAAC;;AAEvB;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,0CAA0C,0EAAiB;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;;AAEzB;AACA;;AAEA;AACA;AACA,0EAA0E,EAAE,OAAO,EAAE;AACrF;AACA;;AAEA,2BAA2B,2CAA2C;AACtE;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,iEAAiE,oBAAoB;AACrF;AACA;AACA,iCAAiC;;AAEjC;AACA,2BAA2B,0DAAC;AAC5B;;AAEA,cAAc,0DAAC;AACf;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA,mEAAmE,EAAE,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE;AAC9H;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,0CAA0C,0EAAiB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA,2CAA2C,0EAAiB;AAC5D;AACA;;AAEA;AACA,iBAAiB,0DAAC,iBAAiB,qCAAqC;AACxE,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrSA;;AAEA;AACyC;AACQ;AAClC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,0DAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;;AAEA,kEAAkE;AAClE;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,qBAAqB,uDAAW;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,uDAAW;AAClC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,uDAAW;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC7NA,kCAAkC,iBAAiB;AACF;AAClC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA,mBAAmB;AACnB;;AAEA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,0DAAQ;AAClB;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;AC9LyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,sBAAsB;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;;AAEA;AACA;AACA,qBAAqB,GAAG,QAAQ,2BAA2B;AAC3D,QAAQ;AACR;AACA,qBAAqB,GAAG,SAAS,2BAA2B;AAC5D,QAAQ;AACR,gBAAgB,GAAG;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,2BAA2B,OAAO,2BAA2B;AACzG;AACA,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG;AACvC,kBAAkB,OAAO;AACzB,gBAAgB,YAAY;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;AC5HyD;AACJ;AACI;AAC1C;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,kEAAkE;;AAElE;AACA,oCAAoC;;AAEpC;AACA;AACA;;AAEA;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,KAAK,WAAW,KAAK,WAAW,eAAe,QAAQ,eAAe,QAAQ,aAAa,MAAM;AACxJ,wBAAwB,oEAAY;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,oEAAY;AACxC;;AAEA;AACA,2BAA2B,oEAAY;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACtGyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,cAAc,MAAM;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,oDAAoD,OAAO;AAC3D;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;;;AAGR;AACA,2BAA2B,MAAM,QAAQ,0CAA0C,IAAI,gCAAgC;AACvH,OAAO,GAAG;;AAEV;AACA;AACA,OAAO;AACP;AACA;AACA,sCAAsC,KAAK,eAAe,KAAK,eAAe,KAAK;AACnF,0DAA0D,qDAAqD,cAAc,qDAAqD;AAClL;AACA,uCAAuC,gBAAgB,IAAI,cAAc,EAAE,YAAY,GAAG;;AAE1F;AACA;;AAEA;AACA,sBAAsB,oEAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;ACzJoC;AACiB;AACtC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC,SAAS;AACT,QAAQ;AACR;;AAEA;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,+BAA+B,eAAe,8BAA8B,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG;;AAEvJ;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,oCAAoC,8BAA8B;AAC5F;AACA;;AAEA;AACA,wBAAwB,0DAAC,oCAAoC,kCAAkC;AAC/F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D,sCAAsC,eAAe;AACrD,KAAK;;AAEL;AACA;AACA,oDAAoD,sCAAsC,MAAM,iBAAiB,yCAAyC,mBAAmB;AAC7K,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO,OAAO,OAAO,qBAAqB,0BAA0B,MAAM,2BAA2B;AAChJ;AACA;;AAEA;AACA,8CAA8C,QAAQ,cAAc,0CAA0C,eAAe,2CAA2C;AACxK;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;ACnLqD;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,oEAAY;AACpC;AACA;AACA,OAAO,2BAA2B,GAAG,MAAM,GAAG;AAC9C;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACrEyD;AACJ;AACI;AAC8B;AACxE;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,oEAAY;AACrC;;AAEA;AACA,wBAAwB,oEAAY;AACpC;;AAEA;AACA;AACA;;AAEA,uCAAuC,GAAG,MAAM,GAAG,mBAAmB,QAAQ,eAAe,QAAQ;AACrG,wBAAwB,oEAAY;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,oFAA0B;AAC9B;AACA;AACA;AACA,KAAK;AACL;;AAEA,EAAE,kEAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;ACrG4C;AAC7B;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,YAAY,qDAAG;AACf,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU;;AAEhB,yBAAyB,qDAAG;AAC5B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;;AAGA,0BAA0B,qDAAG;AAC7B;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;;AAEA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,QAAQ;;;AAGR;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACpPe;AACf;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM,sBAAsB;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,8EAA8E,aAAa;AAC3F;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,uCAAuC,kCAAkC;AACzE,KAAK;;AAEL;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnHoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,sDAAsD,yBAAyB,cAAc,QAAQ;AACrG;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kDAAkD,uDAAuD;AACzG;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA,MAAM,0DAAC;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;AC/FuC;AACxB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,KAAK,GAAG,IAAI,GAAG,MAAM;AACtC,MAAM;AACN,iBAAiB,IAAI,GAAG,MAAM;AAC9B;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;;AAE5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrJA;AACoD;AAChB;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,iCAAiC,yBAAyB,wCAAwC,+BAA+B;AACjI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA,0DAA0D;;AAE1D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA,MAAM;AACN;AACA,iDAAiD;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA,IAAI,0DAAC;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AClIuC;AACH;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB,4BAA4B,MAAM;AAC3H,sCAAsC,oBAAoB,QAAQ,mBAAmB,SAAS,oBAAoB;;AAElH;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,0DAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mDAAmD,WAAW;AAC9D;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,0DAAC;;AAE/B;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,sBAAsB;;AAEhD;AACA;;AAEA;AACA,0FAA0F,mBAAmB,UAAU,kCAAkC;AACzJ;AACA,YAAY;AACZ,mEAAmE,kCAAkC,4BAA4B,mBAAmB;AACpJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,wBAAwB,4BAA4B,MAAM;AAC9F;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA,eAAe,0DAAC;AAChB;;AAEA,aAAa,0DAAC;AACd;;AAEA;;AAEA;AACA,8BAA8B,+BAA+B;AAC7D,kCAAkC,0DAAC,4CAA4C,0DAAC;AAChF;AACA,OAAO;AACP,MAAM;AACN,gCAAgC,iCAAiC;AACjE;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2EAA2E;;AAE3E,kDAAkD,cAAc;AAChE;AACA,UAAU;;;AAGV,+BAA+B,iBAAiB;AAChD;AACA;AACA,QAAQ;AACR,kDAAkD,4BAA4B;AAC9E;AACA,kDAAkD,4BAA4B;AAC9E;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,qDAAS;AAC5B;AACA,iEAAiE,0DAAC,wCAAwC,0DAAC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,oBAAoB,wBAAwB;AAC5C;;AAEA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;AC1RmD;AACE;AACR;AACM;AACQ;AAC5C;AACf;AACA,CAAC;AACD;AACA,iBAAiB,+DAAW;AAC5B,kBAAkB,gEAAY;AAC9B,cAAc,4DAAQ;AACtB,iBAAiB,+DAAW;AAC5B,qBAAqB,mEAAe;AACpC,GAAG;AACH;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;AC/De;AACf;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACjCe;AACf;AACA;;AAEA,kBAAkB,0BAA0B;AAC5C;AACA;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;;AAEA;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;;AC9CA;AACuC;AACH;AACkB;AACvC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,uBAAuB,qDAAG;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,qDAAG;AACrD;AACA;AACA,MAAM;AACN;AACA;;;AAGA,+BAA+B,qDAAG;AAClC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;;;AAGN,kDAAkD;;AAElD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA,8CAA8C;;AAE9C;AACA;AACA;;AAEA;AACA;AACA,4FAA4F;AAC5F,QAAQ,6EAA6E;AACrF,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA,SAAS;;AAET;AACA,mCAAmC;AACnC;;AAEA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qDAAG;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA,aAAa,MAAM,aAAa;AAChC;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,0DAAQ;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;;;AAGV,mDAAmD;;AAEnD,0GAA0G;;AAE1G;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,0DAAC;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACrasF;AAClD;AACrB;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,0DAAC;;AAEb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,oFAAyB;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,iDAAiD,0DAAC,2BAA2B,0DAAC;AAC9E;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;ACxLoC;AACgC;AACkB;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B,4BAA4B,IAAI;AAChC,wBAAwB,IAAI;AAC5B,uBAAuB,IAAI;AAC3B,qBAAqB,IAAI;AACzB,sBAAsB,IAAI;AAC1B,+BAA+B,IAAI;AACnC,mCAAmC,IAAI;AACvC,yBAAyB,IAAI;AAC7B,oBAAoB,IAAI;AACxB,0BAA0B,IAAI;AAC9B,wBAAwB,IAAI;AAC5B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,sCAAsC,kBAAkB,GAAG,SAAS,2BAA2B,kBAAkB,GAAG,SAAS,GAAG,SAAS;AACzI;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D,6CAA6C;;AAE5G;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uGAAuG,yBAAyB,EAAE,OAAO;;AAEzI;AACA;AACA,0BAA0B,0DAAC;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,gBAAgB;AACnD,sCAAsC,yBAAyB;AAC/D;;AAEA;AACA;AACA,sDAAsD,QAAQ;AAC9D,2DAA2D,yBAAyB;AACpF;;AAEA,qFAAqF,yBAAyB;AAC9G,cAAc;AACd;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mEAAmE,cAAc;AACjF;AACA;;AAEA;AACA,eAAe,0EAAiB;AAChC,eAAe,0EAAiB;AAChC;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,eAAe,0EAAiB,sEAAsE,OAAO,WAAW,OAAO;AAC/H;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,qBAAqB;AAC3C;AACA;AACA,UAAU;AACV,gCAAgC,sBAAsB,SAAS,mBAAmB,MAAM,qBAAqB;AAC7G;AACA;;AAEA;AACA,2CAA2C,0EAAiB;AAC5D;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,oBAAoB,qCAAqC,kBAAkB;AACpH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR,yCAAyC,4BAA4B;AACrE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,oFAAyB;AACxD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;AACf;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA,cAAc,0DAAC;AACf;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,qBAAqB,EAAE,YAAY;AACzD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,0EAAiB;AACvC;AACA,oBAAoB,0DAAC;AACrB;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,0EAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;;AAEN,kGAAkG,0DAAC;AACnG;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACzZoC;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM;AACN,gBAAgB,0DAAC;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,MAAM;AACN,aAAa,yBAAyB;AACtC;;AAEA;AACA,aAAa,2BAA2B;AACxC,MAAM;AACN,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,EAAE,IAAI,EAAE;AAC3C,MAAM;AACN;AACA,mCAAmC,EAAE,IAAI,EAAE,eAAe,aAAa;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM,0DAAC;AACP;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,0BAA0B,0DAAC;AAC3B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;ACjHyC;AACL;AACa;AACqC;AACvE;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C,kCAAkC,QAAQ;AAC1C,MAAM;AACN,4CAA4C,OAAO;AACnD,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C,MAAM;AACN,mCAAmC,SAAS;AAC5C;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,0DAAQ;AAC5B;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,8BAA8B,oFAAyB;AACvD;AACA,KAAK;AACL;AACA;AACA,cAAc,0DAAC;;AAEf;AACA;AACA;;AAEA,+BAA+B,kCAAkC;;AAEjE;AACA,gBAAgB,0DAAC,gBAAgB,kCAAkC;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACxWiD;AACb;AACrB;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAAC;AACzB;AACA;;AAEA;AACA,8BAA8B,0DAAC;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA,4FAA4F,aAAa;AACzG,4FAA4F,aAAa;AACzG,qEAAqE,oEAAoE,uFAAuF;AAChO;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,MAAM,SAAS,0DAAQ;AACvB,iDAAiD;AACjD;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,UAAU;;;AAGV,gHAAgH,iBAAiB;AACjI,gHAAgH,iBAAiB;;AAEjI;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU,2FAA2F;AACrG;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,sBAAsB;AAC5C,sEAAsE,qBAAqB;AAC3F;AACA,MAAM;AACN,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;AC3MoC;AACmB;AACxC;AACf;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C,0DAAC,kDAAkD,0DAAC,gBAAgB,yBAAyB,6BAA6B,MAAM,IAAI,MAAM;AACpL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,OAAO;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,SAAS;AACtC;AACA;;AAEA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,yBAAyB;AAC1D,MAAM;AACN,iCAAiC,iBAAiB;AAClD;AACA,qCAAqC,yBAAyB,4BAA4B,EAAE;AAC5F;AACA;AACA;;AAEA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mEAAmE,OAAO;AAC1E;AACA;;AAEA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,QAAQ;AACrD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,MAAM,gEAAc,+CAA+C,mBAAmB;AACtF;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;AClSuC;AACH;AACiB;AACtC;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,0DAAC,uBAAuB,yBAAyB;AAC1E;AACA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D,WAAW;AACtE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2FAA2F,WAAW;AACtG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,8DAAY;AACjC,qBAAqB,8DAAY;AACjC;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,eAAe,MAAM,eAAe;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe,MAAM,eAAe;AACnH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,0DAAC,uBAAuB,yBAAyB;AAC5E;;AAEA;AACA;AACA,4DAA4D,+BAA+B;AAC3F,UAAU;AACV;AACA;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,kEAAkE,WAAW,MAAM,WAAW;AAC9F,2EAA2E,WAAW;AACtF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0DAA0D,+BAA+B;AACzF,QAAQ;AACR;AACA;;AAEA,mDAAmD,sBAAsB;AACzE,yDAAyD,sBAAsB;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,yBAAyB;AACxC;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,sDAAsD,kCAAkC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,8CAA8C;;AAE9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN,uDAAuD,kCAAkC;AACzF;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACnmBe;AACf,aAAa;AACb,sBAAsB;AACtB;;;;;;;;;;;;;;;;ACHyC;AAC1B;AACf,mBAAmB,uDAAW;;AAE9B;AACA;AACA;AACA,8CAA8C,gBAAgB;;AAE9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;ACtByB;AACV;AACf,4CAA4C,WAAW,KAAK,OAAO;AACnE;AACA,gDAAgD,YAAY;;AAE5D;AACA,gBAAgB,mDAAC,mCAAmC,WAAW,KAAK,OAAO;AAC3E;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACZyU;AACzU;AACA,UAAU;AACV,aAAa;AACb,UAAU;AACV,aAAa;AACb,MAAM;AACN,YAAY;AACZ,WAAW;AACX,YAAY;AACZ,IAAI;AACJ,KAAK;AACL,SAAS;AACT,eAAe;AACf,YAAY;AACZ,aAAa;AACb,QAAQ;AACR,QAAQ;AACR,KAAK;AACL,MAAM;AACN,MAAM;AACN,MAAM;AACN,IAAI;AACJ,OAAO;AACP,IAAI;AACJ,QAAQ;AACR,SAAS;AACT,MAAM;AACN,SAAS;AACT,MAAM;AACN,SAAS;AACT,QAAQ;AACR,SAAS;AACT,SAAS;AACT,MAAM;AACN,UAAU;AACV,QAAQ;AACR,QAAQ;AACR;AACA;AACA,wBAAwB,mCAAC;AACzB;AACA;AACA,GAAG;AACH,CAAC;AACD,iEAAe,mCAAC;;;;;;;;;;;;;;;AC7CD;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8BAA8B,qCAAqC,EAAE,OAAO;;AAE5E;AACA,gCAAgC,qCAAqC;AACrE;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;AC9Be;AACf;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,0BAA0B;AAChD;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;AClCuC;AACvC;;AAEA;AACA,iBAAiB,qDAAS;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACvBuC;AACO;AAC9C;;AAEA;AACA;AACA,EAAE,IAAI;AACN,kBAAkB,2DAAU;AAC5B,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;;AAE3D;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;;AAEA,gEAAgE,YAAY,GAAG,aAAa;AAC5F;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;;AAEA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACtDoD;AACpD;;AAEA;AACA,iBAAiB,qDAAS;AAC1B,mBAAmB,uDAAW;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA,QAAQ,WAAW;AACnB;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACtCuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;;AAEA;AACA;AACA,MAAM,WAAW;AACjB;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,4DAA4D;AAClE;;;AAGA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE,0EAA0E;AAC1E;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;;AAEA,sDAAsD,iBAAiB;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE4D;AACM;AACG;AACM;AACA;AACA;AACH;AACH;AACZ;AACA;AACkB;AAClB;AACS;AACuB;AACpB;AACN;AACQ;AACd;AACwB;AACJ;AACA;AACA;AACe;AACH;;;;;;;UCnCzF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNwC;AAEa;AACW;AACA;AACJ;AACE;AACT;AAErDb,mEAAU,CAAC,CAAC;AACZoE,2EAAc,CAAC,CAAC;AAChBzC,6EAAqB,CAAC,CAAC;AACvBR,6EAAe,CAAC,CAAC;AACjBjC,yEAAe,CAAC,CAAC;AACjBqB,kEAAQ,CAAC,CAAC,C","sources":["webpack://gulp-builder/./node_modules/@fancyapps/ui/dist/fancybox.esm.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/media-groups.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/@videojs/vhs-utils/es/stream.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/http-handler.js","webpack://gulp-builder/./node_modules/@videojs/xhr/lib/index.js","webpack://gulp-builder/./src/js/components/accordion.js","webpack://gulp-builder/./src/js/components/burger-menu.js","webpack://gulp-builder/./src/js/components/paint-btn.js","webpack://gulp-builder/./src/js/components/scroll-smooth.js","webpack://gulp-builder/./src/js/components/sliders.js","webpack://gulp-builder/./src/js/components/video-player.js","webpack://gulp-builder/./node_modules/global/document.js","webpack://gulp-builder/./node_modules/global/window.js","webpack://gulp-builder/./node_modules/is-function/index.js","webpack://gulp-builder/./node_modules/keycode/index.js","webpack://gulp-builder/./node_modules/m3u8-parser/dist/m3u8-parser.es.js","webpack://gulp-builder/./node_modules/mpd-parser/dist/mpd-parser.es.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/conventions.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom-parser.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/dom.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/entities.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/index.js","webpack://gulp-builder/./node_modules/mpd-parser/node_modules/@xmldom/xmldom/lib/sax.js","webpack://gulp-builder/./node_modules/mux.js/lib/tools/parse-sidx.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/clock.js","webpack://gulp-builder/./node_modules/mux.js/lib/utils/numbers.js","webpack://gulp-builder/./node_modules/safe-json-parse/tuple.js","webpack://gulp-builder/./node_modules/smooth-scroll/dist/smooth-scroll.js","webpack://gulp-builder/./node_modules/url-toolkit/src/url-toolkit.js","webpack://gulp-builder/./node_modules/video.js/dist/video.es.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codec-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js","webpack://gulp-builder/./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/browser-index.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vtt.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttcue.js","webpack://gulp-builder/./node_modules/videojs-vtt.js/lib/vttregion.js","webpack://gulp-builder/ignored|C:\\Users\\kiril\\OneDrive\\Рабочий стол\\Projects\\felix-gulp\\node_modules\\global|min-document","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/extends.js","webpack://gulp-builder/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://gulp-builder/./node_modules/dom7/dom7.esm.js","webpack://gulp-builder/./node_modules/ssr-window/ssr-window.esm.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/getBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/index.js","webpack://gulp-builder/./node_modules/swiper/core/breakpoints/setBreakpoint.js","webpack://gulp-builder/./node_modules/swiper/core/check-overflow/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/addClasses.js","webpack://gulp-builder/./node_modules/swiper/core/classes/index.js","webpack://gulp-builder/./node_modules/swiper/core/classes/removeClasses.js","webpack://gulp-builder/./node_modules/swiper/core/core.js","webpack://gulp-builder/./node_modules/swiper/core/defaults.js","webpack://gulp-builder/./node_modules/swiper/core/events-emitter.js","webpack://gulp-builder/./node_modules/swiper/core/events/index.js","webpack://gulp-builder/./node_modules/swiper/core/events/onClick.js","webpack://gulp-builder/./node_modules/swiper/core/events/onResize.js","webpack://gulp-builder/./node_modules/swiper/core/events/onScroll.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchEnd.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchMove.js","webpack://gulp-builder/./node_modules/swiper/core/events/onTouchStart.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/index.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/setGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","webpack://gulp-builder/./node_modules/swiper/core/images/index.js","webpack://gulp-builder/./node_modules/swiper/core/images/loadImage.js","webpack://gulp-builder/./node_modules/swiper/core/images/preloadImages.js","webpack://gulp-builder/./node_modules/swiper/core/loop/index.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopCreate.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopDestroy.js","webpack://gulp-builder/./node_modules/swiper/core/loop/loopFix.js","webpack://gulp-builder/./node_modules/swiper/core/moduleExtendParams.js","webpack://gulp-builder/./node_modules/swiper/core/modules/observer/observer.js","webpack://gulp-builder/./node_modules/swiper/core/modules/resize/resize.js","webpack://gulp-builder/./node_modules/swiper/core/slide/index.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideNext.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slidePrev.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideReset.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideTo.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToClosest.js","webpack://gulp-builder/./node_modules/swiper/core/slide/slideToLoop.js","webpack://gulp-builder/./node_modules/swiper/core/transition/index.js","webpack://gulp-builder/./node_modules/swiper/core/transition/setTransition.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEmit.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionEnd.js","webpack://gulp-builder/./node_modules/swiper/core/transition/transitionStart.js","webpack://gulp-builder/./node_modules/swiper/core/translate/getTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/index.js","webpack://gulp-builder/./node_modules/swiper/core/translate/maxTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/minTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/setTranslate.js","webpack://gulp-builder/./node_modules/swiper/core/translate/translateTo.js","webpack://gulp-builder/./node_modules/swiper/core/update/index.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateActiveIndex.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateAutoHeight.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateClickedSlide.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateProgress.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSize.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlides.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesClasses.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesOffset.js","webpack://gulp-builder/./node_modules/swiper/core/update/updateSlidesProgress.js","webpack://gulp-builder/./node_modules/swiper/modules/a11y/a11y.js","webpack://gulp-builder/./node_modules/swiper/modules/autoplay/autoplay.js","webpack://gulp-builder/./node_modules/swiper/modules/controller/controller.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cards/effect-cards.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-creative/effect-creative.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-cube/effect-cube.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-fade/effect-fade.js","webpack://gulp-builder/./node_modules/swiper/modules/effect-flip/effect-flip.js","webpack://gulp-builder/./node_modules/swiper/modules/free-mode/free-mode.js","webpack://gulp-builder/./node_modules/swiper/modules/grid/grid.js","webpack://gulp-builder/./node_modules/swiper/modules/hash-navigation/hash-navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/history/history.js","webpack://gulp-builder/./node_modules/swiper/modules/keyboard/keyboard.js","webpack://gulp-builder/./node_modules/swiper/modules/lazy/lazy.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/manipulation.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/addSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/appendSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/prependSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js","webpack://gulp-builder/./node_modules/swiper/modules/manipulation/methods/removeSlide.js","webpack://gulp-builder/./node_modules/swiper/modules/mousewheel/mousewheel.js","webpack://gulp-builder/./node_modules/swiper/modules/navigation/navigation.js","webpack://gulp-builder/./node_modules/swiper/modules/pagination/pagination.js","webpack://gulp-builder/./node_modules/swiper/modules/parallax/parallax.js","webpack://gulp-builder/./node_modules/swiper/modules/scrollbar/scrollbar.js","webpack://gulp-builder/./node_modules/swiper/modules/thumbs/thumbs.js","webpack://gulp-builder/./node_modules/swiper/modules/virtual/virtual.js","webpack://gulp-builder/./node_modules/swiper/modules/zoom/zoom.js","webpack://gulp-builder/./node_modules/swiper/shared/classes-to-selector.js","webpack://gulp-builder/./node_modules/swiper/shared/create-element-if-not-defined.js","webpack://gulp-builder/./node_modules/swiper/shared/create-shadow.js","webpack://gulp-builder/./node_modules/swiper/shared/dom.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-init.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-target.js","webpack://gulp-builder/./node_modules/swiper/shared/effect-virtual-transition-end.js","webpack://gulp-builder/./node_modules/swiper/shared/get-browser.js","webpack://gulp-builder/./node_modules/swiper/shared/get-device.js","webpack://gulp-builder/./node_modules/swiper/shared/get-support.js","webpack://gulp-builder/./node_modules/swiper/shared/utils.js","webpack://gulp-builder/./node_modules/swiper/swiper.esm.js","webpack://gulp-builder/webpack/bootstrap","webpack://gulp-builder/webpack/runtime/compat get default export","webpack://gulp-builder/webpack/runtime/define property getters","webpack://gulp-builder/webpack/runtime/global","webpack://gulp-builder/webpack/runtime/hasOwnProperty shorthand","webpack://gulp-builder/webpack/runtime/make namespace object","webpack://gulp-builder/./src/js/main.js"],"sourcesContent":["// @fancyapps/ui/Fancybox v4.0.31\nconst t=t=>\"object\"==typeof t&&null!==t&&t.constructor===Object&&\"[object Object]\"===Object.prototype.toString.call(t),e=(...i)=>{let s=!1;\"boolean\"==typeof i[0]&&(s=i.shift());let o=i[0];if(!o||\"object\"!=typeof o)throw new Error(\"extendee must be an object\");const n=i.slice(1),a=n.length;for(let i=0;i(t=parseFloat(t)||0,Math.round((t+Number.EPSILON)*e)/e),s=function(t){return!!(t&&\"object\"==typeof t&&t instanceof Element&&t!==document.body)&&(!t.__Panzoom&&(function(t){const e=getComputedStyle(t)[\"overflow-y\"],i=getComputedStyle(t)[\"overflow-x\"],s=(\"scroll\"===e||\"auto\"===e)&&Math.abs(t.scrollHeight-t.clientHeight)>1,o=(\"scroll\"===i||\"auto\"===i)&&Math.abs(t.scrollWidth-t.clientWidth)>1;return s||o}(t)?t:s(t.parentNode)))},o=\"undefined\"!=typeof window&&window.ResizeObserver||class{constructor(t){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=t}observe(t){if(this.observables.some((e=>e.el===t)))return;const e={el:t,size:{height:t.clientHeight,width:t.clientWidth}};this.observables.push(e)}unobserve(t){this.observables=this.observables.filter((e=>e.el!==t))}disconnect(){this.observables=[]}check(){const t=this.observables.filter((t=>{const e=t.el.clientHeight,i=t.el.clientWidth;if(t.size.height!==e||t.size.width!==i)return t.size.height=e,t.size.width=i,!0})).map((t=>t.el));t.length>0&&this.callback(t),window.requestAnimationFrame(this.boundCheck)}};class n{constructor(t){this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY}}const a=(t,e)=>e?Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2):0,r=(t,e)=>e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t;class h{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=t,this.startPointers=[],this.currentPointers=[],this._pointerStart=t=>{if(t.buttons>0&&0!==t.button)return;const e=new n(t);this.currentPointers.some((t=>t.id===e.id))||this._triggerPointerStart(e,t)&&(window.addEventListener(\"mousemove\",this._move),window.addEventListener(\"mouseup\",this._pointerEnd))},this._touchStart=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerStart(new n(e),t)},this._move=t=>{const e=this.currentPointers.slice(),i=(t=>\"changedTouches\"in t)(t)?Array.from(t.changedTouches).map((t=>new n(t))):[new n(t)];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(this.currentPointers[e]=t)}this._moveCallback(e,this.currentPointers.slice(),t)},this._triggerPointerEnd=(t,e)=>{const i=this.currentPointers.findIndex((e=>e.id===t.id));return!(i<0)&&(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(t,e),!0)},this._pointerEnd=t=>{t.buttons>0&&0!==t.button||this._triggerPointerEnd(new n(t),t)&&(window.removeEventListener(\"mousemove\",this._move,{passive:!1}),window.removeEventListener(\"mouseup\",this._pointerEnd,{passive:!1}))},this._touchEnd=t=>{for(const e of Array.from(t.changedTouches||[]))this._triggerPointerEnd(new n(e),t)},this._startCallback=e,this._moveCallback=i,this._endCallback=s,this._element.addEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.addEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.addEventListener(\"touchmove\",this._move,{passive:!1}),this._element.addEventListener(\"touchend\",this._touchEnd),this._element.addEventListener(\"touchcancel\",this._touchEnd)}stop(){this._element.removeEventListener(\"mousedown\",this._pointerStart,{passive:!1}),this._element.removeEventListener(\"touchstart\",this._touchStart,{passive:!1}),this._element.removeEventListener(\"touchmove\",this._move,{passive:!1}),this._element.removeEventListener(\"touchend\",this._touchEnd),this._element.removeEventListener(\"touchcancel\",this._touchEnd),window.removeEventListener(\"mousemove\",this._move),window.removeEventListener(\"mouseup\",this._pointerEnd)}_triggerPointerStart(t,e){return!!this._startCallback(t,e)&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}}class l{constructor(t={}){this.options=e(!0,{},t),this.plugins=[],this.events={};for(const t of[\"on\",\"once\"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(t,e,...i){t=String(t);let s=(o=t,n=this.options,o.split(\".\").reduce((function(t,e){return t&&t[e]}),n));var o,n;return\"function\"==typeof s&&(s=s.call(this,this,...i)),void 0===s?e:s}localize(t,e=[]){return t=(t=String(t).replace(/\\{\\{(\\w+).?(\\w+)?\\}\\}/g,((t,i,s)=>{let o=\"\";s?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(o=this.option(`l10n.${i}`)),o||(o=t);for(let t=0;te))}on(e,i){if(t(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(\" \").forEach((t=>{const e=this.events[t]=this.events[t]||[];-1==e.indexOf(i)&&e.push(i)})),this}once(e,i){if(t(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(\" \").forEach((t=>{const e=(...s)=>{this.off(t,e),i.call(this,this,...s)};e._=i,this.on(t,e)})),this}off(e,i){if(!t(e))return e.split(\" \").forEach((t=>{const e=this.events[t];if(!e||!e.length)return this;let s=-1;for(let t=0,o=e.length;t1||Math.abs(e.left-this.dragStart.rect.left)>1))return t.preventDefault(),void t.stopPropagation();!1!==this.trigger(\"click\",t)&&this.option(\"zoom\")&&\"toggleZoom\"===this.option(\"click\")&&(t.preventDefault(),t.stopPropagation(),this.zoomWithClick(t))}onWheel(t){!1!==this.trigger(\"wheel\",t)&&this.option(\"zoom\")&&this.option(\"wheel\")&&this.zoomWithWheel(t)}zoomWithWheel(t){void 0===this.changedDelta&&(this.changedDelta=0);const e=Math.max(-1,Math.min(1,-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)),i=this.content.scale;let s=i*(100+e*this.option(\"wheelFactor\"))/100;if(e<0&&Math.abs(i-this.option(\"minScale\"))<.01||e>0&&Math.abs(i-this.option(\"maxScale\"))<.01?(this.changedDelta+=Math.abs(e),s=i):(this.changedDelta=0,s=Math.max(Math.min(s,this.option(\"maxScale\")),this.option(\"minScale\"))),this.changedDelta>this.option(\"wheelLimit\"))return;if(t.preventDefault(),s===i)return;const o=this.$content.getBoundingClientRect(),n=t.clientX-o.left,a=t.clientY-o.top;this.zoomTo(s,{x:n,y:a})}zoomWithClick(t){const e=this.$content.getClientRects()[0],i=t.clientX-e.left,s=t.clientY-e.top;this.toggleZoom({x:i,y:s})}attachEvents(){this.$content.addEventListener(\"load\",this.onLoad),this.$container.addEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.addEventListener(\"click\",this.onClick,{passive:!1}),this.initObserver();const t=new h(this.$container,{start:(e,i)=>{if(!this.option(\"touch\"))return!1;if(this.velocity.scale<0)return!1;const o=i.composedPath()[0];if(!t.currentPointers.length){if(-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(o.nodeName))return!1;if(this.option(\"textSelection\")&&((t,e,i)=>{const s=t.childNodes,o=document.createRange();for(let t=0;t=a.left&&i>=a.top&&e<=a.right&&i<=a.bottom)return n}return!1})(o,e.clientX,e.clientY))return!1}return!s(o)&&(!1!==this.trigger(\"touchStart\",i)&&(\"mousedown\"===i.type&&i.preventDefault(),this.state=\"pointerdown\",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0))},move:(e,i,s)=>{if(\"pointerdown\"!==this.state)return;if(!1===this.trigger(\"touchMove\",s))return void s.preventDefault();if(i.length<2&&!0===this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\"))return;if(i.length>1&&(!this.option(\"zoom\")||!1===this.option(\"pinchToZoom\")))return;const o=r(e[0],e[1]),n=r(i[0],i[1]),h=n.clientX-o.clientX,l=n.clientY-o.clientY,c=a(e[0],e[1]),d=a(i[0],i[1]),u=c&&d?d/c:1;this.dragOffset.x+=h,this.dragOffset.y+=l,this.dragOffset.scale*=u,this.dragOffset.time=Date.now()-this.dragPosition.time;const f=1===this.dragStart.scale&&this.option(\"lockAxis\");if(f&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=t>45&&t<135?\"y\":\"x\"}if(\"xy\"===f||\"y\"!==this.lockAxis){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset[\"x\"===this.lockAxis?\"y\":\"x\"]=0),this.$container.classList.add(this.option(\"draggingClass\")),this.transform.scale===this.option(\"baseScale\")&&\"y\"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option(\"baseScale\")&&\"x\"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const e=r(t.startPointers[0],t.startPointers[1]),i=e.clientX-this.dragStart.rect.x,s=e.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,s);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=n}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(e,i)=>{if(\"pointerdown\"!==this.state)return;if(this._dragOffset={...this.dragOffset},t.currentPointers.length)return void this.resetDragPosition();if(this.state=\"decel\",this.friction=this.option(\"decelFriction\"),this.recalculateTransform(),this.$container.classList.remove(this.option(\"draggingClass\")),!1===this.trigger(\"touchEnd\",i))return;if(\"decel\"!==this.state)return;const s=this.option(\"minScale\");if(this.transform.scale.01){const t=this.dragPosition.midPoint||e,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:t.clientX-i.left,y:t.clientY-i.top})}else;}});this.pointerTracker=t}initObserver(){this.resizeObserver||(this.resizeObserver=new o((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const t=this.$container.getBoundingClientRect();t.width&&t.height?((Math.abs(t.width-this.container.width)>1||Math.abs(t.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option(\"baseScale\"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option(\"friction\"),this.velocity={x:0,y:0,scale:0};const{x:t,y:e,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:t,y:e,scale:i},this.dragPosition={...this.dragPosition,x:t,y:e,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(t){!0!==t&&this.trigger(\"beforeUpdate\");const e=this.$container,s=this.$content,o=this.$viewport,n=s instanceof HTMLImageElement,a=this.option(\"zoom\"),r=this.option(\"resizeParent\",a);let h=this.option(\"width\"),l=this.option(\"height\"),c=h||(d=s,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(t=>Math.max(parseFloat(t.naturalHeight||0),parseFloat(t.height&&t.height.baseVal&&t.height.baseVal.value||0),parseFloat(t.offsetHeight||0),parseFloat(t.scrollHeight||0)))(s);Object.assign(s.style,{width:h?`${h}px`:\"\",height:l?`${l}px`:\"\",maxWidth:\"\",maxHeight:\"\"}),r&&Object.assign(o.style,{width:\"\",height:\"\"});const f=this.option(\"ratio\");c=i(c*f),u=i(u*f),h=c,l=u;const g=s.getBoundingClientRect(),p=o.getBoundingClientRect(),m=o==e?p:e.getBoundingClientRect();let y=Math.max(o.offsetWidth,i(p.width)),v=Math.max(o.offsetHeight,i(p.height)),b=window.getComputedStyle(o);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,a){if(Math.abs(c-g.width)>.1||Math.abs(u-g.height)>.1){const t=((t,e,i,s)=>{const o=Math.min(i/t||0,s/e);return{width:t*o||0,height:e*o||0}})(c,u,Math.min(c,g.width),Math.min(u,g.height));h=i(t.width),l=i(t.height)}Object.assign(s.style,{width:`${h}px`,height:`${l}px`,transform:\"\"})}if(r&&(Object.assign(o.style,{width:`${h}px`,height:`${l}px`}),this.viewport={...this.viewport,width:h,height:l}),n&&a&&\"function\"!=typeof this.options.maxScale){const t=this.option(\"maxScale\");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:t}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:h,fitHeight:l,width:h,height:l,scale:1,isZoomable:a},this.container={width:m.width,height:m.height},!0!==t&&this.trigger(\"afterUpdate\")}zoomIn(t){this.zoomTo(this.content.scale+(t||this.option(\"step\")))}zoomOut(t){this.zoomTo(this.content.scale-(t||this.option(\"step\")))}toggleZoom(t={}){const e=this.option(\"maxScale\"),i=this.option(\"baseScale\"),s=this.content.scale>i+.5*(e-i)?i:e;this.zoomTo(s,t)}zoomTo(t=this.option(\"baseScale\"),{x:e=null,y:s=null}={}){t=Math.max(Math.min(t,this.option(\"maxScale\")),this.option(\"minScale\"));const o=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===e&&(e=this.content.width*o*.5),null===s&&(s=this.content.height*o*.5);const{deltaX:n,deltaY:a}=this.getZoomDelta(t,e,s);e=this.content.x-n,s=this.content.y-a,this.panTo({x:e,y:s,scale:t,friction:this.option(\"zoomFriction\")})}getZoomDelta(t,e=0,i=0){const s=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,n=e>0&&s?e/s:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*t-s)*n,deltaY:(this.content.fitHeight*t-o)*a}}panTo({x:t=this.content.x,y:e=this.content.y,scale:i,friction:s=this.option(\"friction\"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:s,boundY:o}=this.getBounds(i);s&&(t=Math.max(Math.min(t,s.to),s.from)),o&&(e=Math.max(Math.min(e,o.to),o.from))}this.friction=s,this.transform={...this.transform,x:t,y:e,scale:i},s?(this.state=\"panning\",this.velocity={x:(1/this.friction-1)*(t-this.content.x),y:(1/this.friction-1)*(e-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger(\"startAnimation\"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if(\"pointerdown\"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(t){let e=this.boundX,s=this.boundY;if(void 0!==e&&void 0!==s)return{boundX:e,boundY:s};e={from:0,to:0},s={from:0,to:0},t=t||this.transform.scale;const o=this.content.fitWidth*t,n=this.content.fitHeight*t,a=this.viewport.width,r=this.viewport.height;if(oe.to),i&&(n=this.content.yi.to),s||o){let i=((s?e.from:e.to)-this.content.x)*t;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=e.from&&o<=e.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(n||a){let e=((n?i.from:i.to)-this.content.y)*t;const s=this.content.y+(e+this.velocity.y)/this.friction;s>=i.from&&s<=i.to&&(e+=this.velocity.y),this.velocity.y=e,this.recalculateTransform()}}setDragResistance(){if(\"pointerdown\"!==this.state)return;const{boundX:t,boundY:e}=this.getBounds(this.dragPosition.scale);let i,s,o,n;if(t&&(i=this.dragPosition.xt.to),e&&(o=this.dragPosition.ye.to),(i||s)&&(!i||!s)){const e=i?t.from:t.to,s=e-this.dragPosition.x;this.dragPosition.x=e-.3*s}if((o||n)&&(!o||!n)){const t=o?e.from:e.to,i=t-this.dragPosition.y;this.dragPosition.y=t-.3*i}}setDragForce(){\"pointerdown\"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(t){let e,s,o;if(t?(e=i(this.transform.x),s=i(this.transform.y),o=this.transform.scale,this.content={...this.content,x:e,y:s,scale:o}):(e=i(this.content.x),s=i(this.content.y),o=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:e,y:s}),this.trigger(\"beforeTransform\"),e=i(this.content.x),s=i(this.content.y),t&&this.option(\"zoom\")){let t,n;t=i(this.content.fitWidth*o),n=i(this.content.fitHeight*o),this.content.width=t,this.content.height=n,this.transform={...this.transform,width:t,height:n,scale:o},Object.assign(this.$content.style,{width:`${t}px`,height:`${n}px`,maxWidth:\"none\",maxHeight:\"none\",transform:`translate3d(${e}px, ${s}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${e}px, ${s}px, 0) scale(${o})`;this.trigger(\"afterTransform\")}endAnimation(t){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state=\"ready\",this.handleCursor(),!0!==t&&this.trigger(\"endAnimation\")}handleCursor(){const t=this.option(\"draggableClass\");t&&this.option(\"touch\")&&(1==this.option(\"panOnlyZoomed\")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option(\"baseScale\")?this.$container.classList.remove(t):this.$container.classList.add(t))}detachEvents(){this.$content.removeEventListener(\"load\",this.onLoad),this.$container.removeEventListener(\"wheel\",this.onWheel,{passive:!1}),this.$container.removeEventListener(\"click\",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){\"destroy\"!==this.state&&(this.state=\"destroy\",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}d.version=\"4.0.31\",d.Plugins={};const u=(t,e)=>{let i=0;return function(...s){const o=(new Date).getTime();if(!(o-i{e.preventDefault(),e.stopPropagation(),this.carousel[\"slide\"+(\"next\"===t?\"Next\":\"Prev\")]()})),e}build(){this.$container||(this.$container=document.createElement(\"div\"),this.$container.classList.add(...this.option(\"classNames.main\").split(\" \")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton(\"next\"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton(\"prev\"),this.$container.appendChild(this.$prev))}onRefresh(){const t=this.carousel.pages.length;t<=1||t>1&&this.carousel.elemDimWidth=t-1&&this.$next.setAttribute(\"disabled\",\"\")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on(\"refresh change\",this.onRefresh)}detach(){this.carousel.off(\"refresh change\",this.onRefresh),this.cleanup()}}f.defaults={prevTpl:'',nextTpl:'',classNames:{main:\"carousel__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}};class g{constructor(t){this.carousel=t,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(t){this.target=this.carousel,this.nav=t,this.attachEvents()}addAsNavFor(t){this.target=t,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on(\"ready\",this.onNavReady),this.nav.on(\"createSlide\",this.onNavCreateSlide),this.nav.on(\"Panzoom.click\",this.onNavClick),this.target.on(\"change\",this.onTargetChange),this.target.on(\"Panzoom.afterUpdate\",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(t,e,i){const s=i.target.closest(\".carousel__slide\");if(!s)return;i.stopPropagation();const o=parseInt(s.dataset.index,10),n=this.target.findPageForSlide(o);this.target.page!==n&&this.target.slideTo(n,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){const t=this.target.pages[this.target.page].indexes[0],e=this.nav.findPageForSlide(t);this.nav.slideTo(e),this.markSelectedSlide(t)}markSelectedSlide(t){this.selectedIndex=t,[...this.nav.slides].filter((t=>t.$el&&t.$el.classList.remove(\"is-nav-selected\")));const e=this.nav.slides[t];e&&e.$el&&e.$el.classList.add(\"is-nav-selected\")}attach(t){const e=t.options.Sync;(e.target||e.nav)&&(e.target?this.addAsNavFor(e.target):e.nav&&this.addAsTargetFor(e.nav),this.friction=e.friction)}detach(){this.nav&&(this.nav.off(\"ready\",this.onNavReady),this.nav.off(\"Panzoom.click\",this.onNavClick),this.nav.off(\"createSlide\",this.onNavCreateSlide)),this.target&&(this.target.off(\"Panzoom.afterUpdate\",this.onTargetChange),this.target.off(\"change\",this.onTargetChange))}}g.defaults={friction:.92};const p={Navigation:f,Dots:class{constructor(t){this.carousel=t,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length{if(!(\"page\"in t.target.dataset))return;t.preventDefault(),t.stopPropagation();const e=parseInt(t.target.dataset.page,10),i=this.carousel;e!==i.page&&(i.pages.length<3&&i.option(\"infinite\")?i[0==e?\"slidePrev\":\"slideNext\"]():i.slideTo(e))})),this.$list=t,this.carousel.$container.appendChild(t),this.carousel.$container.classList.add(\"has-dots\"),t}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove(\"has-dots\")}rebuildDots(){let t=this.$list;const e=!!t,i=this.carousel.pages.length;if(i<2)return void(e&&this.removeList());e||(t=this.buildList());const s=this.$list.children.length;if(s>i)for(let t=i;t{const i=t.code;let s;\"Enter\"===i||\"NumpadEnter\"===i?s=e:\"ArrowRight\"===i?s=e.nextSibling:\"ArrowLeft\"===i&&(s=e.previousSibling),s&&s.click()})),this.$list.appendChild(e)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((t=>{t.classList.remove(\"is-selected\")}));const t=this.$list.childNodes[this.carousel.page];t&&t.classList.add(\"is-selected\")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:g};const m={slides:[],preload:0,slidesPerPage:\"auto\",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:\"\",classNames:{viewport:\"carousel__viewport\",track:\"carousel__track\",slide:\"carousel__slide\",slideSelected:\"is-selected\"},l10n:{NEXT:\"Next slide\",PREV:\"Previous slide\",GOTO:\"Go to slide #%d\"}};class y extends l{constructor(t,i={}){if(super(i=e(!0,{},m,i)),this.state=\"init\",this.$container=t,!(this.$container instanceof HTMLElement))throw new Error(\"No root element provided\");this.slideNext=u(this.slideNext.bind(this),250),this.slidePrev=u(this.slidePrev.bind(this),250),this.init(),t.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(y.Plugins),this.trigger(\"init\"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state=\"ready\",this.trigger(\"ready\")}initLayout(){const t=this.option(\"prefix\"),e=this.option(\"classNames\");this.$viewport=this.option(\"viewport\")||this.$container.querySelector(`.${t}${e.viewport}`),this.$viewport||(this.$viewport=document.createElement(\"div\"),this.$viewport.classList.add(...(t+e.viewport).split(\" \")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option(\"track\")||this.$container.querySelector(`.${t}${e.track}`),this.$track||(this.$track=document.createElement(\"div\"),this.$track.classList.add(...(t+e.track).split(\" \")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[];this.$viewport.querySelectorAll(`.${this.option(\"prefix\")}${this.option(\"classNames.slide\")}`).forEach((t=>{const e={$el:t,isDom:!0};this.slides.push(e),this.trigger(\"createSlide\",e,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=e(!0,[...this.slides],this.options.slides))}updateMetrics(){let t,e=0,s=[];this.slides.forEach(((i,o)=>{const n=i.$el,a=i.isDom||!t?this.getSlideMetrics(n):t;i.index=o,i.width=a,i.left=e,t=a,e+=a,s.push(o)}));let o=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),n=getComputedStyle(this.$track);o-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),this.contentWidth=e,this.viewportWidth=o;const a=[],r=this.option(\"slidesPerPage\");if(Number.isInteger(r)&&e>o)for(let t=0;to)&&(a.push({indexes:[],slides:[]}),t=a.length-1,e=0),e+=s.width,a[t].indexes.push(i),a[t].slides.push(s)}}const h=this.option(\"center\"),l=this.option(\"fill\");a.forEach(((t,i)=>{t.index=i,t.width=t.slides.reduce(((t,e)=>t+e.width),0),t.left=t.slides[0].left,h&&(t.left+=.5*(o-t.width)*-1),l&&!this.option(\"infiniteX\",this.option(\"infinite\"))&&e>o&&(t.left=Math.max(t.left,0),t.left=Math.min(t.left,e-o))}));const c=[];let d;a.forEach((t=>{const e={...t};d&&e.left===d.left?(d.width+=e.width,d.slides=[...d.slides,...e.slides],d.indexes=[...d.indexes,...e.indexes]):(e.index=c.length,d=e,c.push(e))})),this.pages=c;let u=this.page;if(null===u){const t=this.option(\"initialSlide\");u=null!==t?this.findPageForSlide(t):parseInt(this.option(\"initialPage\",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger(\"refresh\")}getSlideMetrics(t){if(!t){const e=this.slides[0];(t=document.createElement(\"div\")).dataset.isTestEl=1,t.style.visibility=\"hidden\",t.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),e.customClass&&t.classList.add(...e.customClass.split(\" \")),this.$track.prepend(t)}let e=Math.max(t.offsetWidth,i(t.getBoundingClientRect().width));const s=t.currentStyle||window.getComputedStyle(t);return e=e+(parseFloat(s.marginLeft)||0)+(parseFloat(s.marginRight)||0),t.dataset.isTestEl&&t.remove(),e}findPageForSlide(t){t=parseInt(t,10)||0;const e=this.pages.find((e=>e.indexes.indexOf(t)>-1));return e?e.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(t,e={}){const{x:i=-1*this.setPage(t,!0),y:s=0,friction:o=this.option(\"friction\")}=e;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:s,friction:o,ignoreBounds:!0}),\"ready\"===this.state&&\"ready\"===this.Panzoom.state&&this.trigger(\"settle\"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const t=e(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:\"x\",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option(\"textSelection\",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option(\"Panzoom\"));this.Panzoom=new d(this.$container,t),this.Panzoom.on({\"*\":(t,...e)=>this.trigger(`Panzoom.${t}`,...e),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger(\"settle\")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option(\"infiniteX\",this.option(\"infinite\"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option(\"infiniteY\",this.option(\"infinite\"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const t=this.contentWidth,e=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option(\"preload\"),o=this.option(\"infiniteX\",this.option(\"infinite\")),n=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-left\")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue(\"padding-right\"));this.slides.forEach((r=>{let h,l,c=0;h=i-n,l=i+e+a,h-=s*(e+n+a),l+=s*(e+n+a);const d=r.left+r.width>h&&r.lefth&&r.lefth&&r.lefti&&r.left<=i+e+a&&(c=0)):this.removeSlideEl(r),r.hasDiff=c}));let r=0,h=0;this.slides.forEach(((e,i)=>{let s=0;e.$el?(i!==r||e.hasDiff?s=h+e.hasDiff*t:h=0,e.$el.style.left=Math.abs(s)>.1?`${h+e.hasDiff*t}px`:\"\",r++):h+=e.width})),this.markSelectedSlides()}createSlideEl(t){if(!t)return;if(t.$el){let e=t.$el.dataset.index;if(!e||parseInt(e,10)!==t.index){let e;t.$el.dataset.index=t.index,t.$el.querySelectorAll(\"[data-lazy-srcset]\").forEach((t=>{t.srcset=t.dataset.lazySrcset})),t.$el.querySelectorAll(\"[data-lazy-src]\").forEach((t=>{let e=t.dataset.lazySrc;t instanceof HTMLImageElement?t.src=e:t.style.backgroundImage=`url('${e}')`})),(e=t.$el.dataset.lazySrc)&&(t.$el.style.backgroundImage=`url('${e}')`),t.state=\"ready\"}return}const e=document.createElement(\"div\");e.dataset.index=t.index,e.classList.add(...(this.option(\"prefix\")+this.option(\"classNames.slide\")).split(\" \")),t.customClass&&e.classList.add(...t.customClass.split(\" \")),t.html&&(e.innerHTML=t.html);const i=[];this.slides.forEach(((t,e)=>{t.$el&&i.push(e)}));const s=t.index;let o=null;if(i.length){let t=i.reduce(((t,e)=>Math.abs(e-s){const o=i.$el;if(!o)return;const n=this.pages[this.page];n&&n.indexes&&n.indexes.indexOf(s)>-1?(t&&!o.classList.contains(t)&&(o.classList.add(t),this.trigger(\"selectSlide\",i)),o.removeAttribute(e)):(t&&o.classList.contains(t)&&(o.classList.remove(t),this.trigger(\"unselectSlide\",i)),o.setAttribute(e,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option(\"infiniteX\",this.option(\"infinite\"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const t=this.contentWidth,e=this.viewportWidth;if(!this.option(\"infiniteX\",this.option(\"infinite\"))||this.pages.length<2||te&&(i.content.x-=t,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&\"pointerdown\"===i.state&&i.resetDragPosition(),s}onTouchEnd(t,e){const i=this.option(\"dragFree\");if(!i&&this.pages.length>1&&t.dragOffset.time<350&&Math.abs(t.dragOffset.y)<1&&Math.abs(t.dragOffset.x)>5)this[t.dragOffset.x<0?\"slideNext\":\"slidePrev\"]();else if(i){const[,e]=this.getPageFromPosition(-1*t.transform.x);this.setPage(e)}else this.slideToClosest()}slideToClosest(t={}){let[,e]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(e,t)}getPageFromPosition(t){const e=this.pages.length;this.option(\"center\")&&(t+=.5*this.viewportWidth);const i=Math.floor(t/this.contentWidth);t-=i*this.contentWidth;let s=this.slides.find((e=>e.left<=t&&e.left+e.width>t));if(s){let t=this.findPageForSlide(s.index);return[t,t+i*e]}return[0,0]}setPage(t,e){let i=0,s=parseInt(t,10)||0;const o=this.page,n=this.pageIndex,a=this.pages.length,r=this.contentWidth,h=this.viewportWidth;if(t=(s%a+a)%a,this.option(\"infiniteX\",this.option(\"infinite\"))&&r>h){const o=Math.floor(s/a)||0,n=r;if(i=this.pages[t].left+o*n,!0===e&&a>2){let t=-1*this.Panzoom.content.x;const e=i-n,o=i+n,r=Math.abs(t-i),h=Math.abs(t-e),l=Math.abs(t-o);l{this.removeSlideEl(t)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}y.version=\"4.0.31\",y.Plugins=p;const v=!(\"undefined\"==typeof window||!window.document||!window.document.createElement);let b=null;const x=[\"a[href]\",\"area[href]\",'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\"select:not([disabled]):not([aria-hidden])\",\"textarea:not([disabled]):not([aria-hidden])\",\"button:not([disabled]):not([aria-hidden])\",\"iframe\",\"object\",\"embed\",\"video\",\"audio\",\"[contenteditable]\",'[tabindex]:not([tabindex^=\"-\"]):not([disabled]):not([aria-hidden])'],w=t=>{if(t&&v){null===b&&document.createElement(\"div\").focus({get preventScroll(){return b=!0,!1}});try{if(t.setActive)t.setActive();else if(b)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:\"auto\"})}}catch(t){}}};const $={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:\"t\",Carousel:{},tpl:'
'};class C{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onPrepare\",\"onClosing\",\"onKeydown\"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length=this.fancybox.option(\"Thumbs.minScreenHeight\")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(t,e){e===t.option(\"Thumbs.key\")&&this.toggle()}build(){if(this.$container)return;const t=document.createElement(\"div\");t.classList.add(\"fancybox__thumbs\"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel.nextSibling),this.Carousel=new y(t,e(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option(\"Thumbs.Carousel\"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on(\"wheel\",((t,e)=>{e.preventDefault(),this.fancybox[e.deltaY<0?\"prev\":\"next\"]()})),this.$container=t,this.state=\"visible\"}getSlides(){const t=[];for(const e of this.fancybox.items){const i=e.thumb;i&&t.push({html:this.fancybox.option(\"Thumbs.tpl\").replace(/\\{\\{src\\}\\}/gi,i),customClass:`has-thumb has-${e.type||\"image\"}`})}return t}toggle(){\"visible\"===this.state?this.hide():\"hidden\"===this.state?this.show():this.build()}show(){\"hidden\"===this.state&&(this.$container.style.display=\"\",this.Carousel.Panzoom.attachEvents(),this.state=\"visible\")}hide(){\"visible\"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display=\"none\",this.state=\"hidden\")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state=\"init\"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}C.defaults=$;const S=(t,e)=>{const i=new URL(t),s=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[t,i]of[...s,...Object.entries(e)])\"t\"===t?o.set(\"start\",parseInt(i)):o.set(t,i);o=o.toString();let n=t.match(/#t=((.*)?\\d+s)/);return n&&(o+=`#t=${n[1]}`),o},E={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:\"transparent\",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'',format:\"\"}};class P{constructor(t){this.fancybox=t;for(const t of[\"onInit\",\"onReady\",\"onCreateSlide\",\"onRemoveSlide\",\"onSelectSlide\",\"onUnselectSlide\",\"onRefresh\",\"onMessage\"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide,\"Carousel.selectSlide\":this.onSelectSlide,\"Carousel.unselectSlide\":this.onUnselectSlide,\"Carousel.refresh\":this.onRefresh}}onInit(){for(const t of this.fancybox.items)this.processType(t)}processType(t){if(t.html)return t.src=t.html,t.type=\"html\",void delete t.html;const i=t.src||\"\";let s=t.type||this.fancybox.options.type,o=null;if(!i||\"string\"==typeof i){if(o=i.match(/(?:youtube\\.com|youtu\\.be|youtube\\-nocookie\\.com)\\/(?:watch\\?(?:.*&)?v=|v\\/|u\\/|embed\\/?)?(videoseries\\?list=(?:.*)|[\\w-]{11}|\\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const e=S(i,this.fancybox.option(\"Html.youtube\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://www.youtube-nocookie.com/embed/${n}?${e}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${n}/mqdefault.jpg`,t.vendor=\"youtube\",s=\"video\"}else if(o=i.match(/^.+vimeo.com\\/(?:\\/)?([\\d]+)(.*)?/)){const e=S(i,this.fancybox.option(\"Html.vimeo\")),n=encodeURIComponent(o[1]);t.videoId=n,t.src=`https://player.vimeo.com/video/${n}?${e}`,t.vendor=\"vimeo\",s=\"video\"}else(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:(?:(?:maps\\/(?:place\\/(?:.*)\\/)?\\@(.*),(\\d+.?\\d+?)z))|(?:\\?ll=))(.*)?/i))?(t.src=`//maps.google.${o[1]}/?ll=${(o[2]?o[2]+\"&z=\"+Math.floor(o[3])+(o[4]?o[4].replace(/^\\//,\"&\"):\"\"):o[4]+\"\").replace(/\\?/,\"&\")}&output=${o[4]&&o[4].indexOf(\"layer=c\")>0?\"svembed\":\"embed\"}`,s=\"map\"):(o=i.match(/(?:maps\\.)?google\\.([a-z]{2,3}(?:\\.[a-z]{2})?)\\/(?:maps\\/search\\/)(.*)/i))&&(t.src=`//maps.google.${o[1]}/maps?q=${o[2].replace(\"query=\",\"q=\").replace(\"api=1\",\"\")}&output=embed`,s=\"map\");s||(\"#\"===i.charAt(0)?s=\"inline\":(o=i.match(/\\.(mp4|mov|ogv|webm)((\\?|#).*)?$/i))?(s=\"html5video\",t.format=t.format||\"video/\"+(\"ogv\"===o[1]?\"ogg\":o[1])):i.match(/(^data:image\\/[a-z0-9+\\/=]*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\\?|#).*)?$)/i)?s=\"image\":i.match(/\\.(pdf)((\\?|#).*)?$/i)&&(s=\"pdf\")),t.type=s||this.fancybox.option(\"defaultType\",\"image\"),\"html5video\"!==s&&\"video\"!==s||(t.video=e({},this.fancybox.option(\"Html.video\"),t.video),t._width&&t._height?t.ratio=parseFloat(t._width)/parseFloat(t._height):t.ratio=t.ratio||t.video.ratio||E.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&(this.setContent(t),t.index===this.fancybox.getSlide().index&&this.playVideo(t))}))}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}loadInlineContent(t){let e;if(t.src instanceof HTMLElement)e=t.src;else if(\"string\"==typeof t.src){const i=t.src.split(\"#\",2),s=2===i.length&&\"\"===i[0]?i[1]:i[0];e=document.getElementById(s)}if(e){if(\"clone\"===t.type||e.$placeHolder){e=e.cloneNode(!0);let i=e.getAttribute(\"id\");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${t.index}`,e.setAttribute(\"id\",i)}else{const t=document.createElement(\"div\");t.classList.add(\"fancybox-placeholder\"),e.parentNode.insertBefore(t,e),e.$placeHolder=t}this.fancybox.setContent(t,e)}else this.fancybox.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}loadAjaxContent(t){const e=this.fancybox,i=new XMLHttpRequest;e.showLoading(t),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&\"ready\"===e.state&&(e.hideLoading(t),200===i.status?e.setContent(t,i.responseText):e.setError(t,404===i.status?\"{{AJAX_NOT_FOUND}}\":\"{{AJAX_FORBIDDEN}}\"))};const s=t.ajax||null;i.open(s?\"POST\":\"GET\",t.src),i.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),i.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),i.send(s),t.xhr=i}loadIframeContent(t){const e=this.fancybox,i=document.createElement(\"iframe\");if(i.className=\"fancybox__iframe\",i.setAttribute(\"id\",`fancybox__iframe_${e.id}_${t.index}`),i.setAttribute(\"allow\",\"autoplay; fullscreen\"),i.setAttribute(\"scrolling\",\"auto\"),t.$iframe=i,\"iframe\"!==t.type||!1===t.preload)return i.setAttribute(\"src\",t.src),this.fancybox.setContent(t,i),void this.resizeIframe(t);e.showLoading(t);const s=document.createElement(\"div\");s.style.visibility=\"hidden\",this.fancybox.setContent(t,s),s.appendChild(i),i.onerror=()=>{e.setError(t,\"{{IFRAME_ERROR}}\")},i.onload=()=>{e.hideLoading(t);let s=!1;i.isReady||(i.isReady=!0,s=!0),i.src.length&&(i.parentNode.style.visibility=\"\",this.resizeIframe(t),s&&e.revealContent(t))},i.setAttribute(\"src\",t.src)}setAspectRatio(t){const e=t.$content,i=t.ratio;if(!e)return;let s=t._width,o=t._height;if(i||s&&o){Object.assign(e.style,{width:s&&o?\"100%\":\"\",height:s&&o?\"100%\":\"\",maxWidth:\"\",maxHeight:\"\"});let t=e.offsetWidth,n=e.offsetHeight;if(s=s||t,o=o||n,s>t||o>n){let e=Math.min(t/s,n/o);s*=e,o*=e}Math.abs(s/o-i)>.01&&(i{t.$el&&(t.$iframe&&this.resizeIframe(t),t.ratio&&this.setAspectRatio(t))}))}setContent(t){if(t&&!t.isDom){switch(t.type){case\"html\":this.fancybox.setContent(t,t.src);break;case\"html5video\":this.fancybox.setContent(t,this.fancybox.option(\"Html.html5video.tpl\").replace(/\\{\\{src\\}\\}/gi,t.src).replace(\"{{format}}\",t.format||t.html5video&&t.html5video.format||\"\").replace(\"{{poster}}\",t.poster||t.thumb||\"\"));break;case\"inline\":case\"clone\":this.loadInlineContent(t);break;case\"ajax\":this.loadAjaxContent(t);break;case\"pdf\":case\"video\":case\"map\":t.preload=!1;case\"iframe\":this.loadIframeContent(t)}t.ratio&&this.setAspectRatio(t)}}onSelectSlide(t,e,i){\"ready\"===t.state&&this.playVideo(i)}playVideo(t){if(\"html5video\"===t.type&&t.video.autoplay)try{const e=t.$el.querySelector(\"video\");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(t){}if(\"video\"!==t.type||!t.$iframe||!t.$iframe.contentWindow)return;const e=()=>{if(\"done\"===t.state&&t.$iframe&&t.$iframe.contentWindow){let e;if(t.$iframe.isReady)return t.video&&t.video.autoplay&&(e=\"youtube\"==t.vendor?{event:\"command\",func:\"playVideo\"}:{method:\"play\",value:\"true\"}),void(e&&t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"));\"youtube\"===t.vendor&&(e={event:\"listening\",id:t.$iframe.getAttribute(\"id\")},t.$iframe.contentWindow.postMessage(JSON.stringify(e),\"*\"))}t.poller=setTimeout(e,250)};e()}onUnselectSlide(t,e,i){if(\"html5video\"===i.type){try{i.$el.querySelector(\"video\").pause()}catch(t){}return}let s=!1;\"vimeo\"==i.vendor?s={method:\"pause\",value:\"true\"}:\"youtube\"===i.vendor&&(s={event:\"command\",func:\"pauseVideo\"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),\"*\"),clearTimeout(i.poller)}onRemoveSlide(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src=\"//about:blank\",i.$iframe=null);const s=i.$content;\"inline\"===i.type&&s&&(s.classList.remove(\"fancybox__content\"),\"none\"!==s.style.display&&(s.style.display=\"none\")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=s&&s.$placeHolder;o&&(o.parentNode.insertBefore(s,o),o.remove(),s.$placeHolder=null)}onMessage(t){try{let e=JSON.parse(t.data);if(\"https://player.vimeo.com\"===t.origin){if(\"ready\"===e.event)for(let e of document.getElementsByClassName(\"fancybox__iframe\"))e.contentWindow===t.source&&(e.isReady=1)}else\"https://www.youtube-nocookie.com\"===t.origin&&\"onReady\"===e.event&&(document.getElementById(e.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener(\"message\",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener(\"message\",this.onMessage,!1)}}P.defaults=E;class T{constructor(t){this.fancybox=t;for(const t of[\"onReady\",\"onClosing\",\"onDone\",\"onPageChange\",\"onCreateSlide\",\"onRemoveSlide\",\"onImageStatusChange\"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,\"Carousel.change\":this.onPageChange,\"Carousel.createSlide\":this.onCreateSlide,\"Carousel.removeSlide\":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((t=>{t.$el&&this.setContent(t)}))}onDone(t,e){this.handleCursor(e)}onClosing(t){clearTimeout(this.clickTimer),this.clickTimer=null,t.Carousel.slides.forEach((t=>{t.$image&&(t.state=\"destroy\"),t.Panzoom&&t.Panzoom.detachEvents()})),\"closing\"===this.fancybox.state&&this.canZoom(t.getSlide())&&this.zoomOut()}onCreateSlide(t,e,i){\"ready\"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(t,e,i){i.$image&&(i.$el.classList.remove(t.option(\"Image.canZoomInClass\")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(t){if(t.isDom||t.html||t.type&&\"image\"!==t.type)return;if(t.$image)return;t.type=\"image\",t.state=\"loading\";const e=document.createElement(\"div\");e.style.visibility=\"hidden\";const i=document.createElement(\"img\");i.addEventListener(\"load\",(e=>{e.stopImmediatePropagation(),this.onImageStatusChange(t)})),i.addEventListener(\"error\",(()=>{this.onImageStatusChange(t)})),i.src=t.src,i.alt=\"\",i.draggable=!1,i.classList.add(\"fancybox__image\"),t.srcset&&i.setAttribute(\"srcset\",t.srcset),t.sizes&&i.setAttribute(\"sizes\",t.sizes),t.$image=i;const s=this.fancybox.option(\"Image.wrap\");if(s){const o=document.createElement(\"div\");o.classList.add(\"string\"==typeof s?s:\"fancybox__image-wrap\"),o.appendChild(i),e.appendChild(o),t.$wrap=o}else e.appendChild(i);t.$el.dataset.imageFit=this.fancybox.option(\"Image.fit\"),this.fancybox.setContent(t,e),i.complete||i.error?this.onImageStatusChange(t):this.fancybox.showLoading(t)}onImageStatusChange(t){const e=t.$image;e&&\"loading\"===t.state&&(e.complete&&e.naturalWidth&&e.naturalHeight?(this.fancybox.hideLoading(t),\"contain\"===this.fancybox.option(\"Image.fit\")&&this.initSlidePanzoom(t),t.$el.addEventListener(\"wheel\",(e=>this.onWheel(t,e)),{passive:!1}),t.$content.addEventListener(\"click\",(e=>this.onClick(t,e)),{passive:!1}),this.revealContent(t)):this.fancybox.setError(t,\"{{IMAGE_ERROR}}\"))}initSlidePanzoom(t){t.Panzoom||(t.Panzoom=new d(t.$el,e(!0,this.fancybox.option(\"Image.Panzoom\",{}),{viewport:t.$wrap,content:t.$image,width:t._width,height:t._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option(\"Image.touch\"),panOnlyZoomed:!0,click:!1,wheel:!1})),t.Panzoom.on(\"startAnimation\",(()=>{this.fancybox.trigger(\"Image.startAnimation\",t)})),t.Panzoom.on(\"endAnimation\",(()=>{\"zoomIn\"===t.state&&this.fancybox.done(t),this.handleCursor(t),this.fancybox.trigger(\"Image.endAnimation\",t)})),t.Panzoom.on(\"afterUpdate\",(()=>{this.handleCursor(t),this.fancybox.trigger(\"Image.afterUpdate\",t)})))}revealContent(t){null===this.fancybox.Carousel.prevPage&&t.index===this.fancybox.options.startIndex&&this.canZoom(t)?this.zoomIn():this.fancybox.revealContent(t)}getZoomInfo(t){const e=t.$thumb.getBoundingClientRect(),i=e.width,s=e.height,o=t.$content.getBoundingClientRect(),n=o.width,a=o.height,r=o.top-e.top,h=o.left-e.left;let l=this.fancybox.option(\"Image.zoomOpacity\");return\"auto\"===l&&(l=Math.abs(i/s-n/a)>.1),{top:r,left:h,scale:n&&i?i/n:1,opacity:l}}canZoom(t){const e=this.fancybox,i=e.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(t.Panzoom&&!t.Panzoom.content.width)return!1;if(!e.option(\"Image.zoom\")||\"contain\"!==e.option(\"Image.fit\"))return!1;const s=t.$thumb;if(!s||\"loading\"===t.state)return!1;i.classList.add(\"fancybox__no-click\");const o=s.getBoundingClientRect();let n;if(this.fancybox.option(\"Image.ignoreCoveredThumbnail\")){const t=document.elementFromPoint(o.left+1,o.top+1)===s,e=document.elementFromPoint(o.right-1,o.bottom-1)===s;n=t&&e}else n=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===s;return i.classList.remove(\"fancybox__no-click\"),n}zoomIn(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom,{top:s,left:o,scale:n,opacity:a}=this.getZoomInfo(e);t.trigger(\"reveal\",e),i.panTo({x:-1*o,y:-1*s,scale:n,friction:0,ignoreBounds:!0}),e.$content.style.visibility=\"\",e.state=\"zoomIn\",!0===a&&i.on(\"afterTransform\",(t=>{\"zoomIn\"!==e.state&&\"zoomOut\"!==e.state||(t.$content.style.opacity=Math.min(1,1-(1-t.content.scale)/(1-n)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option(\"Image.zoomFriction\")})}zoomOut(){const t=this.fancybox,e=t.getSlide(),i=e.Panzoom;if(!i)return;e.state=\"zoomOut\",t.state=\"customClosing\",e.$caption&&(e.$caption.style.visibility=\"hidden\");let s=this.fancybox.option(\"Image.zoomFriction\");const o=t=>{const{top:o,left:n,scale:a,opacity:r}=this.getZoomInfo(e);t||r||(s*=.82),i.panTo({x:-1*n,y:-1*o,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener(\"scroll\",o),i.once(\"endAnimation\",(()=>{window.removeEventListener(\"scroll\",o),t.destroy()})),o()}handleCursor(t){if(\"image\"!==t.type||!t.$el)return;const e=t.Panzoom,i=this.fancybox.option(\"Image.click\",!1,t),s=this.fancybox.option(\"Image.touch\"),o=t.$el.classList,n=this.fancybox.option(\"Image.canZoomInClass\"),a=this.fancybox.option(\"Image.canZoomOutClass\");if(o.remove(a),o.remove(n),e&&\"toggleZoom\"===i){e&&1===e.content.scale&&e.option(\"maxScale\")-e.content.scale>.01?o.add(n):e.content.scale>1&&!s&&o.add(a)}else\"close\"===i&&o.add(a)}onWheel(t,e){if(\"ready\"===this.fancybox.state&&!1!==this.fancybox.trigger(\"Image.wheel\",e))switch(this.fancybox.option(\"Image.wheel\")){case\"zoom\":\"done\"===t.state&&t.Panzoom&&t.Panzoom.zoomWithWheel(e);break;case\"close\":this.fancybox.close();break;case\"slide\":this.fancybox[e.deltaY<0?\"prev\":\"next\"]()}}onClick(t,e){if(\"ready\"!==this.fancybox.state)return;const i=t.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case\"toggleZoom\":e.stopPropagation(),t.Panzoom&&t.Panzoom.zoomWithClick(e);break;case\"close\":this.fancybox.close();break;case\"next\":e.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option(\"Image.click\"),n=this.fancybox.option(\"Image.doubleClick\");n?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(n)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(o)}),300):s(o)}onPageChange(t,e){const i=t.getSlide();e.slides.forEach((t=>{t.Panzoom&&\"done\"===t.state&&t.index!==i.index&&t.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}T.defaults={canZoomInClass:\"can-zoom_in\",canZoomOutClass:\"can-zoom_out\",zoom:!0,zoomOpacity:\"auto\",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:\"toggleZoom\",doubleClick:null,wheel:\"zoom\",fit:\"contain\",wrap:!1,Panzoom:{ratio:1}};class L{constructor(t){this.fancybox=t;for(const t of[\"onChange\",\"onClosing\"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,\"Carousel.change\":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash=\"\",this.timer=null}onChange(t){const e=t.Carousel;this.timer&&clearTimeout(this.timer);const i=null===e.prevPage,s=t.getSlide(),o=new URL(document.URL).hash;let n=!1;if(s.slug)n=\"#\"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,o=t.option(\"slug\")||i&&i.fancybox;o&&o.length&&\"true\"!==o&&(n=\"#\"+o+(e.slides.length>1?\"-\"+(s.index+1):\"\"))}i&&(this.origHash=o!==n?o:\"\"),n&&o!==n&&(this.timer=setTimeout((()=>{try{window.history[i?\"pushState\":\"replaceState\"]({},document.title,window.location.pathname+window.location.search+n),i&&(this.hasCreatedHistory=!0)}catch(t){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||\"\"))}catch(t){}}attach(t){t.on(this.events)}detach(t){t.off(this.events)}static startFromUrl(){const t=L.Fancybox;if(!t||t.getInstance()||!1===t.defaults.Hash)return;const{hash:e,slug:i,index:s}=L.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug=\"${e}\"]`);if(o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})),t.getInstance())return;const n=document.querySelectorAll(`[data-fancybox=\"${i}\"]`);n.length&&(null===s&&1===n.length?o=n[0]:s&&(o=n[s-1]),o&&o.dispatchEvent(new CustomEvent(\"click\",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:t,index:e}=L.getParsedURL(),i=L.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(t){const i=s.Carousel;if(t===s.option(\"slug\"))return i.slideTo(e-1);for(let e of i.slides)if(e.slug&&e.slug===t)return i.slideTo(e.index);const o=s.getSlide(),n=o.$trigger&&o.$trigger.dataset;if(n&&n.fancybox===t)return i.slideTo(e-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}L.startFromUrl()}static create(t){function e(){window.addEventListener(\"hashchange\",L.onHashChange,!1),L.startFromUrl()}L.Fancybox=t,v&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?e():document.addEventListener(\"DOMContentLoaded\",e)}))}static destroy(){window.removeEventListener(\"hashchange\",L.onHashChange,!1)}static getParsedURL(){const t=window.location.hash.substr(1),e=t.split(\"-\"),i=e.length>1&&/^\\+?\\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||null;return{hash:t,slug:e.join(\"-\"),index:i}}}const _={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(t){_.pageXOffset=window.pageXOffset,_.pageYOffset=window.pageYOffset,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class A{constructor(t){this.fancybox=t,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const t=this.fancybox.option(\"slideshow.delay\",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option(\"infinite\")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),t);let e=this.$progress;e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__progress\"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel),this.$progress=e,e.offsetHeight),e.style.transitionDuration=`${t}ms`,e.style.transform=\"scaleX(1)\"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration=\"\",this.$progress.style.transform=\"\",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add(\"has-slideshow\"),\"done\"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener(\"visibilitychange\",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove(\"has-slideshow\"),document.removeEventListener(\"visibilitychange\",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const z={display:[\"counter\",\"zoom\",\"slideshow\",\"fullscreen\",\"thumbs\",\"close\"],autoEnable:!0,items:{counter:{position:\"left\",type:\"div\",class:\"fancybox__counter\",html:' / ',attr:{tabindex:-1}},prev:{type:\"button\",class:\"fancybox__button--prev\",label:\"PREV\",html:'',attr:{\"data-fancybox-prev\":\"\"}},next:{type:\"button\",class:\"fancybox__button--next\",label:\"NEXT\",html:'',attr:{\"data-fancybox-next\":\"\"}},fullscreen:{type:\"button\",class:\"fancybox__button--fullscreen\",label:\"TOGGLE_FULLSCREEN\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),_.element()?_.deactivate():_.activate(this.fancybox.$container)}},slideshow:{type:\"button\",class:\"fancybox__button--slideshow\",label:\"TOGGLE_SLIDESHOW\",html:'\\n \\n \\n ',click:function(t){t.preventDefault(),this.Slideshow.toggle()}},zoom:{type:\"button\",class:\"fancybox__button--zoom\",label:\"TOGGLE_ZOOM\",html:'',click:function(t){t.preventDefault();const e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:\"link\",label:\"DOWNLOAD\",class:\"fancybox__button--download\",html:'',click:function(t){t.stopPropagation()}},thumbs:{type:\"button\",label:\"TOGGLE_THUMBS\",class:\"fancybox__button--thumbs\",html:'',click:function(t){t.stopPropagation();const e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:\"button\",label:\"CLOSE\",class:\"fancybox__button--close\",html:'',attr:{\"data-fancybox-close\":\"\",tabindex:0}}}};class k{constructor(t){this.fancybox=t,this.$container=null,this.state=\"init\";for(const t of[\"onInit\",\"onPrepare\",\"onDone\",\"onKeydown\",\"onClosing\",\"onChange\",\"onSettle\",\"onRefresh\"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,\"Carousel.change\":this.onChange,\"Carousel.settle\":this.onSettle,\"Carousel.Panzoom.touchStart\":()=>this.onRefresh(),\"Image.startAnimation\":(t,e)=>this.onRefresh(e),\"Image.afterUpdate\":(t,e)=>this.onRefresh(e)}}onInit(){if(this.fancybox.option(\"Toolbar.autoEnable\")){let t=!1;for(const e of this.fancybox.items)if(\"image\"===e.type){t=!0;break}if(!t)return void(this.state=\"disabled\")}for(const e of this.fancybox.option(\"Toolbar.display\")){if(\"close\"===(t(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}}onPrepare(){const t=this.fancybox;if(\"init\"===this.state&&(this.build(),this.update(),this.Slideshow=new A(t),!t.Carousel.prevPage&&(t.option(\"slideshow.autoStart\")&&this.Slideshow.activate(),t.option(\"fullscreen.autoStart\")&&!_.element())))try{_.activate(t.$container)}catch(t){}}onFsChange(){window.scrollTo(_.pageXOffset,_.pageYOffset)}onSettle(){const t=this.fancybox,e=this.Slideshow;e&&e.isActive()&&(t.getSlide().index!==t.Carousel.slides.length-1||t.option(\"infinite\")?\"done\"===t.getSlide().state&&e.setTimer():e.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(t,e){const i=this.Slideshow;e.index===t.getSlide().index&&(this.update(),i&&i.isActive()&&(t.option(\"infinite\")||e.index!==t.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(t){t&&t.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||t&&\"done\"!==t.state||this.Slideshow.deactivate())}onKeydown(t,e,i){\" \"===e&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener(\"fullscreenchange\",this.onFsChange)}createElement(t){let e;\"div\"===t.type?e=document.createElement(\"div\"):(e=document.createElement(\"link\"===t.type?\"a\":\"button\"),e.classList.add(\"carousel__button\")),e.innerHTML=t.html,e.setAttribute(\"tabindex\",t.tabindex||0),t.class&&e.classList.add(...t.class.split(\" \"));for(const i in t.attr)e.setAttribute(i,t.attr[i]);t.label&&e.setAttribute(\"title\",this.fancybox.localize(`{{${t.label}}}`)),t.click&&e.addEventListener(\"click\",t.click.bind(this)),\"prev\"===t.id&&e.setAttribute(\"data-fancybox-prev\",\"\"),\"next\"===t.id&&e.setAttribute(\"data-fancybox-next\",\"\");const i=e.querySelector(\"svg\");return i&&(i.setAttribute(\"role\",\"img\"),i.setAttribute(\"tabindex\",\"-1\"),i.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\")),e}build(){this.cleanup();const i=this.fancybox.option(\"Toolbar.items\"),s=[{position:\"left\",items:[]},{position:\"center\",items:[]},{position:\"right\",items:[]}],o=this.fancybox.plugins.Thumbs;for(const n of this.fancybox.option(\"Toolbar.display\")){let a,r;if(t(n)?(a=n.id,r=e({},i[a],n)):(a=n,r=i[a]),[\"counter\",\"next\",\"prev\",\"slideshow\"].includes(a)&&this.fancybox.items.length<2)continue;if(\"fullscreen\"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener(\"fullscreenchange\",this.onFsChange)}if(\"thumbs\"===a&&(!o||\"disabled\"===o.state))continue;if(!r)continue;let h=r.position||\"right\",l=s.find((t=>t.position===h));l&&l.items.push(r)}const n=document.createElement(\"div\");n.classList.add(\"fancybox__toolbar\");for(const t of s)if(t.items.length){const e=document.createElement(\"div\");e.classList.add(\"fancybox__toolbar__items\"),e.classList.add(`fancybox__toolbar__items--${t.position}`);for(const i of t.items)e.appendChild(this.createElement(i));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const t=this.fancybox.getSlide(),e=t.index,i=this.fancybox.items.length,s=t.downloadSrc||(\"image\"!==t.type||t.error?null:t.src);for(const t of this.fancybox.$container.querySelectorAll(\"a.fancybox__button--download\"))s?(t.removeAttribute(\"disabled\"),t.removeAttribute(\"tabindex\"),t.setAttribute(\"href\",s),t.setAttribute(\"download\",s),t.setAttribute(\"target\",\"_blank\")):(t.setAttribute(\"disabled\",\"\"),t.setAttribute(\"tabindex\",-1),t.removeAttribute(\"href\"),t.removeAttribute(\"download\"));const o=t.Panzoom,n=o&&o.option(\"maxScale\")>o.option(\"baseScale\");for(const t of this.fancybox.$container.querySelectorAll(\".fancybox__button--zoom\"))n?t.removeAttribute(\"disabled\"):t.setAttribute(\"disabled\",\"\");for(const e of this.fancybox.$container.querySelectorAll(\"[data-fancybox-index]\"))e.innerHTML=t.index+1;for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-count]\"))t.innerHTML=i;if(!this.fancybox.option(\"infinite\")){for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-prev]\"))0===e?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\");for(const t of this.fancybox.$container.querySelectorAll(\"[data-fancybox-next]\"))e===i-1?t.setAttribute(\"disabled\",\"\"):t.removeAttribute(\"disabled\")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}k.defaults=z;const O={ScrollLock:class{constructor(t){this.fancybox=t,this.viewport=null,this.pendingUpdate=null;for(const t of[\"onReady\",\"onResize\",\"onTouchstart\",\"onTouchmove\"])this[t]=this[t].bind(this)}onReady(){const t=window.visualViewport;t&&(this.viewport=t,this.startY=0,t.addEventListener(\"resize\",this.onResize),this.updateViewport()),window.addEventListener(\"touchstart\",this.onTouchstart,{passive:!1}),window.addEventListener(\"touchmove\",this.onTouchmove,{passive:!1}),window.addEventListener(\"wheel\",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const t=this.fancybox,e=this.viewport,i=e.scale||1,s=t.$container;if(!s)return;let o=\"\",n=\"\",a=\"\";i-1>.1&&(o=e.width*i+\"px\",n=e.height*i+\"px\",a=`translate3d(${e.offsetLeft}px, ${e.offsetTop}px, 0) scale(${1/i})`),s.style.width=o,s.style.height=n,s.style.transform=a}onTouchstart(t){this.startY=t.touches?t.touches[0].screenY:t.screenY}onTouchmove(t){const e=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!t.cancelable)return;if(t.touches.length>1||1!==i)return;const o=s(t.composedPath()[0]);if(!o)return void t.preventDefault();const n=window.getComputedStyle(o),a=parseInt(n.getPropertyValue(\"height\"),10),r=t.touches?t.touches[0].screenY:t.screenY,h=e<=r&&0===o.scrollTop,l=e>=r&&o.scrollHeight-o.scrollTop===a;(h||l)&&t.preventDefault()}onWheel(t){s(t.composedPath()[0])||t.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const t=this.viewport;t&&(t.removeEventListener(\"resize\",this.onResize),this.viewport=null),window.removeEventListener(\"touchstart\",this.onTouchstart,!1),window.removeEventListener(\"touchmove\",this.onTouchmove,!1),window.removeEventListener(\"wheel\",this.onWheel,{passive:!1})}attach(){this.fancybox.on(\"initLayout\",this.onReady)}detach(){this.fancybox.off(\"initLayout\",this.onReady),this.cleanup()}},Thumbs:C,Html:P,Toolbar:k,Image:T,Hash:L};const M={startIndex:0,preload:1,infinite:!0,showClass:\"fancybox-zoomInUp\",hideClass:\"fancybox-fadeOut\",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:\"close\",closeButton:\"inside\",dragToClose:!0,keyboard:{Escape:\"close\",Delete:\"close\",Backspace:\"close\",PageUp:\"next\",PageDown:\"prev\",ArrowUp:\"next\",ArrowDown:\"prev\",ArrowRight:\"next\",ArrowLeft:\"prev\"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:\"Close\",NEXT:\"Next\",PREV:\"Previous\",MODAL:\"You can close this modal content with the ESC key\",ERROR:\"Something Went Wrong, Please Try Again Later\",IMAGE_ERROR:\"Image Not Found\",ELEMENT_NOT_FOUND:\"HTML Element Not Found\",AJAX_NOT_FOUND:\"Error Loading AJAX : Not Found\",AJAX_FORBIDDEN:\"Error Loading AJAX : Forbidden\",IFRAME_ERROR:\"Error Loading Page\",TOGGLE_ZOOM:\"Toggle zoom level\",TOGGLE_THUMBS:\"Toggle thumbnails\",TOGGLE_SLIDESHOW:\"Toggle slideshow\",TOGGLE_FULLSCREEN:\"Toggle full-screen mode\",DOWNLOAD:\"Download\"}},I=new Map;let F=0;class R extends l{constructor(t,i={}){t=t.map((t=>(t.width&&(t._width=t.width),t.height&&(t._height=t.height),t))),super(e(!0,{},M,i)),this.bindHandlers(),this.state=\"init\",this.setItems(t),this.attachPlugins(R.Plugins),this.trigger(\"init\"),!0===this.option(\"hideScrollbar\")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),I.set(this.id,this),this.trigger(\"prepare\"),this.state=\"ready\",this.trigger(\"ready\"),this.$container.setAttribute(\"aria-hidden\",\"false\"),this.option(\"trapFocus\")&&this.focus()}option(t,...e){const i=this.getSlide();let s=i?i[t]:void 0;return void 0!==s?(\"function\"==typeof s&&(s=s.call(this,this,...e)),s):super.option(t,...e)}bindHandlers(){for(const t of[\"onMousedown\",\"onKeydown\",\"onClick\",\"onFocus\",\"onCreateSlide\",\"onSettle\",\"onTouchMove\",\"onTouchEnd\",\"onTransform\"])this[t]=this[t].bind(this)}attachEvents(){document.addEventListener(\"mousedown\",this.onMousedown),document.addEventListener(\"keydown\",this.onKeydown,!0),this.option(\"trapFocus\")&&document.addEventListener(\"focus\",this.onFocus,!0),this.$container.addEventListener(\"click\",this.onClick)}detachEvents(){document.removeEventListener(\"mousedown\",this.onMousedown),document.removeEventListener(\"keydown\",this.onKeydown,!0),document.removeEventListener(\"focus\",this.onFocus,!0),this.$container.removeEventListener(\"click\",this.onClick)}initLayout(){this.$root=this.option(\"parentEl\")||document.body;let t=this.option(\"template.main\");t&&(this.$root.insertAdjacentHTML(\"beforeend\",this.localize(t)),this.$container=this.$root.querySelector(\".fancybox__container\")),this.$container||(this.$container=document.createElement(\"div\"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:\"fancybox__container\",role:\"dialog\",tabIndex:\"-1\",\"aria-modal\":\"true\",\"aria-hidden\":\"true\",\"aria-label\":this.localize(\"{{MODAL}}\")}).forEach((t=>this.$container.setAttribute(...t))),this.option(\"animated\")&&this.$container.classList.add(\"is-animated\"),this.$backdrop=this.$container.querySelector(\".fancybox__backdrop\"),this.$backdrop||(this.$backdrop=document.createElement(\"div\"),this.$backdrop.classList.add(\"fancybox__backdrop\"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(\".fancybox__carousel\"),this.$carousel||(this.$carousel=document.createElement(\"div\"),this.$carousel.classList.add(\"fancybox__carousel\"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute(\"id\"),this.id||(this.id=this.options.id||++F,this.$container.setAttribute(\"id\",\"fancybox-\"+this.id));const e=this.option(\"mainClass\");return e&&this.$container.classList.add(...e.split(\" \")),document.documentElement.classList.add(\"with-fancybox\"),this.trigger(\"initLayout\"),this}setItems(t){const e=[];for(const i of t){const t=i.$trigger;if(t){const e=t.dataset||{};i.src=e.src||t.getAttribute(\"href\")||i.src,i.type=e.type||i.type,!i.src&&t instanceof HTMLImageElement&&(i.src=t.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let t=i.$trigger&&i.$trigger.origTarget;t&&(s=t instanceof HTMLImageElement?t:t.querySelector(\"img:not([aria-hidden])\")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector(\"img:not([aria-hidden])\"))}i.$thumb=s||null;let o=i.thumb;!o&&s&&(o=s.currentSrc||s.src,!o&&s.dataset&&(o=s.dataset.lazySrc||s.dataset.src)),o||\"image\"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||\"\",e.push(i)}this.items=e}initCarousel(){return this.Carousel=new y(this.$carousel,e(!0,{},{prefix:\"\",classNames:{viewport:\"fancybox__viewport\",track:\"fancybox__track\",slide:\"fancybox__slide\"},textSelection:!0,preload:this.option(\"preload\"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option(\"infinite\"),infiniteY:!0,l10n:this.option(\"l10n\"),Dots:!1,Navigation:{classNames:{main:\"fancybox__nav\",button:\"carousel__button\",next:\"is-next\",prev:\"is-prev\"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option(\"dragToClose\"),lockAxis:()=>{if(this.Carousel){let t=\"x\";return this.option(\"dragToClose\")&&(t+=\"y\"),t}}},on:{\"*\":(t,...e)=>this.trigger(`Carousel.${t}`,...e),init:t=>this.Carousel=t,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option(\"Carousel\"))),this.option(\"dragToClose\")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger(\"initCarousel\"),this}onCreateSlide(t,e){let i=e.caption||\"\";if(\"function\"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,e)),\"string\"==typeof i&&i.length){const t=document.createElement(\"div\"),s=`fancybox__caption_${this.id}_${e.index}`;t.className=\"fancybox__caption\",t.innerHTML=i,t.setAttribute(\"id\",s),e.$caption=e.$el.appendChild(t),e.$el.classList.add(\"has-caption\"),e.$el.setAttribute(\"aria-labelledby\",s)}}onSettle(){this.option(\"autoFocus\")&&this.focus()}onFocus(t){this.isTopmost()&&this.focus(t)}onClick(t){if(t.defaultPrevented)return;let e=t.composedPath()[0];if(e.matches(\"[data-fancybox-close]\"))return t.preventDefault(),void R.close(!1,t);if(e.matches(\"[data-fancybox-next]\"))return t.preventDefault(),void R.next();if(e.matches(\"[data-fancybox-prev]\"))return t.preventDefault(),void R.prev();const i=document.activeElement;if(i){if(i.closest(\"[contenteditable]\"))return;e.matches(x)||i.blur()}if(e.closest(\".fancybox__content\"))return;if(getSelection().toString().length)return;if(!1===this.trigger(\"click\",t))return;switch(this.option(\"click\")){case\"close\":this.close();break;case\"next\":this.next()}}onTouchMove(){const t=this.getSlide().Panzoom;return!t||1===t.content.scale}onTouchEnd(t){const e=t.dragOffset.y;Math.abs(e)>=150||Math.abs(e)>=35&&t.dragOffset.time<350?(this.option(\"hideClass\")&&(this.getSlide().hideClass=\"fancybox-throwOut\"+(t.content.y<0?\"Up\":\"Down\")),this.close()):\"y\"===t.lockAxis&&t.panTo({y:0})}onTransform(t){if(this.$backdrop){const e=Math.abs(t.content.y),i=e<1?\"\":Math.max(.33,Math.min(1,1-e/t.content.fitHeight*1.5));this.$container.style.setProperty(\"--fancybox-ts\",i?\"0s\":\"\"),this.$container.style.setProperty(\"--fancybox-opacity\",i)}}onMousedown(){\"ready\"===this.state&&document.body.classList.add(\"is-using-mouse\")}onKeydown(t){if(!this.isTopmost())return;document.body.classList.remove(\"is-using-mouse\");const e=t.key,i=this.option(\"keyboard\");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const s=t.composedPath()[0],o=document.activeElement&&document.activeElement.classList,n=o&&o.contains(\"carousel__button\");if(\"Escape\"!==e&&!n){if(t.target.isContentEditable||-1!==[\"BUTTON\",\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\",\"VIDEO\"].indexOf(s.nodeName))return}if(!1===this.trigger(\"keydown\",e,t))return;const a=i[e];\"function\"==typeof this[a]&&this[a]()}getSlide(){const t=this.Carousel;if(!t)return null;const e=null===t.page?t.option(\"initialPage\"):t.page,i=t.pages||[];return i.length&&i[e]?i[e].slides[0]:null}focus(t){if(R.ignoreFocusChange)return;if([\"init\",\"closing\",\"customClosing\",\"destroy\"].indexOf(this.state)>-1)return;const e=this.$container,i=this.getSlide(),s=\"done\"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;t&&t.preventDefault(),R.ignoreFocusChange=!0;const o=Array.from(e.querySelectorAll(x));let n,a=[];for(let t of o){const e=t.offsetParent,i=s&&s.contains(t),o=!this.Carousel.$viewport.contains(t);e&&(i||o)?(a.push(t),void 0!==t.dataset.origTabindex&&(t.tabIndex=t.dataset.origTabindex,t.removeAttribute(\"data-orig-tabindex\")),(t.hasAttribute(\"autoFocus\")||!n&&i&&!t.classList.contains(\"carousel__button\"))&&(n=t)):(t.dataset.origTabindex=void 0===t.dataset.origTabindex?t.getAttribute(\"tabindex\"):t.dataset.origTabindex,t.tabIndex=-1)}t?a.indexOf(t.target)>-1?this.lastFocus=t.target:this.lastFocus===e?w(a[a.length-1]):w(e):this.option(\"autoFocus\")&&n?w(n):a.indexOf(document.activeElement)<0&&w(e),this.lastFocus=document.activeElement,R.ignoreFocusChange=!1}hideScrollbar(){if(!v)return;const t=window.innerWidth-document.documentElement.getBoundingClientRect().width,e=\"fancybox-style-noscroll\";let i=document.getElementById(e);i||t>0&&(i=document.createElement(\"style\"),i.id=e,i.type=\"text/css\",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${t}px;}`,document.getElementsByTagName(\"head\")[0].appendChild(i),document.body.classList.add(\"compensate-for-scrollbar\"))}revealScrollbar(){document.body.classList.remove(\"compensate-for-scrollbar\");const t=document.getElementById(\"fancybox-style-noscroll\");t&&t.remove()}clearContent(t){this.Carousel.trigger(\"removeSlide\",t),t.$content&&(t.$content.remove(),t.$content=null),t.$closeButton&&(t.$closeButton.remove(),t.$closeButton=null),t._className&&t.$el.classList.remove(t._className)}setContent(t,e,i={}){let s;const o=t.$el;if(e instanceof HTMLElement)[\"img\",\"iframe\",\"video\",\"audio\"].indexOf(e.nodeName.toLowerCase())>-1?(s=document.createElement(\"div\"),s.appendChild(e)):s=e;else{const t=document.createRange().createContextualFragment(e);s=document.createElement(\"div\"),s.appendChild(t)}if(t.filter&&!t.error&&(s=s.querySelector(t.filter)),s instanceof Element)return t._className=`has-${i.suffix||t.type||\"unknown\"}`,o.classList.add(t._className),s.classList.add(\"fancybox__content\"),\"none\"!==s.style.display&&\"none\"!==getComputedStyle(s).getPropertyValue(\"display\")||(s.style.display=t.display||this.option(\"defaultDisplay\")||\"flex\"),t.id&&s.setAttribute(\"id\",t.id),t.$content=s,o.prepend(s),this.manageCloseButton(t),\"loading\"!==t.state&&this.revealContent(t),s;this.setError(t,\"{{ELEMENT_NOT_FOUND}}\")}manageCloseButton(t){const e=void 0===t.closeButton?this.option(\"closeButton\"):t.closeButton;if(!e||\"top\"===e&&this.$closeButton)return;const i=document.createElement(\"button\");i.classList.add(\"carousel__button\",\"is-close\"),i.setAttribute(\"title\",this.options.l10n.CLOSE),i.innerHTML=this.option(\"template.closeButton\"),i.addEventListener(\"click\",(t=>this.close(t))),\"inside\"===e?(t.$closeButton&&t.$closeButton.remove(),t.$closeButton=t.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(t){this.trigger(\"reveal\",t),t.$content.style.visibility=\"\";let e=!1;t.error||\"loading\"===t.state||null!==this.Carousel.prevPage||t.index!==this.options.startIndex||(e=void 0===t.showClass?this.option(\"showClass\"):t.showClass),e?(t.state=\"animating\",this.animateCSS(t.$content,e,(()=>{this.done(t)}))):this.done(t)}animateCSS(t,e,i){if(t&&t.dispatchEvent(new CustomEvent(\"animationend\",{bubbles:!0,cancelable:!0})),!t||!e)return void(\"function\"==typeof i&&i());const s=function(o){o.currentTarget===this&&(t.removeEventListener(\"animationend\",s),i&&i(),t.classList.remove(e))};t.addEventListener(\"animationend\",s),t.classList.add(e)}done(t){t.state=\"done\",this.trigger(\"done\",t);const e=this.getSlide();e&&t.index===e.index&&this.option(\"autoFocus\")&&this.focus()}setError(t,e){t.error=e,this.hideLoading(t),this.clearContent(t);const i=document.createElement(\"div\");i.classList.add(\"fancybox-error\"),i.innerHTML=this.localize(e||\"

{{ERROR}}

\"),this.setContent(t,i,{suffix:\"error\"})}showLoading(t){t.state=\"loading\",t.$el.classList.add(\"is-loading\");let e=t.$el.querySelector(\".fancybox__spinner\");e||(e=document.createElement(\"div\"),e.classList.add(\"fancybox__spinner\"),e.innerHTML=this.option(\"template.spinner\"),e.addEventListener(\"click\",(()=>{this.Carousel.Panzoom.velocity||this.close()})),t.$el.prepend(e))}hideLoading(t){const e=t.$el&&t.$el.querySelector(\".fancybox__spinner\");e&&(e.remove(),t.$el.classList.remove(\"is-loading\")),\"loading\"===t.state&&(this.trigger(\"load\",t),t.state=\"ready\")}next(){const t=this.Carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.Carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.Carousel&&this.Carousel.slideTo(...t)}isClosing(){return[\"closing\",\"customClosing\",\"destroy\"].includes(this.state)}isTopmost(){return R.getInstance().id==this.id}close(t){if(t&&t.preventDefault(),this.isClosing())return;if(!1===this.trigger(\"shouldClose\",t))return;if(this.state=\"closing\",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger(\"closing\",t),\"destroy\"===this.state)return;this.$container.setAttribute(\"aria-hidden\",\"true\"),this.$container.classList.add(\"is-closing\");const e=this.getSlide();if(this.Carousel.slides.forEach((t=>{t.$content&&t.index!==e.index&&this.Carousel.trigger(\"removeSlide\",t)})),\"closing\"===this.state){const t=void 0===e.hideClass?this.option(\"hideClass\"):e.hideClass;this.animateCSS(e.$content,t,(()=>{this.destroy()}),!0)}}destroy(){if(\"destroy\"===this.state)return;this.state=\"destroy\",this.trigger(\"destroy\");const t=this.option(\"placeFocusBack\")?this.option(\"triggerTarget\",this.getSlide().$trigger):null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,t&&w(t),I.delete(this.id);const e=R.getInstance();e?e.focus():(document.documentElement.classList.remove(\"with-fancybox\"),document.body.classList.remove(\"is-using-mouse\"),this.revealScrollbar())}static show(t,e={}){return new R(t,e)}static fromEvent(t,e={}){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;const i=t.composedPath()[0];let s,o,n,a=i;if((a.matches(\"[data-fancybox-trigger]\")||(a=a.closest(\"[data-fancybox-trigger]\")))&&(e.triggerTarget=a,s=a&&a.dataset&&a.dataset.fancyboxTrigger),s){const t=document.querySelectorAll(`[data-fancybox=\"${s}\"]`),e=parseInt(a.dataset.fancyboxIndex,10)||0;a=t.length?t[e]:a}Array.from(R.openers.keys()).reverse().some((e=>{n=a||i;let s=!1;try{n instanceof Element&&(\"string\"==typeof e||e instanceof String)&&(s=n.matches(e)||(n=n.closest(e)))}catch(t){}return!!s&&(t.preventDefault(),o=e,!0)}));let r=!1;if(o){e.event=t,e.target=n,n.origTarget=i,r=R.fromOpener(o,e);const s=R.getInstance();s&&\"ready\"===s.state&&t.detail&&document.body.classList.add(\"is-using-mouse\")}return r}static fromOpener(t,i={}){let s=[],o=i.startIndex||0,n=i.target||null;const a=void 0!==(i=e({},i,R.openers.get(t))).groupAll&&i.groupAll,r=void 0===i.groupAttr?\"data-fancybox\":i.groupAttr,h=r&&n?n.getAttribute(`${r}`):\"\";if(!n||h||a){const e=i.root||(n?n.getRootNode():document.body);s=[].slice.call(e.querySelectorAll(t))}if(n&&!a&&(s=h?s.filter((t=>t.getAttribute(`${r}`)===h)):[n]),!s.length)return!1;const l=R.getInstance();return!(l&&s.indexOf(l.options.$trigger)>-1)&&(o=n?s.indexOf(n):o,s=s.map((function(t){const e=[\"false\",\"0\",\"no\",\"null\",\"undefined\"],i=[\"true\",\"1\",\"yes\"],s=Object.assign({},t.dataset),o={};for(let[t,n]of Object.entries(s))if(\"fancybox\"!==t)if(\"width\"===t||\"height\"===t)o[`_${t}`]=n;else if(\"string\"==typeof n||n instanceof String)if(e.indexOf(n)>-1)o[t]=!1;else if(i.indexOf(o[t])>-1)o[t]=!0;else try{o[t]=JSON.parse(n)}catch(e){o[t]=n}else o[t]=n;return t instanceof Element&&(o.$trigger=t),o})),new R(s,e({},i,{startIndex:o,$trigger:n})))}static bind(t,e={}){function i(){document.body.addEventListener(\"click\",R.fromEvent,!1)}v&&(R.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener(\"DOMContentLoaded\",i)),R.openers.set(t,e))}static unbind(t){R.openers.delete(t),R.openers.size||R.destroy()}static destroy(){let t;for(;t=R.getInstance();)t.destroy();R.openers=new Map,document.body.removeEventListener(\"click\",R.fromEvent,!1)}static getInstance(t){if(t)return I.get(t);return Array.from(I.values()).reverse().find((t=>!t.isClosing()&&t))||null}static close(t=!0,e){if(t)for(const t of I.values())t.close(e);else{const t=R.getInstance();t&&t.close(e)}}static next(){const t=R.getInstance();t&&t.next()}static prev(){const t=R.getInstance();t&&t.prev()}}R.version=\"4.0.31\",R.defaults=M,R.openers=new Map,R.Plugins=O,R.bind(\"[data-fancybox]\");for(const[t,e]of Object.entries(R.Plugins||{}))\"function\"==typeof e.create&&e.create(R);export{y as Carousel,R as Fancybox,d as Panzoom};\n","import window from 'global/window';\n\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {string[]} groups\n * The media groups to call the callback for\n * @param {Function} callback\n * Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n groups.forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n\n var _proto = Stream.prototype;\n\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */\n ;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */\n ;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */\n ;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n ;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n\n return Stream;\n}();\n\nexport { Stream as default };","\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n if (decodeResponseBody === void 0) {\n decodeResponseBody = false;\n }\n\n return function (err, response, responseBody) {\n // if the XHR failed, return that error\n if (err) {\n callback(err);\n return;\n } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n if (response.statusCode >= 400 && response.statusCode <= 599) {\n var cause = responseBody;\n\n if (decodeResponseBody) {\n if (window.TextDecoder) {\n var charset = getCharset(response.headers && response.headers['content-type']);\n\n try {\n cause = new TextDecoder(charset).decode(responseBody);\n } catch (e) {}\n } else {\n cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n }\n }\n\n callback({\n cause: cause\n });\n return;\n } // otherwise, request succeeded\n\n\n callback(null, responseBody);\n };\n};\n\nfunction getCharset(contentTypeHeader) {\n if (contentTypeHeader === void 0) {\n contentTypeHeader = '';\n }\n\n return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n var _contentType$split = contentType.split('='),\n type = _contentType$split[0],\n value = _contentType$split[1];\n\n if (type.trim() === 'charset') {\n return value.trim();\n }\n\n return charset;\n }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\ncreateXHR.httpHandler = require('./http-handler.js');\n/**\n * @license\n * slighly modified parse-headers 2.0.2 \n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * \n */\n\nvar parseHeaders = function parseHeaders(headers) {\n var result = {};\n\n if (!headers) {\n return result;\n }\n\n headers.trim().split('\\n').forEach(function (row) {\n var index = row.indexOf(':');\n var key = row.slice(0, index).trim().toLowerCase();\n var value = row.slice(index + 1).trim();\n\n if (typeof result[key] === 'undefined') {\n result[key] = value;\n } else if (Array.isArray(result[key])) {\n result[key].push(value);\n } else {\n result[key] = [result[key], value];\n }\n });\n return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i]);\n }\n}\n\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n\n return true;\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri;\n\n if (isFunction(options)) {\n callback = options;\n\n if (typeof uri === \"string\") {\n params = {\n uri: uri\n };\n }\n } else {\n params = _extends({}, options, {\n uri: uri\n });\n }\n\n params.callback = callback;\n return params;\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n if (typeof options.callback === \"undefined\") {\n throw new Error(\"callback argument missing\");\n }\n\n var called = false;\n\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n\n return body;\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n\n if (!(evt instanceof Error)) {\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n }\n\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n } // will load the data & process the response in a special response object\n\n\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n\n var response = failureResponse;\n var err = null;\n\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\");\n }\n\n return callback(err, response, response.body);\n }\n\n var xhr = options.xhr || null;\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n\n var key;\n var aborted;\n var uri = xhr.url = options.uri || options.url;\n var method = xhr.method = options.method || \"GET\";\n var body = options.body || options.data;\n var headers = xhr.headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n\n if (\"json\" in options && options.json !== false) {\n isJson = true;\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n body = JSON.stringify(options.json === true ? body : options.json);\n }\n }\n\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n xhr.onprogress = function () {// IE must die\n };\n\n xhr.onabort = function () {\n aborted = true;\n };\n\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n } // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n\n xhr.abort(\"timeout\");\n var e = new Error(\"XMLHttpRequest timeout\");\n e.code = \"ETIMEDOUT\";\n errorFunc(e);\n }, options.timeout);\n }\n\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType;\n }\n\n if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n options.beforeSend(xhr);\n } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n\n\n xhr.send(body || null);\n return xhr;\n}\n\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML;\n }\n\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n } catch (e) {}\n\n return null;\n}\n\nfunction noop() {}","let items = document.querySelectorAll('.accordion__item')\r\nlet title = document.querySelectorAll('.accordion__title-wrapper')\r\n\r\nexport const toggleAccordion = () => {\r\n title.forEach((question) =>\r\n question.addEventListener('click', function () {\r\n let thisItem = this.parentNode\r\n\r\n items.forEach((item) => {\r\n if (thisItem == item) {\r\n thisItem.classList.toggle('active')\r\n return\r\n }\r\n item.classList.remove('active')\r\n })\r\n })\r\n )\r\n}\r\n","const burger = document.querySelector('.burger-js')\r\nconst menu = document.querySelector('.menu-js')\r\nconst menuLinks = document.querySelectorAll('.nav__link')\r\n\r\nexport const changeMenu = () => {\r\n\tburger?.addEventListener('click', () => {\r\n\t\tmenu?.classList.toggle('active')\r\n\t\tburger?.classList.toggle('active')\r\n\t\tif (menu?.classList.contains('active')) {\r\n\t\t\tdocument.body.style.overflowY = 'hidden'\r\n\t\t} else {\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t}\r\n\t})\r\n\r\n\tmenuLinks.forEach((el) => {\r\n\t\tel.addEventListener('click', () => {\r\n\t\t\tmenu?.classList.remove('active')\r\n\t\t\tdocument.body.style.overflowY = 'auto'\r\n\t\t\tburger?.classList.remove('active')\r\n\t\t})\r\n\t})\r\n}\r\n","const btnNext = document.querySelector('.nav-history__next')\r\n\r\nexport const paintBtn = () => {\r\n try {\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n btnNext.classList.add('active')\r\n } else {\r\n btnNext.classList.remove('active')\r\n }\r\n }\r\n\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","import SmoothScroll from '../../../node_modules/smooth-scroll/dist/smooth-scroll.js'\r\nconst header = document.querySelector('header')\r\nconst btnUpWrapper = document.querySelector('.btn-up-wrapper')\r\n\r\nexport const addSmoothScroll = () => {\r\n const scroll = new SmoothScroll('a[href*=\"#\"]', {\r\n header: '.header',\r\n speed: 500\r\n })\r\n\r\n const scrollToTop = () => {\r\n const top = window.scrollY\r\n if (top >= 100) {\r\n header.classList.add('active')\r\n } else {\r\n header.classList.remove('active')\r\n }\r\n\r\n if (top >= 300) {\r\n btnUpWrapper.classList.add('active')\r\n } else {\r\n btnUpWrapper.classList.remove('active')\r\n }\r\n }\r\n scrollToTop()\r\n window.addEventListener('scroll', () => {\r\n scrollToTop()\r\n })\r\n}\r\n","import Swiper, { Navigation, Pagination, Autoplay } from 'swiper'\r\nSwiper.use([Navigation, Pagination, Autoplay])\r\n\r\nexport const initializationSliders = () => {\r\n try {\r\n const recomendationsSlider = new Swiper('.recommendations__slider', {\r\n slidesPerView: '1',\r\n navigation: {\r\n nextEl: '.recommendations__slider-navigation-next',\r\n prevEl: '.recommendations__slider-navigation-prev'\r\n },\r\n loop: true\r\n })\r\n\r\n const goodsSlider = new Swiper('.goods__slider', {\r\n slidesPerView: 3,\r\n loop: true,\r\n navigation: {\r\n nextEl: '.goods__slider-next',\r\n prevEl: '.goods__slider-prev'\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.goods__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 940: {\r\n slidesPerView: 4\r\n },\r\n 764: {\r\n slidesPerView: 3\r\n },\r\n 600: {\r\n slidesPerView: 2\r\n },\r\n 0: {\r\n slidesPerView: 1\r\n }\r\n }\r\n })\r\n\r\n const professionalSlider = new Swiper('.professional__slider', {\r\n navigation: {\r\n nextEl: '.professional__slider-navigation-next',\r\n prevEl: '.professional__slider-navigation-prev'\r\n },\r\n paginationClickable: true,\r\n // loop: true,\r\n initialSlide: 1,\r\n centeredSlides: true,\r\n slidesPerView: 2,\r\n speed: 1000,\r\n zoom: {\r\n maxRatio: 1.6\r\n },\r\n pagination: {\r\n clickable: true,\r\n el: '.professional__slider-pagination',\r\n clickable: true\r\n },\r\n breakpoints: {\r\n 993: {\r\n spaceBetween: -180\r\n },\r\n 860: {\r\n spaceBetween: -260,\r\n slidesPerView: 2\r\n },\r\n 768: {\r\n spaceBetween: -200\r\n },\r\n 500: {\r\n spaceBetween: -80\r\n },\r\n 320: {\r\n slidesPerView: 1.6,\r\n spaceBetween: -80\r\n }\r\n },\r\n allowTouchMove: false\r\n })\r\n\r\n const interviewSlider = new Swiper('.interview__slider', {\r\n navigation: {\r\n nextEl: '.interview__slider-navigation-next',\r\n prevEl: '.interview__slider-navigation-prev'\r\n },\r\n pagination: {\r\n el: '.interview__slider-pagination',\r\n clickable: true\r\n },\r\n allowTouchMove: false,\r\n paginationClickable: true,\r\n centeredSlides: true,\r\n loop: true,\r\n speed: 1000\r\n })\r\n\r\n const partnersSlider = new Swiper('.partners__wrapper', {\r\n freeMode: true,\r\n grabCursor: true,\r\n centeredSlides: true,\r\n slidesPerView: 'auto',\r\n loop: true,\r\n speed: 2000,\r\n autoplay: {\r\n enabled: true,\r\n delay: 1,\r\n disableOnInteraction: true\r\n },\r\n freeModeMomentum: true\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseover', function () {\r\n partnersSlider.autoplay.stop()\r\n })\r\n\r\n document\r\n .querySelector('.partners__wrapper')\r\n .addEventListener('mouseout', function () {\r\n partnersSlider.autoplay.start()\r\n })\r\n\r\n window.addEventListener('scroll', () => {\r\n if (!partnersSlider.autoplay.running) {\r\n partnersSlider.autoplay.start()\r\n }\r\n })\r\n } catch (e) {\r\n console.error(e)\r\n }\r\n}\r\n","import videojs from 'video.js'\r\n\r\nconst playBtn = document.querySelector('.video__btn')\r\nconst videoTitle = document.querySelector('.video__title')\r\nconst videoText = document.querySelector('.video__text')\r\nconst videoLink = document.querySelector('.video__link')\r\nconst videoGradient = document.querySelector('.video__gradient')\r\nconst videoIntro = document.querySelector('.video__intro')\r\nconst videoMask = document.querySelector('.video__mask')\r\nconst videoJsTech = document.querySelector('.vjs-tech')\r\n\r\nexport const addVideoPlayer = () => {\r\n try {\r\n let isPreviewVideo = true\r\n\r\n const videoPlayer = videojs(document.getElementById('video__player'), {\r\n autoplay: true,\r\n loop: true,\r\n muted: true,\r\n controls: false,\r\n playToggle: false\r\n })\r\n\r\n const loadMainVideo = (desktopUrl, mobileUrl) => {\r\n if (window.screen.width > 768) {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${desktopUrl}`\r\n })\r\n } else {\r\n videoPlayer.src({\r\n type: 'video/mp4',\r\n src: `./videos/${mobileUrl}`\r\n })\r\n }\r\n }\r\n\r\n loadMainVideo('preview.mp4', 'preview-mobile.mp4')\r\n videoPlayer.volume(0.7)\r\n const changePlayerStatus = () => {\r\n videoPlayer.play()\r\n\r\n videoPlayer.addClass('play')\r\n videoPlayer.muted(false)\r\n videoPlayer.controls(true)\r\n videoPlayer.loop(false)\r\n\r\n playBtn.classList.add('hide')\r\n videoTitle.classList.add('hide')\r\n videoText.classList.add('hide')\r\n videoLink.classList.add('hide')\r\n }\r\n\r\n videoPlayer.on('play', () => {\r\n if (!videoPlayer.played()) {\r\n videoPlayer.addClass('play')\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n } else if (videoPlayer.played() && videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n } else if (videoPlayer.played() && !videoPlayer.loop()) {\r\n videoPlayer.removeClass('play')\r\n playBtn?.classList.add('hide')\r\n }\r\n })\r\n\r\n videoPlayer.on('pause', () => {\r\n playBtn?.classList.remove('hide')\r\n })\r\n\r\n videoPlayer.on('ended', () => {\r\n playBtn?.classList.remove('hide')\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n videoMask.addEventListener('click', () => {\r\n playBtn?.classList.remove('hide')\r\n videoPlayer.pause()\r\n videoMask?.classList.remove('visible')\r\n })\r\n\r\n playBtn.addEventListener('click', () => {\r\n if (isPreviewVideo === true) {\r\n loadMainVideo('video.mp4', 'video-mobile.mp4')\r\n isPreviewVideo = false\r\n }\r\n document.querySelector('.video__inner').classList.add('active')\r\n document.querySelector('.video-js').classList.add('active')\r\n document.querySelector('.vjs-poster').classList.add('active')\r\n\r\n videoPlayer.fluid(true)\r\n videoGradient?.classList.add('hide')\r\n videoMask?.classList.add('visible')\r\n playBtn?.classList.add('center-position')\r\n document.querySelector('video').style.objectFit = 'contain'\r\n\r\n if (videoPlayer.muted()) {\r\n videoPlayer.currentTime(0)\r\n changePlayerStatus()\r\n } else {\r\n changePlayerStatus()\r\n }\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}\r\n","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n","var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n if (!fn) {\n return false\n }\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === typeof searchInput) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n if (hasKeyCode) searchInput = hasKeyCode\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput]\n\n // Everything else (cast to string)\n var search = String(searchInput)\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0)\n\n return undefined\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === typeof event) {\n var keyCode = event.which || event.keyCode || event.charCode\n if (keyCode === null || keyCode === undefined) { return false; }\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n \n // check aliases\n var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n if (foundNamedKey) { return foundNamedKey === keyCode; }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n return false;\n }\n}\n\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n}\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias]\n}\n","/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nclass LineStream extends Stream {\n constructor() {\n super();\n this.buffer = '';\n }\n /**\n * Add new data to be parsed.\n *\n * @param {string} data the text to process\n */\n\n\n push(data) {\n let nextNewline;\n this.buffer += data;\n nextNewline = this.buffer.indexOf('\\n');\n\n for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n this.trigger('data', this.buffer.substring(0, nextNewline));\n this.buffer = this.buffer.substring(nextNewline + 1);\n }\n }\n\n}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n // optionally match and capture 0+ digits before `@`\n // optionally match and capture 0+ digits after `@`\n const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n const result = {};\n\n if (match[1]) {\n result.length = parseInt(match[1], 10);\n }\n\n if (match[2]) {\n result.offset = parseInt(match[2], 10);\n }\n\n return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue -> key '=' value\n * key -> [^=]*\n * value -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nconst attributeSeparator = function () {\n const key = '[^=]*';\n const value = '\"[^\"]*\"|[^,]*';\n const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nconst parseAttributes = function (attributes) {\n const result = {};\n\n if (!attributes) {\n return result;\n } // split the string using attributes as the separator\n\n\n const attrs = attributes.split(attributeSeparator());\n let i = attrs.length;\n let attr;\n\n while (i--) {\n // filter out unmatched portions of the string\n if (attrs[i] === '') {\n continue;\n } // split the key and value\n\n\n attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n result[attr[0]] = attr[1];\n }\n\n return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nclass ParseStream extends Stream {\n constructor() {\n super();\n this.customParsers = [];\n this.tagMappers = [];\n }\n /**\n * Parses an additional line of input.\n *\n * @param {string} line a single line of an M3U8 file to parse\n */\n\n\n push(line) {\n let match;\n let event; // strip whitespace\n\n line = line.trim();\n\n if (line.length === 0) {\n // ignore empty lines\n return;\n } // URIs\n\n\n if (line[0] !== '#') {\n this.trigger('data', {\n type: 'uri',\n uri: line\n });\n return;\n } // map tags\n\n\n const newLines = this.tagMappers.reduce((acc, mapper) => {\n const mappedLine = mapper(line); // skip if unchanged\n\n if (mappedLine === line) {\n return acc;\n }\n\n return acc.concat([mappedLine]);\n }, [line]);\n newLines.forEach(newLine => {\n for (let i = 0; i < this.customParsers.length; i++) {\n if (this.customParsers[i].call(this, newLine)) {\n return;\n }\n } // Comments\n\n\n if (newLine.indexOf('#EXT') !== 0) {\n this.trigger('data', {\n type: 'comment',\n text: newLine.slice(1)\n });\n return;\n } // strip off any carriage returns here so the regex matching\n // doesn't have to account for them.\n\n\n newLine = newLine.replace('\\r', ''); // Tags\n\n match = /^#EXTM3U/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'm3u'\n });\n return;\n }\n\n match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'inf'\n };\n\n if (match[1]) {\n event.duration = parseFloat(match[1]);\n }\n\n if (match[2]) {\n event.title = match[2];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'targetduration'\n };\n\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'version'\n };\n\n if (match[1]) {\n event.version = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'discontinuity-sequence'\n };\n\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'playlist-type'\n };\n\n if (match[1]) {\n event.playlistType = match[1];\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n if (match) {\n event = _extends(parseByterange(match[1]), {\n type: 'tag',\n tagType: 'byterange'\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'allow-cache'\n };\n\n if (match[1]) {\n event.allowed = !/NO/.test(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'map'\n };\n\n if (match[1]) {\n const attributes = parseAttributes(match[1]);\n\n if (attributes.URI) {\n event.uri = attributes.URI;\n }\n\n if (attributes.BYTERANGE) {\n event.byterange = parseByterange(attributes.BYTERANGE);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'stream-inf'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.RESOLUTION) {\n const split = event.attributes.RESOLUTION.split('x');\n const resolution = {};\n\n if (split[0]) {\n resolution.width = parseInt(split[0], 10);\n }\n\n if (split[1]) {\n resolution.height = parseInt(split[1], 10);\n }\n\n event.attributes.RESOLUTION = resolution;\n }\n\n if (event.attributes.BANDWIDTH) {\n event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n }\n\n if (event.attributes['FRAME-RATE']) {\n event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n }\n\n if (event.attributes['PROGRAM-ID']) {\n event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'endlist'\n });\n return;\n }\n\n match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'discontinuity'\n });\n return;\n }\n\n match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'program-date-time'\n };\n\n if (match[1]) {\n event.dateTimeString = match[1];\n event.dateTimeObject = new Date(match[1]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'key'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n if (event.attributes.IV) {\n if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n event.attributes.IV = event.attributes.IV.substring(2);\n }\n\n event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n event.attributes.IV = new Uint32Array(event.attributes.IV);\n }\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'start'\n };\n\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out-cont'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-in'\n };\n\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'skip'\n };\n event.attributes = parseAttributes(match[1]);\n\n if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n }\n\n if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part'\n };\n event.attributes = parseAttributes(match[1]);\n ['DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['INDEPENDENT', 'GAP'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n\n if (event.attributes.hasOwnProperty('BYTERANGE')) {\n event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'server-control'\n };\n event.attributes = parseAttributes(match[1]);\n ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part-inf'\n };\n event.attributes = parseAttributes(match[1]);\n ['PART-TARGET'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'preload-hint'\n };\n event.attributes = parseAttributes(match[1]);\n ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n event.attributes.byterange = event.attributes.byterange || {};\n event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n delete event.attributes[key];\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'rendition-report'\n };\n event.attributes = parseAttributes(match[1]);\n ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n }\n });\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'daterange'\n };\n event.attributes = parseAttributes(match[1]);\n ['ID', 'CLASS'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = String(event.attributes[key]);\n }\n });\n ['START-DATE', 'END-DATE'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = new Date(event.attributes[key]);\n }\n });\n ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['END-ON-NEXT'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/i.test(event.attributes[key]);\n }\n });\n ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = event.attributes[key].toString(16);\n }\n });\n const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n for (const key in event.attributes) {\n if (!clientAttributePattern.test(key)) {\n continue;\n }\n\n const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n }\n\n this.trigger('data', event);\n return;\n }\n\n match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n if (match) {\n this.trigger('data', {\n type: 'tag',\n tagType: 'independent-segments'\n });\n return;\n } // unknown tag type\n\n\n this.trigger('data', {\n type: 'tag',\n data: newLine.slice(4)\n });\n });\n }\n /**\n * Add a parser for custom headers\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.customType the custom type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser({\n expression,\n customType,\n dataParser,\n segment\n }) {\n if (typeof dataParser !== 'function') {\n dataParser = line => line;\n }\n\n this.customParsers.push(line => {\n const match = expression.exec(line);\n\n if (match) {\n this.trigger('data', {\n type: 'custom',\n data: dataParser(line),\n customType,\n segment\n });\n return true;\n }\n });\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper({\n expression,\n map\n }) {\n const mapFn = line => {\n if (expression.test(line)) {\n return map(line);\n }\n\n return line;\n };\n\n this.tagMappers.push(mapFn);\n }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n const result = {};\n Object.keys(attributes).forEach(function (key) {\n result[camelCase(key)] = attributes[key];\n });\n return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nconst setHoldBack = function (manifest) {\n const {\n serverControl,\n targetDuration,\n partTargetDuration\n } = manifest;\n\n if (!serverControl) {\n return;\n }\n\n const tag = '#EXT-X-SERVER-CONTROL';\n const hb = 'holdBack';\n const phb = 'partHoldBack';\n const minTargetDuration = targetDuration && targetDuration * 3;\n const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n serverControl[hb] = minTargetDuration;\n this.trigger('info', {\n message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n });\n }\n\n if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n this.trigger('warn', {\n message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n });\n serverControl[hb] = minTargetDuration;\n } // default no part hold back to part target duration * 3\n\n\n if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n serverControl[phb] = partTargetDuration * 3;\n this.trigger('info', {\n message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n });\n } // if part hold back is too small default it to part target duration * 2\n\n\n if (partTargetDuration && serverControl[phb] < minPartDuration) {\n this.trigger('warn', {\n message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n });\n serverControl[phb] = minPartDuration;\n }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n constructor() {\n super();\n this.lineStream = new LineStream();\n this.parseStream = new ParseStream();\n this.lineStream.pipe(this.parseStream);\n /* eslint-disable consistent-this */\n\n const self = this;\n /* eslint-enable consistent-this */\n\n const uris = [];\n let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n let currentMap; // if specified, the active decryption key\n\n let key;\n let hasParts = false;\n\n const noop = function () {};\n\n const defaultMediaGroups = {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n // used in MPDs with Widevine encrypted streams.\n\n const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n this.manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: []\n }; // keep track of the last seen segment's byte range end, as segments are not required\n // to provide the offset, in which case it defaults to the next byte after the\n // previous segment\n\n let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n let lastPartByterangeEnd = 0;\n const daterangeTags = {};\n this.on('end', () => {\n // only add preloadSegment if we don't yet have a uri for it.\n // and we actually have parts/preloadHints\n if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n return;\n }\n\n if (!currentUri.map && currentMap) {\n currentUri.map = currentMap;\n }\n\n if (!currentUri.key && key) {\n currentUri.key = key;\n }\n\n if (!currentUri.timeline && typeof currentTimeline === 'number') {\n currentUri.timeline = currentTimeline;\n }\n\n this.manifest.preloadSegment = currentUri;\n }); // update the manifest with the m3u8 entry from the parse stream\n\n this.parseStream.on('data', function (entry) {\n let mediaGroup;\n let rendition;\n ({\n tag() {\n // switch based on the tag type\n (({\n version() {\n if (entry.version) {\n this.manifest.version = entry.version;\n }\n },\n\n 'allow-cache'() {\n this.manifest.allowCache = entry.allowed;\n\n if (!('allowed' in entry)) {\n this.trigger('info', {\n message: 'defaulting allowCache to YES'\n });\n this.manifest.allowCache = true;\n }\n },\n\n byterange() {\n const byterange = {};\n\n if ('length' in entry) {\n currentUri.byterange = byterange;\n byterange.length = entry.length;\n\n if (!('offset' in entry)) {\n /*\n * From the latest spec (as of this writing):\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n *\n * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n *\n * \"If o [offset] is not present, the sub-range begins at the next byte\n * following the sub-range of the previous media segment.\"\n */\n entry.offset = lastByterangeEnd;\n }\n }\n\n if ('offset' in entry) {\n currentUri.byterange = byterange;\n byterange.offset = entry.offset;\n }\n\n lastByterangeEnd = byterange.offset + byterange.length;\n },\n\n endlist() {\n this.manifest.endList = true;\n },\n\n inf() {\n if (!('mediaSequence' in this.manifest)) {\n this.manifest.mediaSequence = 0;\n this.trigger('info', {\n message: 'defaulting media sequence to zero'\n });\n }\n\n if (!('discontinuitySequence' in this.manifest)) {\n this.manifest.discontinuitySequence = 0;\n this.trigger('info', {\n message: 'defaulting discontinuity sequence to zero'\n });\n }\n\n if (entry.duration > 0) {\n currentUri.duration = entry.duration;\n }\n\n if (entry.duration === 0) {\n currentUri.duration = 0.01;\n this.trigger('info', {\n message: 'updating zero segment duration to a small value'\n });\n }\n\n this.manifest.segments = uris;\n },\n\n key() {\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring key declaration without attribute list'\n });\n return;\n } // clear the active encryption key\n\n\n if (entry.attributes.METHOD === 'NONE') {\n key = null;\n return;\n }\n\n if (!entry.attributes.URI) {\n this.trigger('warn', {\n message: 'ignoring key declaration without URI'\n });\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.apple.fps.1_0'] = {\n attributes: entry.attributes\n };\n return;\n }\n\n if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.microsoft.playready'] = {\n uri: entry.attributes.URI\n };\n return;\n } // check if the content is encrypted for Widevine\n // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n if (entry.attributes.KEYFORMAT === widevineUuid) {\n const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n this.trigger('warn', {\n message: 'invalid key method provided for Widevine'\n });\n return;\n }\n\n if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n this.trigger('warn', {\n message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n });\n }\n\n if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n this.trigger('warn', {\n message: 'invalid key URI provided for Widevine'\n });\n return;\n }\n\n if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n this.trigger('warn', {\n message: 'invalid key ID provided for Widevine'\n });\n return;\n } // if Widevine key attributes are valid, store them as `contentProtection`\n // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n this.manifest.contentProtection = this.manifest.contentProtection || {};\n this.manifest.contentProtection['com.widevine.alpha'] = {\n attributes: {\n schemeIdUri: entry.attributes.KEYFORMAT,\n // remove '0x' from the key id string\n keyId: entry.attributes.KEYID.substring(2)\n },\n // decode the base64-encoded PSSH box\n pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n };\n return;\n }\n\n if (!entry.attributes.METHOD) {\n this.trigger('warn', {\n message: 'defaulting key method to AES-128'\n });\n } // setup an encryption key for upcoming segments\n\n\n key = {\n method: entry.attributes.METHOD || 'AES-128',\n uri: entry.attributes.URI\n };\n\n if (typeof entry.attributes.IV !== 'undefined') {\n key.iv = entry.attributes.IV;\n }\n },\n\n 'media-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid media sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.mediaSequence = entry.number;\n },\n\n 'discontinuity-sequence'() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid discontinuity sequence: ' + entry.number\n });\n return;\n }\n\n this.manifest.discontinuitySequence = entry.number;\n currentTimeline = entry.number;\n },\n\n 'playlist-type'() {\n if (!/VOD|EVENT/.test(entry.playlistType)) {\n this.trigger('warn', {\n message: 'ignoring unknown playlist type: ' + entry.playlist\n });\n return;\n }\n\n this.manifest.playlistType = entry.playlistType;\n },\n\n map() {\n currentMap = {};\n\n if (entry.uri) {\n currentMap.uri = entry.uri;\n }\n\n if (entry.byterange) {\n currentMap.byterange = entry.byterange;\n }\n\n if (key) {\n currentMap.key = key;\n }\n },\n\n 'stream-inf'() {\n this.manifest.playlists = uris;\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring empty stream-inf attributes'\n });\n return;\n }\n\n if (!currentUri.attributes) {\n currentUri.attributes = {};\n }\n\n _extends(currentUri.attributes, entry.attributes);\n },\n\n media() {\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n this.trigger('warn', {\n message: 'ignoring incomplete or missing media group'\n });\n return;\n } // find the media group, creating defaults as necessary\n\n\n const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n rendition = {\n default: /yes/i.test(entry.attributes.DEFAULT)\n };\n\n if (rendition.default) {\n rendition.autoselect = true;\n } else {\n rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n }\n\n if (entry.attributes.LANGUAGE) {\n rendition.language = entry.attributes.LANGUAGE;\n }\n\n if (entry.attributes.URI) {\n rendition.uri = entry.attributes.URI;\n }\n\n if (entry.attributes['INSTREAM-ID']) {\n rendition.instreamId = entry.attributes['INSTREAM-ID'];\n }\n\n if (entry.attributes.CHARACTERISTICS) {\n rendition.characteristics = entry.attributes.CHARACTERISTICS;\n }\n\n if (entry.attributes.FORCED) {\n rendition.forced = /yes/i.test(entry.attributes.FORCED);\n } // insert the new rendition\n\n\n mediaGroup[entry.attributes.NAME] = rendition;\n },\n\n discontinuity() {\n currentTimeline += 1;\n currentUri.discontinuity = true;\n this.manifest.discontinuityStarts.push(uris.length);\n },\n\n 'program-date-time'() {\n if (typeof this.manifest.dateTimeString === 'undefined') {\n // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n // to the manifest object\n // TODO: Consider removing this in future major version\n this.manifest.dateTimeString = entry.dateTimeString;\n this.manifest.dateTimeObject = entry.dateTimeObject;\n }\n\n currentUri.dateTimeString = entry.dateTimeString;\n currentUri.dateTimeObject = entry.dateTimeObject;\n },\n\n targetduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid target duration: ' + entry.duration\n });\n return;\n }\n\n this.manifest.targetDuration = entry.duration;\n setHoldBack.call(this, this.manifest);\n },\n\n start() {\n if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n this.trigger('warn', {\n message: 'ignoring start declaration without appropriate attribute list'\n });\n return;\n }\n\n this.manifest.start = {\n timeOffset: entry.attributes['TIME-OFFSET'],\n precise: entry.attributes.PRECISE\n };\n },\n\n 'cue-out'() {\n currentUri.cueOut = entry.data;\n },\n\n 'cue-out-cont'() {\n currentUri.cueOutCont = entry.data;\n },\n\n 'cue-in'() {\n currentUri.cueIn = entry.data;\n },\n\n 'skip'() {\n this.manifest.skip = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n },\n\n 'part'() {\n hasParts = true; // parts are always specifed before a segment\n\n const segmentIndex = this.manifest.segments.length;\n const part = camelCaseKeys(entry.attributes);\n currentUri.parts = currentUri.parts || [];\n currentUri.parts.push(part);\n\n if (part.byterange) {\n if (!part.byterange.hasOwnProperty('offset')) {\n part.byterange.offset = lastPartByterangeEnd;\n }\n\n lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n }\n\n const partIndex = currentUri.parts.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n if (this.manifest.renditionReports) {\n this.manifest.renditionReports.forEach((r, i) => {\n if (!r.hasOwnProperty('lastPart')) {\n this.trigger('warn', {\n message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n });\n }\n });\n }\n },\n\n 'server-control'() {\n const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n if (!attrs.hasOwnProperty('canBlockReload')) {\n attrs.canBlockReload = false;\n this.trigger('info', {\n message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n });\n }\n\n setHoldBack.call(this, this.manifest);\n\n if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n this.trigger('warn', {\n message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n });\n }\n },\n\n 'preload-hint'() {\n // parts are always specifed before a segment\n const segmentIndex = this.manifest.segments.length;\n const hint = camelCaseKeys(entry.attributes);\n const isPart = hint.type && hint.type === 'PART';\n currentUri.preloadHints = currentUri.preloadHints || [];\n currentUri.preloadHints.push(hint);\n\n if (hint.byterange) {\n if (!hint.byterange.hasOwnProperty('offset')) {\n // use last part byterange end or zero if not a part.\n hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n if (isPart) {\n lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n }\n }\n }\n\n const index = currentUri.preloadHints.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n if (!hint.type) {\n return;\n } // search through all preload hints except for the current one for\n // a duplicate type.\n\n\n for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n const otherHint = currentUri.preloadHints[i];\n\n if (!otherHint.type) {\n continue;\n }\n\n if (otherHint.type === hint.type) {\n this.trigger('warn', {\n message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n });\n }\n }\n },\n\n 'rendition-report'() {\n const report = camelCaseKeys(entry.attributes);\n this.manifest.renditionReports = this.manifest.renditionReports || [];\n this.manifest.renditionReports.push(report);\n const index = this.manifest.renditionReports.length - 1;\n const required = ['LAST-MSN', 'URI'];\n\n if (hasParts) {\n required.push('LAST-PART');\n }\n\n this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n },\n\n 'part-inf'() {\n this.manifest.partInf = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n if (this.manifest.partInf.partTarget) {\n this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n }\n\n setHoldBack.call(this, this.manifest);\n },\n\n 'daterange'() {\n this.manifest.daterange = this.manifest.daterange || [];\n this.manifest.daterange.push(camelCaseKeys(entry.attributes));\n const index = this.manifest.daterange.length - 1;\n this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n const daterange = this.manifest.daterange[index];\n\n if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n });\n }\n\n if (daterange.duration && daterange.duration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE DURATION must not be negative'\n });\n }\n\n if (daterange.plannedDuration && daterange.plannedDuration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n });\n }\n\n const endOnNextYes = !!daterange.endOnNext;\n\n if (endOnNextYes && !daterange.class) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n });\n }\n\n if (endOnNextYes && (daterange.duration || daterange.endDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n });\n }\n\n if (daterange.duration && daterange.endDate) {\n const startDate = daterange.startDate;\n const newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration);\n this.manifest.daterange[index].endDate = new Date(newDateInSeconds);\n }\n\n if (daterange && !this.manifest.dateTimeString) {\n this.trigger('warn', {\n message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n });\n }\n\n if (!daterangeTags[daterange.id]) {\n daterangeTags[daterange.id] = daterange;\n } else {\n for (const attribute in daterangeTags[daterange.id]) {\n if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values'\n });\n break;\n }\n }\n }\n },\n\n 'independent-segments'() {\n this.manifest.independentSegments = true;\n }\n\n })[entry.tagType] || noop).call(self);\n },\n\n uri() {\n currentUri.uri = entry.uri;\n uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n if (this.manifest.targetDuration && !('duration' in currentUri)) {\n this.trigger('warn', {\n message: 'defaulting segment duration to the target duration'\n });\n currentUri.duration = this.manifest.targetDuration;\n } // annotate with encryption information, if necessary\n\n\n if (key) {\n currentUri.key = key;\n }\n\n currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n if (currentMap) {\n currentUri.map = currentMap;\n } // reset the last byterange end as it needs to be 0 between parts\n\n\n lastPartByterangeEnd = 0; // prepare for the next URI\n\n currentUri = {};\n },\n\n comment() {// comments are not important for playback\n },\n\n custom() {\n // if this is segment-level data attach the output to the segment\n if (entry.segment) {\n currentUri.custom = currentUri.custom || {};\n currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n } else {\n this.manifest.custom = this.manifest.custom || {};\n this.manifest.custom[entry.customType] = entry.data;\n }\n }\n\n })[entry.type].call(self);\n });\n }\n\n warnOnMissingAttributes_(identifier, attributes, required) {\n const missing = [];\n required.forEach(function (key) {\n if (!attributes.hasOwnProperty(key)) {\n missing.push(key);\n }\n });\n\n if (missing.length) {\n this.trigger('warn', {\n message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n });\n }\n }\n /**\n * Parse the input string and update the manifest object.\n *\n * @param {string} chunk a potentially incomplete portion of the manifest\n */\n\n\n push(chunk) {\n this.lineStream.push(chunk);\n }\n /**\n * Flush any remaining input. This can be handy if the last line of an M3U8\n * manifest did not contain a trailing newline but the file has been\n * completely received.\n */\n\n\n end() {\n // flush any buffered input\n this.lineStream.push('\\n');\n this.trigger('end');\n }\n /**\n * Add an additional parser for non-standard tags\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.type the type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n\n\n addParser(options) {\n this.parseStream.addParser(options);\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n\n\n addTagMapper(options) {\n this.parseStream.addTagMapper(options);\n }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n","/*! @name mpd-parser @version 1.2.2 @license Apache-2.0 */\nimport resolveUrl from '@videojs/vhs-utils/es/resolve-url';\nimport window from 'global/window';\nimport { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array';\nimport { DOMParser } from '@xmldom/xmldom';\n\nvar version = \"1.2.2\";\n\nconst isObject = obj => {\n return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n return objects.reduce((result, source) => {\n if (typeof source !== 'object') {\n return result;\n }\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n result[key] = result[key].concat(source[key]);\n } else if (isObject(result[key]) && isObject(source[key])) {\n result[key] = merge(result[key], source[key]);\n } else {\n result[key] = source[key];\n }\n });\n return result;\n }, {});\n};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n const result = [];\n\n for (let i = start; i < end; i++) {\n result.push(i);\n }\n\n return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n if (!list.length) {\n return [];\n }\n\n const result = [];\n\n for (let i = 0; i < list.length; i++) {\n result.push(list[i]);\n }\n\n return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n if (e[key]) {\n a.push(i);\n }\n\n return a;\n}, []);\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nconst union = (lists, keyFunction) => {\n return values(lists.reduce((acc, list) => {\n list.forEach(el => {\n acc[keyFunction(el)] = el;\n });\n return acc;\n }, {}));\n};\n\nvar errors = {\n INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n DASH_INVALID_XML: 'DASH_INVALID_XML',\n NO_BASE_URL: 'NO_BASE_URL',\n MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n * requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n * follows RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n * to m3u8-parser\n */\n\nconst urlTypeToSegment = ({\n baseUrl = '',\n source = '',\n range = '',\n indexRange = ''\n}) => {\n const segment = {\n uri: source,\n resolvedUri: resolveUrl(baseUrl || '', source)\n };\n\n if (range || indexRange) {\n const rangeStr = range ? range : indexRange;\n const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n let endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n startRange = Number(startRange);\n }\n\n if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n endRange = Number(endRange);\n }\n\n let length;\n\n if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n } else {\n length = endRange - startRange + 1;\n }\n\n if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n length = Number(length);\n } // byterange should be inclusive according to\n // RFC 2616, Clause 14.35.1\n\n\n segment.byterange = {\n length,\n offset: startRange\n };\n }\n\n return segment;\n};\nconst byteRangeToString = byterange => {\n // `endRange` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n let endRange;\n\n if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n } else {\n endRange = byterange.offset + byterange.length - 1;\n }\n\n return `${byterange.offset}-${endRange}`;\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n * The end number attribute.\n *\n * @return {number|null}\n * The result of parsing the end number.\n */\n\nconst parseEndNumber = endNumber => {\n if (endNumber && typeof endNumber !== 'number') {\n endNumber = parseInt(endNumber, 10);\n }\n\n if (isNaN(endNumber)) {\n return null;\n }\n\n return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst segmentRange = {\n /**\n * Returns the entire range of available segments for a static MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n static(attributes) {\n const {\n duration,\n timescale = 1,\n sourceDuration,\n periodDuration\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber);\n const segmentDuration = duration / timescale;\n\n if (typeof endNumber === 'number') {\n return {\n start: 0,\n end: endNumber\n };\n }\n\n if (typeof periodDuration === 'number') {\n return {\n start: 0,\n end: periodDuration / segmentDuration\n };\n }\n\n return {\n start: 0,\n end: sourceDuration / segmentDuration\n };\n },\n\n /**\n * Returns the current live window range of available segments for a dynamic MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n dynamic(attributes) {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n duration,\n periodStart = 0,\n minimumUpdatePeriod = 0,\n timeShiftBufferDepth = Infinity\n } = attributes;\n const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n // after retrieving UTC server time.\n\n const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n // Convert the period start time to EPOCH.\n\n const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n const segmentCount = Math.ceil(periodDuration * timescale / duration);\n const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n const availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n return {\n start: Math.max(0, availableStart),\n end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n };\n }\n\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n * Number of the segment\n * @param {number} index\n * Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n * Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {toSegmentsCallback}\n * Callback map function\n */\n\nconst toSegments = attributes => number => {\n const {\n duration,\n timescale = 1,\n periodStart,\n startNumber = 1\n } = attributes;\n return {\n number: startNumber + number,\n duration: duration / timescale,\n timeline: periodStart,\n time: number * duration\n };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseByDuration = attributes => {\n const {\n type,\n duration,\n timescale = 1,\n periodDuration,\n sourceDuration\n } = attributes;\n const {\n start,\n end\n } = segmentRange[type](attributes);\n const segments = range(start, end).map(toSegments(attributes));\n\n if (type === 'static') {\n const index = segments.length - 1; // section is either a period or the full source\n\n const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n segments[index].duration = sectionDuration - duration / timescale * index;\n }\n\n return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @return {Object.} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n const {\n baseUrl,\n initialization = {},\n sourceDuration,\n indexRange = '',\n periodStart,\n presentationTime,\n number = 0,\n duration\n } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n if (!baseUrl) {\n throw new Error(errors.NO_BASE_URL);\n }\n\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: baseUrl,\n indexRange\n });\n segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n // (since SegmentBase is only for one total segment)\n\n if (duration) {\n const segmentTimeInfo = parseByDuration(attributes);\n\n if (segmentTimeInfo.length) {\n segment.duration = segmentTimeInfo[0].duration;\n segment.timeline = segmentTimeInfo[0].timeline;\n }\n } else if (sourceDuration) {\n segment.duration = sourceDuration;\n segment.timeline = periodStart;\n } // If presentation time is provided, these segments are being generated by SIDX\n // references, and should use the time provided. For the general case of SegmentBase,\n // there should only be one segment in the period, so its presentation time is the same\n // as its period start.\n\n\n segment.presentationTime = presentationTime || periodStart;\n segment.number = number;\n return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n // Retain init segment information\n const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n const timeline = playlist.timeline || 0;\n const sidxByteRange = playlist.sidx.byterange;\n const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n const segments = [];\n const type = playlist.endList ? 'static' : 'dynamic';\n const periodStart = playlist.sidx.timeline;\n let presentationTime = periodStart;\n let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n let startIndex; // eslint-disable-next-line\n\n if (typeof sidx.firstOffset === 'bigint') {\n startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n } else {\n startIndex = sidxEnd + sidx.firstOffset;\n }\n\n for (let i = 0; i < mediaReferences.length; i++) {\n const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n const size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale\n // this will be converted to seconds when generating segments\n\n const duration = reference.subsegmentDuration; // should be an inclusive range\n\n let endIndex; // eslint-disable-next-line\n\n if (typeof startIndex === 'bigint') {\n endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n } else {\n endIndex = startIndex + size - 1;\n }\n\n const indexRange = `${startIndex}-${endIndex}`;\n const attributes = {\n baseUrl,\n timescale,\n timeline,\n periodStart,\n presentationTime,\n number,\n duration,\n sourceDuration,\n indexRange,\n type\n };\n const segment = segmentsFromBase(attributes)[0];\n\n if (initSegment) {\n segment.map = initSegment;\n }\n\n segments.push(segment);\n\n if (typeof startIndex === 'bigint') {\n startIndex += window.BigInt(size);\n } else {\n startIndex += size;\n }\n\n presentationTime += duration / timescale;\n number++;\n }\n\n playlist.segments = segments;\n return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nconst getUniqueTimelineStarts = timelineStarts => {\n return union(timelineStarts, ({\n timeline\n }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nconst findPlaylistWithName = (playlists, name) => {\n for (let i = 0; i < playlists.length; i++) {\n if (playlists[i].attributes.NAME === name) {\n return playlists[i];\n }\n }\n\n return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nconst getMediaGroupPlaylists = manifest => {\n let mediaGroupPlaylists = [];\n forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {\n mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n });\n return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nconst updateMediaSequenceForPlaylist = ({\n playlist,\n mediaSequence\n}) => {\n playlist.mediaSequence = mediaSequence;\n playlist.segments.forEach((segment, index) => {\n segment.number = playlist.mediaSequence + index;\n });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nconst updateSequenceNumbers = ({\n oldPlaylists,\n newPlaylists,\n timelineStarts\n}) => {\n newPlaylists.forEach(playlist => {\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n // (see ISO_23009-1-2012 5.3.5.2).\n //\n // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\n if (!oldPlaylist) {\n // Since this is a new playlist, the media sequence values can start from 0 without\n // consequence.\n return;\n } // TODO better support for live SIDX\n //\n // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n // not supported when the SIDX properties change on refreshes.\n //\n // In the future, if support needs to be added, the merging logic here can be called\n // after SIDX references are resolved. For now, exit early to prevent exceptions being\n // thrown due to undefined references.\n\n\n if (playlist.sidx) {\n return;\n } // Since we don't yet support early available timelines, we don't need to support\n // playlists with no segments.\n\n\n const firstNewSegment = playlist.segments[0];\n const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n }); // No matching segment from the old playlist means the entire playlist was refreshed.\n // In this case the media sequence should account for this update, and the new segments\n // should be marked as discontinuous from the prior content, since the last prior\n // timeline was removed.\n\n if (oldMatchingSegmentIndex === -1) {\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n });\n playlist.segments[0].discontinuity = true;\n playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n //\n // If the new playlist's timeline is the same as the last seen segment's timeline,\n // then a discontinuity can be added to identify that there's potentially missing\n // content. If there's no missing content, the discontinuity should still be rather\n // harmless. It's possible that if segment durations are accurate enough, that the\n // existence of a gap can be determined using the presentation times and durations,\n // but if the segment timing info is off, it may introduce more problems than simply\n // adding the discontinuity.\n //\n // If the new playlist's timeline is different from the last seen segment's timeline,\n // then a discontinuity can be added to identify that this is the first seen segment\n // of a new timeline. However, the logic at the start of this function that\n // determined the disconinuity sequence by timeline index is now off by one (the\n // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n // we added it), so the disconinuity sequence must be decremented.\n //\n // A period may also have a duration of zero, so the case of no segments is handled\n // here even though we don't yet support early available periods.\n\n if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n playlist.discontinuitySequence--;\n }\n\n return;\n } // If the first segment matched with a prior segment on a discontinuity (it's matching\n // on the first segment of a period), then the discontinuitySequence shouldn't be the\n // timeline's matching one, but instead should be the one prior, and the first segment\n // of the new manifest should be marked with a discontinuity.\n //\n // The reason for this special case is that discontinuity sequence shows how many\n // discontinuities have fallen off of the playlist, and discontinuities are marked on\n // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n // sequence, and that first segment is an indicator, but can be removed before that\n // timeline is gone.\n\n\n const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n firstNewSegment.discontinuity = true;\n playlist.discontinuityStarts.unshift(0);\n playlist.discontinuitySequence--;\n }\n\n updateMediaSequenceForPlaylist({\n playlist,\n mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n });\n });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nconst positionManifestOnTimeline = ({\n oldManifest,\n newManifest\n}) => {\n // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n //\n // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n //\n // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n //\n // Because of this change, and the difficulty of supporting periods with changing start\n // times, periods with changing start times are not supported. This makes the logic much\n // simpler, since periods with the same start time can be considerred the same period\n // across refreshes.\n //\n // To give an example as to the difficulty of handling periods where the start time may\n // change, if a single period manifest is refreshed with another manifest with a single\n // period, and both the start and end times are increased, then the only way to determine\n // if it's a new period or an old one that has changed is to look through the segments of\n // each playlist and determine the presentation time bounds to find a match. In addition,\n // if the period start changed to exceed the old period end, then there would be no\n // match, and it would not be possible to determine whether the refreshed period is a new\n // one or the old one.\n const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n // of properties are saved for each seen Period. Even long running live streams won't\n // generate too many Periods, unless the stream is watched for decades. In the future,\n // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n // but it may not become an issue, and the additional info can be useful for debugging.\n\n newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n updateSequenceNumbers({\n oldPlaylists,\n newPlaylists,\n timelineStarts: newManifest.timelineStarts\n });\n return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n // Break out playlists into groups based on their baseUrl\n const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n if (!acc[cur.attributes.baseUrl]) {\n acc[cur.attributes.baseUrl] = [];\n }\n\n acc[cur.attributes.baseUrl].push(cur);\n return acc;\n }, {});\n let allPlaylists = [];\n Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => {\n // assuming playlist IDs are the same across periods\n // TODO: handle multiperiod where representation sets are not the same\n // across periods\n const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\n if (!acc[name]) {\n // First Period\n acc[name] = playlist;\n acc[name].attributes.timelineStarts = [];\n } else {\n // Subsequent Periods\n if (playlist.segments) {\n // first segment of subsequent periods signal a discontinuity\n if (playlist.segments[0]) {\n playlist.segments[0].discontinuity = true;\n }\n\n acc[name].segments.push(...playlist.segments);\n } // bubble up contentProtection, this assumes all DRM content\n // has the same contentProtection\n\n\n if (playlist.attributes.contentProtection) {\n acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n }\n }\n\n acc[name].attributes.timelineStarts.push({\n // Although they represent the same number, it's important to have both to make it\n // compatible with HLS potentially having a similar attribute.\n start: playlist.attributes.periodStart,\n timeline: playlist.attributes.periodStart\n });\n return acc;\n }, {}));\n allPlaylists = allPlaylists.concat(mergedPlaylists);\n });\n return allPlaylists.map(playlist => {\n playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n return playlist;\n });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n const sidxKey = generateSidxKey(playlist.sidx);\n const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n if (sidxMatch) {\n addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n }\n\n return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n if (!Object.keys(sidxMapping).length) {\n return playlists;\n }\n\n for (const i in playlists) {\n playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n }\n\n return playlists;\n};\nconst formatAudioPlaylist = ({\n attributes,\n segments,\n sidx,\n mediaSequence,\n discontinuitySequence,\n discontinuityStarts\n}, isAudioOnly) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n CODECS: attributes.codecs,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuitySequence,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n mediaSequence,\n segments\n };\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n if (isAudioOnly) {\n playlist.attributes.AUDIO = 'audio';\n playlist.attributes.SUBTITLES = 'subs';\n }\n\n return playlist;\n};\nconst formatVttPlaylist = ({\n attributes,\n segments,\n mediaSequence,\n discontinuityStarts,\n discontinuitySequence\n}) => {\n if (typeof segments === 'undefined') {\n // vtt tracks may use single file in BaseURL\n segments = [{\n uri: attributes.baseUrl,\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n duration: attributes.sourceDuration,\n number: 0\n }]; // targetDuration should be the same duration as the only segment\n\n attributes.duration = attributes.sourceDuration;\n }\n\n const m3u8Attributes = {\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n };\n\n if (attributes.codecs) {\n m3u8Attributes.CODECS = attributes.codecs;\n }\n\n const vttPlaylist = {\n attributes: m3u8Attributes,\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n timelineStarts: attributes.timelineStarts,\n discontinuityStarts,\n discontinuitySequence,\n mediaSequence,\n segments\n };\n\n if (attributes.serviceLocation) {\n vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n let mainPlaylist;\n const formattedPlaylists = playlists.reduce((a, playlist) => {\n const role = playlist.attributes.role && playlist.attributes.role.value || '';\n const language = playlist.attributes.lang || '';\n let label = playlist.attributes.label || 'main';\n\n if (language && !playlist.attributes.label) {\n const roleLabel = role ? ` (${role})` : '';\n label = `${playlist.attributes.lang}${roleLabel}`;\n }\n\n if (!a[label]) {\n a[label] = {\n language,\n autoselect: true,\n default: role === 'main',\n playlists: [],\n uri: ''\n };\n }\n\n const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n a[label].playlists.push(formatted);\n\n if (typeof mainPlaylist === 'undefined' && role === 'main') {\n mainPlaylist = playlist;\n mainPlaylist.default = true;\n }\n\n return a;\n }, {}); // if no playlists have role \"main\", mark the first as main\n\n if (!mainPlaylist) {\n const firstLabel = Object.keys(formattedPlaylists)[0];\n formattedPlaylists[firstLabel].default = true;\n }\n\n return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n return playlists.reduce((a, playlist) => {\n const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n\n if (!a[label]) {\n a[label] = {\n language: label,\n default: false,\n autoselect: false,\n playlists: [],\n uri: ''\n };\n }\n\n a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n return a;\n }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n if (!svc) {\n return svcObj;\n }\n\n svc.forEach(service => {\n const {\n channel,\n language\n } = service;\n svcObj[language] = {\n autoselect: false,\n default: false,\n instreamId: channel,\n language\n };\n\n if (service.hasOwnProperty('aspectRatio')) {\n svcObj[language].aspectRatio = service.aspectRatio;\n }\n\n if (service.hasOwnProperty('easyReader')) {\n svcObj[language].easyReader = service.easyReader;\n }\n\n if (service.hasOwnProperty('3D')) {\n svcObj[language]['3D'] = service['3D'];\n }\n });\n return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n attributes,\n segments,\n sidx,\n discontinuityStarts\n}) => {\n const playlist = {\n attributes: {\n NAME: attributes.id,\n AUDIO: 'audio',\n SUBTITLES: 'subs',\n RESOLUTION: {\n width: attributes.width,\n height: attributes.height\n },\n CODECS: attributes.codecs,\n BANDWIDTH: attributes.bandwidth,\n ['PROGRAM-ID']: 1\n },\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n segments\n };\n\n if (attributes.frameRate) {\n playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n }\n\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n\n if (sidx) {\n playlist.sidx = sidx;\n }\n\n return playlist;\n};\n\nconst videoOnly = ({\n attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n // increment all segments sequentially\n playlists.forEach(playlist => {\n playlist.mediaSequence = 0;\n playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n timeline\n }) {\n return timeline === playlist.timeline;\n });\n\n if (!playlist.segments) {\n return;\n }\n\n playlist.segments.forEach((segment, index) => {\n segment.number = index;\n });\n });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n * The media group playlists\n */\n\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n if (!mediaGroupObject) {\n return [];\n }\n\n return Object.keys(mediaGroupObject).reduce((acc, label) => {\n const labelContents = mediaGroupObject[label];\n return acc.concat(labelContents.playlists);\n }, []);\n};\nconst toM3u8 = ({\n dashPlaylists,\n locations,\n contentSteering,\n sidxMapping = {},\n previousManifest,\n eventStream\n}) => {\n if (!dashPlaylists.length) {\n return {};\n } // grab all main manifest attributes\n\n\n const {\n sourceDuration: duration,\n type,\n suggestedPresentationDelay,\n minimumUpdatePeriod\n } = dashPlaylists[0].attributes;\n const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n const manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: [],\n endList: true,\n mediaGroups: {\n AUDIO: {},\n VIDEO: {},\n ['CLOSED-CAPTIONS']: {},\n SUBTITLES: {}\n },\n uri: '',\n duration,\n playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n };\n\n if (minimumUpdatePeriod >= 0) {\n manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n }\n\n if (locations) {\n manifest.locations = locations;\n }\n\n if (contentSteering) {\n manifest.contentSteering = contentSteering;\n }\n\n if (type === 'dynamic') {\n manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n }\n\n if (eventStream && eventStream.length > 0) {\n manifest.eventStream = eventStream;\n }\n\n const isAudioOnly = manifest.playlists.length === 0;\n const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n const playlistTimelineStarts = formattedPlaylists.map(({\n timelineStarts\n }) => timelineStarts);\n manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n if (organizedAudioGroup) {\n manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n }\n\n if (organizedVttGroup) {\n manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n }\n\n if (captions.length) {\n manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n }\n\n if (previousManifest) {\n return positionManifestOnTimeline({\n oldManifest: previousManifest,\n newManifest: manifest\n });\n }\n\n return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {number} time\n * current time (typically the total time up until the final segment)\n * @param {number} duration\n * duration property for the given \n *\n * @return {number}\n * R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n const {\n NOW,\n clientOffset,\n availabilityStartTime,\n timescale = 1,\n periodStart = 0,\n minimumUpdatePeriod = 0\n } = attributes;\n const now = (NOW + clientOffset) / 1000;\n const periodStartWC = availabilityStartTime + periodStart;\n const periodEndWC = now + minimumUpdatePeriod;\n const periodDuration = periodEndWC - periodStartWC;\n return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n const {\n type,\n minimumUpdatePeriod = 0,\n media = '',\n sourceDuration,\n timescale = 1,\n startNumber = 1,\n periodStart: timeline\n } = attributes;\n const segments = [];\n let time = -1;\n\n for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n const S = segmentTimeline[sIndex];\n const duration = S.d;\n const repeat = S.r || 0;\n const segmentTime = S.t || 0;\n\n if (time < 0) {\n // first segment\n time = segmentTime;\n }\n\n if (segmentTime && segmentTime > time) {\n // discontinuity\n // TODO: How to handle this type of discontinuity\n // timeline++ here would treat it like HLS discontuity and content would\n // get appended without gap\n // E.G.\n // \n // \n // \n // \n // would have $Time$ values of [0, 1, 2, 5]\n // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n // does the value of sourceDuration consider this when calculating arbitrary\n // negative @r repeat value?\n // E.G. Same elements as above with this added at the end\n // \n // with a sourceDuration of 10\n // Would the 2 gaps be included in the time duration calculations resulting in\n // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n time = segmentTime;\n }\n\n let count;\n\n if (repeat < 0) {\n const nextS = sIndex + 1;\n\n if (nextS === segmentTimeline.length) {\n // last segment\n if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n count = getLiveRValue(attributes, time, duration);\n } else {\n // TODO: This may be incorrect depending on conclusion of TODO above\n count = (sourceDuration * timescale - time) / duration;\n }\n } else {\n count = (segmentTimeline[nextS].t - time) / duration;\n }\n } else {\n count = repeat + 1;\n }\n\n const end = startNumber + segments.length + count;\n let number = startNumber + segments.length;\n\n while (number < end) {\n segments.push({\n number,\n duration: duration / timescale,\n time,\n timeline\n });\n time += duration;\n number++;\n }\n }\n\n return segments;\n};\n\nconst identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n * Entire match of identifier\n * @param {string} identifier\n * Name of matched identifier\n * @param {string} format\n * Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n * Desired length of the replaced value. Values less than this width shall be left\n * zero padded\n * @return {string}\n * Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {replaceCallback}\n * Callback to be used with String.prototype.replace to replace identifiers\n */\n\nconst identifierReplacement = values => (match, identifier, format, width) => {\n if (match === '$$') {\n // escape sequence\n return '$';\n }\n\n if (typeof values[identifier] === 'undefined') {\n return match;\n }\n\n const value = '' + values[identifier];\n\n if (identifier === 'RepresentationID') {\n // Format tag shall not be present with RepresentationID\n return value;\n }\n\n if (!format) {\n width = 1;\n } else {\n width = parseInt(width, 10);\n }\n\n if (value.length >= width) {\n return value;\n }\n\n return `${new Array(width - value.length + 1).join('0')}${value}`;\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n * Template string to construct url from\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {string}\n * Segment url with identifiers replaced\n */\n\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nconst parseTemplateInfo = (attributes, segmentTimeline) => {\n if (!attributes.duration && !segmentTimeline) {\n // if neither @duration or SegmentTimeline are present, then there shall be exactly\n // one media segment\n return [{\n number: attributes.startNumber || 1,\n duration: attributes.sourceDuration,\n time: 0,\n timeline: attributes.periodStart\n }];\n }\n\n if (attributes.duration) {\n return parseByDuration(attributes);\n }\n\n return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object[]}\n * List of segment objects\n */\n\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n const templateValues = {\n RepresentationID: attributes.id,\n Bandwidth: attributes.bandwidth || 0\n };\n const {\n initialization = {\n sourceURL: '',\n range: ''\n }\n } = attributes;\n const mapSegment = urlTypeToSegment({\n baseUrl: attributes.baseUrl,\n source: constructTemplateUrl(initialization.sourceURL, templateValues),\n range: initialization.range\n });\n const segments = parseTemplateInfo(attributes, segmentTimeline);\n return segments.map(segment => {\n templateValues.Number = segment.number;\n templateValues.Time = segment.time;\n const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is\n // calculated in mpd-parser prior to this, so it's assumed to be available.\n attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n const map = {\n uri,\n timeline: segment.timeline,\n duration: segment.duration,\n resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n map: mapSegment,\n number: segment.number,\n presentationTime\n };\n return map;\n });\n};\n\n/**\n * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object} segmentUrl\n * node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n const {\n baseUrl,\n initialization = {}\n } = attributes;\n const initSegment = urlTypeToSegment({\n baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n const segment = urlTypeToSegment({\n baseUrl,\n source: segmentUrl.media,\n range: segmentUrl.mediaRange\n });\n segment.map = initSegment;\n return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object.} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n const {\n duration,\n segmentUrls = [],\n periodStart\n } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n if (!duration && !segmentTimeline || duration && segmentTimeline) {\n throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n }\n\n const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n let segmentTimeInfo;\n\n if (duration) {\n segmentTimeInfo = parseByDuration(attributes);\n }\n\n if (segmentTimeline) {\n segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n }\n\n const segments = segmentTimeInfo.map((segmentTime, index) => {\n if (segmentUrlMap[index]) {\n const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n segment.timeline = segmentTime.timeline;\n segment.duration = segmentTime.duration;\n segment.number = segmentTime.number;\n segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n return segment;\n } // Since we're mapping we should get rid of any blank segments (in case\n // the given SegmentTimeline is handling for more elements than we have\n // SegmentURLs for).\n\n }).filter(segment => segment);\n return segments;\n};\n\nconst generateSegments = ({\n attributes,\n segmentInfo\n}) => {\n let segmentAttributes;\n let segmentsFn;\n\n if (segmentInfo.template) {\n segmentsFn = segmentsFromTemplate;\n segmentAttributes = merge(attributes, segmentInfo.template);\n } else if (segmentInfo.base) {\n segmentsFn = segmentsFromBase;\n segmentAttributes = merge(attributes, segmentInfo.base);\n } else if (segmentInfo.list) {\n segmentsFn = segmentsFromList;\n segmentAttributes = merge(attributes, segmentInfo.list);\n }\n\n const segmentsInfo = {\n attributes\n };\n\n if (!segmentsFn) {\n return segmentsInfo;\n }\n\n const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n // must be in seconds. Since we've generated the segment list, we no longer need\n // @duration to be in @timescale units, so we can convert it here.\n\n if (segmentAttributes.duration) {\n const {\n duration,\n timescale = 1\n } = segmentAttributes;\n segmentAttributes.duration = duration / timescale;\n } else if (segments.length) {\n // if there is no @duration attribute, use the largest segment duration as\n // as target duration\n segmentAttributes.duration = segments.reduce((max, segment) => {\n return Math.max(max, Math.ceil(segment.duration));\n }, 0);\n } else {\n segmentAttributes.duration = 0;\n }\n\n segmentsInfo.attributes = segmentAttributes;\n segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n if (segmentInfo.base && segmentAttributes.indexRange) {\n segmentsInfo.sidx = segments[0];\n segmentsInfo.segments = [];\n }\n\n return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nconst parseDivisionValue = value => {\n return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n const SECONDS_IN_DAY = 24 * 60 * 60;\n const SECONDS_IN_HOUR = 60 * 60;\n const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n const match = durationRegex.exec(str);\n\n if (!match) {\n return 0;\n }\n\n const [year, month, day, hour, minute, second] = match.slice(1);\n return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nconst parseDate = str => {\n // Date format without timezone according to ISO 8601\n // YYY-MM-DDThh:mm:ss.ssssss\n const dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n // expressed by ending with 'Z'\n\n if (dateRegex.test(str)) {\n str += 'Z';\n }\n\n return Date.parse(str);\n};\n\nconst parsers = {\n /**\n * Specifies the duration of the entire Media Presentation. Format is a duration string\n * as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n mediaPresentationDuration(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the Segment availability start time for all Segments referred to in this\n * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n * time. Format is a date string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The date as seconds from unix epoch\n */\n availabilityStartTime(value) {\n return parseDate(value) / 1000;\n },\n\n /**\n * Specifies the smallest period between potential changes to the MPD. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n minimumUpdatePeriod(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the suggested presentation delay. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n suggestedPresentationDelay(value) {\n return parseDuration(value);\n },\n\n /**\n * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n *\n * @param {string} value\n * value of attribute as a string\n *\n * @return {string}\n * The type as a string\n */\n type(value) {\n return value;\n },\n\n /**\n * Specifies the duration of the smallest time shifting buffer for any Representation\n * in the MPD. Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n timeShiftBufferDepth(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n * Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n start(value) {\n return parseDuration(value);\n },\n\n /**\n * Specifies the width of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed width\n */\n width(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the height of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed height\n */\n height(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the bitrate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed bandwidth\n */\n bandwidth(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the frame rate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed frame rate\n */\n frameRate(value) {\n return parseDivisionValue(value);\n },\n\n /**\n * Specifies the number of the first Media Segment in this Representation in the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n startNumber(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the timescale in units per seconds\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed timescale\n */\n timescale(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTimeOffset.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTimeOffset\n */\n presentationTimeOffset(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the constant approximate Segment duration\n * NOTE: The element also contains an @duration attribute. This duration\n * specifies the duration of the Period. This attribute is currently not\n * supported by the rest of the parser, however we still check for it to prevent\n * errors.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n duration(value) {\n const parsedValue = parseInt(value, 10);\n\n if (isNaN(parsedValue)) {\n return parseDuration(value);\n }\n\n return parsedValue;\n },\n\n /**\n * Specifies the Segment duration, in units of the value of the @timescale.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n d(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the MPD start time, in @timescale units, the first Segment in the series\n * starts relative to the beginning of the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed time\n */\n t(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the repeat count of the number of following contiguous Segments with the\n * same duration expressed by the value of @d\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n r(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Specifies the presentationTime.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTime\n */\n presentationTime(value) {\n return parseInt(value, 10);\n },\n\n /**\n * Default parser for all other attributes. Acts as a no-op and just returns the value\n * as a string\n *\n * @param {string} value\n * value of attribute as a string\n * @return {string}\n * Unparsed value\n */\n DEFAULT(value) {\n return value;\n }\n\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n * The node to parse attributes from\n * @return {Object}\n * Object with all attributes of el parsed\n */\n\nconst parseAttributes = el => {\n if (!(el && el.attributes)) {\n return {};\n }\n\n return from(el.attributes).reduce((a, e) => {\n const parseFn = parsers[e.name] || parsers.DEFAULT;\n a[e.name] = parseFn(e.value);\n return a;\n }, {});\n};\n\nconst keySystemsMap = {\n 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {Object[]} references\n * List of objects containing the reference URL as well as its attributes\n * @param {Node[]} baseUrlElements\n * List of BaseURL nodes from the mpd\n * @return {Object[]}\n * List of objects with resolved urls and attributes\n */\n\nconst buildBaseUrls = (references, baseUrlElements) => {\n if (!baseUrlElements.length) {\n return references;\n }\n\n return flatten(references.map(function (reference) {\n return baseUrlElements.map(function (baseUrlElement) {\n const initialBaseUrl = getContent(baseUrlElement);\n const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n const finalBaseUrl = merge(parseAttributes(baseUrlElement), {\n baseUrl: resolvedBaseUrl\n }); // If the URL is resolved, we want to get the serviceLocation from the reference\n // assuming there is no serviceLocation on the initialBaseUrl\n\n if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n finalBaseUrl.serviceLocation = reference.serviceLocation;\n }\n\n return finalBaseUrl;\n });\n }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n * Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n * Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n * Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n * Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n * The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n * The Segment information contained within the provided AdaptationSet\n */\n\nconst getSegmentInformation = adaptationSet => {\n const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n tag: 'SegmentURL'\n }, parseAttributes(s)));\n const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n const segmentTimelineParentNode = segmentList || segmentTemplate;\n const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n // @initialization and an node. @initialization can be templated,\n // while the node can have a url and range specified. If the has\n // both @initialization and an subelement we opt to override with\n // the node, as this interaction is not defined in the spec.\n\n const template = segmentTemplate && parseAttributes(segmentTemplate);\n\n if (template && segmentInitialization) {\n template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n } else if (template && template.initialization) {\n // If it is @initialization we convert it to an object since this is the format that\n // later functions will rely on for the initialization segment. This is only valid\n // for \n template.initialization = {\n sourceURL: template.initialization\n };\n }\n\n const segmentInfo = {\n template,\n segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n list: segmentList && merge(parseAttributes(segmentList), {\n segmentUrls,\n initialization: parseAttributes(segmentInitialization)\n }),\n base: segmentBase && merge(parseAttributes(segmentBase), {\n initialization: parseAttributes(segmentInitialization)\n })\n };\n Object.keys(segmentInfo).forEach(key => {\n if (!segmentInfo[key]) {\n delete segmentInfo[key];\n }\n });\n return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n * Segment information for this Representation\n * @property {Object} attributes\n * Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n * Representation node from the mpd\n * @return {RepresentationInformation}\n * Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n * Contains attributes inherited by the AdaptationSet\n * @param {Object[]} adaptationSetBaseUrls\n * List of objects containing resolved base URLs and attributes\n * inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n * Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n * Callback map function\n */\n\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n const repBaseUrlElements = findChildren(representation, 'BaseURL');\n const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n const representationSegmentInfo = getSegmentInformation(representation);\n return repBaseUrls.map(baseUrl => {\n return {\n segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n attributes: merge(attributes, baseUrl)\n };\n });\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n * Content protection nodes\n * @return {Object}\n * Object containing pssh data by key system\n */\n\nconst generateKeySystemInformation = contentProtectionNodes => {\n return contentProtectionNodes.reduce((acc, node) => {\n const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n if (attributes.schemeIdUri) {\n attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n }\n\n const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n if (keySystem) {\n acc[keySystem] = {\n attributes\n };\n const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n if (psshNode) {\n const pssh = getContent(psshNode);\n acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n }\n }\n\n return acc;\n }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n // 608 captions\n if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n let channel;\n let language; // default language to value\n\n language = value;\n\n if (/^CC\\d=/.test(value)) {\n [channel, language] = value.split('=');\n } else if (/^CC\\d$/.test(value)) {\n channel = value;\n }\n\n return {\n channel,\n language\n };\n });\n } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return values.map(value => {\n const flags = {\n // service or channel number 1-63\n 'channel': undefined,\n // language is a 3ALPHA per ISO 639.2/B\n // field is required\n 'language': undefined,\n // BIT 1/0 or ?\n // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n 'aspectRatio': 1,\n // BIT 1/0\n // easy reader flag indicated the text is tailed to the needs of beginning readers\n // default 0, or off\n 'easyReader': 0,\n // BIT 1/0\n // If 3d metadata is present (CEA-708.1) then 1\n // default 0\n '3D': 0\n };\n\n if (/=/.test(value)) {\n const [channel, opts = ''] = value.split('=');\n flags.channel = channel;\n flags.language = value;\n opts.split(',').forEach(opt => {\n const [name, val] = opt.split(':');\n\n if (name === 'lang') {\n flags.language = val; // er for easyReadery\n } else if (name === 'er') {\n flags.easyReader = Number(val); // war for wide aspect ratio\n } else if (name === 'war') {\n flags.aspectRatio = Number(val);\n } else if (name === '3D') {\n flags['3D'] = Number(val);\n }\n });\n } else {\n flags.language = value;\n }\n\n if (flags.channel) {\n flags.channel = 'SERVICE' + flags.channel;\n }\n\n return flags;\n });\n }\n};\n/**\n * A map callback that will parse all event stream data for a collection of periods\n * DASH ISO_IEC_23009 5.10.2.2\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n *\n * @param {PeriodInformation} period object containing necessary period information\n * @return a collection of parsed eventstream event objects\n */\n\nconst toEventStream = period => {\n // get and flatten all EventStreams tags and parse attributes and children\n return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n const eventStreamAttributes = parseAttributes(eventStream);\n const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n return findChildren(eventStream, 'Event').map(event => {\n const eventAttributes = parseAttributes(event);\n const presentationTime = eventAttributes.presentationTime || 0;\n const timescale = eventStreamAttributes.timescale || 1;\n const duration = eventAttributes.duration || 0;\n const start = presentationTime / timescale + period.attributes.start;\n return {\n schemeIdUri,\n value: eventStreamAttributes.value,\n id: eventAttributes.id,\n start,\n end: start + duration / timescale,\n messageData: getContent(event) || eventAttributes.messageData,\n contentEncoding: eventStreamAttributes.contentEncoding,\n presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n };\n });\n }));\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n * AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n * Contains attributes inherited by the Period\n * @param {Object[]} periodBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the Period\n * @param {string[]} periodSegmentInfo\n * Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n * Callback map function\n */\n\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n const adaptationSetAttributes = parseAttributes(adaptationSet);\n const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n const role = findChildren(adaptationSet, 'Role')[0];\n const roleAttributes = {\n role: parseAttributes(role)\n };\n let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n if (captionServices) {\n attrs = merge(attrs, {\n captionServices\n });\n }\n\n const label = findChildren(adaptationSet, 'Label')[0];\n\n if (label && label.childNodes.length) {\n const labelVal = label.childNodes[0].nodeValue.trim();\n attrs = merge(attrs, {\n label: labelVal\n });\n }\n\n const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n if (Object.keys(contentProtection).length) {\n attrs = merge(attrs, {\n contentProtection\n });\n }\n\n const segmentInfo = getSegmentInformation(adaptationSet);\n const representations = findChildren(adaptationSet, 'Representation');\n const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n * Period node from the mpd\n * @property {Object} period.attributes\n * Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n * Period object containing necessary period information\n * @param {number} periodStart\n * Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n * Contains attributes inherited by the mpd\n * @param {Object[]} mpdBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the mpd\n * @return {toAdaptationSetsCallback}\n * Callback map function\n */\n\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n const periodAttributes = merge(mpdAttributes, {\n periodStart: period.attributes.start\n });\n\n if (typeof period.attributes.duration === 'number') {\n periodAttributes.periodDuration = period.attributes.duration;\n }\n\n const adaptationSets = findChildren(period.node, 'AdaptationSet');\n const periodSegmentInfo = getSegmentInformation(period.node);\n return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n};\n/**\n * Tranforms an array of content steering nodes into an object\n * containing CDN content steering information from the MPD manifest.\n *\n * For more information on the DASH spec for Content Steering parsing, see:\n * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {Node[]} contentSteeringNodes\n * Content steering nodes\n * @param {Function} eventHandler\n * The event handler passed into the parser options to handle warnings\n * @return {Object}\n * Object containing content steering data\n */\n\nconst generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => {\n // If there are more than one ContentSteering tags, throw an error\n if (contentSteeringNodes.length > 1) {\n eventHandler({\n type: 'warn',\n message: 'The MPD manifest should contain no more than one ContentSteering tag'\n });\n } // Return a null value if there are no ContentSteering tags\n\n\n if (!contentSteeringNodes.length) {\n return null;\n }\n\n const infoFromContentSteeringTag = merge({\n serverURL: getContent(contentSteeringNodes[0])\n }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n // to `false` if it doesn't exist\n\n infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n return infoFromContentSteeringTag;\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n * Options object\n * @param {Object} options.attributes\n * Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n * Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n * The MPD@type these periods came from\n * @return {number|null}\n * The period start, or null if it's an early available period or error\n */\n\nconst getPeriodStart = ({\n attributes,\n priorPeriodAttributes,\n mpdType\n}) => {\n // Summary of period start time calculation from DASH spec section 5.3.2.1\n //\n // A period's start is the first period's start + time elapsed after playing all\n // prior periods to this one. Periods continue one after the other in time (without\n // gaps) until the end of the presentation.\n //\n // The value of Period@start should be:\n // 1. if Period@start is present: value of Period@start\n // 2. if previous period exists and it has @duration: previous Period@start +\n // previous Period@duration\n // 3. if this is first period and MPD@type is 'static': 0\n // 4. in all other cases, consider the period an \"early available period\" (note: not\n // currently supported)\n // (1)\n if (typeof attributes.start === 'number') {\n return attributes.start;\n } // (2)\n\n\n if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n } // (3)\n\n\n if (!priorPeriodAttributes && mpdType === 'static') {\n return 0;\n } // (4)\n // There is currently no logic for calculating the Period@start value if there is\n // no Period@start or prior Period@start and Period@duration available. This is not made\n // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n // nothing about any other resolution strategies, it's implied. Thus, this case should\n // be considered an early available period, or error, and null should suffice for both\n // of those cases.\n\n\n return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n * The root node of the mpd\n * @param {Object} options\n * Available options for inheritAttributes\n * @param {string} options.manifestUri\n * The uri source of the mpd\n * @param {number} options.NOW\n * Current time per DASH IOP. Default is current time in ms since epoch\n * @param {number} options.clientOffset\n * Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n * List of objects containing Representation information\n */\n\nconst inheritAttributes = (mpd, options = {}) => {\n const {\n manifestUri = '',\n NOW = Date.now(),\n clientOffset = 0,\n // TODO: For now, we are expecting an eventHandler callback function\n // to be passed into the mpd parser as an option.\n // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n // This will support new features including a standardized event handler.\n // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n eventHandler = function () {}\n } = options;\n const periodNodes = findChildren(mpd, 'Period');\n\n if (!periodNodes.length) {\n throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n }\n\n const locations = findChildren(mpd, 'Location');\n const mpdAttributes = parseAttributes(mpd);\n const mpdBaseUrls = buildBaseUrls([{\n baseUrl: manifestUri\n }], findChildren(mpd, 'BaseURL'));\n const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n mpdAttributes.type = mpdAttributes.type || 'static';\n mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n mpdAttributes.NOW = NOW;\n mpdAttributes.clientOffset = clientOffset;\n\n if (locations.length) {\n mpdAttributes.locations = locations.map(getContent);\n }\n\n const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n // adding properties that require looking at prior periods is to parse attributes and add\n // missing ones before toAdaptationSets is called. If more such properties are added, it\n // may be better to refactor toAdaptationSets.\n\n periodNodes.forEach((node, index) => {\n const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n // for this period.\n\n const priorPeriod = periods[index - 1];\n attributes.start = getPeriodStart({\n attributes,\n priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n mpdType: mpdAttributes.type\n });\n periods.push({\n node,\n attributes\n });\n });\n return {\n locations: mpdAttributes.locations,\n contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n // TODO: There are occurences where this `representationInfo` array contains undesired\n // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n // parent BaseURL and a child BaseURL, and the value does not resolve,\n // we end up returning the child BaseURL multiple times.\n // We need to determine a way to remove these duplicates in a safe way.\n // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n eventStream: flatten(periods.map(toEventStream))\n };\n};\n\nconst stringToMpdXml = manifestString => {\n if (manifestString === '') {\n throw new Error(errors.DASH_EMPTY_MANIFEST);\n }\n\n const parser = new DOMParser();\n let xml;\n let mpd;\n\n try {\n xml = parser.parseFromString(manifestString, 'application/xml');\n mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n } catch (e) {// ie 11 throws on invalid xml\n }\n\n if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n throw new Error(errors.DASH_INVALID_XML);\n }\n\n return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nconst parseUTCTimingScheme = mpd => {\n const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n if (!UTCTimingNode) {\n return null;\n }\n\n const attributes = parseAttributes(UTCTimingNode);\n\n switch (attributes.schemeIdUri) {\n case 'urn:mpeg:dash:utc:http-head:2014':\n case 'urn:mpeg:dash:utc:http-head:2012':\n attributes.method = 'HEAD';\n break;\n\n case 'urn:mpeg:dash:utc:http-xsdate:2014':\n case 'urn:mpeg:dash:utc:http-iso:2014':\n case 'urn:mpeg:dash:utc:http-xsdate:2012':\n case 'urn:mpeg:dash:utc:http-iso:2012':\n attributes.method = 'GET';\n break;\n\n case 'urn:mpeg:dash:utc:direct:2014':\n case 'urn:mpeg:dash:utc:direct:2012':\n attributes.method = 'DIRECT';\n attributes.value = Date.parse(attributes.value);\n break;\n\n case 'urn:mpeg:dash:utc:http-ntp:2014':\n case 'urn:mpeg:dash:utc:ntp:2014':\n case 'urn:mpeg:dash:utc:sntp:2014':\n default:\n throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n }\n\n return attributes;\n};\n\nconst VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nconst parse = (manifestString, options = {}) => {\n const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n const playlists = toPlaylists(parsedManifestInfo.representationInfo);\n return toM3u8({\n dashPlaylists: playlists,\n locations: parsedManifestInfo.locations,\n contentSteering: parsedManifestInfo.contentSteeringInfo,\n sidxMapping: options.sidxMapping,\n previousManifest: options.previousManifest,\n eventStream: parsedManifestInfo.eventStream\n });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n","'use strict'\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n","var conventions = require(\"./conventions\");\nvar dom = require('./dom')\nvar entities = require('./entities');\nvar sax = require('./sax');\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.replace(/[\\r\\u0085\\u2028]/g, '\\n')\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax = new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n\tstartDocument : function() {\n \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n \tif (this.locator) {\n \tthis.doc.documentURI = this.locator.systemId;\n \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t var el = doc.createElementNS(namespaceURI, qName||localName);\n\t var len = attrs.length;\n\t appendElement(this, el);\n\t this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t for (var i = 0 ; i < len; i++) {\n\t var namespaceURI = attrs.getURI(i);\n\t var value = attrs.getValue(i);\n\t var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t var ins = this.doc.createProcessingInstruction(target, data);\n\t this.locator && position(this.locator,ins)\n\t appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t if(this.locator = locator){// && !('lineNumber' in locator)){\n\t \tlocator.lineNumber = 0;\n\t }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t var comm = this.doc.createComment(chars);\n\t this.locator && position(this.locator,comm)\n\t appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t //used in characters() methods\n\t this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t if (impl && impl.createDocumentType) {\n\t var dt = impl.createDocumentType(name, publicId, systemId);\n\t this.locator && position(this.locator,dt)\n\t appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n * #comment(chars, start, length)\n * #startCDATA()\n * #endCDATA()\n * #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n * #endDTD()\n * #startEntity(name)\n * #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n * #elementDecl(name, model)\n * #externalEntityDecl(name, publicId, systemId)\n * #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n * #resolveEntity(String name,String publicId,String baseURI,String systemId)\n * #resolveEntity(publicId, systemId)\n * #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n * #notationDecl(name, publicId, systemId) {};\n * #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n}//appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;\n","var conventions = require(\"./conventions\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record} current\n * @param {string} element\n * @returns {Record}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\nvar ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\nvar TEXT_NODE = NodeType.TEXT_NODE = 3;\nvar CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\nvar ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\nvar ENTITY_NODE = NodeType.ENTITY_NODE = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE = NodeType.COMMENT_NODE = 8;\nvar DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\nvar NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR \t= ExceptionCode.INVALID_STATE_ERR \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR \t= ExceptionCode.SYNTAX_ERR \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR \t= ExceptionCode.NAMESPACE_ERR \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR \t= ExceptionCode.INVALID_ACCESS_ERR \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index unsigned long\n\t * Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI, qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n // Introduced in DOM Level 2:\n hasAttributes:function(){\n \treturn this.attributes.length>0;\n },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n lookupPrefix:function(namespaceURI){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n lookupNamespaceURI:function(prefix){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n \t\t\t\treturn map[prefix] ;\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n isDefaultNamespace:function(namespaceURI){\n \tvar prefix = this.lookupPrefix(namespaceURI);\n \treturn prefix == null;\n }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '<' ||\n c == '>' && '>' ||\n c == '&' && '&' ||\n c == '\"' && '"' ||\n '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n }while(node=node.nextSibling)\n }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName : '#document',\n\tnodeType : DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype : null,\n\tdocumentElement : null,\n\t_inc : 1,\n\n\tinsertBefore : function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild : function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&` and `<` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" > \", and must, for compatibility,\n\t\t * be escaped using either `>` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n","var dom = require('./dom')\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = require('./dom-parser').DOMParser\n","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4] \tNameStartChar\t ::= \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a] \tNameChar\t ::= \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5] \tName\t ::= \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t \t\t\tdoc.appendChild(text);\n\t \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t \t\tend = tagStart+1+tagName.length;\n\t \t}else if(tagName.match(/\\s\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退,有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName = el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart = source.indexOf('',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos = source.lastIndexOf('')\n\t\tif(pos',start+4);\n\t\t\t//append comment source.substring(4,end)//';\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parsing fields [ID3v2.4.0 section 4.14.]\n\n mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (mimeTypeEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Mime type field (terminated with \\0)\n\n frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n frame.pictureType = frame.data[i];\n i++;\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (descriptionEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Description field (terminated with \\0)\n\n frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n i = descriptionEndIndex + 1;\n if (frame.mimeType === LINK_MIME_TYPE) {\n // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n } else {\n // parsing Picture Data field as binary data\n frame.pictureData = frame.data.subarray(i, frame.data.length);\n }\n },\n 'T*': function (frame) {\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parse text field, do not include null terminator in the frame value\n // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n frame.values = frame.value.split('\\0');\n },\n 'TXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the text fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n // frames that allow different types of encoding contain terminated text\n // [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n frame.data = frame.value;\n },\n 'W*': function (frame) {\n // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n },\n 'WXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the description and URL fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information\n // should be ignored [ID3v2.4.0 section 4.3]\n\n frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n },\n 'PRIV': function (frame) {\n var i;\n for (i = 0; i < frame.data.length; i++) {\n if (frame.data[i] === 0) {\n // parse the description and URL fields\n frame.owner = parseIso88591$1(frame.data, 0, i);\n break;\n }\n }\n frame.privateData = frame.data.subarray(i + 1);\n frame.data = frame.privateData;\n }\n };\n var parseId3Frames$1 = function (data) {\n var frameSize,\n frameHeader,\n frameStart = 10,\n tagSize = 0,\n frames = []; // If we don't have enough data for a header, 10 bytes, \n // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n return;\n } // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n\n tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n var hasExtendedHeader = data[5] & 0x40;\n if (hasExtendedHeader) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n break;\n }\n frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n var frame = {\n id: frameHeader,\n data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (frameParsers[frame.id]) {\n // use frame specific parser\n frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n frameParsers['W*'](frame);\n }\n frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n return frames;\n };\n var parseId3 = {\n parseId3Frames: parseId3Frames$1,\n parseSyncSafeInteger: parseSyncSafeInteger$1,\n frameParsers: frameParsers\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n\n var Stream$5 = stream,\n StreamTypes$3 = streamTypes,\n id3 = parseId3,\n MetadataStream;\n MetadataStream = function (options) {\n var settings = {\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n this.trigger('log', {\n level: 'warn',\n message: 'Skipping unrecognized metadata packet'\n });\n return;\n } // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n this.trigger('log', {\n level: 'warn',\n message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n // to be sent along.\n\n break;\n }\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (id3.frameParsers[frame.id]) {\n // use frame specific parser\n id3.frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n id3.frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n id3.frameParsers['W*'](frame);\n } // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n this.trigger('timestamp', frame);\n }\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n };\n MetadataStream.prototype = new Stream$5();\n var metadataStream = MetadataStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$4 = stream,\n CaptionStream$1 = captionStream,\n StreamTypes$2 = streamTypes,\n TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n var MP2T_PACKET_LENGTH$1 = 188,\n // bytes\n SYNC_BYTE$1 = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n TransportPacketStream = function () {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n bytesInBuffer = 0;\n TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH$1,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH$1;\n endIndex += MP2T_PACKET_LENGTH$1;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n TransportPacketStream.prototype = new Stream$4();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n TransportParseStream = function () {\n var parsePsi, parsePat, parsePmt, self;\n TransportParseStream.prototype.init.call(this);\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n parsePsi = function (payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n parsePat = function (payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n parsePmt = function (payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n TransportParseStream.prototype = new Stream$4();\n TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n ElementaryStream = function () {\n var self = this,\n segmentHadPmt = false,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function (payload, pes) {\n var ptsDtsFlags;\n const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n // that are frame data that is continuing from the previous fragment. This\n // is to check that the pes data is the start of a new pes payload\n\n if (startPrefix !== 1) {\n return;\n } // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function (stream, type, forceFlush) {\n var packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream.data.length || stream.size < 9) {\n return;\n }\n event.trackId = stream.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream.data.length; i++) {\n fragment = stream.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream.size = 0;\n stream.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n this.push = function (data) {\n ({\n pat: function () {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function () {\n var stream, streamType;\n switch (data.streamType) {\n case StreamTypes$2.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes$2.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes$2.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function () {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n segmentHadPmt = true;\n self.trigger('data', event);\n }\n })[data.type]();\n };\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n this.flush = function () {\n // if on flush we haven't had a pmt emitted\n // and we have a pmt to emit. emit the pmt\n // so that we trigger a trackinfo downstream.\n if (!segmentHadPmt && programMapTable) {\n var pmt = {\n type: 'metadata',\n tracks: []\n }; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n self.trigger('data', pmt);\n }\n segmentHadPmt = false;\n this.flushStreams_();\n this.trigger('done');\n };\n };\n ElementaryStream.prototype = new Stream$4();\n var m2ts$1 = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n TransportPacketStream: TransportPacketStream,\n TransportParseStream: TransportParseStream,\n ElementaryStream: ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream$1.CaptionStream,\n Cea608Stream: CaptionStream$1.Cea608Stream,\n Cea708Stream: CaptionStream$1.Cea708Stream,\n MetadataStream: metadataStream\n };\n for (var type in StreamTypes$2) {\n if (StreamTypes$2.hasOwnProperty(type)) {\n m2ts$1[type] = StreamTypes$2[type];\n }\n }\n var m2ts_1 = m2ts$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$3 = stream;\n var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n var AdtsStream$1;\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n AdtsStream$1 = function (handlePartialSegments) {\n var buffer,\n frameNum = 0;\n AdtsStream$1.prototype.init.call(this);\n this.skipWarn_ = function (start, end) {\n this.trigger('log', {\n level: 'warn',\n message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n });\n };\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n if (buffer && buffer.length) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n var skip; // We use i + 7 here because we want to be able to parse the entire header.\n // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n while (i + 7 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n if (typeof skip !== 'number') {\n skip = i;\n } // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n\n i++;\n continue;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n // NOTE: frame length includes the size of the header\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n // then we have to wait for more data\n\n if (buffer.byteLength - i < frameLength) {\n break;\n } // Otherwise, deliver the complete AAC frame\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n // data is the frame without it's header\n data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n });\n frameNum++;\n i += frameLength;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // remove processed bytes from the buffer.\n\n buffer = buffer.subarray(i);\n };\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n AdtsStream$1.prototype = new Stream$3();\n var adts = AdtsStream$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb$1;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb$1 = function (workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n return valu;\n }; // ():uint\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n this.loadWord();\n };\n var expGolomb = ExpGolomb$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$2 = stream;\n var ExpGolomb = expGolomb;\n var H264Stream$1, NalByteStream;\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n NalByteStream = function () {\n var syncPoint = 0,\n i,\n buffer;\n NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n this.push = function (data) {\n var swapBuffer;\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n // TODO: the three profiles below don't\n // appear to have sps data in the specificiation anymore?\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n H264Stream$1 = function () {\n var nalByteStream = new NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n H264Stream$1.prototype.init.call(this);\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data,\n nalUnitTypeCode: data[0] & 0x1f\n };\n switch (event.nalUnitTypeCode) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n } // This triggers data on the H264Stream\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n this.flush = function () {\n nalByteStream.flush();\n };\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n this.reset = function () {\n nalByteStream.reset();\n };\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n skipScalingList = function (count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n discardEmulationPreventionBytes = function (data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n readSequenceParameterSet = function (data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio = [1, 1],\n aspectRatioIdc,\n i;\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n case 2:\n sarRatio = [12, 11];\n break;\n case 3:\n sarRatio = [10, 11];\n break;\n case 4:\n sarRatio = [16, 11];\n break;\n case 5:\n sarRatio = [40, 33];\n break;\n case 6:\n sarRatio = [24, 11];\n break;\n case 7:\n sarRatio = [20, 11];\n break;\n case 8:\n sarRatio = [32, 11];\n break;\n case 9:\n sarRatio = [80, 33];\n break;\n case 10:\n sarRatio = [18, 11];\n break;\n case 11:\n sarRatio = [15, 11];\n break;\n case 12:\n sarRatio = [64, 33];\n break;\n case 13:\n sarRatio = [160, 99];\n break;\n case 14:\n sarRatio = [4, 3];\n break;\n case 15:\n sarRatio = [3, 2];\n break;\n case 16:\n sarRatio = [2, 1];\n break;\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n if (sarRatio) {\n sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n // sar is sample aspect ratio\n sarRatio: sarRatio\n };\n };\n };\n H264Stream$1.prototype = new Stream$2();\n var h264 = {\n H264Stream: H264Stream$1,\n NalByteStream: NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n var parseId3TagSize = function (header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n returnSize = returnSize >= 0 ? returnSize : 0;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n var getId3Offset = function (data, offset) {\n if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n return offset;\n }\n offset += parseId3TagSize(data, offset);\n return getId3Offset(data, offset);\n }; // TODO: use vhs-utils\n\n var isLikelyAacData$1 = function (data) {\n var offset = getId3Offset(data, 0);\n return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n // verify that the 2 layer bits are 0, aka this\n // is not mp3 data but aac data.\n (data[offset + 1] & 0x16) === 0x10;\n };\n var parseSyncSafeInteger = function (data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n var percentEncode = function (bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n var parseIso88591 = function (bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n };\n\n var parseAdtsSize = function (header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n var parseType$4 = function (header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n return null;\n };\n var parseSampleRate = function (packet) {\n var i = 0;\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n return null;\n };\n var parseAacTimestamp = function (packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return null;\n }\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n break;\n }\n }\n }\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n return null;\n };\n var utils = {\n isLikelyAacData: isLikelyAacData$1,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType$4,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$1 = stream;\n var aacUtils = utils; // Constants\n\n var AacStream$1;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n AacStream$1 = function () {\n var everything = new Uint8Array(),\n timeStamp = 0;\n AacStream$1.prototype.init.call(this);\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n AacStream$1.prototype = new Stream$1();\n var aac = AacStream$1;\n var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var audioProperties = AUDIO_PROPERTIES$1;\n var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n var videoProperties = VIDEO_PROPERTIES$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream = stream;\n var mp4 = mp4Generator;\n var frameUtils = frameUtils$1;\n var audioFrameUtils = audioFrameUtils$1;\n var trackDecodeInfo = trackDecodeInfo$1;\n var m2ts = m2ts_1;\n var clock = clock$2;\n var AdtsStream = adts;\n var H264Stream = h264.H264Stream;\n var AacStream = aac;\n var isLikelyAacData = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n var AUDIO_PROPERTIES = audioProperties;\n var VIDEO_PROPERTIES = videoProperties; // object types\n\n var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n var retriggerForStream = function (key, event) {\n event.stream = key;\n this.trigger('log', event);\n };\n var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n var keys = Object.keys(pipeline);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i]; // skip non-stream keys and headOfPipeline\n // which is just a duplicate\n\n if (key === 'headOfPipeline' || !pipeline[key].on) {\n continue;\n }\n pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n }\n };\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n var arrayEquals = function (a, b) {\n var i;\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n AudioSegmentStream = function (track, options) {\n var adtsFrames = [],\n sequenceNumber,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n AudioSegmentStream.prototype.init.call(this);\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n adtsFrames.push(data);\n };\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts;\n };\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n segmentDuration = frames.length * frameDuration;\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n // frame info is in video clock cycles. Convert to match expectation of\n // listeners (that all timestamps will be based on video clock cycles).\n clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n // frame times are already in video clock, as is segment duration\n frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n this.trigger('timingInfo', {\n start: frames[0].pts,\n end: frames[0].pts + segmentDuration\n });\n }\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n AudioSegmentStream.prototype = new Stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n VideoSegmentStream = function (track, options) {\n var sequenceNumber,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n VideoSegmentStream.prototype.init.call(this);\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].pts,\n end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n break;\n }\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n gopIndex--;\n }\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n var trimIndex;\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n if (trimIndex === 0) {\n return gops;\n }\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n VideoSegmentStream.prototype = new Stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n CoalesceStream = function (options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.content || output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n CoalesceStream.prototype = new Stream();\n CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n Transmuxer = function (options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n Transmuxer.prototype.init.call(this);\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n return;\n }\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n };\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream(options);\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence. Do not do this if keepOriginalTimestamps is set,\n // because this is a particularly subtle form of timestamp alteration.\n if (audioTrack && !options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n }; // hook up the segment streams once track metadata is delivered\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n }\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n };\n this.getLogTrigger_ = function (key) {\n var self = this;\n return function (event) {\n event.stream = key;\n self.trigger('log', event);\n };\n }; // feed incoming data to the front of the parsing pipeline\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data);\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n Transmuxer.prototype = new Stream();\n var transmuxer = {\n Transmuxer: Transmuxer,\n VideoSegmentStream: VideoSegmentStream,\n AudioSegmentStream: AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateSegmentTimingInfo: generateSegmentTimingInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var toUnsigned$3 = function (value) {\n return value >>> 0;\n };\n var toHexString$1 = function (value) {\n return ('00' + value.toString(16)).slice(-2);\n };\n var bin = {\n toUnsigned: toUnsigned$3,\n toHexString: toHexString$1\n };\n var parseType$3 = function (buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n };\n var parseType_1 = parseType$3;\n var toUnsigned$2 = bin.toUnsigned;\n var parseType$2 = parseType_1;\n var findBox$2 = function (data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType$2(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = findBox$2(data.subarray(i + 8, end), path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = end;\n } // we've finished searching all of data\n\n return results;\n };\n var findBox_1 = findBox$2;\n var toUnsigned$1 = bin.toUnsigned;\n var getUint64$2 = numbers.getUint64;\n var tfdt = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n if (result.version === 1) {\n result.baseMediaDecodeTime = getUint64$2(data.subarray(4));\n } else {\n result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n }\n return result;\n };\n var parseTfdt$2 = tfdt;\n var parseSampleFlags$1 = function (flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n };\n var parseSampleFlags_1 = parseSampleFlags$1;\n var parseSampleFlags = parseSampleFlags_1;\n var trun = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n };\n var parseTrun$2 = trun;\n var tfhd = function (data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n return result;\n };\n var parseTfhd$2 = tfhd;\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n var CaptionStream = captionStream.CaptionStream;\n var findBox$1 = findBox_1;\n var parseTfdt$1 = parseTfdt$2;\n var parseTrun$1 = parseTrun$2;\n var parseTfhd$1 = parseTfhd$2;\n var window$2 = window_1;\n /**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var mapToSample = function (offset, samples) {\n var approximateOffset = offset;\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n if (approximateOffset < sample.size) {\n return sample;\n }\n approximateOffset -= sample.size;\n }\n return null;\n };\n /**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n var findSeiNals = function (avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = {\n logs: [],\n seiNals: []\n },\n seiNal,\n i,\n length,\n lastMatchedSample;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else if (lastMatchedSample) {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n } else {\n result.logs.push({\n level: 'warn',\n message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n });\n break;\n }\n result.seiNals.push(seiNal);\n break;\n }\n }\n return result;\n };\n /**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array} truns - The Trun Run boxes to be parsed\n * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var parseSamples = function (truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = parseTrun$1(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n sample.trackId = trackId;\n sample.dts = currentDts;\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n if (typeof currentDts === 'bigint') {\n sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset);\n currentDts += window$2.BigInt(sample.duration);\n } else {\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n }\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n };\n /**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n var parseCaptionNals = function (segment, videoTrackId) {\n // To get the samples\n var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = findBox$1(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = parseTfhd$1(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = findBox$1(traf, ['trun']);\n var samples;\n var result; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n result = findSeiNals(mdat, samples, trackId);\n if (!captionNals[trackId]) {\n captionNals[trackId] = {\n seiNals: [],\n logs: []\n };\n }\n captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n }\n });\n return captionNals;\n };\n /**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n **/\n\n var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n captionNals = parseCaptionNals(segment, trackId);\n var trackNals = captionNals[trackId] || {};\n return {\n seiNals: trackNals.seiNals,\n logs: trackNals.logs,\n timescale: timescale\n };\n };\n /**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n var CaptionParser = function () {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n captionStream.on('log', function (log) {\n parsedCaptions.logs.push(log);\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n if (parsedData && parsedData.logs) {\n parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n }\n if (parsedData === null || !parsedData.seiNals) {\n if (parsedCaptions.logs.length) {\n return {\n logs: parsedCaptions.logs,\n captions: [],\n captionStreams: []\n };\n }\n return null;\n }\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n parsedCaptions.logs = [];\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {},\n logs: []\n };\n } else {\n this.clearParsedCaptions();\n }\n this.resetCaptionStream();\n };\n this.reset();\n };\n var captionParser = CaptionParser;\n /**\n * Returns the first string in the data array ending with a null char '\\0'\n * @param {UInt8} data \n * @returns the string with the null char\n */\n\n var uint8ToCString$1 = function (data) {\n var index = 0;\n var curChar = String.fromCharCode(data[index]);\n var retString = '';\n while (curChar !== '\\0') {\n retString += curChar;\n index++;\n curChar = String.fromCharCode(data[index]);\n } // Add nullChar\n\n retString += curChar;\n return retString;\n };\n var string = {\n uint8ToCString: uint8ToCString$1\n };\n var uint8ToCString = string.uint8ToCString;\n var getUint64$1 = numbers.getUint64;\n /**\n * Based on: ISO/IEC 23009 Section: 5.10.3.3\n * References:\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n * https://aomediacodec.github.io/id3-emsg/\n * \n * Takes emsg box data as a uint8 array and returns a emsg box object\n * @param {UInt8Array} boxData data from emsg box\n * @returns A parsed emsg box object\n */\n\n var parseEmsgBox = function (boxData) {\n // version + flags\n var offset = 4;\n var version = boxData[0];\n var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n if (version === 0) {\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time_delta = dv.getUint32(offset);\n offset += 4;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n } else if (version === 1) {\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time = getUint64$1(boxData.subarray(offset));\n offset += 8;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n }\n message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n var emsgBox = {\n scheme_id_uri,\n value,\n // if timescale is undefined or 0 set to 1 \n timescale: timescale ? timescale : 1,\n presentation_time,\n presentation_time_delta,\n event_duration,\n id,\n message_data\n };\n return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n };\n /**\n * Scales a presentation time or time delta with an offset with a provided timescale\n * @param {number} presentationTime \n * @param {number} timescale \n * @param {number} timeDelta \n * @param {number} offset \n * @returns the scaled time as a number\n */\n\n var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n };\n /**\n * Checks the emsg box data for validity based on the version\n * @param {number} version of the emsg box to validate\n * @param {Object} emsg the emsg data to validate\n * @returns if the box is valid as a boolean\n */\n\n var isValidEmsgBox = function (version, emsg) {\n var hasScheme = emsg.scheme_id_uri !== '\\0';\n var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n return !(version > 1) && isValidV0Box || isValidV1Box;\n }; // Utility function to check if an object is defined\n\n var isDefined = function (data) {\n return data !== undefined || data !== null;\n };\n var emsg$1 = {\n parseEmsgBox: parseEmsgBox,\n scaleTime: scaleTime\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n\n var toUnsigned = bin.toUnsigned;\n var toHexString = bin.toHexString;\n var findBox = findBox_1;\n var parseType$1 = parseType_1;\n var emsg = emsg$1;\n var parseTfhd = parseTfhd$2;\n var parseTrun = parseTrun$2;\n var parseTfdt = parseTfdt$2;\n var getUint64 = numbers.getUint64;\n var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3;\n var window$1 = window_1;\n var parseId3Frames = parseId3.parseId3Frames;\n /**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n timescale = function (init) {\n var result = {},\n traks = findBox(init, ['moov', 'trak']); // mdhd timescale\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = findBox(trak, ['tkhd'])[0];\n if (!tkhd) {\n return null;\n }\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (!mdhd) {\n return null;\n }\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n };\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n startTime = function (timescale, fragment) {\n var trafs; // we need info from two childrend of each track fragment box\n\n trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n var lowestTime = trafs.reduce(function (acc, traf) {\n var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n var tfdt = findBox(traf, ['tfdt'])[0];\n var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n var baseTime; // version 1 is 64 bit\n\n if (tfdt[0] === 1) {\n baseTime = getUint64(tfdt.subarray(4, 12));\n } else {\n baseTime = dv.getUint32(4);\n } // convert base time to seconds if it is a valid number.\n\n let seconds;\n if (typeof baseTime === 'bigint') {\n seconds = baseTime / window$1.BigInt(scale);\n } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n seconds = baseTime / scale;\n }\n if (seconds < Number.MAX_SAFE_INTEGER) {\n seconds = Number(seconds);\n }\n if (seconds < acc) {\n acc = seconds;\n }\n return acc;\n }, Infinity);\n return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n };\n /**\n * Determine the composition start, in seconds, for an MP4\n * fragment.\n *\n * The composition start time of a fragment can be calculated using the base\n * media decode time, composition time offset, and timescale, as follows:\n *\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n *\n * All of the aforementioned information is contained within a media fragment's\n * `traf` box, except for timescale info, which comes from the initialization\n * segment, so a track id (also contained within a `traf`) is also necessary to\n * associate it with a timescale\n *\n *\n * @param timescales {object} - a hash of track ids to timescale values.\n * @param fragment {Unit8Array} - the bytes of a media segment\n * @return {number} the composition start time for the fragment, in seconds\n **/\n\n compositionStartTime = function (timescales, fragment) {\n var trafBoxes = findBox(fragment, ['moof', 'traf']);\n var baseMediaDecodeTime = 0;\n var compositionTimeOffset = 0;\n var trackId;\n if (trafBoxes && trafBoxes.length) {\n // The spec states that track run samples contained within a `traf` box are contiguous, but\n // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n // We will assume that they are, so we only need the first to calculate start time.\n var tfhd = findBox(trafBoxes[0], ['tfhd'])[0];\n var trun = findBox(trafBoxes[0], ['trun'])[0];\n var tfdt = findBox(trafBoxes[0], ['tfdt'])[0];\n if (tfhd) {\n var parsedTfhd = parseTfhd(tfhd);\n trackId = parsedTfhd.trackId;\n }\n if (tfdt) {\n var parsedTfdt = parseTfdt(tfdt);\n baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n }\n if (trun) {\n var parsedTrun = parseTrun(trun);\n if (parsedTrun.samples && parsedTrun.samples.length) {\n compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n }\n }\n } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n // specified.\n\n var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n if (typeof baseMediaDecodeTime === 'bigint') {\n compositionTimeOffset = window$1.BigInt(compositionTimeOffset);\n timescale = window$1.BigInt(timescale);\n }\n var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n result = Number(result);\n }\n return result;\n };\n /**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n getVideoTrackIds = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = findBox(trak, ['mdia', 'hdlr']);\n var tkhds = findBox(trak, ['tkhd']);\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType$1(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n };\n getTimescaleFromMediaHeader = function (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n };\n /**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n getTracks = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n var tkhd = findBox(trak, ['tkhd'])[0];\n var view, tkhdVersion; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n tkhdVersion = view.getUint8(0);\n track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n if (hdlr) {\n var type = parseType$1(hdlr.subarray(8, 12));\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n var codecBox = findBox(sampleDescriptions, [track.codec])[0];\n var codecConfig, codecConfigType;\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {\n // flac, opus, etc\n track.codec = track.codec.toLowerCase();\n }\n }\n }\n var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n track.timescale = getTimescaleFromMediaHeader(mdhd);\n }\n tracks.push(track);\n });\n return tracks;\n };\n /**\n * Returns an array of emsg ID3 data from the provided segmentData.\n * An offset can also be provided as the Latest Arrival Time to calculate \n * the Event Start Time of v0 EMSG boxes. \n * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n * \n * @param {Uint8Array} segmentData the segment byte array.\n * @param {number} offset the segment start time or Latest Arrival Time, \n * @return {Object[]} an array of ID3 parsed from EMSG boxes\n */\n\n getEmsgID3 = function (segmentData, offset = 0) {\n var emsgBoxes = findBox(segmentData, ['emsg']);\n return emsgBoxes.map(data => {\n var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n return {\n cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n frames: parsedId3Frames\n };\n });\n };\n var probe$2 = {\n // export mp4 inspector's findBox and parseType for backwards compatibility\n findBox: findBox,\n parseType: parseType$1,\n timescale: timescale,\n startTime: startTime,\n compositionStartTime: compositionStartTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks,\n getTimescaleFromMediaHeader: getTimescaleFromMediaHeader,\n getEmsgID3: getEmsgID3\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n\n var StreamTypes$1 = streamTypes;\n var parsePid = function (packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n };\n var parsePayloadUnitStartIndicator = function (packet) {\n return !!(packet[1] & 0x40);\n };\n var parseAdaptionField = function (packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n return offset;\n };\n var parseType = function (packet, pmtPid) {\n var pid = parsePid(packet);\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n return null;\n };\n var parsePat = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n if (pusi) {\n offset += packet[offset] + 1;\n }\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n };\n var parsePmt = function (packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n return programMapTable;\n };\n var parsePesType = function (packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n switch (type) {\n case StreamTypes$1.H264_STREAM_TYPE:\n return 'video';\n case StreamTypes$1.ADTS_STREAM_TYPE:\n return 'audio';\n case StreamTypes$1.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n default:\n return null;\n }\n };\n var parsePesTime = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n if (!pusi) {\n return null;\n }\n var offset = 4 + parseAdaptionField(packet);\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n\n return pes;\n };\n var parseNalUnitType = function (type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n case 0x06:\n return 'sei_rbsp';\n case 0x07:\n return 'seq_parameter_set_rbsp';\n case 0x08:\n return 'pic_parameter_set_rbsp';\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n default:\n return null;\n }\n };\n var videoPacketContainsKeyFrame = function (packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n return foundKeyFrame;\n };\n var probe$1 = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n\n var StreamTypes = streamTypes;\n var handleRollover = timestampRolloverStream.handleRollover;\n var probe = {};\n probe.ts = probe$1;\n probe.aac = utils;\n var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\n var parsePsi_ = function (bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pat':\n pmt.pid = probe.ts.parsePat(packet);\n break;\n case 'pmt':\n var table = probe.ts.parsePmt(packet);\n pmt.table = pmt.table || {};\n Object.keys(table).forEach(function (key) {\n pmt.table[key] = table[key];\n });\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n var parseAudioPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n var parseVideoPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n currentFrame.size = 0;\n }\n }\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n break;\n }\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n }\n }\n };\n /**\n * inspects the aac data stream for start and end time information\n */\n\n var inspectAac_ = function (bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n byteIndex += frameSize;\n break;\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n audioCount++;\n byteIndex += frameSize;\n break;\n default:\n byteIndex++;\n break;\n }\n if (endLoop) {\n return null;\n }\n }\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n };\n /**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n var inspectTs_ = function (bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n if (result.video.length === 0) {\n delete result.video;\n }\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n if (result.audio.length === 0) {\n delete result.audio;\n }\n break;\n }\n }\n }\n return result;\n };\n /**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n var inspect = function (bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n if (!result || !result.audio && !result.video) {\n return null;\n }\n adjustTimestamp_(result, baseTimestamp);\n return result;\n };\n var tsInspector = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n };\n /* global self */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n const wireTransmuxerEvents = function (self, transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n const initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n const typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n transmuxer.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo\n });\n });\n transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n const videoSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo\n });\n });\n transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n const audioSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'audioSegmentTimingInfo',\n audioSegmentTimingInfo\n });\n });\n transmuxer.on('id3Frame', function (id3Frame) {\n self.postMessage({\n action: 'id3Frame',\n id3Frame\n });\n });\n transmuxer.on('caption', function (caption) {\n self.postMessage({\n action: 'caption',\n caption\n });\n });\n transmuxer.on('trackinfo', function (trackInfo) {\n self.postMessage({\n action: 'trackinfo',\n trackInfo\n });\n });\n transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n // convert to video TS since we prioritize video time over audio\n self.postMessage({\n action: 'audioTimingInfo',\n audioTimingInfo: {\n start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n }\n });\n });\n transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n self.postMessage({\n action: 'videoTimingInfo',\n videoTimingInfo: {\n start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n }\n });\n });\n transmuxer.on('log', function (log) {\n self.postMessage({\n action: 'log',\n log\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\n class MessageHandlers {\n constructor(self, options) {\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n\n init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n pushMp4Captions(data) {\n if (!this.captionParser) {\n this.captionParser = new captionParser();\n this.captionParser.init();\n }\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n this.self.postMessage({\n action: 'mp4Captions',\n captions: parsed && parsed.captions || [],\n logs: parsed && parsed.logs || [],\n data: segment.buffer\n }, [segment.buffer]);\n }\n probeMp4StartTime({\n timescales,\n data\n }) {\n const startTime = probe$2.startTime(timescales, data);\n this.self.postMessage({\n action: 'probeMp4StartTime',\n startTime,\n data\n }, [data.buffer]);\n }\n probeMp4Tracks({\n data\n }) {\n const tracks = probe$2.tracks(data);\n this.self.postMessage({\n action: 'probeMp4Tracks',\n tracks,\n data\n }, [data.buffer]);\n }\n /**\n * Probes an mp4 segment for EMSG boxes containing ID3 data.\n * https://aomediacodec.github.io/id3-emsg/\n *\n * @param {Uint8Array} data segment data\n * @param {number} offset segment start time\n * @return {Object[]} an array of ID3 frames\n */\n\n probeEmsgID3({\n data,\n offset\n }) {\n const id3Frames = probe$2.getEmsgID3(data, offset);\n this.self.postMessage({\n action: 'probeEmsgID3',\n id3Frames,\n emsgData: data\n }, [data.buffer]);\n }\n /**\n * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n * internal \"media time,\" as well as whether it contains video and/or audio.\n *\n * @private\n * @param {Uint8Array} bytes - segment bytes\n * @param {number} baseStartTime\n * Relative reference timestamp used when adjusting frame timestamps for rollover.\n * This value should be in seconds, as it's converted to a 90khz clock within the\n * function body.\n * @return {Object} The start time of the current segment in \"media time\" as well as\n * whether it contains video and/or audio\n */\n\n probeTs({\n data,\n baseStartTime\n }) {\n const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n const timeInfo = tsInspector.inspect(data, tsStartTime);\n let result = null;\n if (timeInfo) {\n result = {\n // each type's time info comes back as an array of 2 times, start and end\n hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n };\n if (result.hasVideo) {\n result.videoStart = timeInfo.video[0].ptsTime;\n }\n if (result.hasAudio) {\n result.audioStart = timeInfo.audio[0].ptsTime;\n }\n }\n this.self.postMessage({\n action: 'probeTs',\n result,\n data\n }, [data.buffer]);\n }\n clearAllMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearAllCaptions();\n }\n }\n clearParsedMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearParsedCaptions();\n }\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n\n push(data) {\n // Cast array buffer to correct type for transmuxer\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n\n reset() {\n this.transmuxer.reset();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n\n setTimestampOffset(data) {\n const timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n }\n setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n }\n setRemux(data) {\n this.transmuxer.setRemux(data.remux);\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n\n flush(data) {\n this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n self.postMessage({\n action: 'done',\n type: 'transmuxed'\n });\n }\n endTimeline() {\n this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n // timelines\n\n self.postMessage({\n action: 'endedtimeline',\n type: 'transmuxed'\n });\n }\n alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }\n /**\n * Our web worker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nconst handleData_ = (event, transmuxedData, callback) => {\n const {\n type,\n initSegment,\n captions,\n captionStreams,\n metadata,\n videoFrameDtsTime,\n videoFramePtsTime\n } = event.data.segment;\n transmuxedData.buffer.push({\n captions,\n captionStreams,\n metadata\n });\n const boxes = event.data.segment.boxes || {\n data: event.data.segment.data\n };\n const result = {\n type,\n // cast ArrayBuffer to TypedArray\n data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n };\n if (typeof videoFrameDtsTime !== 'undefined') {\n result.videoFrameDtsTime = videoFrameDtsTime;\n }\n if (typeof videoFramePtsTime !== 'undefined') {\n result.videoFramePtsTime = videoFramePtsTime;\n }\n callback(result);\n};\nconst handleDone_ = ({\n transmuxedData,\n callback\n}) => {\n // Previously we only returned data on data events,\n // not on done events. Clear out the buffer to keep that consistent.\n transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n // have received\n\n callback(transmuxedData);\n};\nconst handleGopInfo_ = (event, transmuxedData) => {\n transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n const {\n transmuxer,\n bytes,\n audioAppendStart,\n gopsToAlignWith,\n remux,\n onData,\n onTrackInfo,\n onAudioTimingInfo,\n onVideoTimingInfo,\n onVideoSegmentTimingInfo,\n onAudioSegmentTimingInfo,\n onId3,\n onCaptions,\n onDone,\n onEndedTimeline,\n onTransmuxerLog,\n isEndOfTimeline\n } = options;\n const transmuxedData = {\n buffer: []\n };\n let waitForEndedTimelineEvent = isEndOfTimeline;\n const handleMessage = event => {\n if (transmuxer.currentTransmux !== options) {\n // disposed\n return;\n }\n if (event.data.action === 'data') {\n handleData_(event, transmuxedData, onData);\n }\n if (event.data.action === 'trackinfo') {\n onTrackInfo(event.data.trackInfo);\n }\n if (event.data.action === 'gopInfo') {\n handleGopInfo_(event, transmuxedData);\n }\n if (event.data.action === 'audioTimingInfo') {\n onAudioTimingInfo(event.data.audioTimingInfo);\n }\n if (event.data.action === 'videoTimingInfo') {\n onVideoTimingInfo(event.data.videoTimingInfo);\n }\n if (event.data.action === 'videoSegmentTimingInfo') {\n onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n }\n if (event.data.action === 'audioSegmentTimingInfo') {\n onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n }\n if (event.data.action === 'id3Frame') {\n onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n }\n if (event.data.action === 'caption') {\n onCaptions(event.data.caption);\n }\n if (event.data.action === 'endedtimeline') {\n waitForEndedTimelineEvent = false;\n onEndedTimeline();\n }\n if (event.data.action === 'log') {\n onTransmuxerLog(event.data.log);\n } // wait for the transmuxed event since we may have audio and video\n\n if (event.data.type !== 'transmuxed') {\n return;\n } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n // of a timeline, that means there may still be data events before the segment\n // processing can be considerred complete. In that case, the final event should be\n // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n if (waitForEndedTimelineEvent) {\n return;\n }\n transmuxer.onmessage = null;\n handleDone_({\n transmuxedData,\n callback: onDone\n });\n /* eslint-disable no-use-before-define */\n\n dequeue(transmuxer);\n /* eslint-enable */\n };\n\n transmuxer.onmessage = handleMessage;\n if (audioAppendStart) {\n transmuxer.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioAppendStart\n });\n } // allow empty arrays to be passed to clear out GOPs\n\n if (Array.isArray(gopsToAlignWith)) {\n transmuxer.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith\n });\n }\n if (typeof remux !== 'undefined') {\n transmuxer.postMessage({\n action: 'setRemux',\n remux\n });\n }\n if (bytes.byteLength) {\n const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n transmuxer.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset,\n byteLength: bytes.byteLength\n }, [buffer]);\n }\n if (isEndOfTimeline) {\n transmuxer.postMessage({\n action: 'endTimeline'\n });\n } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n // the end of the segment\n\n transmuxer.postMessage({\n action: 'flush'\n });\n};\nconst dequeue = transmuxer => {\n transmuxer.currentTransmux = null;\n if (transmuxer.transmuxQueue.length) {\n transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n if (typeof transmuxer.currentTransmux === 'function') {\n transmuxer.currentTransmux();\n } else {\n processTransmux(transmuxer.currentTransmux);\n }\n }\n};\nconst processAction = (transmuxer, action) => {\n transmuxer.postMessage({\n action\n });\n dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n if (!transmuxer.currentTransmux) {\n transmuxer.currentTransmux = action;\n processAction(transmuxer, action);\n return;\n }\n transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n if (!options.transmuxer.currentTransmux) {\n options.transmuxer.currentTransmux = options;\n processTransmux(options);\n return;\n }\n options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n const transmuxer = new TransmuxWorker();\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue = [];\n const term = transmuxer.terminate;\n transmuxer.terminate = () => {\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue.length = 0;\n return term.call(transmuxer);\n };\n transmuxer.postMessage({\n action: 'init',\n options\n });\n return transmuxer;\n};\nvar segmentTransmuxer = {\n reset,\n endTimeline,\n transmux,\n createTransmuxer\n};\nconst workerCallback = function (options) {\n const transmuxer = options.transmuxer;\n const endAction = options.endAction || options.action;\n const callback = options.callback;\n const message = _extends({}, options, {\n endAction: null,\n transmuxer: null,\n callback: null\n });\n const listenForEndEvent = event => {\n if (event.data.action !== endAction) {\n return;\n }\n transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n if (event.data.data) {\n event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n if (options.data) {\n options.data = event.data.data;\n }\n }\n callback(event.data);\n };\n transmuxer.addEventListener('message', listenForEndEvent);\n if (options.data) {\n const isArrayBuffer = options.data instanceof ArrayBuffer;\n message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n message.byteLength = options.data.byteLength;\n const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n transmuxer.postMessage(message, transfers);\n } else {\n transmuxer.postMessage(message);\n }\n};\nconst REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nconst abortAll = activeXhrs => {\n activeXhrs.forEach(xhr => {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nconst getRequestStats = request => {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nconst getProgressStats = progressEvent => {\n const request = progressEvent.target;\n const roundTripTime = Date.now() - request.requestTime;\n const stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\nconst handleErrors = (error, request) => {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n return {\n status: request.status,\n message: 'Empty HLS response at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n const response = request.response;\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n const view = new DataView(response);\n const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n for (let i = 0; i < objects.length; i++) {\n objects[i].bytes = bytes;\n }\n return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n // only know how to parse mp4 init segments at the moment\n\n if (type !== 'mp4') {\n const uri = segment.map.resolvedUri || segment.map.uri;\n return callback({\n internal: true,\n message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`,\n code: REQUEST_ERRORS.FAILURE\n });\n }\n workerCallback({\n action: 'probeMp4Tracks',\n data: segment.map.bytes,\n transmuxer: segment.transmuxer,\n callback: ({\n tracks,\n data\n }) => {\n // transfer bytes back to us\n segment.map.bytes = data;\n tracks.forEach(function (track) {\n segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n if (segment.map.tracks[track.type]) {\n return;\n }\n segment.map.tracks[track.type] = track;\n if (typeof track.id === 'number' && track.timescale) {\n segment.map.timescales = segment.map.timescales || {};\n segment.map.timescales[track.id] = track.timescale;\n }\n });\n return callback(null);\n }\n });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleInitSegmentResponse = ({\n segment,\n finishProcessingFn\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n // until the key request is done to decrypt.\n\n if (segment.map.key) {\n segment.map.encryptedBytes = bytes;\n return finishProcessingFn(null, segment);\n }\n segment.map.bytes = bytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n parseError.xhr = request;\n parseError.status = request.status;\n return finishProcessingFn(parseError, segment);\n }\n finishProcessingFn(null, segment);\n });\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleSegmentResponse = ({\n segment,\n finishProcessingFn,\n responseType\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const newBytes =\n // although responseText \"should\" exist, this guard serves to prevent an error being\n // thrown for two primary cases:\n // 1. the mime type override stops working, or is not implemented for a specific\n // browser\n // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n segment.stats = getRequestStats(request);\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(newBytes);\n } else {\n segment.bytes = new Uint8Array(newBytes);\n }\n return finishProcessingFn(null, segment);\n};\nconst transmuxAndNotify = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const fmp4Tracks = segment.map && segment.map.tracks || {};\n const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n // One reason for this is that in the case of full segments, we want to trust start\n // times from the probe, rather than the transmuxer.\n\n let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n const finish = () => transmux({\n bytes,\n transmuxer: segment.transmuxer,\n audioAppendStart: segment.audioAppendStart,\n gopsToAlignWith: segment.gopsToAlignWith,\n remux: isMuxed,\n onData: result => {\n result.type = result.type === 'combined' ? 'video' : result.type;\n dataFn(segment, result);\n },\n onTrackInfo: trackInfo => {\n if (trackInfoFn) {\n if (isMuxed) {\n trackInfo.isMuxed = true;\n }\n trackInfoFn(segment, trackInfo);\n }\n },\n onAudioTimingInfo: audioTimingInfo => {\n // we only want the first start value we encounter\n if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n audioStartFn(audioTimingInfo.start);\n audioStartFn = null;\n } // we want to continually update the end time\n\n if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n audioEndFn(audioTimingInfo.end);\n }\n },\n onVideoTimingInfo: videoTimingInfo => {\n // we only want the first start value we encounter\n if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n videoStartFn(videoTimingInfo.start);\n videoStartFn = null;\n } // we want to continually update the end time\n\n if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n videoEndFn(videoTimingInfo.end);\n }\n },\n onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n },\n onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n },\n onId3: (id3Frames, dispatchType) => {\n id3Fn(segment, id3Frames, dispatchType);\n },\n onCaptions: captions => {\n captionsFn(segment, [captions]);\n },\n isEndOfTimeline,\n onEndedTimeline: () => {\n endedTimelineFn();\n },\n onTransmuxerLog,\n onDone: result => {\n if (!doneFn) {\n return;\n }\n result.type = result.type === 'combined' ? 'video' : result.type;\n doneFn(null, segment, result);\n }\n }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n // Meaning cached frame data may corrupt our notion of where this segment\n // really starts. To get around this, probe for the info needed.\n\n workerCallback({\n action: 'probeTs',\n transmuxer: segment.transmuxer,\n data: bytes,\n baseStartTime: segment.baseStartTime,\n callback: data => {\n segment.bytes = bytes = data.data;\n const probeResult = data.result;\n if (probeResult) {\n trackInfoFn(segment, {\n hasAudio: probeResult.hasAudio,\n hasVideo: probeResult.hasVideo,\n isMuxed\n });\n trackInfoFn = null;\n }\n finish();\n }\n });\n};\nconst handleSegmentBytes = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n // We should have a handler that fetches the number of bytes required\n // to check if something is fmp4. This will allow us to save bandwidth\n // because we can only exclude a playlist and abort requests\n // by codec after trackinfo triggers.\n\n if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n segment.isFmp4 = true;\n const {\n tracks\n } = segment.map;\n const trackInfo = {\n isFmp4: true,\n hasVideo: !!tracks.video,\n hasAudio: !!tracks.audio\n }; // if we have a audio track, with a codec that is not set to\n // encrypted audio\n\n if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n trackInfo.audioCodec = tracks.audio.codec;\n } // if we have a video track, with a codec that is not set to\n // encrypted video\n\n if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n trackInfo.videoCodec = tracks.video.codec;\n }\n if (tracks.video && tracks.audio) {\n trackInfo.isMuxed = true;\n } // since we don't support appending fmp4 data on progress, we know we have the full\n // segment here\n\n trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n // time. The end time can be roughly calculated by the receiver using the duration.\n //\n // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n // that is the true start of the segment (where the playback engine should begin\n // decoding).\n\n const finishLoading = (captions, id3Frames) => {\n // if the track still has audio at this point it is only possible\n // for it to be audio only. See `tracks.video && tracks.audio` if statement\n // above.\n // we make sure to use segment.bytes here as that\n dataFn(segment, {\n data: bytesAsUint8Array,\n type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n });\n if (id3Frames && id3Frames.length) {\n id3Fn(segment, id3Frames);\n }\n if (captions && captions.length) {\n captionsFn(segment, captions);\n }\n doneFn(null, segment, {});\n };\n workerCallback({\n action: 'probeMp4StartTime',\n timescales: segment.map.timescales,\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n callback: ({\n data,\n startTime\n }) => {\n // transfer bytes back to us\n bytes = data.buffer;\n segment.bytes = bytesAsUint8Array = data;\n if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n timingInfoFn(segment, 'audio', 'start', startTime);\n }\n if (trackInfo.hasVideo) {\n timingInfoFn(segment, 'video', 'start', startTime);\n }\n workerCallback({\n action: 'probeEmsgID3',\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n offset: startTime,\n callback: ({\n emsgData,\n id3Frames\n }) => {\n // transfer bytes back to us\n bytes = emsgData.buffer;\n segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n // Initialize CaptionParser if it hasn't been yet\n\n if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n finishLoading(undefined, id3Frames);\n return;\n }\n workerCallback({\n action: 'pushMp4Captions',\n endAction: 'mp4Captions',\n transmuxer: segment.transmuxer,\n data: bytesAsUint8Array,\n timescales: segment.map.timescales,\n trackIds: [tracks.video.id],\n callback: message => {\n // transfer bytes back to us\n bytes = message.data.buffer;\n segment.bytes = bytesAsUint8Array = message.data;\n message.logs.forEach(function (log) {\n onTransmuxerLog(merge(log, {\n stream: 'mp4CaptionParser'\n }));\n });\n finishLoading(message.captions, id3Frames);\n }\n });\n }\n });\n }\n });\n return;\n } // VTT or other segments that don't need processing\n\n if (!segment.transmuxer) {\n doneFn(null, segment, {});\n return;\n }\n if (typeof segment.container === 'undefined') {\n segment.container = detectContainerForBytes(bytesAsUint8Array);\n }\n if (segment.container !== 'ts' && segment.container !== 'aac') {\n trackInfoFn(segment, {\n hasAudio: false,\n hasVideo: false\n });\n doneFn(null, segment, {});\n return;\n } // ts or aac\n\n transmuxAndNotify({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n};\nconst decrypt = function ({\n id,\n key,\n encryptedBytes,\n decryptionWorker\n}, callback) {\n const decryptionHandler = event => {\n if (event.data.source === id) {\n decryptionWorker.removeEventListener('message', decryptionHandler);\n const decrypted = event.data.decrypted;\n callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n }\n };\n decryptionWorker.addEventListener('message', decryptionHandler);\n let keyBytes;\n if (key.bytes.slice) {\n keyBytes = key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n } // incrementally decrypt the bytes\n\n decryptionWorker.postMessage(createTransferableMessage({\n source: id,\n encrypted: encryptedBytes,\n key: keyBytes,\n iv: key.iv\n }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nconst decryptSegment = ({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n decrypt({\n id: segment.requestId,\n key: segment.key,\n encryptedBytes: segment.encryptedBytes,\n decryptionWorker\n }, decryptedBytes => {\n segment.bytes = decryptedBytes;\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\nconst waitForCompletion = ({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let count = 0;\n let didError = false;\n return (error, segment) => {\n if (didError) {\n return;\n }\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n count += 1;\n if (count === activeXhrs.length) {\n const segmentFinish = function () {\n if (segment.encryptedBytes) {\n return decryptSegment({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n } // Otherwise, everything is ready just continue\n\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n }; // Keep track of when *all* of the requests have completed\n\n segment.endOfAllRequests = Date.now();\n if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n return decrypt({\n decryptionWorker,\n // add -init to the \"id\" to differentiate between segment\n // and init segment decryption, just in case they happen\n // at the same time at some point in the future.\n id: segment.requestId + '-init',\n encryptedBytes: segment.map.encryptedBytes,\n key: segment.map.key\n }, decryptedBytes => {\n segment.map.bytes = decryptedBytes;\n parseInitSegment(segment, parseError => {\n if (parseError) {\n abortAll(activeXhrs);\n return doneFn(parseError, segment);\n }\n segmentFinish();\n });\n });\n }\n segmentFinish();\n }\n };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nconst handleLoadEnd = ({\n loadendState,\n abortFn\n}) => event => {\n const request = event.target;\n if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n abortFn();\n loadendState.calledAbortFn = true;\n }\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nconst handleProgress = ({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n}) => event => {\n const request = event.target;\n if (request.aborted) {\n return;\n }\n segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n return progressFn(event, segment);\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [transmuxer]: Object,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n * aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n * request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\nconst mediaSegmentRequest = ({\n xhr,\n xhrOptions,\n decryptionWorker,\n segment,\n abortFn,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const activeXhrs = [];\n const finishProcessingFn = waitForCompletion({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n }); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n const objects = [segment.key];\n if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n objects.push(segment.map.key);\n }\n const keyRequestOptions = merge(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n if (segment.map && !segment.map.bytes) {\n const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n if (differentMapKey) {\n const mapKeyRequestOptions = merge(xhrOptions, {\n uri: segment.map.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n activeXhrs.push(mapKeyXhr);\n }\n const initSegmentOptions = merge(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map)\n });\n const initSegmentRequestCallback = handleInitSegmentResponse({\n segment,\n finishProcessingFn\n });\n const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n const segmentRequestOptions = merge(xhrOptions, {\n uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment)\n });\n const segmentRequestCallback = handleSegmentResponse({\n segment,\n finishProcessingFn,\n responseType: segmentRequestOptions.responseType\n });\n const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n }));\n activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n // multiple times, provide a shared state object\n\n const loadendState = {};\n activeXhrs.forEach(activeXhr => {\n activeXhr.addEventListener('loadend', handleLoadEnd({\n loadendState,\n abortFn\n }));\n });\n return () => abortAll(activeXhrs);\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nconst logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nconst getCodecs = function (media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n const mediaAttributes = media.attributes || {};\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n};\nconst isMaat = (main, media) => {\n const mediaAttributes = media.attributes || {};\n return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n if (!isMaat(main, media)) {\n return true;\n }\n const mediaAttributes = media.attributes || {};\n const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n for (const groupId in audioGroup) {\n // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n // or there are listed playlists (the case for DASH, as the manifest will have already\n // provided all of the details necessary to generate the audio playlist, as opposed to\n // HLS' externally requested playlists), then the content is demuxed.\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n return true;\n }\n }\n return false;\n};\nconst unwrapCodecList = function (codecList) {\n const codecs = {};\n codecList.forEach(({\n mediaType,\n type,\n details\n }) => {\n codecs[mediaType] = codecs[mediaType] || [];\n codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n });\n Object.keys(codecs).forEach(function (mediaType) {\n if (codecs[mediaType].length > 1) {\n logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n codecs[mediaType] = null;\n return;\n }\n codecs[mediaType] = codecs[mediaType][0];\n });\n return codecs;\n};\nconst codecCount = function (codecObj) {\n let count = 0;\n if (codecObj.audio) {\n count++;\n }\n if (codecObj.video) {\n count++;\n }\n return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nconst codecsForPlaylist = function (main, media) {\n const mediaAttributes = media.attributes || {};\n const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n if (isMaat(main, media) && !codecInfo.audio) {\n if (!isMuxed(main, media)) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n if (defaultCodecs.audio) {\n codecInfo.audio = defaultCodecs.audio;\n }\n }\n }\n return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n if (!representation || !representation.playlist) {\n return;\n }\n const playlist = representation.playlist;\n return JSON.stringify({\n id: playlist.id,\n bandwidth: representation.bandwidth,\n width: representation.width,\n height: representation.height,\n codecs: playlist.attributes && playlist.attributes.CODECS || ''\n });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nconst safeGetComputedStyle = function (el, property) {\n if (!el) {\n return '';\n }\n const result = window$1.getComputedStyle(el);\n if (!result) {\n return '';\n }\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nconst stableSort = function (array, sortFn) {\n const newArray = array.slice();\n array.sort(function (left, right) {\n const cmp = sortFn(left, right);\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistBandwidth = function (left, right) {\n let leftBandwidth;\n let rightBandwidth;\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistResolution = function (left, right) {\n let leftWidth;\n let rightWidth;\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} main\n * Object representation of the main manifest\n * @param {number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {number} playerWidth\n * Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n * Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @param {Object} playlistController\n * the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nlet simpleSelector = function (main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) {\n // If we end up getting called before `main` is available, exit early\n if (!main) {\n return;\n }\n const options = {\n bandwidth: playerBandwidth,\n width: playerWidth,\n height: playerHeight,\n limitRenditionByPlayerDimensions\n };\n let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n if (Playlist.isAudioOnly(main)) {\n playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n // at the buttom of this function for debugging.\n\n options.audioOnly = true;\n } // convert the playlists to an intermediary representation to make comparisons easier\n\n let sortedPlaylistReps = playlists.map(playlist => {\n let bandwidth;\n const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth,\n width,\n height,\n playlist\n };\n });\n stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n }\n if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n } // filter out playlists without resolution information\n\n const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n let resolutionPlusOneList;\n let resolutionPlusOneSmallest;\n let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n }\n let leastPixelDiffRep; // If this selector proves to be better than others,\n // resolutionPlusOneRep and resolutionBestRep and all\n // the code involving them should be removed.\n\n if (playlistController.leastPixelDiffSelector) {\n // find the variant that is closest to the player's pixel size\n const leastPixelDiffList = haveResolution.map(rep => {\n rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n return rep;\n }); // get the highest bandwidth, closest resolution playlist\n\n stableSort(leastPixelDiffList, (left, right) => {\n // sort by highest bandwidth if pixelDiff is the same\n if (left.pixelDiff === right.pixelDiff) {\n return right.bandwidth - left.bandwidth;\n }\n return left.pixelDiff - right.pixelDiff;\n });\n leastPixelDiffRep = leastPixelDiffList[0];\n } // fallback chain of variants\n\n const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (leastPixelDiffRep) {\n type = 'leastPixelDiffRep';\n } else if (resolutionPlusOneRep) {\n type = 'resolutionPlusOneRep';\n } else if (resolutionBestRep) {\n type = 'resolutionBestRep';\n } else if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n } else if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nconst lastBandwidthSelector = function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nconst movingAverageBandwidthSelector = function (decay) {\n let average = -1;\n let lastSystemBandwidth = -1;\n if (decay < 0 || decay > 1) {\n throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n }\n return function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n if (average < 0) {\n average = this.systemBandwidth;\n lastSystemBandwidth = this.systemBandwidth;\n } // stop the average value from decaying for every 250ms\n // when the systemBandwidth is constant\n // and\n // stop average from setting to a very low value when the\n // systemBandwidth becomes 0 in case of chunk cancellation\n\n if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n average = decay * this.systemBandwidth + (1 - decay) * average;\n lastSystemBandwidth = this.systemBandwidth;\n }\n return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.main\n * Object representation of the main manifest\n * @param {number} settings.currentTime\n * The current time of the player\n * @param {number} settings.bandwidth\n * Current measured bandwidth\n * @param {number} settings.duration\n * Duration of the media\n * @param {number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\nconst minRebufferMaxBandwidthSelector = function (settings) {\n const {\n main,\n currentTime,\n bandwidth,\n duration,\n segmentDuration,\n timeUntilRebuffer,\n currentTimeline,\n syncController\n } = settings; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n }\n const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n const numRequests = syncPoint ? 1 : 2;\n const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist,\n rebufferingImpact\n };\n });\n const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\nconst lowestBitrateCompatibleVariantSelector = function () {\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nconst concatSegments = segmentObj => {\n let offset = 0;\n let tempBuffer;\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(segment => {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n }\n return tempBuffer;\n};\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n if (!inbandTextTracks[captionStream]) {\n tech.trigger({\n type: 'usage',\n name: 'vhs-608'\n });\n let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n if (/^cc708_/.test(captionStream)) {\n instreamId = 'SERVICE' + captionStream.split('_')[1];\n }\n const track = tech.textTracks().getTrackById(instreamId);\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[captionStream] = track;\n } else {\n // This section gets called when we have caption services that aren't specified in the manifest.\n // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let label = captionStream;\n let language = captionStream;\n let def = false;\n const captionService = captionServices[instreamId];\n if (captionService) {\n label = captionService.label;\n language = captionService.language;\n def = captionService.default;\n } // Otherwise, create a track with the default `CC#` label and\n // without a language\n\n inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: instreamId,\n // TODO: investigate why this doesn't seem to turn the caption on by default\n default: def,\n label,\n language\n }, false).track;\n }\n }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {Array} captionArray an array of caption data\n * @private\n */\n\nconst addCaptionData = function ({\n inbandTextTracks,\n captionArray,\n timestampOffset\n}) {\n if (!captionArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n captionArray.forEach(caption => {\n const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n // with positioning data\n\n if (caption.content) {\n caption.content.forEach(value => {\n const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n cue.line = value.line;\n cue.align = 'left';\n cue.position = value.position;\n cue.positionAlign = 'line-left';\n inbandTextTracks[track].addCue(cue);\n });\n } else {\n // otherwise, a text value with combined captions is sent\n inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n }\n });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nconst deprecateOldCue = function (cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get() {\n videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get() {\n videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get() {\n videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} metadataArray an array of meta data\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {number} videoDuration the duration of the video\n * @private\n */\n\nconst addMetadata = ({\n inbandTextTracks,\n metadataArray,\n timestampOffset,\n videoDuration\n}) => {\n if (!metadataArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n metadataArray.forEach(metadata => {\n const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n } // If we have no frames, we can't create a cue.\n\n if (!metadata.frames || !metadata.frames.length) {\n return;\n }\n metadata.frames.forEach(frame => {\n const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n metadataTrack.addCue(cue);\n });\n });\n if (!metadataTrack.cues || !metadataTrack.cues.length) {\n return;\n } // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n const cues = metadataTrack.cues;\n const cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (let i = 0; i < cues.length; i++) {\n if (cues[i]) {\n cuesArray.push(cues[i]);\n }\n } // Group cues by their startTime value\n\n const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n const timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach((startTime, idx) => {\n const cueGroup = cuesGroupedByStartTime[startTime];\n const finiteDuration = isFinite(videoDuration) ? videoDuration : 0;\n const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(cue => {\n cue.endTime = nextTime;\n });\n });\n}; // object for mapping daterange attributes\n\nconst dateRangeAttr = {\n id: 'ID',\n class: 'CLASS',\n startDate: 'START-DATE',\n duration: 'DURATION',\n endDate: 'END-DATE',\n endOnNext: 'END-ON-NEXT',\n plannedDuration: 'PLANNED-DURATION',\n scte35Out: 'SCTE35-OUT',\n scte35In: 'SCTE35-IN'\n};\nconst dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nconst addDateRangeMetadata = ({\n inbandTextTracks,\n dateRanges\n}) => {\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n dateRanges.forEach(dateRange => {\n // we generate multiple cues for each date range with different attributes\n for (const key of Object.keys(dateRange)) {\n if (dateRangeKeysToOmit.has(key)) {\n continue;\n }\n const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n cue.id = dateRange.id;\n cue.type = 'com.apple.quicktime.HLS';\n cue.value = {\n key: dateRangeAttr[key],\n data: dateRange[key]\n };\n if (key === 'scte35Out' || key === 'scte35In') {\n cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n }\n metadataTrack.addCue(cue);\n }\n dateRange.processDateRange();\n });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n if (inbandTextTracks.metadataTrack_) {\n return;\n }\n inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n if (!videojs.browser.IS_ANY_SAFARI) {\n inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nconst removeCuesFromTrack = function (start, end, track) {\n let i;\n let cue;\n if (!track) {\n return;\n }\n if (!track.cues) {\n return;\n }\n i = track.cues.length;\n while (i--) {\n cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n if (cue.startTime >= start && cue.endTime <= end) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nconst removeDuplicateCuesFromTrack = function (track) {\n const cues = track.cues;\n if (!cues) {\n return;\n }\n const uniqueCues = {};\n for (let i = cues.length - 1; i >= 0; i--) {\n const cue = cues[i];\n const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n if (uniqueCues[cueKey]) {\n track.removeCue(cue);\n } else {\n uniqueCues[cueKey] = cue;\n }\n }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\nconst gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n let i;\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\nconst updateGopBuffer = (buffer, gops, replace) => {\n if (!gops.length) {\n return buffer;\n }\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n const start = gops[0].pts;\n let i = 0;\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n const updatedBuffer = buffer.slice();\n let i = buffer.length;\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n let j = i + 1;\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\nconst shallowEqual = function (a, b) {\n // if both are undefined\n // or one or the other is undefined\n // they are not equal\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // they are the same object and thus, equal\n\n if (a === b) {\n return true;\n } // sort keys so we can make sure they have\n // all the same keys later.\n\n const akeys = Object.keys(a).sort();\n const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (let i = 0; i < akeys.length; i++) {\n const key = akeys[i]; // different sorted keys, not equal\n\n if (key !== bkeys[i]) {\n return false;\n } // different values, not equal\n\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nconst QUOTA_EXCEEDED_ERR = 22;\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n segments = segments || [];\n const timelineSegments = [];\n let time = 0;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (currentTimeline === segment.timeline) {\n timelineSegments.push(i);\n time += segment.duration;\n if (time > targetTime) {\n return i;\n }\n }\n }\n if (timelineSegments.length === 0) {\n return 0;\n } // default to the last timeline segment\n\n return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n return null;\n }\n if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n return 'Neither audio nor video found in segment.';\n }\n if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {number} currentTime\n * The current time of the player\n * @param {number} targetDuration\n * The target duration of the current playlist\n * @return {number}\n * Time that is safe to remove from the back buffer without interrupting playback\n */\n\nconst safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n // 30 seconds before the playhead provides a safe default for trimming.\n //\n // Choosing a reasonable default is particularly important for high bitrate content and\n // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n // throw an APPEND_BUFFER_ERR.\n let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n if (seekable.length) {\n // Some live playlists may have a shorter window of content than the full allowed back\n // buffer. For these playlists, don't save content that's no longer within the window.\n trimTime = Math.max(trimTime, seekable.start(0));\n } // Don't remove within target duration of the current time to avoid the possibility of\n // removing the GOP currently being played, as removing it can cause playback stalls.\n\n const maxTrimTime = currentTime - targetDuration;\n return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n const {\n startOfSegment,\n duration,\n segment,\n part,\n playlist: {\n mediaSequence: seq,\n id,\n segments = []\n },\n mediaIndex: index,\n partIndex,\n timeline\n } = segmentInfo;\n const segmentLen = segments.length - 1;\n let selection = 'mediaIndex/partIndex increment';\n if (segmentInfo.getMediaInfoForTime) {\n selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n } else if (segmentInfo.isSyncRequest) {\n selection = 'getSyncSegmentCandidate (isSyncRequest)';\n }\n if (segmentInfo.independent) {\n selection += ` with independent ${segmentInfo.independent}`;\n }\n const hasPartIndex = typeof partIndex === 'number';\n const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n preloadSegment: segment\n }) - 1 : 0;\n return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\nconst getBufferedEndOrFallback = (buffered, fallback) => buffered.length ? buffered.end(buffered.length - 1) : fallback;\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n * The timeline of the segment\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} startOfSegment\n * The estimated segment start\n * @param {TimeRange[]} buffered\n * The loader's buffer\n * @param {boolean} calculateTimestampOffsetForEachSegment\n * Feature flag to always calculate timestampOffset\n * @param {boolean} overrideCheck\n * If true, no checks are made to see if the timestamp offset value should be set,\n * but sets it directly to a value.\n *\n * @return {number|null}\n * Either a number representing a new timestamp offset, or null if the segment is\n * part of the same timeline\n */\n\nconst timestampOffsetForSegment = ({\n segmentTimeline,\n currentTimeline,\n startOfSegment,\n buffered,\n calculateTimestampOffsetForEachSegment,\n overrideCheck\n}) => {\n if (calculateTimestampOffsetForEachSegment) {\n return getBufferedEndOrFallback(buffered, startOfSegment);\n } // Check to see if we are crossing a discontinuity to see if we need to set the\n // timestamp offset on the transmuxer and source buffer.\n //\n // Previously, we changed the timestampOffset if the start of this segment was less than\n // the currently set timestampOffset, but this isn't desirable as it can produce bad\n // behavior, especially around long running live streams.\n\n if (!overrideCheck && segmentTimeline === currentTimeline) {\n return null;\n } // When changing renditions, it's possible to request a segment on an older timeline. For\n // instance, given two renditions with the following:\n //\n // #EXTINF:10\n // segment1\n // #EXT-X-DISCONTINUITY\n // #EXTINF:10\n // segment2\n // #EXTINF:10\n // segment3\n //\n // And the current player state:\n //\n // current time: 8\n // buffer: 0 => 20\n //\n // The next segment on the current rendition would be segment3, filling the buffer from\n // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n // then the next segment to be requested will be segment1 from the new rendition in\n // order to fill time 8 and onwards. Using the buffered end would result in repeated\n // content (since it would position segment1 of the new rendition starting at 20s). This\n // case can be identified when the new segment's timeline is a prior value. Instead of\n // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n // more accurate to the actual start time of the segment.\n\n if (segmentTimeline < currentTimeline) {\n return startOfSegment;\n } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n // value uses the end of the last segment if it is available. While this value\n // should often be correct, it's better to rely on the buffered end, as the new\n // content post discontinuity should line up with the buffered end as if it were\n // time 0 for the new content.\n\n return getBufferedEndOrFallback(buffered, startOfSegment);\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n * The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n * The loader type\n * @param {boolean} audioDisabled\n * Whether the audio is disabled for the loader. This should only be true when the\n * loader may have muxed audio in its segment, but should not append it, e.g., for\n * the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n * Whether the loader should wait for a timeline change from the timeline change\n * controller before processing the segment\n */\n\nconst shouldWaitForTimelineChange = ({\n timelineChangeController,\n currentTimeline,\n segmentTimeline,\n loaderType,\n audioDisabled\n}) => {\n if (currentTimeline === segmentTimeline) {\n return false;\n }\n if (loaderType === 'audio') {\n const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n type: 'main'\n }); // Audio loader should wait if:\n //\n // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n // * main hasn't yet changed to the timeline audio is looking to load\n\n return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n // loader's segments (or the content is audio/video only and handled by the main\n // loader).\n\n if (loaderType === 'main' && audioDisabled) {\n const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n type: 'audio'\n }); // Main loader should wait for the audio loader if audio is not pending a timeline\n // change to the current timeline.\n //\n // Since the main loader is responsible for setting the timestamp offset for both\n // audio and video, the main loader must wait for audio to be about to change to its\n // timeline before setting the offset, otherwise, if audio is behind in loading,\n // segments from the previous timeline would be adjusted by the new timestamp offset.\n //\n // This requirement means that video will not cross a timeline until the audio is\n // about to cross to it, so that way audio and video will always cross the timeline\n // together.\n //\n // In addition to normal timeline changes, these rules also apply to the start of a\n // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n // that these rules apply to the first timeline change because if they did not, it's\n // possible that the main loader will cross two timelines before the audio loader has\n // crossed one. Logic may be implemented to handle the startup as a special case, but\n // it's easier to simply treat all timeline changes the same.\n\n if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n return false;\n }\n return true;\n }\n return false;\n};\nconst mediaDuration = timingInfos => {\n let maxDuration = 0;\n ['video', 'audio'].forEach(function (type) {\n const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n if (!typeTimingInfo) {\n return;\n }\n const {\n start,\n end\n } = typeTimingInfo;\n let duration;\n if (typeof start === 'bigint' || typeof end === 'bigint') {\n duration = window$1.BigInt(end) - window$1.BigInt(start);\n } else if (typeof start === 'number' && typeof end === 'number') {\n duration = end - start;\n }\n if (typeof duration !== 'undefined' && duration > maxDuration) {\n maxDuration = duration;\n }\n }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n // as we only need BigInt when we are above that.\n\n if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n maxDuration = Number(maxDuration);\n }\n return maxDuration;\n};\nconst segmentTooLong = ({\n segmentDuration,\n maxDuration\n}) => {\n // 0 duration segments are most likely due to metadata only segments or a lack of\n // information.\n if (!segmentDuration) {\n return false;\n } // For HLS:\n //\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n // The EXTINF duration of each Media Segment in the Playlist\n // file, when rounded to the nearest integer, MUST be less than or equal\n // to the target duration; longer segments can trigger playback stalls\n // or other errors.\n //\n // For DASH, the mpd-parser uses the largest reported segment duration as the target\n // duration. Although that reported duration is occasionally approximate (i.e., not\n // exact), a strict check may report that a segment is too long more often in DASH.\n\n return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n // Right now we aren't following DASH's timing model exactly, so only perform\n // this check for HLS content.\n if (sourceType !== 'hls') {\n return null;\n }\n const segmentDuration = mediaDuration({\n audioTimingInfo: segmentInfo.audioTimingInfo,\n videoTimingInfo: segmentInfo.videoTimingInfo\n }); // Don't report if we lack information.\n //\n // If the segment has a duration of 0 it is either a lack of information or a\n // metadata only segment and shouldn't be reported here.\n\n if (!segmentDuration) {\n return null;\n }\n const targetDuration = segmentInfo.playlist.targetDuration;\n const isSegmentWayTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration * 2\n });\n const isSegmentSlightlyTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration\n });\n const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n return {\n severity: isSegmentWayTooLong ? 'warn' : 'info',\n message: segmentTooLongMessage\n };\n }\n return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass SegmentLoader extends videojs.EventTarget {\n constructor(settings, options = {}) {\n super(); // check pre-conditions\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n this.bandwidth = settings.bandwidth;\n this.throughput = {\n rate: 0,\n count: 0\n };\n this.roundTrip = NaN;\n this.resetStats_();\n this.mediaIndex = null;\n this.partIndex = null; // private settings\n\n this.hasPlayed_ = settings.hasPlayed;\n this.currentTime_ = settings.currentTime;\n this.seekable_ = settings.seekable;\n this.seeking_ = settings.seeking;\n this.duration_ = settings.duration;\n this.mediaSource_ = settings.mediaSource;\n this.vhs_ = settings.vhs;\n this.loaderType_ = settings.loaderType;\n this.currentMediaInfo_ = void 0;\n this.startingMediaInfo_ = void 0;\n this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n this.goalBufferLength_ = settings.goalBufferLength;\n this.sourceType_ = settings.sourceType;\n this.sourceUpdater_ = settings.sourceUpdater;\n this.inbandTextTracks_ = settings.inbandTextTracks;\n this.state_ = 'INIT';\n this.timelineChangeController_ = settings.timelineChangeController;\n this.shouldSaveSegmentTimingInfo_ = true;\n this.parse708captions_ = settings.parse708captions;\n this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n this.calculateTimestampOffsetForEachSegment_ = settings.calculateTimestampOffsetForEachSegment;\n this.captionServices_ = settings.captionServices;\n this.exactManifestTimings = settings.exactManifestTimings;\n this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n this.checkBufferTimeout_ = null;\n this.error_ = void 0;\n this.currentTimeline_ = -1;\n this.pendingSegment_ = null;\n this.xhrOptions_ = null;\n this.pendingSegments_ = [];\n this.audioDisabled_ = false;\n this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n this.gopBuffer_ = [];\n this.timeMapping_ = 0;\n this.safeAppend_ = false;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.playlistOfLastInitSegment_ = {\n audio: null,\n video: null\n };\n this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n // information yet to start the loading process (e.g., if the audio loader wants to\n // load a segment from the next timeline but the main loader hasn't yet crossed that\n // timeline), then the load call will be added to the queue until it is ready to be\n // processed.\n\n this.loadQueue_ = [];\n this.metadataQueue_ = {\n id3: [],\n caption: []\n };\n this.waitingOnRemove_ = false;\n this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n this.activeInitSegmentId_ = null;\n this.initSegments_ = {}; // HLSe playback\n\n this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n this.keyCache_ = {};\n this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n this.syncController_ = settings.syncController;\n this.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n this.transmuxer_ = this.createTransmuxer_();\n this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n this.mediaSource_.addEventListener('sourceopen', () => {\n if (!this.isEndOfStream_()) {\n this.ended_ = false;\n }\n }); // ...for determining the fetch location\n\n this.fetchAtBuffer_ = false; // For comparing with currentTime when overwriting segments on fastQualityChange_ changes. Use -1 as the inactive flag.\n\n this.replaceSegmentsUntil_ = -1;\n this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n Object.defineProperty(this, 'state', {\n get() {\n return this.state_;\n },\n set(newState) {\n if (newState !== this.state_) {\n this.logger_(`${this.state_} -> ${newState}`);\n this.state_ = newState;\n this.trigger('statechange');\n }\n }\n });\n this.sourceUpdater_.on('ready', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }); // Only the main loader needs to listen for pending timeline changes, as the main\n // loader should wait for audio to be ready to change its timeline so that both main\n // and audio timelines change together. For more details, see the\n // shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'main') {\n this.timelineChangeController_.on('pendingtimelinechange', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n } // The main loader only listens on pending timeline changes, but the audio loader,\n // since its loads follow main, needs to listen on timeline changes. For more details,\n // see the shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'audio') {\n this.timelineChangeController_.on('timelinechange', () => {\n if (this.hasEnoughInfoToLoad_()) {\n this.processLoadQueue_();\n }\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n }\n }\n createTransmuxer_() {\n return segmentTransmuxer.createTransmuxer({\n remux: false,\n alignGopsAtEnd: this.safeAppend_,\n keepOriginalTimestamps: true,\n parse708captions: this.parse708captions_,\n captionServices: this.captionServices_\n });\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n\n resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n this.mediaAppends = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n\n dispose() {\n this.trigger('dispose');\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n if (this.transmuxer_) {\n this.transmuxer_.terminate();\n }\n this.resetStats_();\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n }\n this.off();\n }\n setAudio(enable) {\n this.audioDisabled_ = !enable;\n if (enable) {\n this.appendInitSegment_.audio = true;\n } else {\n // remove current track audio if it gets disabled\n this.sourceUpdater_.removeAudio(0, this.duration_());\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n\n abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n return;\n }\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n\n abort_() {\n if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n this.pendingSegment_ = null;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n this.waitingOnRemove_ = false;\n window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n this.quotaExceededErrorRetryTimeout_ = null;\n }\n checkForAbort_(requestId) {\n // If the state is APPENDING, then aborts will not modify the state, meaning the first\n // callback that happens should reset the state to READY so that loading can continue.\n if (this.state === 'APPENDING' && !this.pendingSegment_) {\n this.state = 'READY';\n return true;\n }\n if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n return true;\n }\n return false;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n\n error(error) {\n if (typeof error !== 'undefined') {\n this.logger_('error occurred:', error);\n this.error_ = error;\n }\n this.pendingSegment_ = null;\n return this.error_;\n }\n endOfStream() {\n this.ended_ = true;\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.gopBuffer_.length = 0;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n const trackInfo = this.getMediaInfo_();\n if (!this.sourceUpdater_ || !trackInfo) {\n return createTimeRanges();\n }\n if (this.loaderType_ === 'main') {\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n return this.sourceUpdater_.buffered();\n }\n if (hasVideo) {\n return this.sourceUpdater_.videoBuffered();\n }\n } // One case that can be ignored for now is audio only with alt audio,\n // as we don't yet have proper support for that.\n\n return this.sourceUpdater_.audioBuffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n tracks: map.tracks,\n timescales: map.timescales\n };\n }\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n\n segmentKey(key, set = false) {\n if (!key) {\n return null;\n }\n const id = segmentKeyId(key);\n let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n const result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n\n load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n // audio data from the muxed content should be removed\n\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n\n playlist(newPlaylist, options = {}) {\n if (!newPlaylist) {\n return;\n }\n const oldPlaylist = this.playlist_;\n const segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n //\n // Use the INIT state to determine if playback has started, as the playlist sync info\n // should be fixed once requests begin (as sync points are generated based on sync\n // info), but not before then.\n\n if (this.state === 'INIT') {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n }; // Setting the date time mapping means mapping the program date time (if available)\n // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n // be updated as the playlist is refreshed before the loader starts loading, the\n // program date time mapping needs to be updated as well.\n //\n // This mapping is only done for the main loader because a program date time should\n // map equivalently between playlists.\n\n if (this.loaderType_ === 'main') {\n this.syncController_.setDateTimeMappingForStart(newPlaylist);\n }\n }\n let oldId = null;\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must reset/resync the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n // to false, resulting in fetching segments at currentTime and causing repeated\n // same-segment requests on playlist change. This erroneously drives up the playback watcher\n // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n // will not change the buffer.\n // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n if (isLLHLS) {\n this.resetLoader();\n } else {\n this.resyncLoader();\n }\n }\n this.currentMediaInfo_ = void 0;\n this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n // new playlist was incremented by 1.\n\n if (this.mediaIndex < 0) {\n this.mediaIndex = null;\n this.partIndex = null;\n } else {\n const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n // unless parts fell off of the playlist for this segment.\n // In that case we need to reset partIndex and resync\n\n if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n const mediaIndex = this.mediaIndex;\n this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n // as the part was dropped from our current playlists segment.\n // The mediaIndex will still be valid so keep that around.\n\n this.mediaIndex = mediaIndex;\n }\n }\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleAppendsDone_` after the segment has been successfully appended\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff;\n if (segmentInfo.mediaIndex < 0) {\n segmentInfo.mediaIndex = null;\n segmentInfo.partIndex = null;\n } else {\n // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n }\n }\n }\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n\n pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n\n paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * Resets the segment loader ended and init properties.\n */\n\n resetLoaderProperties() {\n this.ended_ = false;\n this.activeInitSegmentId_ = null;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n *\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n\n resetEverything(done) {\n this.resetLoaderProperties();\n this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n // we then clamp the value to duration if necessary.\n\n this.remove(0, Infinity, done); // clears fmp4 captions\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n }); // reset the cache in the transmuxer\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n\n resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n\n resyncLoader() {\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.mediaIndex = null;\n this.partIndex = null;\n this.syncPoint_ = null;\n this.isPendingTimestampOffset_ = false;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.abort();\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * @param {boolean} force - force all remove operations to happen\n * operation is complete\n */\n\n remove(start, end, done = () => {}, force = false) {\n // clamp end to duration if we need to remove everything.\n // This is due to a browser bug that causes issues if we remove to Infinity.\n // videojs/videojs-contrib-hls#1225\n if (end === Infinity) {\n end = this.duration_();\n } // skip removes that would throw an error\n // commonly happens during a rendition switch at the start of a video\n // from start 0 to end 0\n\n if (end <= start) {\n this.logger_('skipping remove because end ${end} is <= start ${start}');\n return;\n }\n if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n return;\n } // set it to one to complete this function's removes\n\n let removesRemaining = 1;\n const removeFinished = () => {\n removesRemaining--;\n if (removesRemaining === 0) {\n done();\n }\n };\n if (force || !this.audioDisabled_) {\n removesRemaining++;\n this.sourceUpdater_.removeAudio(start, end, removeFinished);\n } // While it would be better to only remove video if the main loader has video, this\n // should be safe with audio only as removeVideo will call back even if there's no\n // video buffer.\n //\n // In theory we can check to see if there's video before calling the remove, but in\n // the event that we're switching between renditions and from video to audio only\n // (when we add support for that), we may need to clear the video contents despite\n // what the new media will contain.\n\n if (force || this.loaderType_ === 'main') {\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n removesRemaining++;\n this.sourceUpdater_.removeVideo(start, end, removeFinished);\n } // remove any captions and ID3 tags\n\n for (const track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n removeFinished();\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n\n monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n\n monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // TODO since the source buffer maintains a queue, and we shouldn't call this function\n // except when we're ready for the next segment, this check can most likely be removed\n if (this.sourceUpdater_.updating()) {\n return;\n } // see if we need to begin loading immediately\n\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (typeof segmentInfo.timestampOffset === 'number') {\n this.isPendingTimestampOffset_ = false;\n this.timelineChangeController_.pendingTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {number} [mediaIndex] the media index of segment we last appended\n * @param {Object} [playlist] a media playlist object\n * @return {boolean} do we need to call endOfStream on the MediaSource\n */\n\n isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n if (!playlist || !this.mediaSource_) {\n return false;\n }\n const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n }\n /**\n * Determines what request should be made given current segment loader state.\n *\n * @return {Object} a request object that describes the segment/part to load\n */\n\n chooseNextRequest_() {\n const buffered = this.buffered_();\n const bufferedEnd = lastBufferedEnd(buffered) || 0;\n const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n const segments = this.playlist_.segments; // return no segment if:\n // 1. we don't have segments\n // 2. The video has not yet played and we already downloaded a segment\n // 3. we already have enough buffered time\n\n if (!segments.length || preloaded || haveEnoughBuffer) {\n return null;\n }\n this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n const next = {\n partIndex: null,\n mediaIndex: null,\n startOfSegment: null,\n playlist: this.playlist_,\n isSyncRequest: Boolean(!this.syncPoint_)\n };\n if (next.isSyncRequest) {\n next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n } else if (this.mediaIndex !== null) {\n const segment = segments[this.mediaIndex];\n const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n if (segment.parts && segment.parts[partIndex + 1]) {\n next.mediaIndex = this.mediaIndex;\n next.partIndex = partIndex + 1;\n } else {\n next.mediaIndex = this.mediaIndex + 1;\n }\n } else {\n // Find the segment containing the end of the buffer or current time.\n const {\n segmentIndex,\n startTime,\n partIndex\n } = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n });\n next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n next.mediaIndex = segmentIndex;\n next.startOfSegment = startTime;\n next.partIndex = partIndex;\n }\n const nextSegment = segments[next.mediaIndex];\n let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n // the next partIndex is invalid do not choose a next segment.\n\n if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n return null;\n } // if the next segment has parts, and we don't have a partIndex.\n // Set partIndex to 0\n\n if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n next.partIndex = 0;\n nextPart = nextSegment.parts[0];\n } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n // it applies to each segment in each media playlist.\n // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n // that the next part we append is \"independent\" if possible.\n // So we check if the previous part is independent, and request\n // it if it is.\n\n if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n if (next.partIndex === 0) {\n const lastSegment = segments[next.mediaIndex - 1];\n const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n next.mediaIndex -= 1;\n next.partIndex = lastSegment.parts.length - 1;\n next.independent = 'previous segment';\n }\n } else if (nextSegment.parts[next.partIndex - 1].independent) {\n next.partIndex -= 1;\n next.independent = 'previous part';\n }\n }\n const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n // 1. this is the last segment in the playlist\n // 2. end of stream has been called on the media source already\n // 3. the player is not seeking\n\n if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n return null;\n }\n return this.generateSegmentInfo_(next);\n }\n generateSegmentInfo_(options) {\n const {\n independent,\n playlist,\n mediaIndex,\n startOfSegment,\n isSyncRequest,\n partIndex,\n forceTimestampOffset,\n getMediaInfoForTime\n } = options;\n const segment = playlist.segments[mediaIndex];\n const part = typeof partIndex === 'number' && segment.parts[partIndex];\n const segmentInfo = {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: part && part.resolvedUri || segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex,\n partIndex: part ? partIndex : null,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest,\n startOfSegment,\n // the segment's playlist\n playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: part && part.duration || segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment,\n part,\n byteLength: 0,\n transmuxer: this.transmuxer_,\n // type of getMediaInfoForTime that was used to get this segment\n getMediaInfoForTime,\n independent\n };\n const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n segmentTimeline: segment.timeline,\n currentTimeline: this.currentTimeline_,\n startOfSegment,\n buffered: this.buffered_(),\n calculateTimestampOffsetForEachSegment: this.calculateTimestampOffsetForEachSegment_,\n overrideCheck\n });\n const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n if (typeof audioBufferedEnd === 'number') {\n // since the transmuxer is using the actual timing values, but the buffer is\n // adjusted by the timestamp offset, we must adjust the value here\n segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n }\n if (this.sourceUpdater_.videoBuffered().length) {\n segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n // since the transmuxer is using the actual timing values, but the time is\n // adjusted by the timestmap offset, we must adjust the value here\n this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n }\n return segmentInfo;\n } // get the timestampoffset for a segment,\n // added so that vtt segment loader can override and prevent\n // adding timestamp offsets.\n\n timestampOffsetForSegment_(options) {\n return timestampOffsetForSegment(options);\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @private\n */\n\n earlyAbortWhenNeeded_(stats) {\n if (this.vhs_.tech_.paused() ||\n // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout ||\n // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return;\n }\n const currentTime = this.currentTime_();\n const measuredBandwidth = stats.bandwidth;\n const segmentDuration = this.pendingSegment_.duration;\n const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$1) {\n return;\n }\n const switchCandidate = minRebufferMaxBandwidthSelector({\n main: this.vhs_.playlists.main,\n currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n if (!switchCandidate) {\n return;\n }\n const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.trigger('earlyabort');\n }\n handleAbort_(segmentInfo) {\n this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n this.mediaRequestsAborted += 1;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n\n handleProgress_(event, simpleSegment) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n this.trigger('progress');\n }\n handleTrackInfo_(simpleSegment, trackInfo) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n if (this.checkForIllegalMediaSwitch(trackInfo)) {\n return;\n }\n trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n // Guard against cases where we're not getting track info at all until we are\n // certain that all streams will provide it.\n\n if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.startingMediaInfo_ = trackInfo;\n this.currentMediaInfo_ = trackInfo;\n this.logger_('trackinfo update', trackInfo);\n this.trigger('trackinfo');\n } // trackinfo may cause an abort if the trackinfo\n // causes a codec change to an unsupported codec.\n\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // set trackinfo on the pending segment so that\n // it can append.\n\n this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_;\n const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n segmentInfo[timingInfoProperty][timeType] = time;\n this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleCaptions_(simpleSegment, captionData) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // This could only happen with fmp4 segments, but\n // should still not happen in general\n\n if (captionData.length === 0) {\n this.logger_('SegmentLoader received no captions from a caption event');\n return;\n }\n const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n // can be adjusted by the timestamp offset\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n return;\n }\n const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n const captionTracks = {}; // get total start/end and captions for each track/stream\n\n captionData.forEach(caption => {\n // caption.stream is actually a track name...\n // set to the existing values in tracks or default values\n captionTracks[caption.stream] = captionTracks[caption.stream] || {\n // Infinity, as any other value will be less than this\n startTime: Infinity,\n captions: [],\n // 0 as an other value will be more than this\n endTime: 0\n };\n const captionTrack = captionTracks[caption.stream];\n captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n captionTrack.captions.push(caption);\n });\n Object.keys(captionTracks).forEach(trackName => {\n const {\n startTime,\n endTime,\n captions\n } = captionTracks[trackName];\n const inbandTextTracks = this.inbandTextTracks_;\n this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n // We do this because a rendition change that also changes the timescale for captions\n // will result in captions being re-parsed for certain segments. If we add them again\n // without clearing we will have two of the same captions visible.\n\n removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n addCaptionData({\n captionArray: captions,\n inbandTextTracks,\n timestampOffset\n });\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n handleId3_(simpleSegment, id3Frames, dispatchType) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n return;\n }\n this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n }\n processMetadataQueue_() {\n this.metadataQueue_.id3.forEach(fn => fn());\n this.metadataQueue_.caption.forEach(fn => fn());\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n }\n processCallQueue_() {\n const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.callQueue_ = [];\n callQueue.forEach(fun => fun());\n }\n processLoadQueue_() {\n const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.loadQueue_ = [];\n loadQueue.forEach(fun => fun());\n }\n /**\n * Determines whether the loader has enough info to load the next segment.\n *\n * @return {boolean}\n * Whether or not the loader has enough info to load the next segment\n */\n\n hasEnoughInfoToLoad_() {\n // Since primary timing goes by video, only the audio loader potentially needs to wait\n // to load.\n if (this.loaderType_ !== 'audio') {\n return true;\n }\n const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n // enough info to load.\n\n if (!segmentInfo) {\n return false;\n } // The first segment can and should be loaded immediately so that source buffers are\n // created together (before appending). Source buffer creation uses the presence of\n // audio and video data to determine whether to create audio/video source buffers, and\n // uses processed (transmuxed or parsed) media to determine the types required.\n\n if (!this.getCurrentMediaInfo_()) {\n return true;\n }\n if (\n // Technically, instead of waiting to load a segment on timeline changes, a segment\n // can be requested and downloaded and only wait before it is transmuxed or parsed.\n // But in practice, there are a few reasons why it is better to wait until a loader\n // is ready to append that segment before requesting and downloading:\n //\n // 1. Because audio and main loaders cross discontinuities together, if this loader\n // is waiting for the other to catch up, then instead of requesting another\n // segment and using up more bandwidth, by not yet loading, more bandwidth is\n // allotted to the loader currently behind.\n // 2. media-segment-request doesn't have to have logic to consider whether a segment\n // is ready to be processed or not, isolating the queueing behavior to the loader.\n // 3. The audio loader bases some of its segment properties on timing information\n // provided by the main loader, meaning that, if the logic for waiting on\n // processing was in media-segment-request, then it would also need to know how\n // to re-generate the segment information after the main loader caught up.\n shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n }\n getMediaInfo_(segmentInfo = this.pendingSegment_) {\n return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n }\n getPendingSegmentPlaylist() {\n return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n }\n hasEnoughInfoToAppend_() {\n if (!this.sourceUpdater_.ready()) {\n return false;\n } // If content needs to be removed or the loader is waiting on an append reattempt,\n // then no additional content should be appended until the prior append is resolved.\n\n if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n return false;\n }\n const segmentInfo = this.pendingSegment_;\n const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n // we do not have information on this specific\n // segment yet\n\n if (!segmentInfo || !trackInfo) {\n return false;\n }\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && !segmentInfo.videoTimingInfo) {\n return false;\n } // muxed content only relies on video timing information for now.\n\n if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n return false;\n }\n if (shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n handleData_(simpleSegment, result) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // If there's anything in the call queue, then this data came later and should be\n // executed after the calls currently queued.\n\n if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n return;\n }\n const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n // logic may change behavior depending on the state, and changing state too early may\n // inflate our estimates of bandwidth. In the future this should be re-examined to\n // note more granular states.\n // don't process and append data if the mediaSource is closed\n\n if (this.mediaSource_.readyState === 'closed') {\n return;\n } // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n segmentInfo.segment.map = simpleSegment.map;\n } // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n segmentInfo.isFmp4 = simpleSegment.isFmp4;\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n if (segmentInfo.isFmp4) {\n this.trigger('fmp4');\n segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n } else {\n const trackInfo = this.getCurrentMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n let firstVideoFrameTimeForData;\n if (useVideoTimingInfo) {\n firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n } // Segment loader knows more about segment timing than the transmuxer (in certain\n // aspects), so make any changes required for a more accurate start time.\n // Don't set the end time yet, as the segment may not be finished processing.\n\n segmentInfo.timingInfo.start = this.trueSegmentStart_({\n currentStart: segmentInfo.timingInfo.start,\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex,\n currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n useVideoTimingInfo,\n firstVideoFrameTimeForData,\n videoTimingInfo: segmentInfo.videoTimingInfo,\n audioTimingInfo: segmentInfo.audioTimingInfo\n });\n } // Init segments for audio and video only need to be appended in certain cases. Now\n // that data is about to be appended, we can check the final cases to determine\n // whether we should append an init segment.\n\n this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n // as we use the start of the segment to offset the best guess (playlist provided)\n // timestamp offset.\n\n this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n // be appended or not.\n\n if (segmentInfo.isSyncRequest) {\n // first save/update our timing info for this segment.\n // this is what allows us to choose an accurate segment\n // and the main reason we make a sync request.\n this.updateTimingInfoEnd_(segmentInfo);\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n // after taking into account its timing info, do not append it.\n\n if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n this.logger_('sync segment was incorrect, not appending');\n return;\n } // otherwise append it like any other segment as our guess was correct.\n\n this.logger_('sync segment was correct, appending');\n } // Save some state so that in the future anything waiting on first append (and/or\n // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n // we need some notion of whether the timestamp offset or other relevant information\n // has had a chance to be set.\n\n segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n this.processMetadataQueue_();\n this.appendData_(segmentInfo, result);\n }\n updateAppendInitSegmentStatus(segmentInfo, type) {\n // alt audio doesn't manage timestamp offset\n if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n // in the case that we're handling partial data, we don't want to append an init\n // segment for each chunk\n !segmentInfo.changedTimestampOffset) {\n // if the timestamp offset changed, the timeline may have changed, so we have to re-\n // append init segments\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n // make sure we append init segment on playlist changes, in case the media config\n // changed\n this.appendInitSegment_[type] = true;\n }\n }\n getInitSegmentAndUpdateState_({\n type,\n initSegment,\n map,\n playlist\n }) {\n // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n // (Section 3) required to parse the applicable Media Segments. It applies to every\n // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n // or until the end of the playlist.\"\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n if (map) {\n const id = initSegmentId(map);\n if (this.activeInitSegmentId_ === id) {\n // don't need to re-append the init segment if the ID matches\n return null;\n } // a map-specified init segment takes priority over any transmuxed (or otherwise\n // obtained) init segment\n //\n // this also caches the init segment for later use\n\n initSegment = this.initSegmentForMap(map, true).bytes;\n this.activeInitSegmentId_ = id;\n } // We used to always prepend init segments for video, however, that shouldn't be\n // necessary. Instead, we should only append on changes, similar to what we've always\n // done for audio. This is more important (though may not be that important) for\n // frame-by-frame appending for LHLS, simply because of the increased quantity of\n // appends.\n\n if (initSegment && this.appendInitSegment_[type]) {\n // Make sure we track the playlist that we last used for the init segment, so that\n // we can re-append the init segment in the event that we get data from a new\n // playlist. Discontinuities and track changes are handled in other sections.\n this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n // we are appending the muxer init segment\n\n this.activeInitSegmentId_ = null;\n return initSegment;\n }\n return null;\n }\n handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n const audioBuffered = this.sourceUpdater_.audioBuffered();\n const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n // should be cleared out during the buffer removals. However, log in case it helps\n // debug.\n\n if (audioBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n }\n if (videoBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n }\n const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n // Can't remove enough buffer to make room for new segment (or the browser doesn't\n // allow for appends of segments this size). In the future, it may be possible to\n // split up the segment and append in pieces, but for now, error out this playlist\n // in an attempt to switch to a more manageable rendition.\n this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n this.error({\n message: 'Quota exceeded error with append of a single segment of content',\n excludeUntil: Infinity\n });\n this.trigger('error');\n return;\n } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n // that the segment-loader should block on future events until this one is handled, so\n // that it doesn't keep moving onto further segments. Adding the call to the call\n // queue will prevent further appends until waitingOnRemove_ and\n // quotaExceededErrorRetryTimeout_ are cleared.\n //\n // Note that this will only block the current loader. In the case of demuxed content,\n // the other load may keep filling as fast as possible. In practice, this should be\n // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n // source buffer, or video fills without enough room for audio to append (and without\n // the availability of clearing out seconds of back buffer to make room for audio).\n // But it might still be good to handle this case in the future as a TODO.\n\n this.waitingOnRemove_ = true;\n this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n // before retrying.\n\n const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n this.remove(0, timeToRemoveUntil, () => {\n this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n // attempts (since we can't clear less than the minimum)\n\n this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n this.quotaExceededErrorRetryTimeout_ = null;\n this.processCallQueue_();\n }, MIN_BACK_BUFFER * 1000);\n }, true);\n }\n handleAppendError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n // if there's no error, nothing to do\n if (!error) {\n return;\n }\n if (error.code === QUOTA_EXCEEDED_ERR) {\n this.handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }); // A quota exceeded error should be recoverable with a future re-append, so no need\n // to trigger an append error.\n\n return;\n }\n this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n this.error(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`); // If an append errors, we often can't recover.\n // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n //\n // Trigger a special error so that it can be handled separately from normal,\n // recoverable errors.\n\n this.trigger('appenderror');\n }\n appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data,\n bytes\n }) {\n // If this is a re-append, bytes were already created and don't need to be recreated\n if (!bytes) {\n const segments = [data];\n let byteLength = data.byteLength;\n if (initSegment) {\n // if the media initialization segment is changing, append it before the content\n // segment\n segments.unshift(initSegment);\n byteLength += initSegment.byteLength;\n } // Technically we should be OK appending the init segment separately, however, we\n // haven't yet tested that, and prepending is how we have always done things.\n\n bytes = concatSegments({\n bytes: byteLength,\n segments\n });\n }\n this.sourceUpdater_.appendBuffer({\n segmentInfo,\n type,\n bytes\n }, this.handleAppendError_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n }\n handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n const segment = this.pendingSegment_.segment;\n const timingInfoProperty = `${type}TimingInfo`;\n if (!segment[timingInfoProperty]) {\n segment[timingInfoProperty] = {};\n }\n segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n }\n appendData_(segmentInfo, result) {\n const {\n type,\n data\n } = result;\n if (!data || !data.byteLength) {\n return;\n }\n if (type === 'audio' && this.audioDisabled_) {\n return;\n }\n const initSegment = this.getInitSegmentAndUpdateState_({\n type,\n initSegment: result.initSegment,\n playlist: segmentInfo.playlist,\n map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n });\n this.appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data\n });\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n\n loadSegment_(segmentInfo) {\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n if (typeof segmentInfo.timestampOffset === 'number') {\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n });\n }\n }\n if (!this.hasEnoughInfoToLoad_()) {\n this.loadQueue_.push(() => {\n // regenerate the audioAppendStart, timestampOffset, etc as they\n // may have changed since this function was added to the queue.\n const options = _extends({}, segmentInfo, {\n forceTimestampOffset: true\n });\n _extends(segmentInfo, this.generateSegmentInfo_(options));\n this.isPendingTimestampOffset_ = false;\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n });\n return;\n }\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n }\n updateTransmuxerAndRequestSegment_(segmentInfo) {\n // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n // the transmuxer still needs to be updated before then.\n //\n // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n // offset must be passed to the transmuxer for stream correcting adjustments.\n if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n segmentInfo.gopsToAlignWith = [];\n this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: segmentInfo.timestampOffset\n });\n }\n const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n const isWalkingForward = this.mediaIndex !== null;\n const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n // the first timeline\n segmentInfo.timeline > 0;\n const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n this.logger_(`Requesting ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n // then this init segment has never been seen before and should be appended.\n //\n // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n // both to true and leave the decision of whether to append the init segment to append time.\n\n if (simpleSegment.map && !simpleSegment.map.bytes) {\n this.logger_('going to request init segment.');\n this.appendInitSegment_ = {\n video: true,\n audio: true\n };\n }\n segmentInfo.abortRequests = mediaSegmentRequest({\n xhr: this.vhs_.xhr,\n xhrOptions: this.xhrOptions_,\n decryptionWorker: this.decrypter_,\n segment: simpleSegment,\n abortFn: this.handleAbort_.bind(this, segmentInfo),\n progressFn: this.handleProgress_.bind(this),\n trackInfoFn: this.handleTrackInfo_.bind(this),\n timingInfoFn: this.handleTimingInfo_.bind(this),\n videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n captionsFn: this.handleCaptions_.bind(this),\n isEndOfTimeline,\n endedTimelineFn: () => {\n this.logger_('received endedtimeline callback');\n },\n id3Fn: this.handleId3_.bind(this),\n dataFn: this.handleData_.bind(this),\n doneFn: this.segmentRequestFinished_.bind(this),\n onTransmuxerLog: ({\n message,\n level,\n stream\n }) => {\n this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n }\n });\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n\n trimBackBuffer_(segmentInfo) {\n const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @return {Object} a simplified segment object copy\n */\n\n createSimplifiedSegmentObj_(segmentInfo) {\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const simpleSegment = {\n resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n byterange: part ? part.byterange : segment.byterange,\n requestId: segmentInfo.requestId,\n transmuxer: segmentInfo.transmuxer,\n audioAppendStart: segmentInfo.audioAppendStart,\n gopsToAlignWith: segmentInfo.gopsToAlignWith,\n part: segmentInfo.part\n };\n const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n if (previousSegment && previousSegment.timeline === segment.timeline) {\n // The baseStartTime of a segment is used to handle rollover when probing the TS\n // segment to retrieve timing information. Since the probe only looks at the media's\n // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n // seconds of media time, so should be used here. The previous segment is used since\n // the end of the previous segment should represent the beginning of the current\n // segment, so long as they are on the same timeline.\n if (previousSegment.videoTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n } else if (previousSegment.audioTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n }\n }\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n if (segment.map) {\n simpleSegment.map = this.initSegmentForMap(segment.map);\n }\n return simpleSegment;\n }\n saveTransferStats_(stats) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n if (stats) {\n this.mediaBytesTransferred += stats.bytesReceived;\n this.mediaTransferDuration += stats.roundTripTime;\n }\n }\n saveBandwidthRelatedStats_(duration, stats) {\n // byteLength will be used for throughput, and should be based on bytes receieved,\n // which we only know at the end of the request and should reflect total bytes\n // downloaded rather than just bytes processed from components of the segment\n this.pendingSegment_.byteLength = stats.bytesReceived;\n if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n this.bandwidth = stats.bandwidth;\n this.roundTrip = stats.roundTripTime;\n }\n handleTimeout_() {\n // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functinality between segment loaders\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n this.trigger('timeout');\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n // check the call queue directly since this function doesn't need to deal with any\n // data, and can continue even if the source buffers are not set up and we didn't get\n // any data from the segment\n if (this.callQueue_.length) {\n this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n if (!this.pendingSegment_) {\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n return;\n }\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to exclude the current playlist\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n }\n const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n if (result.gopInfo) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n } // Although we may have already started appending on progress, we shouldn't switch the\n // state away from loading until we are officially done loading the segment data.\n\n this.state = 'APPENDING'; // used for testing\n\n this.trigger('appending');\n this.waitForAppendsToComplete_(segmentInfo);\n }\n setTimeMapping_(timeline) {\n const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n if (timelineMapping !== null) {\n this.timeMapping_ = timelineMapping;\n }\n }\n updateMediaSecondsLoaded_(segment) {\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n }\n shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n if (timestampOffset === null) {\n return false;\n } // note that we're potentially using the same timestamp offset for both video and\n // audio\n\n if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n return true;\n }\n if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n return true;\n }\n return false;\n }\n trueSegmentStart_({\n currentStart,\n playlist,\n mediaIndex,\n firstVideoFrameTimeForData,\n currentVideoTimestampOffset,\n useVideoTimingInfo,\n videoTimingInfo,\n audioTimingInfo\n }) {\n if (typeof currentStart !== 'undefined') {\n // if start was set once, keep using it\n return currentStart;\n }\n if (!useVideoTimingInfo) {\n return audioTimingInfo.start;\n }\n const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n // within that segment. Since the transmuxer maintains a cache of incomplete data\n // from and/or the last frame seen, the start time may reflect a frame that starts\n // in the previous segment. Check for that case and ensure the start time is\n // accurate for the segment.\n\n if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n return firstVideoFrameTimeForData;\n }\n return videoTimingInfo.start;\n }\n waitForAppendsToComplete_(segmentInfo) {\n const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n if (!trackInfo) {\n this.error({\n message: 'No starting media returned, likely due to an unsupported media format.',\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return;\n } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n // on each queue this loader is responsible for to ensure that the appends are\n // complete.\n\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n segmentInfo.waitingOnAppends = 0; // segments with no data\n\n if (!segmentInfo.hasAppendedData_) {\n if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n // When there's no audio or video data in the segment, there's no audio or video\n // timing information.\n //\n // If there's no audio or video timing information, then the timestamp offset\n // can't be adjusted to the appropriate value for the transmuxer and source\n // buffers.\n //\n // Therefore, the next segment should be used to set the timestamp offset.\n this.isPendingTimestampOffset_ = true;\n } // override settings for metadata only segments\n\n segmentInfo.timingInfo = {\n start: 0\n };\n segmentInfo.waitingOnAppends++;\n if (!this.isPendingTimestampOffset_) {\n // update the timestampoffset\n this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n // no video/audio data.\n\n this.processMetadataQueue_();\n } // append is \"done\" instantly with no data.\n\n this.checkAppendsDone_(segmentInfo);\n return;\n } // Since source updater could call back synchronously, do the increments first.\n\n if (waitForVideo) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForAudio) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForVideo) {\n this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n if (waitForAudio) {\n this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n }\n checkAppendsDone_(segmentInfo) {\n if (this.checkForAbort_(segmentInfo.requestId)) {\n return;\n }\n segmentInfo.waitingOnAppends--;\n if (segmentInfo.waitingOnAppends === 0) {\n this.handleAppendsDone_();\n }\n }\n checkForIllegalMediaSwitch(trackInfo) {\n const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return true;\n }\n return false;\n }\n updateSourceBufferTimestampOffset_(segmentInfo) {\n if (segmentInfo.timestampOffset === null ||\n // we don't yet have the start for whatever media type (video or audio) has\n // priority, timing-wise, so we must wait\n typeof segmentInfo.timingInfo.start !== 'number' ||\n // already updated the timestamp offset for this segment\n segmentInfo.changedTimestampOffset ||\n // the alt audio loader should not be responsible for setting the timestamp offset\n this.loaderType_ !== 'main') {\n return;\n }\n let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n // the timing info here comes from video. In the event that the audio is longer than\n // the video, this will trim the start of the audio.\n // This also trims any offset from 0 at the beginning of the media\n\n segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n timingInfo: segmentInfo.timingInfo\n }); // In the event that there are part segment downloads, each will try to update the\n // timestamp offset. Retaining this bit of state prevents us from updating in the\n // future (within the same segment), however, there may be a better way to handle it.\n\n segmentInfo.changedTimestampOffset = true;\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (didChange) {\n this.trigger('timestampoffset');\n }\n }\n getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo,\n audioTimingInfo,\n timingInfo\n }) {\n if (!this.useDtsForTimestampOffset_) {\n return timingInfo.start;\n }\n if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n return videoTimingInfo.transmuxedDecodeStart;\n } // handle audio only\n\n if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n return audioTimingInfo.transmuxedDecodeStart;\n } // handle content not transmuxed (e.g., MP4)\n\n return timingInfo.start;\n }\n updateTimingInfoEnd_(segmentInfo) {\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n const trackInfo = this.getMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n if (!prioritizedTimingInfo) {\n return;\n }\n segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n // End time may not exist in a case where we aren't parsing the full segment (one\n // current example is the case of fmp4), so use the rough duration to calculate an\n // end time.\n prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n\n handleAppendsDone_() {\n // appendsdone can cause an abort\n if (this.pendingSegment_) {\n this.trigger('appendsdone');\n }\n if (!this.pendingSegment_) {\n this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n // all appending cases?\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n return;\n }\n const segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n // best to wait until all appends are done so we're sure that the primary media is\n // finished (and we have its end time).\n\n this.updateTimingInfoEnd_(segmentInfo);\n if (this.shouldSaveSegmentTimingInfo_) {\n // Timeline mappings should only be saved for the main loader. This is for multiple\n // reasons:\n //\n // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n // and the main loader try to save the timeline mapping, whichever comes later\n // will overwrite the first. In theory this is OK, as the mappings should be the\n // same, however, it breaks for (2)\n // 2) In the event of a live stream, the initial live point will make for a somewhat\n // arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n // the mapping will be off for one of the streams, dependent on which one was\n // first saved (see (1)).\n // 3) Primary timing goes by video in VHS, so the mapping should be video.\n //\n // Since the audio loader will wait for the main loader to load the first segment,\n // the main loader will save the first timeline mapping, and ensure that there won't\n // be a case where audio loads two segments without saving a mapping (thus leading\n // to missing segment timing info).\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n }\n const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n if (segmentDurationMessage) {\n if (segmentDurationMessage.severity === 'warn') {\n videojs.log.warn(segmentDurationMessage.message);\n } else {\n this.logger_(segmentDurationMessage.message);\n }\n }\n this.recordThroughput_(segmentInfo);\n this.pendingSegment_ = null;\n this.state = 'READY';\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate'); // if the sync request was not appended\n // then it was not the correct segment.\n // throw it away and use the data it gave us\n // to get the correct one.\n\n if (!segmentInfo.hasAppendedData_) {\n this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n return;\n }\n }\n this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n this.addSegmentMetadataCue_(segmentInfo);\n if (this.currentTime_() >= this.replaceSegmentsUntil_) {\n this.replaceSegmentsUntil_ = -1;\n this.fetchAtBuffer_ = true;\n }\n if (this.currentTimeline_ !== segmentInfo.timeline) {\n this.timelineChangeController_.lastTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n }); // If audio is not disabled, the main segment loader is responsible for updating\n // the audio timeline as well. If the content is video only, this won't have any\n // impact.\n\n if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n this.timelineChangeController_.lastTimelineChange({\n type: 'audio',\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n }\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate');\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (badSegmentGuess || badPartGuess) {\n this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n this.resetEverything();\n return;\n }\n const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n this.trigger('progress');\n this.mediaIndex = segmentInfo.mediaIndex;\n this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n this.endOfStream();\n } // used for testing\n\n this.trigger('appended');\n if (segmentInfo.hasAppendedData_) {\n this.mediaAppends++;\n }\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n\n recordThroughput_(segmentInfo) {\n if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n\n addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n const segment = segmentInfo.segment;\n const start = segment.start;\n const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n programDateTime: segment.programDateTime,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.id,\n start,\n end\n };\n const data = JSON.stringify(value);\n const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n /**\n * Public setter for defining the private replaceSegmentsUntil_ property, which\n * determines when we can return fetchAtBuffer to true if overwriting the buffer.\n *\n * @param {number} bufferedEnd the end of the buffered range to replace segments\n * until currentTime reaches this time.\n */\n\n set replaceSegmentsUntil(bufferedEnd) {\n this.logger_(`Replacing currently buffered segments until ${bufferedEnd}`);\n this.replaceSegmentsUntil_ = bufferedEnd;\n }\n}\nfunction noop() {}\nconst toTitleCase = function (string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n for (let i = 0; i < queue.length; i++) {\n const queueEntry = queue[i];\n if (queueEntry.type === 'mediaSource') {\n // If the next entry is a media source entry (uses multiple source buffers), block\n // processing to allow it to go through first.\n return null;\n }\n if (queueEntry.type === type) {\n return i;\n }\n }\n return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n if (sourceUpdater.queue.length === 0) {\n return;\n }\n let queueIndex = 0;\n let queueEntry = sourceUpdater.queue[queueIndex];\n if (queueEntry.type === 'mediaSource') {\n if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n sourceUpdater.queue.shift();\n queueEntry.action(sourceUpdater);\n if (queueEntry.doneFn) {\n queueEntry.doneFn();\n } // Only specific source buffer actions must wait for async updateend events. Media\n // Source actions process synchronously. Therefore, both audio and video source\n // buffers are now clear to process the next queue entries.\n\n shiftQueue('audio', sourceUpdater);\n shiftQueue('video', sourceUpdater);\n } // Media Source actions require both source buffers, so if the media source action\n // couldn't process yet (because one or both source buffers are busy), block other\n // queue actions until both are available and the media source action can process.\n\n return;\n }\n if (type === 'mediaSource') {\n // If the queue was shifted by a media source action (this happens when pushing a\n // media source action onto the queue), then it wasn't from an updateend event from an\n // audio or video source buffer, so there's no change from previous state, and no\n // processing should be done.\n return;\n } // Media source queue entries don't need to consider whether the source updater is\n // started (i.e., source buffers are created) as they don't need the source buffers, but\n // source buffer queue entries do.\n\n if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n return;\n }\n if (queueEntry.type !== type) {\n queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n if (queueIndex === null) {\n // Either there's no queue entry that uses this source buffer type in the queue, or\n // there's a media source queue entry before the next entry of this type, in which\n // case wait for that action to process first.\n return;\n }\n queueEntry = sourceUpdater.queue[queueIndex];\n }\n sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n //\n // The queue pending operation must be set before the action is performed in the event\n // that the action results in a synchronous event that is acted upon. For instance, if\n // an exception is thrown that can be handled, it's possible that new actions will be\n // appended to an empty queue and immediately executed, but would not have the correct\n // pending information if this property was set after the action was performed.\n\n sourceUpdater.queuePending[type] = queueEntry;\n queueEntry.action(type, sourceUpdater);\n if (!queueEntry.doneFn) {\n // synchronous operation, process next entry\n sourceUpdater.queuePending[type] = null;\n shiftQueue(type, sourceUpdater);\n return;\n }\n};\nconst cleanupBuffer = (type, sourceUpdater) => {\n const buffer = sourceUpdater[`${type}Buffer`];\n const titleType = toTitleCase(type);\n if (!buffer) {\n return;\n }\n buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = null;\n sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n try {\n sourceBuffer.appendBuffer(bytes);\n } catch (e) {\n sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n sourceUpdater.queuePending[type] = null;\n onError(e);\n }\n },\n remove: (start, end) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n try {\n sourceBuffer.remove(start, end);\n } catch (e) {\n sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n }\n },\n timestampOffset: offset => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n sourceBuffer.timestampOffset = offset;\n },\n callback: callback => (type, sourceUpdater) => {\n callback();\n },\n endOfStream: error => sourceUpdater => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n try {\n sourceUpdater.mediaSource.endOfStream(error);\n } catch (e) {\n videojs.log.warn('Failed to call media source endOfStream', e);\n }\n },\n duration: duration => sourceUpdater => {\n sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n try {\n sourceUpdater.mediaSource.duration = duration;\n } catch (e) {\n videojs.log.warn('Failed to set media source duration', e);\n }\n },\n abort: () => (type, sourceUpdater) => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n try {\n sourceBuffer.abort();\n } catch (e) {\n videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n }\n },\n addSourceBuffer: (type, codec) => sourceUpdater => {\n const titleType = toTitleCase(type);\n const mime = getMimeForCodec(codec);\n sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = codec;\n sourceUpdater[`${type}Buffer`] = sourceBuffer;\n },\n removeSourceBuffer: type => sourceUpdater => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n try {\n sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n } catch (e) {\n videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n }\n },\n changeType: codec => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n } // do not update codec if we don't need to.\n\n if (sourceUpdater.codecs[type] === codec) {\n return;\n }\n sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`);\n sourceBuffer.changeType(mime);\n sourceUpdater.codecs[type] = codec;\n }\n};\nconst pushQueue = ({\n type,\n sourceUpdater,\n action,\n doneFn,\n name\n}) => {\n sourceUpdater.queue.push({\n type,\n action,\n doneFn,\n name\n });\n shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n const buffered = sourceUpdater[`${type}Buffered`]();\n const bufferedAsString = prettyBuffered(buffered);\n sourceUpdater.logger_(`${type} source buffer update end. Buffered: \\n`, bufferedAsString); // Although there should, in theory, be a pending action for any updateend receieved,\n // there are some actions that may trigger updateend events without set definitions in\n // the w3c spec. For instance, setting the duration on the media source may trigger\n // updateend events on source buffers. This does not appear to be in the spec. As such,\n // if we encounter an updateend without a corresponding pending action from our queue\n // for that source buffer type, process the next action.\n\n if (sourceUpdater.queuePending[type]) {\n const doneFn = sourceUpdater.queuePending[type].doneFn;\n sourceUpdater.queuePending[type] = null;\n if (doneFn) {\n // if there's an error, report it\n doneFn(sourceUpdater[`${type}Error_`]);\n }\n }\n shiftQueue(type, sourceUpdater);\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\nclass SourceUpdater extends videojs.EventTarget {\n constructor(mediaSource) {\n super();\n this.mediaSource = mediaSource;\n this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n this.audioTimestampOffset_ = 0;\n this.videoTimestampOffset_ = 0;\n this.queue = [];\n this.queuePending = {\n audio: null,\n video: null\n };\n this.delayedAudioAppendQueue_ = [];\n this.videoAppendQueued_ = false;\n this.codecs = {};\n this.onVideoUpdateEnd_ = onUpdateend('video', this);\n this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n this.onVideoError_ = e => {\n // used for debugging\n this.videoError_ = e;\n };\n this.onAudioError_ = e => {\n // used for debugging\n this.audioError_ = e;\n };\n this.createdSourceBuffers_ = false;\n this.initializedEme_ = false;\n this.triggeredReady_ = false;\n }\n initializedEme() {\n this.initializedEme_ = true;\n this.triggerReady();\n }\n hasCreatedSourceBuffers() {\n // if false, likely waiting on one of the segment loaders to get enough data to create\n // source buffers\n return this.createdSourceBuffers_;\n }\n hasInitializedAnyEme() {\n return this.initializedEme_;\n }\n ready() {\n return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n }\n createSourceBuffers(codecs) {\n if (this.hasCreatedSourceBuffers()) {\n // already created them before\n return;\n } // the intial addOrChangeSourceBuffers will always be\n // two add buffers.\n\n this.addOrChangeSourceBuffers(codecs);\n this.createdSourceBuffers_ = true;\n this.trigger('createdsourcebuffers');\n this.triggerReady();\n }\n triggerReady() {\n // only allow ready to be triggered once, this prevents the case\n // where:\n // 1. we trigger createdsourcebuffers\n // 2. ie 11 synchronously initializates eme\n // 3. the synchronous initialization causes us to trigger ready\n // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n if (this.ready() && !this.triggeredReady_) {\n this.triggeredReady_ = true;\n this.trigger('ready');\n }\n }\n /**\n * Add a type of source buffer to the media source.\n *\n * @param {string} type\n * The type of source buffer to add.\n *\n * @param {string} codec\n * The codec to add the source buffer with.\n */\n\n addSourceBuffer(type, codec) {\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.addSourceBuffer(type, codec),\n name: 'addSourceBuffer'\n });\n }\n /**\n * call abort on a source buffer.\n *\n * @param {string} type\n * The type of source buffer to call abort on.\n */\n\n abort(type) {\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.abort(type),\n name: 'abort'\n });\n }\n /**\n * Call removeSourceBuffer and remove a specific type\n * of source buffer on the mediaSource.\n *\n * @param {string} type\n * The type of source buffer to remove.\n */\n\n removeSourceBuffer(type) {\n if (!this.canRemoveSourceBuffer()) {\n videojs.log.error('removeSourceBuffer is not supported!');\n return;\n }\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.removeSourceBuffer(type),\n name: 'removeSourceBuffer'\n });\n }\n /**\n * Whether or not the removeSourceBuffer function is supported\n * on the mediaSource.\n *\n * @return {boolean}\n * if removeSourceBuffer can be called.\n */\n\n canRemoveSourceBuffer() {\n // As of Firefox 83 removeSourceBuffer\n // throws errors, so we report that it does not support this.\n return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n static canChangeType() {\n return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n canChangeType() {\n return this.constructor.canChangeType();\n }\n /**\n * Call the changeType function on a source buffer, given the code and type.\n *\n * @param {string} type\n * The type of source buffer to call changeType on.\n *\n * @param {string} codec\n * The codec string to change type with on the source buffer.\n */\n\n changeType(type, codec) {\n if (!this.canChangeType()) {\n videojs.log.error('changeType is not supported!');\n return;\n }\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.changeType(codec),\n name: 'changeType'\n });\n }\n /**\n * Add source buffers with a codec or, if they are already created,\n * call changeType on source buffers using changeType.\n *\n * @param {Object} codecs\n * Codecs to switch to\n */\n\n addOrChangeSourceBuffers(codecs) {\n if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n }\n Object.keys(codecs).forEach(type => {\n const codec = codecs[type];\n if (!this.hasCreatedSourceBuffers()) {\n return this.addSourceBuffer(type, codec);\n }\n if (this.canChangeType()) {\n this.changeType(type, codec);\n }\n });\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {MediaObject} object containing audioBytes and/or videoBytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n\n appendBuffer(options, doneFn) {\n const {\n segmentInfo,\n type,\n bytes\n } = options;\n this.processedAppend_ = true;\n if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n this.delayedAudioAppendQueue_.push([options, doneFn]);\n this.logger_(`delayed audio append of ${bytes.length} until video append`);\n return;\n } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n // not be fired. This means that the queue will be blocked until the next action\n // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n // these errors by calling the doneFn with the specific error.\n\n const onError = doneFn;\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.appendBuffer(bytes, segmentInfo || {\n mediaIndex: -1\n }, onError),\n doneFn,\n name: 'appendBuffer'\n });\n if (type === 'video') {\n this.videoAppendQueued_ = true;\n if (!this.delayedAudioAppendQueue_.length) {\n return;\n }\n const queue = this.delayedAudioAppendQueue_.slice();\n this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n this.delayedAudioAppendQueue_.length = 0;\n queue.forEach(que => {\n this.appendBuffer.apply(this, que);\n });\n }\n }\n /**\n * Get the audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The audio buffer's buffered time range\n */\n\n audioBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n return createTimeRanges();\n }\n return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n }\n /**\n * Get the video buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The video buffer's buffered time range\n */\n\n videoBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n return createTimeRanges();\n }\n return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n }\n /**\n * Get a combined video/audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * the combined time range\n */\n\n buffered() {\n const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n if (audio && !video) {\n return this.audioBuffered();\n }\n if (video && !audio) {\n return this.videoBuffered();\n }\n return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n }\n /**\n * Add a callback to the queue that will set duration on the mediaSource.\n *\n * @param {number} duration\n * The duration to set\n *\n * @param {Function} [doneFn]\n * function to run after duration has been set.\n */\n\n setDuration(duration, doneFn = noop) {\n // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.duration(duration),\n name: 'duration',\n doneFn\n });\n }\n /**\n * Add a mediaSource endOfStream call to the queue\n *\n * @param {Error} [error]\n * Call endOfStream with an error\n *\n * @param {Function} [doneFn]\n * A function that should be called when the\n * endOfStream call has finished.\n */\n\n endOfStream(error = null, doneFn = noop) {\n if (typeof error !== 'string') {\n error = undefined;\n } // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.endOfStream(error),\n name: 'endOfStream',\n doneFn\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeAudio(start, end, done = noop) {\n if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeVideo(start, end, done = noop) {\n if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {boolean} the updating status of the SourceBuffer\n */\n\n updating() {\n // the audio/video source buffer is updating\n if (updating('audio', this) || updating('video', this)) {\n return true;\n }\n return false;\n }\n /**\n * Set/get the timestampoffset on the audio SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n audioTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.audioBuffer &&\n // no point in updating if it's the same\n this.audioTimestampOffset_ !== offset) {\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.audioTimestampOffset_ = offset;\n }\n return this.audioTimestampOffset_;\n }\n /**\n * Set/get the timestampoffset on the video SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n videoTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.videoBuffer &&\n // no point in updating if it's the same\n this.videoTimestampOffset !== offset) {\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.videoTimestampOffset_ = offset;\n }\n return this.videoTimestampOffset_;\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the audio queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n audioQueueCallback(callback) {\n if (!this.audioBuffer) {\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the video queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n videoQueueCallback(callback) {\n if (!this.videoBuffer) {\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n\n dispose() {\n this.trigger('dispose');\n bufferTypes.forEach(type => {\n this.abort(type);\n if (this.canRemoveSourceBuffer()) {\n this.removeSourceBuffer(type);\n } else {\n this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n }\n });\n this.videoAppendQueued_ = false;\n this.delayedAudioAppendQueue_.length = 0;\n if (this.sourceopenListener_) {\n this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n }\n this.off();\n }\n}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n constructor() {\n super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n }\n}\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass VTTSegmentLoader extends SegmentLoader {\n constructor(settings, options = {}) {\n super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n this.mediaSource_ = null;\n this.subtitlesTrack_ = null;\n this.loaderType_ = 'subtitle';\n this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n // the sync controller leads to improper behavior.\n\n this.shouldSaveSegmentTimingInfo_ = false;\n }\n createTransmuxer_() {\n // don't need to transmux any subtitles\n return null;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n return createTimeRanges();\n }\n const cues = this.subtitlesTrack_.cues;\n const start = cues[0].startTime;\n const end = cues[cues.length - 1].startTime;\n return createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n const combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n\n track(track) {\n if (typeof track === 'undefined') {\n return this.subtitlesTrack_;\n }\n this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n */\n\n remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // see if we need to begin loading immediately\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n const checkTimestampOffset = () => {\n this.state = 'READY';\n if (!this.paused()) {\n // if not paused, queue a buffer check as soon as possible\n this.monitorBuffer_();\n }\n };\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n this.loadSegment_(segmentInfo);\n } // never set a timestamp offset for vtt segments.\n\n timestampOffsetForSegment_() {\n return null;\n }\n chooseNextRequest_() {\n return this.skipEmptySegments_(super.chooseNextRequest_());\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n\n skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n // stop at the last possible segmentInfo\n if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n segmentInfo = null;\n break;\n }\n segmentInfo = this.generateSegmentInfo_({\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex + 1,\n startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n isSyncRequest: segmentInfo.isSyncRequest\n });\n }\n return segmentInfo;\n }\n stopForError(error) {\n this.error(error);\n this.state = 'READY';\n this.pause();\n this.trigger('error');\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n if (!this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n this.mediaRequestsAborted += 1;\n return;\n }\n if (error) {\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n }\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n } else {\n this.mediaRequestsErrored += 1;\n }\n this.stopForError(error);\n return;\n }\n const segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functionality between segment loaders\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n this.state = 'APPENDING'; // used for tests\n\n this.trigger('appending');\n const segment = segmentInfo.segment;\n if (segment.map) {\n segment.map.bytes = simpleSegment.map.bytes;\n }\n segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n message: 'Error loading vtt.js'\n }));\n return;\n }\n segment.requested = true;\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.stopForError({\n message: e.message\n });\n return;\n }\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n if (segmentInfo.cues.length) {\n segmentInfo.timingInfo = {\n start: segmentInfo.cues[0].startTime,\n end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n };\n } else {\n segmentInfo.timingInfo = {\n start: segmentInfo.startOfSegment,\n end: segmentInfo.startOfSegment + segmentInfo.duration\n };\n }\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n // the subtitle track\n\n segmentInfo.cues.forEach(cue => {\n this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n // cues to have identical time-intervals, but if the text is also identical\n // we can safely assume it is a duplicate that can be removed (ex. when a cue\n // \"overlaps\" VTT segments)\n\n removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n this.handleAppendsDone_();\n }\n handleData_() {// noop as we shouldn't be getting video/audio data captions\n // that we do not support here.\n }\n updateTimingInfoEnd_() {// noop\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @throws NoVttJsError\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n\n parseVTTCues_(segmentInfo) {\n let decoder;\n let decodeBytesToString = false;\n if (typeof window$1.WebVTT !== 'function') {\n // caller is responsible for exception handling.\n throw new NoVttJsError();\n }\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n parser.ontimestampmap = map => {\n segmentInfo.timestampmap = map;\n };\n parser.onparsingerror = error => {\n videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n if (segmentInfo.segment.map) {\n let mapData = segmentInfo.segment.map.bytes;\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n parser.parse(mapData);\n }\n let segmentData = segmentInfo.bytes;\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n\n updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n const segment = segmentInfo.segment;\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n const timestampmap = segmentInfo.timestampmap;\n const diff = timestampmap.MPEGTS / ONE_SECOND_IN_TS - timestampmap.LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(cue => {\n // First convert cue time to TS time using the timestamp-map provided within the vtt\n cue.startTime += diff;\n cue.endTime += diff;\n });\n if (!playlist.syncInfo) {\n const firstStart = segmentInfo.cues[0].startTime;\n const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n}\n\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n * the track to find the cue for\n *\n * @param {number} mediaTime\n * the time to find the cue at\n *\n * @return {Object|null}\n * the found cue or null\n */\n\nconst findAdCue = function (track, mediaTime) {\n const cues = track.cues;\n for (let i = 0; i < cues.length; i++) {\n const cue = cues[i];\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n if (!media.segments) {\n return;\n }\n let mediaTime = offset;\n let cue;\n for (let i = 0; i < media.segments.length; i++) {\n const segment = media.segments[i];\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n mediaTime += segment.duration;\n }\n};\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (duration !== Infinity) {\n const syncPoint = {\n time: 0,\n segmentIndex: 0,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n return null;\n }\n let syncPoint = null;\n let lastDistance = null;\n const partsAndSegments = getPartsAndSegments(playlist);\n currentTime = currentTime || 0;\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n if (!datetimeMapping || !segment.dateTimeObject) {\n continue;\n }\n const segmentTime = segment.dateTimeObject.getTime() / 1000;\n let start = segmentTime + datetimeMapping; // take part duration into account.\n\n if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n for (let z = 0; z < partAndSegment.partIndex; z++) {\n start += segment.parts[z].duration;\n }\n }\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n return syncPoint;\n }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n let lastDistance = null;\n currentTime = currentTime || 0;\n const partsAndSegments = getPartsAndSegments(playlist);\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n currentTime = currentTime || 0;\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n let lastDistance = null;\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const discontinuitySync = syncController.discontinuities[discontinuity];\n if (discontinuitySync) {\n const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex,\n partIndex: null\n };\n }\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (playlist.syncInfo) {\n const syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}];\nclass SyncController extends videojs.EventTarget {\n constructor(options = {}) {\n super(); // ...for synching across variants\n\n this.timelines = [];\n this.discontinuities = [];\n this.timelineToDatetimeMappings = {};\n this.logger_ = logger('SyncController');\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Object}\n * A sync-point object\n */\n\n getSyncPoint(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime);\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @return {number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n\n getExpiredTime(playlist, duration) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n const syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n return Math.abs(syncPoint.time + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: syncPoint.segmentIndex,\n endIndex: 0\n }));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Array}\n * A list of sync-point objects\n */\n\n runStrategies_(playlist, duration, currentTimeline, currentTime) {\n const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (let i = 0; i < syncPointStrategies.length; i++) {\n const strategy = syncPointStrategies[i];\n const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime);\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint\n });\n }\n }\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {string} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {number} target.value\n * The value to target for the specified key.\n * @return {Object}\n * The sync-point nearest the target\n */\n\n selectSyncPoint_(syncPoints, target) {\n let bestSyncPoint = syncPoints[0].syncPoint;\n let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n let bestStrategy = syncPoints[0].strategy;\n for (let i = 1; i < syncPoints.length; i++) {\n const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[i].syncPoint;\n bestStrategy = syncPoints[i].strategy;\n }\n }\n this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n\n saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n return;\n } // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n const lastRemovedSegment = oldPlaylist.segments[i];\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + i,\n time: lastRemovedSegment.start\n };\n this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n * before segments start to load.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n\n setDateTimeMappingForStart(playlist) {\n // It's possible for the playlist to be updated before playback starts, meaning time\n // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n // crossed, then the old time zero mapping (for the prior timeline) would be retained\n // unless the mappings are cleared.\n this.timelineToDatetimeMappings = {};\n if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n const firstSegment = playlist.segments[0];\n const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n }\n }\n /**\n * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n * based on the latest timing information.\n *\n * @param {Object} options\n * Options object\n * @param {SegmentInfo} options.segmentInfo\n * The current active request information\n * @param {boolean} options.shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved for timeline mapping and program date time mappings.\n */\n\n saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping\n }) {\n const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n const segment = segmentInfo.segment;\n if (didCalculateSegmentTimeMapping) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!segmentInfo.playlist.syncInfo) {\n segmentInfo.playlist.syncInfo = {\n mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n const dateTime = segment.dateTimeObject;\n if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n }\n }\n timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].time;\n }\n mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {Object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @param {boolean} shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved in timelines.\n * @return {boolean}\n * Returns false if segment time mapping could not be calculated\n */\n\n calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n // TODO: remove side effects\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n let mappingObj = this.timelines[segmentInfo.timeline];\n let start;\n let end;\n if (typeof segmentInfo.timestampOffset === 'number') {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n if (shouldSaveTimelineMapping) {\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n }\n start = segmentInfo.startOfSegment;\n end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n start = timingInfo.start + mappingObj.mapping;\n end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n if (part) {\n part.start = start;\n part.end = end;\n } // If we don't have a segment start yet or the start value we got\n // is less than our current segment.start value, save a new start value.\n // We have to do this because parts will have segment timing info saved\n // multiple times and we want segment start to be the earliest part start\n // value for that segment.\n\n if (!segment.start || start < segment.start) {\n segment.start = start;\n }\n segment.end = end;\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n saveDiscontinuitySyncInfo_(segmentInfo) {\n const playlist = segmentInfo.playlist;\n const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n const accuracy = Math.abs(mediaIndexDiff);\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n let time;\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex,\n endIndex: segmentIndex\n });\n } else {\n time = segment.end + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex + 1,\n endIndex: segmentIndex\n });\n }\n this.discontinuities[discontinuity] = {\n time,\n accuracy\n };\n }\n }\n }\n }\n dispose() {\n this.trigger('dispose');\n this.off();\n }\n}\n\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\nclass TimelineChangeController extends videojs.EventTarget {\n constructor() {\n super();\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n }\n clearPendingTimelineChange(type) {\n this.pendingTimelineChanges_[type] = null;\n this.trigger('pendingtimelinechange');\n }\n pendingTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.pendingTimelineChanges_[type] = {\n type,\n from,\n to\n };\n this.trigger('pendingtimelinechange');\n }\n return this.pendingTimelineChanges_[type];\n }\n lastTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.lastTimelineChanges_[type] = {\n type,\n from,\n to\n };\n delete this.pendingTimelineChanges_[type];\n this.trigger('timelinechange');\n }\n return this.lastTimelineChanges_[type];\n }\n dispose() {\n this.trigger('dispose');\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n this.off();\n }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst workerCode = transform(getWorkerString(function () {\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n var Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n }();\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n *\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */\n\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n const precompute = function () {\n const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n const encTable = tables[0];\n const decTable = tables[1];\n const sbox = encTable[4];\n const sboxInv = decTable[4];\n let i;\n let x;\n let xInv;\n const d = [];\n const th = [];\n let x2;\n let x4;\n let x8;\n let s;\n let tEnc;\n let tDec; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n return tables;\n };\n let aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n class AES {\n constructor(key) {\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n let i;\n let j;\n let tmp;\n const sbox = this._tables[0][4];\n const decTable = this._tables[1];\n const keyLen = key.length;\n let rcon = 1;\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n const encKey = key.slice(0);\n const decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {number} encrypted0 the first word to decrypt\n * @param {number} encrypted1 the second word to decrypt\n * @param {number} encrypted2 the third word to decrypt\n * @param {number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n let a = encrypted0 ^ key[0];\n let b = encrypted3 ^ key[1];\n let c = encrypted2 ^ key[2];\n let d = encrypted1 ^ key[3];\n let a2;\n let b2;\n let c2; // key.length === 2 ?\n\n const nInnerRounds = key.length / 4 - 2;\n let i;\n let kIndex = 4;\n const table = this._tables[1]; // load up the tables\n\n const table0 = table[0];\n const table1 = table[1];\n const table2 = table[2];\n const table3 = table[3];\n const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n }\n }\n /**\n * @file async-stream.js\n */\n\n /**\n * A wrapper around the Stream class to use setTimeout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n class AsyncStream extends Stream {\n constructor() {\n super(Stream);\n this.jobs = [];\n this.delay = 1;\n this.timeout_ = null;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n processJob_() {\n this.jobs.shift()();\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n }\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n push(job) {\n this.jobs.push(job);\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n }\n }\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n const ntoh = function (word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n const decrypt = function (encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n const decrypted = new Uint8Array(encrypted.byteLength);\n const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n let init0;\n let init1;\n let init2;\n let init3;\n let encrypted0;\n let encrypted1;\n let encrypted2;\n let encrypted3; // iteration variable\n\n let wordIx; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n class Decrypter {\n constructor(encrypted, key, initVector, done) {\n const step = Decrypter.STEP;\n const encrypted32 = new Int32Array(encrypted.buffer);\n const decrypted = new Uint8Array(encrypted.byteLength);\n let i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {number} the value of step 32000\n */\n\n static get STEP() {\n // 4 * 8000;\n return 32000;\n }\n /**\n * @private\n */\n\n decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n const bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n }\n }\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n };\n var BigInt = window_1.BigInt || Number;\n [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n (function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n })();\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n const createTransferableMessage = function (message) {\n const transferable = {};\n Object.keys(message).forEach(key => {\n const value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /* global self */\n\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n */\n\n self.onmessage = function (event) {\n const data = event.data;\n const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n}));\n\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nconst audioTrackKind_ = properties => {\n let kind = properties.default ? 'main' : 'alternative';\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n segmentLoader.abort();\n segmentLoader.pause();\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\nconst startLoaders = (playlistLoader, mediaType) => {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\nconst onGroupChanged = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup || activeGroup.isMainPlaylist) {\n // there is no group active or active group is a main playlist and won't change\n return;\n }\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n return;\n } // Non-destructive resync\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n mediaType.lastGroup_ = null;\n segmentLoader.abort();\n segmentLoader.pause();\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\nconst onTrackChanged = (type, settings) => () => {\n const {\n mainPlaylistLoader,\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n if (activeGroup.isMainPlaylist) {\n // track did not change, do nothing\n if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n return;\n }\n const pc = settings.vhs.playlistController_;\n const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n if (pc.media() === newPlaylist) {\n return;\n }\n mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n mainPlaylistLoader.pause();\n mainSegmentLoader.resetEverything();\n pc.fastQualityChange_(newPlaylist);\n return;\n }\n if (type === 'AUDIO') {\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no\n // playlist loader for the audio group), we want to do a destructive reset of the\n // main segment loader and not restart the audio loaders\n mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n // it should be stopped\n\n mainSegmentLoader.resetEverything();\n return;\n } // although the segment loader is an audio segment loader, call the setAudio\n // function to ensure it is prepared to re-append the init segment (or handle other\n // config changes)\n\n segmentLoader.setAudio(true);\n mainSegmentLoader.setAudio(false);\n }\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is excluded) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n },\n excludePlaylist\n } = settings; // switch back to default audio track\n\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.activeGroup();\n const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n const defaultTrack = mediaType.tracks[id];\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is exclude the current\n // rendition and hope another will switch audio groups\n excludePlaylist({\n error: {\n message: 'Problem encountered loading the default audio track.'\n }\n });\n return;\n }\n videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n for (const trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n mediaType.onTrackChanged();\n },\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n const track = mediaType.activeTrack();\n if (track) {\n track.mode = 'disabled';\n }\n mediaType.onTrackChanged();\n }\n};\nconst setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: (type, playlistLoader, settings) => {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: (type, playlistLoader, settings) => {\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nconst initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': (type, settings) => {\n const {\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks,\n logger_\n }\n },\n mainPlaylistLoader\n } = settings;\n const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n default: {\n default: true\n }\n }\n };\n if (audioOnlyMain) {\n mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n }\n }\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (audioOnlyMain) {\n logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n properties.isMainPlaylist = true;\n playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n // use the resolved media playlist object\n } else if (sourceType === 'vhs-json' && properties.playlists) {\n playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n } else if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n // should we even have properties.playlists in this check.\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = new videojs.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n default: properties.default,\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': (type, settings) => {\n const {\n tech,\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n },\n mainPlaylistLoader\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n } else if (sourceType === 'dash') {\n const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n if (!playlists.length) {\n return;\n }\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else if (sourceType === 'vhs-json') {\n playlistLoader = new PlaylistLoader(\n // if the vhs-json object included the media playlist, use the media playlist\n // as provided, otherwise use the resolved URI to load the playlist\n properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n default: properties.default && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': (type, settings) => {\n const {\n tech,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n }\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n continue;\n }\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let newProps = {\n label: variantLabel,\n language: properties.language,\n instreamId: properties.instreamId,\n default: properties.default && properties.autoselect\n };\n if (captionServices[newProps.instreamId]) {\n newProps = merge(newProps, captionServices[newProps.instreamId]);\n }\n if (newProps.default === undefined) {\n delete newProps.default;\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n groups[groupId].push(merge({\n id: variantLabel\n }, properties));\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: newProps.instreamId,\n kind: 'captions',\n default: newProps.default,\n language: newProps.language,\n label: newProps.label\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\nconst groupMatch = (list, media) => {\n for (let i = 0; i < list.length; i++) {\n if (playlistMatch(media, list[i])) {\n return true;\n }\n if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nconst activeGroup = (type, settings) => track => {\n const {\n mainPlaylistLoader,\n mediaTypes: {\n [type]: {\n groups\n }\n }\n } = settings;\n const media = mainPlaylistLoader.media();\n if (!media) {\n return null;\n }\n let variants = null; // set to variants to main media active group\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n const groupKeys = Object.keys(groups);\n if (!variants) {\n // find the mainPlaylistLoader media\n // that is in a media group if we are dealing\n // with audio only\n if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n for (let i = 0; i < groupKeys.length; i++) {\n const groupPropertyList = groups[groupKeys[i]];\n if (groupMatch(groupPropertyList, media)) {\n variants = groupPropertyList;\n break;\n }\n } // use the main group if it exists\n } else if (groups.main) {\n variants = groups.main; // only one group, use that one\n } else if (groupKeys.length === 1) {\n variants = groups[groupKeys[0]];\n }\n }\n if (typeof track === 'undefined') {\n return variants;\n }\n if (track === null || !variants) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n return null;\n },\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n return tracks[id];\n }\n }\n return null;\n }\n};\nconst getActiveGroup = (type, {\n mediaTypes\n}) => () => {\n const activeTrack_ = mediaTypes[type].activeTrack();\n if (!activeTrack_) {\n return null;\n }\n return mediaTypes[type].activeGroup(activeTrack_);\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n * PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n * VHS SourceHandler\n * @param {Object} settings.main\n * The parsed main manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n * Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nconst setupMediaGroups = settings => {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n initialize[type](type, settings);\n });\n const {\n mediaTypes,\n mainPlaylistLoader,\n tech,\n vhs,\n segmentLoaders: {\n ['AUDIO']: audioSegmentLoader,\n main: mainSegmentLoader\n }\n } = settings; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n const audioGroup = mediaTypes.AUDIO.activeGroup();\n if (audioGroup) {\n const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onGroupChanged();\n mediaTypes.AUDIO.onTrackChanged();\n const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n // track is changed, but needs to be handled here since the track may not be considered\n // changed on the first call to onTrackChanged\n\n if (!activeAudioGroup.playlistLoader) {\n // either audio is muxed with video or the stream is audio only\n mainSegmentLoader.setAudio(true);\n } else {\n // audio is demuxed\n mainSegmentLoader.setAudio(false);\n audioSegmentLoader.setAudio(true);\n }\n }\n mainPlaylistLoader.on('mediachange', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n });\n mainPlaylistLoader.on('mediachanging', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n }); // custom audio track change event handler for usage event\n\n const onAudioTrackChanged = () => {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'vhs-audio-change'\n });\n };\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n vhs.on('dispose', () => {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n for (const id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nconst createMediaTypes = () => {\n const mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n getActiveGroup: noop,\n onGroupChanged: noop,\n onTrackChanged: noop,\n lastTrack_: null,\n logger_: logger(`MediaGroups[${type}]`)\n };\n });\n return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n */\n\nclass SteeringManifest {\n constructor() {\n this.priority_ = [];\n }\n set version(number) {\n // Only version 1 is currently supported for both DASH and HLS.\n if (number === 1) {\n this.version_ = number;\n }\n }\n set ttl(seconds) {\n // TTL = time-to-live, default = 300 seconds.\n this.ttl_ = seconds || 300;\n }\n set reloadUri(uri) {\n if (uri) {\n // reload URI can be relative to the previous reloadUri.\n this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n }\n }\n set priority(array) {\n // priority must be non-empty and unique values.\n if (array && array.length) {\n this.priority_ = array;\n }\n }\n get version() {\n return this.version_;\n }\n get ttl() {\n return this.ttl_;\n }\n get reloadUri() {\n return this.reloadUri_;\n }\n get priority() {\n return this.priority_;\n }\n}\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\n\nclass ContentSteeringController extends videojs.EventTarget {\n constructor(xhr, bandwidth) {\n super();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.logger_ = logger('Content Steering');\n this.xhr_ = xhr;\n this.getBandwidth_ = bandwidth;\n }\n /**\n * Assigns the content steering tag properties to the steering controller\n *\n * @param {string} baseUrl the baseURL from the manifest for resolving the steering manifest url\n * @param {Object} steeringTag the content steering tag from the main manifest\n */\n\n assignTagProperties(baseUrl, steeringTag) {\n this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n if (!steeringUri) {\n this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n this.trigger('error');\n return;\n } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n if (steeringUri.startsWith('data:')) {\n this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n return;\n } // With DASH queryBeforeStart, we want to use the steeringUri as soon as possible for the request.\n\n this.steeringManifest.reloadUri = this.queryBeforeStart ? steeringUri : resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on tags.\n\n this.queryBeforeStart = steeringTag.queryBeforeStart || false;\n this.proxyServerUrl_ = steeringTag.proxyServerURL || null; // trigger a steering event if we have a pathway from the content steering tag.\n // this tells VHS which segment pathway to start with.\n // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n if (this.defaultPathway && !this.queryBeforeStart) {\n this.trigger('content-steering');\n }\n if (this.queryBeforeStart) {\n this.requestSteeringManifest(this.steeringManifest.reloadUri);\n }\n }\n /**\n * Requests the content steering manifest and parse the response. This should only be called after\n * assignTagProperties was called with a content steering tag.\n *\n * @param {string} initialUri The optional uri to make the request with.\n * If set, the request should be made with exactly what is passed in this variable.\n * This scenario is specific to DASH when the queryBeforeStart parameter is true.\n * This scenario should only happen once on initalization.\n */\n\n requestSteeringManifest(initialUri) {\n const reloadUri = this.steeringManifest.reloadUri;\n if (!initialUri && !reloadUri) {\n return;\n } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n // This request URI accounts for manifest URIs that have been excluded.\n\n const uri = initialUri || this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n if (!uri) {\n this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n this.trigger('error');\n this.dispose();\n return;\n }\n this.request_ = this.xhr_({\n uri\n }, (error, errorInfo) => {\n if (error) {\n // If the client receives HTTP 410 Gone in response to a manifest request,\n // it MUST NOT issue another request for that URI for the remainder of the\n // playback session. It MAY continue to use the most-recently obtained set\n // of Pathways.\n if (errorInfo.status === 410) {\n this.logger_(`manifest request 410 ${error}.`);\n this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n this.excludedSteeringManifestURLs.add(uri);\n return;\n } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n // header in response to a manifest request, it SHOULD wait until the time\n // specified by the Retry-After header to reissue the request.\n\n if (errorInfo.status === 429) {\n const retrySeconds = errorInfo.responseHeaders['retry-after'];\n this.logger_(`manifest request 429 ${error}.`);\n this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n this.startTTLTimeout_(parseInt(retrySeconds, 10));\n return;\n } // If the Steering Manifest cannot be loaded and parsed correctly, the\n // client SHOULD continue to use the previous values and attempt to reload\n // it after waiting for the previously-specified TTL (or 5 minutes if\n // none).\n\n this.logger_(`manifest failed to load ${error}.`);\n this.startTTLTimeout_();\n return;\n }\n const steeringManifestJson = JSON.parse(this.request_.responseText);\n this.startTTLTimeout_();\n this.assignSteeringProperties_(steeringManifestJson);\n });\n }\n /**\n * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n *\n * @param {string} steeringUrl the steering manifest url\n * @return the steering manifest url to a proxy server with all parameters set\n */\n\n setProxyServerUrl_(steeringUrl) {\n const steeringUrlObject = new window$1.URL(steeringUrl);\n const proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n return this.setSteeringParams_(proxyServerUrlObject.toString());\n }\n /**\n * Decodes and parses the data uri encoded steering manifest\n *\n * @param {string} dataUri the data uri to be decoded and parsed.\n */\n\n decodeDataUriManifest_(dataUri) {\n const steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n this.assignSteeringProperties_(steeringManifestJson);\n }\n /**\n * Set the HLS or DASH content steering manifest request query parameters. For example:\n * _HLS_pathway=\"\" and _HLS_throughput=\n * _DASH_pathway and _DASH_throughput\n *\n * @param {string} uri to add content steering server parameters to.\n * @return a new uri as a string with the added steering query parameters.\n */\n\n setSteeringParams_(url) {\n const urlObject = new window$1.URL(url);\n const path = this.getPathway();\n const networkThroughput = this.getBandwidth_();\n if (path) {\n const pathwayKey = `_${this.manifestType_}_pathway`;\n urlObject.searchParams.set(pathwayKey, path);\n }\n if (networkThroughput) {\n const throughputKey = `_${this.manifestType_}_throughput`;\n urlObject.searchParams.set(throughputKey, networkThroughput);\n }\n return urlObject.toString();\n }\n /**\n * Assigns the current steering manifest properties and to the SteeringManifest object\n *\n * @param {Object} steeringJson the raw JSON steering manifest\n */\n\n assignSteeringProperties_(steeringJson) {\n this.steeringManifest.version = steeringJson.VERSION;\n if (!this.steeringManifest.version) {\n this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n this.trigger('error');\n return;\n }\n this.steeringManifest.ttl = steeringJson.TTL;\n this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // TODO: HLS handle PATHWAY-CLONES. See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n // 1. apply first pathway from the array.\n // 2. if first pathway doesn't exist in manifest, try next pathway.\n // a. if all pathways are exhausted, ignore the steering manifest priority.\n // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n // the excluded pathway will be ignored.\n // See excludePathway usage in excludePlaylist().\n // If there are no available pathways, we need to stop content steering.\n\n if (!this.availablePathways_.size) {\n this.logger_('There are no available pathways for content steering. Ending content steering.');\n this.trigger('error');\n this.dispose();\n }\n const chooseNextPathway = pathwaysByPriority => {\n for (const path of pathwaysByPriority) {\n if (this.availablePathways_.has(path)) {\n return path;\n }\n } // If no pathway matches, ignore the manifest and choose the first available.\n\n return [...this.availablePathways_][0];\n };\n const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n if (this.currentPathway !== nextPathway) {\n this.currentPathway = nextPathway;\n this.trigger('content-steering');\n }\n }\n /**\n * Returns the pathway to use for steering decisions\n *\n * @return {string} returns the current pathway or the default\n */\n\n getPathway() {\n return this.currentPathway || this.defaultPathway;\n }\n /**\n * Chooses the manifest request URI based on proxy URIs and server URLs.\n * Also accounts for exclusion on certain manifest URIs.\n *\n * @param {string} reloadUri the base uri before parameters\n *\n * @return {string} the final URI for the request to the manifest server.\n */\n\n getRequestURI(reloadUri) {\n if (!reloadUri) {\n return null;\n }\n const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n if (this.proxyServerUrl_) {\n const proxyURI = this.setProxyServerUrl_(reloadUri);\n if (!isExcluded(proxyURI)) {\n return proxyURI;\n }\n }\n const steeringURI = this.setSteeringParams_(reloadUri);\n if (!isExcluded(steeringURI)) {\n return steeringURI;\n } // Return nothing if all valid manifest URIs are excluded.\n\n return null;\n }\n /**\n * Start the timeout for re-requesting the steering manifest at the TTL interval.\n *\n * @param {number} ttl time in seconds of the timeout. Defaults to the\n * ttl interval in the steering manifest\n */\n\n startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n // 300 (5 minutes) is the default value.\n const ttlMS = ttl * 1000;\n this.ttlTimeout_ = window$1.setTimeout(() => {\n this.requestSteeringManifest();\n }, ttlMS);\n }\n /**\n * Clear the TTL timeout if necessary.\n */\n\n clearTTLTimeout_() {\n window$1.clearTimeout(this.ttlTimeout_);\n this.ttlTimeout_ = null;\n }\n /**\n * aborts any current steering xhr and sets the current request object to null\n */\n\n abort() {\n if (this.request_) {\n this.request_.abort();\n }\n this.request_ = null;\n }\n /**\n * aborts steering requests clears the ttl timeout and resets all properties.\n */\n\n dispose() {\n this.off('content-steering');\n this.off('error');\n this.abort();\n this.clearTTLTimeout_();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n }\n /**\n * adds a pathway to the available pathways set\n *\n * @param {string} pathway the pathway string to add\n */\n\n addAvailablePathway(pathway) {\n if (pathway) {\n this.availablePathways_.add(pathway);\n }\n }\n /**\n * clears all pathways from the available pathways set\n */\n\n clearAvailablePathways() {\n this.availablePathways_.clear();\n }\n excludePathway(pathway) {\n return this.availablePathways_.delete(pathway);\n }\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n currentPlaylist,\n buffered,\n currentTime,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration,\n bufferBasedABR,\n log\n}) {\n // we have no other playlist to switch to\n if (!nextPlaylist) {\n videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n return false;\n }\n const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n if (!currentPlaylist) {\n log(`${sharedLogLine} as current playlist is not set`);\n return true;\n } // no need to switch if playlist is the same\n\n if (nextPlaylist.id === currentPlaylist.id) {\n return false;\n } // determine if current time is in a buffered range.\n\n const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n if (!currentPlaylist.endList) {\n // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n // doubles the time to first playback.\n if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n return false;\n }\n log(`${sharedLogLine} as current playlist is live`);\n return true;\n }\n const forwardBuffer = timeAheadOf(buffered, currentTime);\n const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n\n if (duration < maxBufferLowWaterLine) {\n log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n return true;\n }\n const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n // we can switch down\n\n if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n if (bufferBasedABR) {\n logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n }\n log(logLine);\n return true;\n } // and if our buffer is higher than the low water line,\n // we can switch up\n\n if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n if (bufferBasedABR) {\n logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n }\n log(logLine);\n return true;\n }\n log(`not ${sharedLogLine} as no switching criteria met`);\n return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\n\nclass PlaylistController extends videojs.EventTarget {\n constructor(options) {\n super();\n const {\n src,\n withCredentials,\n tech,\n bandwidth,\n externVhs,\n useCueTags,\n playlistExclusionDuration,\n enableLowInitialPlaylist,\n sourceType,\n cacheEncryptionKeys,\n bufferBasedABR,\n leastPixelDiffSelector,\n captionServices\n } = options;\n if (!src) {\n throw new Error('A non-empty playlist URL or JSON manifest string is required');\n }\n let {\n maxPlaylistRetries\n } = options;\n if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n maxPlaylistRetries = Infinity;\n }\n Vhs$1 = externVhs;\n this.bufferBasedABR = Boolean(bufferBasedABR);\n this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n this.withCredentials = withCredentials;\n this.tech_ = tech;\n this.vhs_ = tech.vhs;\n this.sourceType_ = sourceType;\n this.useCueTags_ = useCueTags;\n this.playlistExclusionDuration = playlistExclusionDuration;\n this.maxPlaylistRetries = maxPlaylistRetries;\n this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n if (this.useCueTags_) {\n this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n this.requestOptions_ = {\n withCredentials,\n maxPlaylistRetries,\n timeout: null\n };\n this.on('error', this.pauseLoading);\n this.mediaTypes_ = createMediaTypes();\n this.mediaSource = new window$1.MediaSource();\n this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n // everything, and the MediaSource should not be detached without a proper disposal\n\n this.seekable_ = createTimeRanges();\n this.hasPlayed_ = false;\n this.syncController_ = new SyncController(options);\n this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n this.decrypter_ = new Decrypter();\n this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n this.inbandTextTracks_ = {};\n this.timelineChangeController_ = new TimelineChangeController();\n const segmentLoaderSettings = {\n vhs: this.vhs_,\n parse708captions: options.parse708captions,\n useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n calculateTimestampOffsetForEachSegment: options.calculateTimestampOffsetForEachSegment,\n captionServices,\n mediaSource: this.mediaSource,\n currentTime: this.tech_.currentTime.bind(this.tech_),\n seekable: () => this.seekable(),\n seeking: () => this.tech_.seeking(),\n duration: () => this.duration(),\n hasPlayed: () => this.hasPlayed_,\n goalBufferLength: () => this.goalBufferLength(),\n bandwidth,\n syncController: this.syncController_,\n decrypter: this.decrypter_,\n sourceType: this.sourceType_,\n inbandTextTracks: this.inbandTextTracks_,\n cacheEncryptionKeys,\n sourceUpdater: this.sourceUpdater_,\n timelineChangeController: this.timelineChangeController_,\n exactManifestTimings: options.exactManifestTimings,\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n }; // The source type check not only determines whether a special DASH playlist loader\n // should be used, but also covers the case where the provided src is a vhs-json\n // manifest object (instead of a URL). In the case of vhs-json, the default\n // PlaylistLoader should be used.\n\n this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n }));\n this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n segmentMetadataTrack: this.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'vtt',\n featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n loadVttJs: () => new Promise((resolve, reject) => {\n function onLoad() {\n tech.off('vttjserror', onError);\n resolve();\n }\n function onError() {\n tech.off('vttjsloaded', onLoad);\n reject();\n }\n tech.one('vttjsloaded', onLoad);\n tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n tech.addWebVttScript_();\n })\n }), options);\n const getBandwidth = () => {\n return this.mainSegmentLoader_.bandwidth;\n };\n this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n this.setupSegmentLoaderListeners_();\n if (this.bufferBasedABR) {\n this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n this.tech_.on('pause', () => this.stopABRTimer_());\n this.tech_.on('play', () => this.startABRTimer_());\n } // Create SegmentLoader stat-getters\n // mediaRequests_\n // mediaRequestsAborted_\n // mediaRequestsTimedout_\n // mediaRequestsErrored_\n // mediaTransferDuration_\n // mediaBytesTransferred_\n // mediaAppends_\n\n loaderStats.forEach(stat => {\n this[stat + '_'] = sumLoaderStat.bind(this, stat);\n });\n this.logger_ = logger('pc');\n this.triggeredFmp4Usage = false;\n if (this.tech_.preload() === 'none') {\n this.loadOnPlay_ = () => {\n this.loadOnPlay_ = null;\n this.mainPlaylistLoader_.load();\n };\n this.tech_.one('play', this.loadOnPlay_);\n } else {\n this.mainPlaylistLoader_.load();\n }\n this.timeToLoadedData__ = -1;\n this.mainAppendsToLoadedData__ = -1;\n this.audioAppendsToLoadedData__ = -1;\n const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n this.tech_.one(event, () => {\n const timeToLoadedDataStart = Date.now();\n this.tech_.one('loadeddata', () => {\n this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n });\n });\n }\n mainAppendsToLoadedData_() {\n return this.mainAppendsToLoadedData__;\n }\n audioAppendsToLoadedData_() {\n return this.audioAppendsToLoadedData__;\n }\n appendsToLoadedData_() {\n const main = this.mainAppendsToLoadedData_();\n const audio = this.audioAppendsToLoadedData_();\n if (main === -1 || audio === -1) {\n return -1;\n }\n return main + audio;\n }\n timeToLoadedData_() {\n return this.timeToLoadedData__;\n }\n /**\n * Run selectPlaylist and switch to the new playlist if we should\n *\n * @param {string} [reason=abr] a reason for why the ABR check is made\n * @private\n */\n\n checkABR_(reason = 'abr') {\n const nextPlaylist = this.selectPlaylist();\n if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n this.switchMedia_(nextPlaylist, reason);\n }\n }\n switchMedia_(playlist, cause, delay) {\n const oldMedia = this.media();\n const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n const newId = playlist.id || playlist.uri;\n if (oldId && oldId !== newId) {\n this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-rendition-change-${cause}`\n });\n }\n this.mainPlaylistLoader_.media(playlist, delay);\n }\n /**\n * A function that ensures we switch our playlists inside of `mediaTypes`\n * to match the current `serviceLocation` provided by the contentSteering controller.\n * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n *\n * This should only be called on a DASH playback scenario while using content steering.\n * This is necessary due to differences in how media in HLS manifests are generally tied to\n * a video playlist, where in DASH that is not always the case.\n */\n\n switchMediaForDASHContentSteering_() {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n const mediaType = this.mediaTypes_[type];\n const activeGroup = mediaType ? mediaType.activeGroup() : null;\n const pathway = this.contentSteeringController_.getPathway();\n if (activeGroup && pathway) {\n // activeGroup can be an array or a single group\n const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n if (dashMediaPlaylists.length) {\n this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n }\n }\n });\n }\n /**\n * Start a timer that periodically calls checkABR_\n *\n * @private\n */\n\n startABRTimer_() {\n this.stopABRTimer_();\n this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n }\n /**\n * Stop the timer that periodically calls checkABR_\n *\n * @private\n */\n\n stopABRTimer_() {\n // if we're scrubbing, we don't need to pause.\n // This getter will be added to Video.js in version 7.11.\n if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n return;\n }\n window$1.clearInterval(this.abrTimer_);\n this.abrTimer_ = null;\n }\n /**\n * Get a list of playlists for the currently selected audio playlist\n *\n * @return {Array} the array of audio playlists\n */\n\n getAudioTrackPlaylists_() {\n const main = this.main();\n const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n // assume that the audio tracks are contained in main\n // playlist array, use that or an empty array.\n\n if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n return defaultPlaylists;\n }\n const AUDIO = main.mediaGroups.AUDIO;\n const groupKeys = Object.keys(AUDIO);\n let track; // get the current active track\n\n if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n } else {\n // default group is `main` or just the first group.\n const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n for (const label in defaultGroup) {\n if (defaultGroup[label].default) {\n track = {\n label\n };\n break;\n }\n }\n } // no active track no playlists.\n\n if (!track) {\n return defaultPlaylists;\n }\n const playlists = []; // get all of the playlists that are possible for the\n // active track.\n\n for (const group in AUDIO) {\n if (AUDIO[group][track.label]) {\n const properties = AUDIO[group][track.label];\n if (properties.playlists && properties.playlists.length) {\n playlists.push.apply(playlists, properties.playlists);\n } else if (properties.uri) {\n playlists.push(properties);\n } else if (main.playlists.length) {\n // if an audio group does not have a uri\n // see if we have main playlists that use it as a group.\n // if we do then add those to the playlists list.\n for (let i = 0; i < main.playlists.length; i++) {\n const playlist = main.playlists[i];\n if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n playlists.push(playlist);\n }\n }\n }\n }\n }\n if (!playlists.length) {\n return defaultPlaylists;\n }\n return playlists;\n }\n /**\n * Register event handlers on the main playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n\n setupMainPlaylistLoaderListeners_() {\n this.mainPlaylistLoader_.on('loadedmetadata', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n if (media.endList && this.tech_.preload() !== 'none') {\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n }\n setupMediaGroups({\n sourceType: this.sourceType_,\n segmentLoaders: {\n AUDIO: this.audioSegmentLoader_,\n SUBTITLES: this.subtitleSegmentLoader_,\n main: this.mainSegmentLoader_\n },\n tech: this.tech_,\n requestOptions: this.requestOptions_,\n mainPlaylistLoader: this.mainPlaylistLoader_,\n vhs: this.vhs_,\n main: this.main(),\n mediaTypes: this.mediaTypes_,\n excludePlaylist: this.excludePlaylist.bind(this)\n });\n this.triggerPresenceUsage_(this.main(), media);\n this.setupFirstPlay();\n if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n this.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n this.trigger('selectedinitialmedia');\n });\n }\n });\n this.mainPlaylistLoader_.on('loadedplaylist', () => {\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n let updatedPlaylist = this.mainPlaylistLoader_.media();\n if (!updatedPlaylist) {\n this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n\n this.excludeUnsupportedVariants_();\n let selectedMedia;\n if (this.enableLowInitialPlaylist) {\n selectedMedia = this.selectInitialPlaylist();\n }\n if (!selectedMedia) {\n selectedMedia = this.selectPlaylist();\n }\n if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n return;\n }\n this.initialMedia_ = selectedMedia;\n this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n // fire again since the playlist will be requested. In the case of vhs-json\n // (where the manifest object is provided as the source), when the media\n // playlist's `segments` list is already available, a media playlist won't be\n // requested, and loadedplaylist won't fire again, so the playlist handler must be\n // called on its own here.\n\n const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n if (!haveJsonSource) {\n return;\n }\n updatedPlaylist = this.initialMedia_;\n }\n this.handleUpdatedMediaPlaylist(updatedPlaylist);\n });\n this.mainPlaylistLoader_.on('error', () => {\n const error = this.mainPlaylistLoader_.error;\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainPlaylistLoader_.on('mediachanging', () => {\n this.mainSegmentLoader_.abort();\n this.mainSegmentLoader_.pause();\n });\n this.mainPlaylistLoader_.on('mediachange', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n }\n this.mainPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n this.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.mainPlaylistLoader_.on('playlistunchanged', () => {\n const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n // excluded for not-changing. We likely just have a really slowly updating\n // playlist.\n\n if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n return;\n }\n const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // exclude it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n this.excludePlaylist({\n error: {\n message: 'Playlist no longer updating.',\n reason: 'playlist-unchanged'\n }\n }); // useful for monitoring QoS\n\n this.tech_.trigger('playliststuck');\n }\n });\n this.mainPlaylistLoader_.on('renditiondisabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-disabled'\n });\n });\n this.mainPlaylistLoader_.on('renditionenabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-enabled'\n });\n });\n }\n /**\n * Given an updated media playlist (whether it was loaded for the first time, or\n * refreshed for live playlists), update any relevant properties and state to reflect\n * changes in the media that should be accounted for (e.g., cues and duration).\n *\n * @param {Object} updatedPlaylist the updated media playlist object\n *\n * @private\n */\n\n handleUpdatedMediaPlaylist(updatedPlaylist) {\n if (this.useCueTags_) {\n this.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n if (!this.tech_.paused()) {\n this.mainSegmentLoader_.load();\n if (this.audioSegmentLoader_) {\n this.audioSegmentLoader_.load();\n }\n }\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n\n triggerPresenceUsage_(main, media) {\n const mediaGroups = main.mediaGroups || {};\n let defaultDemuxed = true;\n const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n for (const mediaGroup in mediaGroups.AUDIO) {\n for (const label in mediaGroups.AUDIO[mediaGroup]) {\n const properties = mediaGroups.AUDIO[mediaGroup][label];\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-demuxed'\n });\n }\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-webvtt'\n });\n }\n if (Vhs$1.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-aes'\n });\n }\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-alternate-audio'\n });\n }\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-playlist-cue-tags'\n });\n }\n }\n shouldSwitchToMedia_(nextPlaylist) {\n const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n const currentTime = this.tech_.currentTime();\n const bufferLowWaterLine = this.bufferLowWaterLine();\n const bufferHighWaterLine = this.bufferHighWaterLine();\n const buffered = this.tech_.buffered();\n return shouldSwitchToMedia({\n buffered,\n currentTime,\n currentPlaylist,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration: this.duration(),\n bufferBasedABR: this.bufferBasedABR,\n log: this.logger_\n });\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n\n setupSegmentLoaderListeners_() {\n this.mainSegmentLoader_.on('bandwidthupdate', () => {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n this.checkABR_('bandwidthupdate');\n this.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('timeout', () => {\n if (this.bufferBasedABR) {\n // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n // Here the only consideration is that for buffer based ABR there's no guarantee\n // of an immediate switch (since the bandwidth is averaged with a timeout\n // bandwidth value of 1), so force a load on the segment loader to keep it going.\n this.mainSegmentLoader_.load();\n }\n }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n // based ABR.\n\n if (!this.bufferBasedABR) {\n this.mainSegmentLoader_.on('progress', () => {\n this.trigger('progress');\n });\n }\n this.mainSegmentLoader_.on('error', () => {\n const error = this.mainSegmentLoader_.error();\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainSegmentLoader_.on('appenderror', () => {\n this.error = this.mainSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.audioSegmentLoader_.on('appenderror', () => {\n this.error = this.audioSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('ended', () => {\n this.logger_('main segment loader ended');\n this.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', event => {\n // never try to early abort with the new ABR algorithm\n if (this.bufferBasedABR) {\n return;\n }\n this.delegateLoaders_('all', ['abort']);\n this.excludePlaylist({\n error: {\n message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n },\n playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n });\n });\n const updateCodecs = () => {\n if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return this.tryToCreateSourceBuffers_();\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n };\n this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n this.mainSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('ended', () => {\n this.logger_('audioSegmentLoader ended');\n this.onEndOfStream();\n });\n }\n mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n\n load() {\n this.mainSegmentLoader_.load();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This will reset the main segment loader\n * and the next segment position to the currentTime.\n * This is good for manual quality changes.\n *\n * @private\n */\n\n fastQualityChange_(media = this.selectPlaylist()) {\n if (media === this.mainPlaylistLoader_.media()) {\n this.logger_('skipping fastQualityChange because new media is same as old');\n return;\n }\n this.switchMedia_(media, 'fast-quality'); // Reset main segment loader properties and next segment position information.\n // Don't need to reset audio as it is reset when media changes.\n // We resetLoaderProperties separately here as we want to fetch init segments if\n // necessary and ensure we're not in an ended state when we switch playlists.\n\n this.resetMainLoaderReplaceSegments();\n }\n /**\n * Sets the replaceUntil flag on the main segment soader to the buffered end\n * and resets the main segment loaders properties.\n */\n\n resetMainLoaderReplaceSegments() {\n const buffered = this.tech_.buffered();\n const bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer\n // on the main loader to remain, false after the resetLoader call, until we have\n // replaced all content buffered ahead of the currentTime.\n\n this.mainSegmentLoader_.replaceSegmentsUntil = bufferedEnd;\n this.mainSegmentLoader_.resetLoaderProperties();\n this.mainSegmentLoader_.resetLoader();\n }\n /**\n * Begin playback.\n */\n\n play() {\n if (this.setupFirstPlay()) {\n return;\n }\n if (this.tech_.ended()) {\n this.tech_.setCurrentTime(0);\n }\n if (this.hasPlayed_) {\n this.load();\n }\n const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable.start(0)) {\n return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n\n setupFirstPlay() {\n const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_) {\n return false;\n } // when the video is a live stream and/or has a start time\n\n if (!media.endList || media.start) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // without a seekable range, the player cannot seek to begin buffering at the\n // live or start point\n return false;\n }\n const seekableEnd = seekable.end(0);\n let startPoint = seekableEnd;\n if (media.start) {\n const offset = media.start.timeOffset;\n if (offset < 0) {\n startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n } else {\n startPoint = Math.min(seekableEnd, offset);\n }\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n this.trigger('firstplay'); // seek to the live point\n\n this.tech_.setCurrentTime(startPoint);\n }\n this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n\n handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n if (this.tech_.autoplay()) {\n const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, e => {});\n }\n }\n this.trigger('sourceopen');\n }\n /**\n * handle the sourceended event on the MediaSource\n *\n * @private\n */\n\n handleSourceEnded_() {\n if (!this.inbandTextTracks_.metadataTrack_) {\n return;\n }\n const cues = this.inbandTextTracks_.metadataTrack_.cues;\n if (!cues || !cues.length) {\n return;\n }\n const duration = this.duration();\n cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n }\n /**\n * handle the durationchange event on the MediaSource\n *\n * @private\n */\n\n handleDurationChange_() {\n this.tech_.trigger('durationchange');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n\n onEndOfStream() {\n let isEndOfStream = this.mainSegmentLoader_.ended_;\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n if (!isEndOfStream) {\n return;\n }\n this.stopABRTimer_();\n this.sourceUpdater_.endOfStream();\n }\n /**\n * Check if a playlist has stopped being updated\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n\n stuckAtPlaylistEnd_(playlist) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Exclude a playlist for a set amount of time, making it unavailable for selection by\n * the rendition selection algorithm, then force a new playlist (rendition) selection.\n *\n * @param {Object=} playlistToExclude\n * the playlist to exclude, defaults to the currently selected playlist\n * @param {Object=} error\n * an optional error\n * @param {number=} playlistExclusionDuration\n * an optional number of seconds to exclude the playlist\n */\n\n excludePlaylist({\n playlistToExclude = this.mainPlaylistLoader_.media(),\n error = {},\n playlistExclusionDuration\n }) {\n // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // excluded instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the main OR while we were disposing of the tech\n\n if (!playlistToExclude) {\n this.error = error;\n if (this.mediaSource.readyState !== 'open') {\n this.trigger('error');\n } else {\n this.sourceUpdater_.endOfStream('network');\n }\n return;\n }\n playlistToExclude.playlistErrors_++;\n const playlists = this.mainPlaylistLoader_.main.playlists;\n const enabledPlaylists = playlists.filter(isEnabled);\n const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n // forever\n\n if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n return this.mainPlaylistLoader_.load(isFinalRendition);\n }\n if (isFinalRendition) {\n // If we're content steering, try other pathways.\n if (this.main().contentSteering) {\n const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n this.contentSteeringController_.excludePathway(pathway);\n this.excludeThenChangePathway_();\n setTimeout(() => {\n this.contentSteeringController_.addAvailablePathway(pathway);\n }, reIncludeDelay);\n return;\n } // Since we're on the final non-excluded playlist, and we're about to exclude\n // it, instead of erring the player or retrying this playlist, clear out the current\n // exclusion list. This allows other playlists to be attempted in case any have been\n // fixed.\n\n let reincluded = false;\n playlists.forEach(playlist => {\n // skip current playlist which is about to be excluded\n if (playlist === playlistToExclude) {\n return;\n }\n const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n reincluded = true;\n delete playlist.excludeUntil;\n }\n });\n if (reincluded) {\n videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n }\n } // Exclude this playlist\n\n let excludeUntil;\n if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n excludeUntil = Infinity;\n } else {\n excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n }\n playlistToExclude.excludeUntil = excludeUntil;\n if (error.reason) {\n playlistToExclude.lastExcludeReason_ = error.reason;\n }\n this.tech_.trigger('excludeplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-excluded'\n }); // TODO: only load a new playlist if we're excluding the current playlist\n // If this function was called with a playlist that's not the current active playlist\n // (e.g., media().id !== playlistToExclude.id),\n // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n const nextPlaylist = this.selectPlaylist();\n if (!nextPlaylist) {\n this.error = 'Playback cannot continue. No available working or supported playlists.';\n this.trigger('error');\n return;\n }\n const logFn = error.internal ? this.logger_ : videojs.log.warn;\n const errorMessage = error.message ? ' ' + error.message : '';\n logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n this.delegateLoaders_('audio', ['abort', 'pause']);\n } // if subtitle group changed reset subtitle loaders\n\n if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n this.delegateLoaders_('subtitle', ['abort', 'pause']);\n }\n this.delegateLoaders_('main', ['abort', 'pause']);\n const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n }\n /**\n * Pause all segment/playlist loaders\n */\n\n pauseLoading() {\n this.delegateLoaders_('all', ['abort', 'pause']);\n this.stopABRTimer_();\n }\n /**\n * Call a set of functions in order on playlist loaders, segment loaders,\n * or both types of loaders.\n *\n * @param {string} filter\n * Filter loaders that should call fnNames using a string. Can be:\n * * all - run on all loaders\n * * audio - run on all audio loaders\n * * subtitle - run on all subtitle loaders\n * * main - run on the main loaders\n *\n * @param {Array|string} fnNames\n * A string or array of function names to call.\n */\n\n delegateLoaders_(filter, fnNames) {\n const loaders = [];\n const dontFilterPlaylist = filter === 'all';\n if (dontFilterPlaylist || filter === 'main') {\n loaders.push(this.mainPlaylistLoader_);\n }\n const mediaTypes = [];\n if (dontFilterPlaylist || filter === 'audio') {\n mediaTypes.push('AUDIO');\n }\n if (dontFilterPlaylist || filter === 'subtitle') {\n mediaTypes.push('CLOSED-CAPTIONS');\n mediaTypes.push('SUBTITLES');\n }\n mediaTypes.forEach(mediaType => {\n const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n if (loader) {\n loaders.push(loader);\n }\n });\n ['main', 'audio', 'subtitle'].forEach(name => {\n const loader = this[`${name}SegmentLoader_`];\n if (loader && (filter === name || filter === 'all')) {\n loaders.push(loader);\n }\n });\n loaders.forEach(loader => fnNames.forEach(fnName => {\n if (typeof loader[fnName] === 'function') {\n loader[fnName]();\n }\n }));\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n\n setCurrentTime(currentTime) {\n const buffered = findRange(this.tech_.buffered(), currentTime);\n if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n if (!this.mainPlaylistLoader_.media().segments) {\n return 0;\n } // if the seek location is already buffered, continue buffering as usual\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n this.mainSegmentLoader_.resetEverything();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.resetEverything();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.resetEverything();\n } // start segment loader loading in case they are paused\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n\n duration() {\n if (!this.mainPlaylistLoader_) {\n return 0;\n }\n const media = this.mainPlaylistLoader_.media();\n if (!media) {\n // no playlists loaded yet, so can't determine a duration\n return 0;\n } // Don't rely on the media source for duration in the case of a live playlist since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, just return Infinity.\n\n if (!media.endList) {\n return Infinity;\n } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n // available). If it's not available, fall back to a playlist-calculated estimate.\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n return Vhs$1.Playlist.duration(media);\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n\n seekable() {\n return this.seekable_;\n }\n onSyncInfoUpdate_() {\n let audioSeekable; // TODO check for creation of both source buffers before updating seekable\n //\n // A fix was made to this function where a check for\n // this.sourceUpdater_.hasCreatedSourceBuffers\n // was added to ensure that both source buffers were created before seekable was\n // updated. However, it originally had a bug where it was checking for a true and\n // returning early instead of checking for false. Setting it to check for false to\n // return early though created other issues. A call to play() would check for seekable\n // end without verifying that a seekable range was present. In addition, even checking\n // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n // due to a media update calling load on the segment loaders, skipping a seek to live,\n // thereby starting live streams at the beginning of the stream rather than at the end.\n //\n // This conditional should be fixed to wait for the creation of two source buffers at\n // the same time as the other sections of code are fixed to properly seek to live and\n // not throw an error due to checking for a seekable end when no seekable range exists.\n //\n // For now, fall back to the older behavior, with the understanding that the seekable\n // range may not be completely correct, leading to a suboptimal initial live point.\n\n if (!this.mainPlaylistLoader_) {\n return;\n }\n let media = this.mainPlaylistLoader_.media();\n if (!media) {\n return;\n }\n let expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n const main = this.mainPlaylistLoader_.main;\n const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (mainSeekable.length === 0) {\n return;\n }\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n return;\n }\n audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (audioSeekable.length === 0) {\n return;\n }\n }\n let oldEnd;\n let oldStart;\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n\n updateDuration(isLive) {\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n this.updateDuration_ = null;\n }\n if (this.mediaSource.readyState !== 'open') {\n this.updateDuration_ = this.updateDuration.bind(this, isLive);\n this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n return;\n }\n if (isLive) {\n const seekable = this.seekable();\n if (!seekable.length) {\n return;\n } // Even in the case of a live playlist, the native MediaSource's duration should not\n // be set to Infinity (even though this would be expected for a live playlist), since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, the duration should be greater than or\n // equal to the last possible seekable value.\n // MediaSource duration starts as NaN\n // It is possible (and probable) that this case will never be reached for many\n // sources, since the MediaSource reports duration as the highest value without\n // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n // we buffered times 0 to 100 with real times of 100 to 200, even though current\n // time will be between 0 and 100, the native media source may report the duration\n // as 200. However, since we report duration separate from the media source (as\n // Infinity), and as long as the native media source duration value is greater than\n // our reported seekable range, seeks will work as expected. The large number as\n // duration for live is actually a strategy used by some players to work around the\n // issue of live seekable ranges cited above.\n\n if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n }\n return;\n }\n const buffered = this.tech_.buffered();\n let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n if (buffered.length > 0) {\n duration = Math.max(duration, buffered.end(buffered.length - 1));\n }\n if (this.mediaSource.duration !== duration) {\n this.sourceUpdater_.setDuration(duration);\n }\n }\n /**\n * dispose of the PlaylistController and everything\n * that it controls\n */\n\n dispose() {\n this.trigger('dispose');\n this.decrypter_.terminate();\n this.mainPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n this.contentSteeringController_.dispose();\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n const groups = this.mediaTypes_[type].groups;\n for (const id in groups) {\n groups[id].forEach(group => {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n this.sourceUpdater_.dispose();\n this.timelineChangeController_.dispose();\n this.stopABRTimer_();\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n }\n this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n this.off();\n }\n /**\n * return the main playlist object if we have one\n *\n * @return {Object} the main playlist object that we parsed\n */\n\n main() {\n return this.mainPlaylistLoader_.main;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n\n media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.mainPlaylistLoader_.media() || this.initialMedia_;\n }\n areMediaTypesKnown_() {\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n // otherwise check on the segment loader.\n\n const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n return false;\n }\n return true;\n }\n getCodecsOrExclude_() {\n const media = {\n main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n };\n const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n media.video = media.main;\n const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n const codecs = {};\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n if (media.main.hasVideo) {\n codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n }\n if (media.main.isMuxed) {\n codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n }\n if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n } // no codecs, no playback.\n\n if (!codecs.audio && !codecs.video) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: 'Could not determine codecs for playlist.'\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // fmp4 relies on browser support, while ts relies on muxer support\n\n const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n const unsupportedCodecs = {};\n let unsupportedAudio;\n ['video', 'audio'].forEach(function (type) {\n if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n unsupportedCodecs[supporter].push(codecs[type]);\n if (type === 'audio') {\n unsupportedAudio = supporter;\n }\n }\n });\n if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n const audioGroup = playlist.attributes.AUDIO;\n this.main().playlists.forEach(variant => {\n const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n if (variantAudioGroup === audioGroup && variant !== playlist) {\n variant.excludeUntil = Infinity;\n }\n });\n this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n } // if we have any unsupported codecs exclude this playlist.\n\n if (Object.keys(unsupportedCodecs).length) {\n const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n if (acc) {\n acc += ', ';\n }\n acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n return acc;\n }, '') + '.';\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n internal: true,\n message\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // check if codec switching is happening\n\n if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n const switchMessages = [];\n ['video', 'audio'].forEach(type => {\n const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n }\n });\n if (switchMessages.length) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n internal: true\n },\n playlistExclusionDuration: Infinity\n });\n return;\n }\n } // TODO: when using the muxer shouldn't we just return\n // the codecs that the muxer outputs?\n\n return codecs;\n }\n /**\n * Create source buffers and exlude any incompatible renditions.\n *\n * @private\n */\n\n tryToCreateSourceBuffers_() {\n // media source is not ready yet or sourceBuffers are already\n // created.\n if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return;\n }\n if (!this.areMediaTypesKnown_()) {\n return;\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.createSourceBuffers(codecs);\n const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n this.excludeIncompatibleVariants_(codecString);\n }\n /**\n * Excludes playlists with codecs that are unsupported by the muxer and browser.\n */\n\n excludeUnsupportedVariants_() {\n const playlists = this.main().playlists;\n const ids = []; // TODO: why don't we have a property to loop through all\n // playlist? Why did we ever mix indexes and keys?\n\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n\n if (ids.indexOf(variant.id) !== -1) {\n return;\n }\n ids.push(variant.id);\n const codecs = codecsForPlaylist(this.main, variant);\n const unsupported = [];\n if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n unsupported.push(`audio codec ${codecs.audio}`);\n }\n if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n unsupported.push(`video codec ${codecs.video}`);\n }\n if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n unsupported.push(`text codec ${codecs.text}`);\n }\n if (unsupported.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n }\n });\n }\n /**\n * Exclude playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current main playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n\n excludeIncompatibleVariants_(codecString) {\n const ids = [];\n const playlists = this.main().playlists;\n const codecs = unwrapCodecList(parseCodecs(codecString));\n const codecCount_ = codecCount(codecs);\n const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n // or it if it is already excluded forever.\n\n if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n return;\n }\n ids.push(variant.id);\n const exclusionReasons = []; // get codecs from the playlist for this variant\n\n const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n // variant is incompatible. Wait for mux.js to probe\n\n if (!variantCodecs.audio && !variantCodecs.video) {\n return;\n } // TODO: we can support this by removing the\n // old media source and creating a new one, but it will take some work.\n // The number of streams cannot change\n\n if (variantCodecCount !== codecCount_) {\n exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n } // only exclude playlists by codec change, if codecs cannot switch\n // during playback.\n\n if (!this.sourceUpdater_.canChangeType()) {\n const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n } // the audio codec cannot change\n\n if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n }\n }\n if (exclusionReasons.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n }\n });\n }\n updateAdCues_(media) {\n let offset = 0;\n const seekable = this.seekable();\n if (seekable.length) {\n offset = seekable.start(0);\n }\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {number} Desired forward buffer length in seconds\n */\n\n goalBufferLength() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.GOAL_BUFFER_LENGTH;\n const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {number} Desired buffer low water line in seconds\n */\n\n bufferLowWaterLine() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.BUFFER_LOW_WATER_LINE;\n const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n }\n bufferHighWaterLine() {\n return Config.BUFFER_HIGH_WATER_LINE;\n }\n addDateRangesToTextTrack_(dateRanges) {\n createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n addDateRangeMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n dateRanges\n });\n }\n addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n // audio/video source with a metadata track, and an alt audio with a metadata track.\n // However, this probably won't happen, and if it does it can be handled then.\n\n createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n addMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n metadataArray,\n timestampOffset,\n videoDuration\n });\n }\n pathwayAttribute_(playlist) {\n return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n }\n /**\n * Initialize content steering listeners and apply the tag properties.\n */\n\n initContentSteeringController_() {\n const initialMain = this.main();\n if (!initialMain.contentSteering) {\n return;\n }\n const updateSteeringValues = main => {\n for (const playlist of main.playlists) {\n this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n }\n this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering);\n };\n updateSteeringValues(initialMain);\n this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new\n // manifest is loaded in live DASH with content steering.\n\n if (this.sourceType_ === 'dash') {\n this.mainPlaylistLoader_.on('mediaupdatetimeout', () => {\n this.mainPlaylistLoader_.refreshMedia_(this.mainPlaylistLoader_.media().id); // clear past values\n\n this.contentSteeringController_.abort();\n this.contentSteeringController_.clearTTLTimeout_();\n this.contentSteeringController_.clearAvailablePathways();\n updateSteeringValues(this.main());\n });\n } // Do this at startup only, after that the steering requests are managed by the Content Steering class.\n // DASH queryBeforeStart scenarios will be handled by the Content Steering class.\n\n if (!this.contentSteeringController_.queryBeforeStart) {\n this.tech_.one('canplay', () => {\n this.contentSteeringController_.requestSteeringManifest();\n });\n }\n }\n /**\n * Simple exclude and change playlist logic for content steering.\n */\n\n excludeThenChangePathway_() {\n const currentPathway = this.contentSteeringController_.getPathway();\n if (!currentPathway) {\n return;\n }\n const main = this.main();\n const playlists = main.playlists;\n const ids = new Set();\n let didEnablePlaylists = false;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key];\n const pathwayId = this.pathwayAttribute_(variant);\n const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n if (steeringExclusion && !differentPathwayId) {\n delete variant.excludeUntil;\n delete variant.lastExcludeReason_;\n didEnablePlaylists = true;\n }\n const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n if (!shouldExclude) {\n return;\n }\n ids.add(variant.id);\n variant.excludeUntil = Infinity;\n variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n });\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n Object.keys(this.mediaTypes_).forEach(key => {\n const type = this.mediaTypes_[key];\n if (type.activePlaylistLoader) {\n const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n didEnablePlaylists = true;\n }\n }\n });\n }\n if (didEnablePlaylists) {\n this.changeSegmentPathway_();\n }\n }\n /**\n * Changes the current playlists for audio, video and subtitles after a new pathway\n * is chosen from content steering.\n */\n\n changeSegmentPathway_() {\n const nextPlaylist = this.selectPlaylist();\n this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n this.switchMediaForDASHContentSteering_();\n }\n this.switchMedia_(nextPlaylist, 'content-steering');\n }\n}\n\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n const playlist = loader.main.playlists[playlistID];\n const incompatible = isIncompatible(playlist);\n const currentlyEnabled = isEnabled(playlist);\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n return enable;\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\nclass Representation {\n constructor(vhsHandler, playlist, id) {\n const {\n playlistController_: pc\n } = vhsHandler;\n const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n if (playlist.attributes) {\n const resolution = playlist.attributes.RESOLUTION;\n this.width = resolution && resolution.width;\n this.height = resolution && resolution.height;\n this.bandwidth = playlist.attributes.BANDWIDTH;\n this.frameRate = playlist.attributes['FRAME-RATE'];\n }\n this.codecs = codecsForPlaylist(pc.main(), playlist);\n this.playlist = playlist; // The id is simply the ordinality of the media playlist\n // within the main playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n }\n}\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n // Add a single API-specific function to the VhsHandler instance\n vhsHandler.representations = () => {\n const main = vhsHandler.playlistController_.main();\n const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n if (!playlists) {\n return [];\n }\n return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n /**\n * Represents an PlaybackWatcher object.\n *\n * @class\n * @param {Object} options an object that includes the tech and settings\n */\n constructor(options) {\n this.playlistController_ = options.playlistController;\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n const playHandler = () => this.monitorCurrentTime_();\n const canPlayHandler = () => this.monitorCurrentTime_();\n const waitingHandler = () => this.techWaiting_();\n const cancelTimerHandler = () => this.resetTimeUpdate_();\n const pc = this.playlistController_;\n const loaderTypes = ['main', 'subtitle', 'audio'];\n const loaderChecks = {};\n loaderTypes.forEach(type => {\n loaderChecks[type] = {\n reset: () => this.resetSegmentDownloads_(type),\n updateend: () => this.checkSegmentDownloads_(type)\n };\n pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n // isn't changing we want to reset. We cannot assume that the new rendition\n // will also be stalled, until after new appends.\n\n pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n // This prevents one segment playlists (single vtt or single segment content)\n // from being detected as stalling. As the buffer will not change in those cases, since\n // the buffer is the entire video duration.\n\n this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n /**\n * We check if a seek was into a gap through the following steps:\n * 1. We get a seeking event and we do not get a seeked event. This means that\n * a seek was attempted but not completed.\n * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n * removed everything from our buffer and appended a segment, and should be ready\n * to check for gaps.\n */\n\n const setSeekingHandlers = fn => {\n ['main', 'audio'].forEach(type => {\n pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n });\n };\n this.seekingAppendCheck_ = () => {\n if (this.fixesBadSeeks_()) {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = this.tech_.currentTime();\n setSeekingHandlers('off');\n }\n };\n this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n this.watchForBadSeeking_ = () => {\n this.clearSeekingAppendCheck_();\n setSeekingHandlers('on');\n };\n this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n this.tech_.on('seeking', this.watchForBadSeeking_);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler);\n /*\n An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n is surfaced in one of two ways:\n 1) The `waiting` event is fired before the player has buffered content, making it impossible\n to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n we can check if playback is stalled due to a gap, and skip the gap if necessary.\n 2) A source with a gap at the beginning of the stream is loaded programatically while the player\n is in a playing state. To catch this case, it's important that our one-time play listener is setup\n even if the player is in a playing state\n */\n\n this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n this.dispose = () => {\n this.clearSeekingAppendCheck_();\n this.logger_('dispose');\n this.tech_.off('waiting', waitingHandler);\n this.tech_.off(timerCancelEvents, cancelTimerHandler);\n this.tech_.off('canplay', canPlayHandler);\n this.tech_.off('play', playHandler);\n this.tech_.off('seeking', this.watchForBadSeeking_);\n this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n loaderTypes.forEach(type => {\n pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n }\n this.resetTimeUpdate_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n\n monitorCurrentTime_() {\n this.checkCurrentTime_();\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * Reset stalled download stats for a specific type of loader\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#playlistupdate\n * @listens Tech#seeking\n * @listens Tech#seeked\n */\n\n resetSegmentDownloads_(type) {\n const loader = this.playlistController_[`${type}SegmentLoader_`];\n if (this[`${type}StalledDownloads_`] > 0) {\n this.logger_(`resetting possible stalled download count for ${type} loader`);\n }\n this[`${type}StalledDownloads_`] = 0;\n this[`${type}Buffered_`] = loader.buffered_();\n }\n /**\n * Checks on every segment `appendsdone` to see\n * if segment appends are making progress. If they are not\n * and we are still downloading bytes. We exclude the playlist.\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#appendsdone\n */\n\n checkSegmentDownloads_(type) {\n const pc = this.playlistController_;\n const loader = pc[`${type}SegmentLoader_`];\n const buffered = loader.buffered_();\n const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n // the buffered value for this loader changed\n // appends are working\n\n if (isBufferedDifferent) {\n this.resetSegmentDownloads_(type);\n return;\n }\n this[`${type}StalledDownloads_`]++;\n this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n playlistId: loader.playlist_ && loader.playlist_.id,\n buffered: timeRangesToArray(buffered)\n }); // after 10 possibly stalled appends with no reset, exclude\n\n if (this[`${type}StalledDownloads_`] < 10) {\n return;\n }\n this.logger_(`${type} loader stalled download exclusion`);\n this.resetSegmentDownloads_(type);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-${type}-download-exclusion`\n });\n if (type === 'subtitle') {\n return;\n } // TODO: should we exclude audio tracks rather than main tracks\n // when type is audio?\n\n pc.excludePlaylist({\n error: {\n message: `Excessive ${type} segment downloading detected.`\n },\n playlistExclusionDuration: Infinity\n });\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n\n checkCurrentTime_() {\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n *\n * @private\n */\n\n resetTimeUpdate_() {\n this.consecutiveUpdates = 0;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {boolean} whether an action was taken to fix the seek\n * @private\n */\n\n fixesBadSeeks_() {\n const seeking = this.tech_.seeking();\n if (!seeking) {\n return false;\n } // TODO: It's possible that these seekable checks should be moved out of this function\n // and into a function that runs on seekablechange. It's also possible that we only need\n // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n // seekable range.\n\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n let seekTo;\n if (isAfterSeekableRange) {\n const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + (\n // if the playlist is too short and the seekable range is an exact time (can\n // happen in live with a 3 segment playlist), then don't use a time delta\n seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n }\n if (typeof seekTo !== 'undefined') {\n this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n const sourceUpdater = this.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n const media = this.media(); // verify that at least two segment durations or one part duration have been\n // appended before checking for a gap.\n\n const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n // appended before checking for a gap.\n\n const bufferedToCheck = [audioBuffered, videoBuffered];\n for (let i = 0; i < bufferedToCheck.length; i++) {\n // skip null buffered\n if (!bufferedToCheck[i]) {\n continue;\n }\n const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n // duration behind we haven't appended enough to call this a bad seek.\n\n if (timeAhead < minAppendedDuration) {\n return false;\n }\n }\n const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n // to seek over the gap\n\n if (nextRange.length === 0) {\n return false;\n }\n seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n\n waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime);\n this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n\n techWaiting_() {\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n if (this.tech_.seeking()) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const livePoint = seekable.end(seekable.length - 1);\n this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-live-resync'\n });\n return true;\n }\n const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const videoUnderflow = this.videoUnderflow_({\n audioBuffered: sourceUpdater.audioBuffered(),\n videoBuffered: sourceUpdater.videoBuffered(),\n currentTime\n });\n if (videoUnderflow) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-video-underflow'\n });\n return true;\n }\n const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n if (nextRange.length > 0) {\n this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n this.resetTimeUpdate_();\n this.skipTheGap_(currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n return false;\n }\n afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n const isLive = !playlist.endList;\n const isLLHLS = typeof playlist.partTargetDuration === 'number';\n if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n if (currentTime > allowedEnd) {\n return true;\n }\n return false;\n }\n beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length &&\n // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n return true;\n }\n return false;\n }\n videoUnderflow_({\n videoBuffered,\n audioBuffered,\n currentTime\n }) {\n // audio only content will not have video underflow :)\n if (!videoBuffered) {\n return;\n }\n let gap; // find a gap in demuxed content.\n\n if (videoBuffered.length && audioBuffered.length) {\n // in Chrome audio will continue to play for ~3s when we run out of video\n // so we have to check that the video buffer did have some buffer in the\n // past.\n const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n const videoRange = findRange(videoBuffered, currentTime);\n const audioRange = findRange(audioBuffered, currentTime);\n if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n gap = {\n start: lastVideoRange.end(0),\n end: audioRange.end(0)\n };\n } // find a gap in muxed content.\n } else {\n const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n\n if (!nextRange.length) {\n gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n }\n }\n if (gap) {\n this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n return true;\n }\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n\n skipTheGap_(scheduledCurrentTime) {\n const buffered = this.tech_.buffered();\n const currentTime = this.tech_.currentTime();\n const nextRange = findNextRange(buffered, currentTime);\n this.resetTimeUpdate_();\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-gap-skip'\n });\n }\n gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n const gaps = findGaps(buffered);\n for (let i = 0; i < gaps.length; i++) {\n const start = gaps.start(i);\n const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start,\n end\n };\n }\n }\n return null;\n }\n}\nconst defaultOptions = {\n errorInterval: 30,\n getSource(next) {\n const tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n const sourceObj = tech.currentSource_ || this.currentSource();\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nconst initPlugin = function (player, options) {\n let lastCalled = 0;\n let seekTo = 0;\n const localOptions = merge(defaultOptions, options);\n player.ready(() => {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n const loadedMetadataHandler = function () {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n const setSource = function (sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n const errorHandler = function () {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-canceled'\n });\n return;\n }\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n const cleanupEvents = function () {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n const reinitPlugin = function (newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nconst reloadSourceOnError = function (options) {\n initPlugin(this, options);\n};\nvar version$4 = \"3.7.0\";\nvar version$3 = \"7.0.1\";\nvar version$2 = \"1.2.2\";\nvar version$1 = \"7.1.0\";\nvar version = \"4.0.1\";\n\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the VHS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE\n */\nconst Vhs = {\n PlaylistLoader,\n Playlist,\n utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n lastBandwidthSelector,\n movingAverageBandwidthSelector,\n comparePlaylistBandwidth,\n comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n Object.defineProperty(Vhs, prop, {\n get() {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n return Config[prop];\n },\n set(value) {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n if (typeof value !== 'number' || value < 0) {\n videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n return;\n }\n Config[prop] = value;\n }\n });\n});\nconst LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n const newPlaylist = playlistLoader.media();\n let selectedIndex = -1;\n for (let i = 0; i < qualityLevels.length; i++) {\n if (qualityLevels[i].id === newPlaylist.id) {\n selectedIndex = i;\n break;\n }\n }\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n vhs.representations().forEach(rep => {\n qualityLevels.addQualityLevel(rep);\n });\n handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n if (!keySystemOptions) {\n return keySystemOptions;\n }\n let codecs = {};\n if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n }\n if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n codecs.audio = audioPlaylist.attributes.CODECS;\n }\n const videoContentType = getMimeForCodec(codecs.video);\n const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n const keySystemContentTypes = {};\n for (const keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {};\n if (audioContentType) {\n keySystemContentTypes[keySystem].audioContentType = audioContentType;\n }\n if (videoContentType) {\n keySystemContentTypes[keySystem].videoContentType = videoContentType;\n } // Default to using the video playlist's PSSH even though they may be different, as\n // videojs-contrib-eme will only accept one in the options.\n //\n // This shouldn't be an issue for most cases as early intialization will handle all\n // unique PSSH values, and if they aren't, then encrypted events should have the\n // specific information needed for the unique license.\n\n if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n * Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n * The playlists to look through\n * @param {string[]} keySystems\n * The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n * An array of KeySystems objects containing available key systems and their\n * pssh values\n */\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n return playlists.reduce((keySystemsArr, playlist) => {\n if (!playlist.contentProtection) {\n return keySystemsArr;\n }\n const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n const keySystemOptions = playlist.contentProtection[keySystem];\n if (keySystemOptions && keySystemOptions.pssh) {\n keySystemsObj[keySystem] = {\n pssh: keySystemOptions.pssh\n };\n }\n return keySystemsObj;\n }, {});\n if (Object.keys(keySystemsOptions).length) {\n keySystemsArr.push(keySystemsOptions);\n }\n return keySystemsArr;\n }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n * The playlists found on the main playlist object\n *\n * @return {Object}\n * Promise that resolves when the key session has been created\n */\n\nconst waitForKeySessionCreation = ({\n player,\n sourceKeySystems,\n audioMedia,\n mainPlaylists\n}) => {\n if (!player.eme.initializeMediaKeys) {\n return Promise.resolve();\n } // TODO should all audio PSSH values be initialized for DRM?\n //\n // All unique video rendition pssh values are initialized for DRM, but here only\n // the initial audio playlist license is initialized. In theory, an encrypted\n // event should be fired if the user switches to an alternative audio playlist\n // where a license is required, but this case hasn't yet been tested. In addition, there\n // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n // languages).\n\n const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n const initializationFinishedPromises = [];\n const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n // only place where it should not be deduped is for ms-prefixed APIs, but\n // the existence of modern EME APIs in addition to\n // ms-prefixed APIs on Edge should prevent this from being a concern.\n // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n keySystemsOptionsArr.forEach(keySystemsOptions => {\n keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n player.tech_.one('keysessioncreated', resolve);\n }));\n initializationFinishedPromises.push(new Promise((resolve, reject) => {\n player.eme.initializeMediaKeys({\n keySystems: keySystemsOptions\n }, err => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n }));\n }); // The reasons Promise.race is chosen over Promise.any:\n //\n // * Promise.any is only available in Safari 14+.\n // * None of these promises are expected to reject. If they do reject, it might be\n // better here for the race to surface the rejection, rather than mask it by using\n // Promise.any.\n\n return Promise.race([\n // If a session was previously created, these will all finish resolving without\n // creating a new session, otherwise it will take until the end of all license\n // requests, which is why the key session check is used (to make setup much faster).\n Promise.all(initializationFinishedPromises),\n // Once a single session is created, the browser knows DRM will be used.\n Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} media\n * The active media playlist\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n *\n * @return {boolean}\n * Whether or not options were configured and EME is available\n */\n\nconst setupEmeOptions = ({\n player,\n sourceKeySystems,\n media,\n audioMedia\n}) => {\n const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n if (!sourceOptions) {\n return false;\n }\n player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n // do nothing.\n\n if (sourceOptions && !player.eme) {\n videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n return false;\n }\n return true;\n};\nconst getVhsLocalStorage = () => {\n if (!window$1.localStorage) {\n return null;\n }\n const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedObject) {\n return null;\n }\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\nconst updateVhsLocalStorage = options => {\n if (!window$1.localStorage) {\n return false;\n }\n let objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? merge(objectToStore, options) : options;\n try {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n * The data URI\n *\n * @return {string|Object}\n * The parsed object/string, or the original string if no supported media type\n * was found\n */\n\nconst expandDataUri = dataUri => {\n if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n } // no known case for this data URI, return the string as-is\n\n return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nconst addOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n xhr._requestCallbackSet = new Set();\n }\n xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nconst addOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n xhr._responseCallbackSet = new Set();\n }\n xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n return;\n }\n xhr._requestCallbackSet.delete(callback);\n if (!xhr._requestCallbackSet.size) {\n delete xhr._requestCallbackSet;\n }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n return;\n }\n xhr._responseCallbackSet.delete(callback);\n if (!xhr._responseCallbackSet.size) {\n delete xhr._responseCallbackSet;\n }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n if (!document || !document.createElement) {\n return false;\n }\n const video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n const canPlay = [\n // Apple santioned\n 'application/vnd.apple.mpegurl',\n // Apple sanctioned for backwards compatibility\n 'audio/mpegurl',\n // Very common\n 'audio/x-mpegurl',\n // Very common\n 'application/x-mpegurl',\n // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\nVhs.supportsNativeDash = function () {\n if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n return false;\n }\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = type => {\n if (type === 'hls') {\n return Vhs.supportsNativeHls;\n }\n if (type === 'dash') {\n return Vhs.supportsNativeDash;\n }\n return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n removeOnResponseHook(Vhs.xhr, callback);\n};\nconst Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nclass VhsHandler extends Component {\n constructor(source, tech, options) {\n super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n // use that over the VHS level `bandwidth` option\n\n if (typeof options.initialBandwidth === 'number') {\n this.options_.bandwidth = options.initialBandwidth;\n }\n this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n // so, get it from Video.js via the `playerId`\n\n if (tech.options_ && tech.options_.playerId) {\n const _player = videojs.getPlayer(tech.options_.playerId);\n this.player_ = _player;\n }\n this.tech_ = tech;\n this.source_ = source;\n this.stats = {};\n this.ignoreNextSeekingEvent_ = false;\n this.setOptions_();\n if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native VHS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n this.playlistController_.fastQualityChange_();\n } else {\n // When leaving fullscreen, since the in page pixel dimensions should be smaller\n // than full screen, see if there should be a rendition switch down to preserve\n // bandwidth.\n this.playlistController_.checkABR_();\n }\n });\n this.on(this.tech_, 'seeking', function () {\n if (this.ignoreNextSeekingEvent_) {\n this.ignoreNextSeekingEvent_ = false;\n return;\n }\n this.setCurrentTime(this.tech_.currentTime());\n });\n this.on(this.tech_, 'error', function () {\n // verify that the error was real and we are loaded\n // enough to have pc loaded.\n if (this.tech_.error() && this.playlistController_) {\n this.playlistController_.pauseLoading();\n }\n });\n this.on(this.tech_, 'play', this.play);\n }\n setOptions_() {\n // defaults\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n this.options_.llhls = this.options_.llhls === false ? false : true;\n this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n if (typeof this.options_.playlistExclusionDuration !== 'number') {\n this.options_.playlistExclusionDuration = 60;\n }\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n const storedObject = getVhsLocalStorage();\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-bandwidth-from-local-storage'\n });\n }\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n if (typeof this.source_[option] !== 'undefined') {\n this.options_[option] = this.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n\n src(src, type) {\n // do nothing if the src is falsey\n if (!src) {\n return;\n }\n this.setOptions_(); // add main playlist controller options\n\n this.options_.src = expandDataUri(this.source_.src);\n this.options_.tech = this.tech_;\n this.options_.externVhs = Vhs;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n this.options_.seekTo = time => {\n this.tech_.setCurrentTime(time);\n };\n this.playlistController_ = new PlaylistController(this.options_);\n const playbackWatcherOptions = merge({\n liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n }, this.options_, {\n seekable: () => this.seekable(),\n media: () => this.playlistController_.media(),\n playlistController: this.playlistController_\n });\n this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n this.playlistController_.on('error', () => {\n const player = videojs.players[this.tech_.options_.playerId];\n let error = this.playlistController_.error;\n if (typeof error === 'object' && !error.code) {\n error.code = 3;\n } else if (typeof error === 'string') {\n error = {\n message: error,\n code: 3\n };\n }\n player.error(error);\n });\n const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n // compatibility with < v2\n\n this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.playlistController_.mainPlaylistLoader_;\n this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get() {\n return this.playlistController_.selectPlaylist;\n },\n set(selectPlaylist) {\n this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get() {\n return this.playlistController_.mainSegmentLoader_.throughput.rate;\n },\n set(throughput) {\n this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get() {\n let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n const tenMbpsAsBitsPerSecond = 10e6;\n if (this.options_.useNetworkInformationApi && networkInformation) {\n // downlink returns Mbps\n // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n // high quality streams are not filtered out.\n\n if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n } else {\n playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n }\n }\n return playerBandwidthEst;\n },\n set(bandwidth) {\n this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get() {\n const invBandwidth = 1 / (this.bandwidth || 1);\n let invThroughput;\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set() {\n videojs.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: () => this.bandwidth || 0,\n enumerable: true\n },\n mediaRequests: {\n get: () => this.playlistController_.mediaRequests_() || 0,\n enumerable: true\n },\n mediaRequestsAborted: {\n get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n enumerable: true\n },\n mediaRequestsErrored: {\n get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n enumerable: true\n },\n mediaTransferDuration: {\n get: () => this.playlistController_.mediaTransferDuration_() || 0,\n enumerable: true\n },\n mediaBytesTransferred: {\n get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n enumerable: true\n },\n mediaAppends: {\n get: () => this.playlistController_.mediaAppends_() || 0,\n enumerable: true\n },\n mainAppendsToLoadedData: {\n get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n enumerable: true\n },\n audioAppendsToLoadedData: {\n get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n enumerable: true\n },\n appendsToLoadedData: {\n get: () => this.playlistController_.appendsToLoadedData_() || 0,\n enumerable: true\n },\n timeToLoadedData: {\n get: () => this.playlistController_.timeToLoadedData_() || 0,\n enumerable: true\n },\n buffered: {\n get: () => timeRangesToArray(this.tech_.buffered()),\n enumerable: true\n },\n currentTime: {\n get: () => this.tech_.currentTime(),\n enumerable: true\n },\n currentSource: {\n get: () => this.tech_.currentSource_,\n enumerable: true\n },\n currentTech: {\n get: () => this.tech_.name_,\n enumerable: true\n },\n duration: {\n get: () => this.tech_.duration(),\n enumerable: true\n },\n main: {\n get: () => this.playlists.main,\n enumerable: true\n },\n playerDimensions: {\n get: () => this.tech_.currentDimensions(),\n enumerable: true\n },\n seekable: {\n get: () => timeRangesToArray(this.tech_.seekable()),\n enumerable: true\n },\n timestamp: {\n get: () => Date.now(),\n enumerable: true\n },\n videoPlaybackQuality: {\n get: () => this.tech_.getVideoPlaybackQuality(),\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n this.tech_.on('bandwidthupdate', () => {\n if (this.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: this.bandwidth,\n throughput: Math.round(this.throughput)\n });\n }\n });\n this.playlistController_.on('selectedinitialmedia', () => {\n // Add the manual rendition mix-in to VhsHandler\n renditionSelectionMixin(this);\n });\n this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n this.setupEme_();\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.playlistController_, 'progress', function () {\n this.tech_.trigger('progress');\n }); // In the live case, we need to ignore the very first `seeking` event since\n // that will be the result of the seek-to-live behavior\n\n this.on(this.playlistController_, 'firstplay', function () {\n this.ignoreNextSeekingEvent_ = true;\n });\n this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n this.tech_.src(this.mediaSourceUrl_);\n }\n createKeySessions_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n this.logger_('waiting for EME key session creation');\n waitForKeySessionCreation({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n mainPlaylists: this.playlists.main.playlists\n }).then(() => {\n this.logger_('created EME key session');\n this.playlistController_.sourceUpdater_.initializedEme();\n }).catch(err => {\n this.logger_('error while creating EME key session', err);\n this.player_.error({\n message: 'Failed to initialize media keys for EME',\n code: 3\n });\n });\n }\n handleWaitingForKey_() {\n // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n // the key is in the manifest. While this should've happened on initial source load, it\n // may happen again in live streams where the keys change, and the manifest info\n // reflects the update.\n //\n // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n // already requested keys for, we don't have to worry about this generating extraneous\n // requests.\n this.logger_('waitingforkey fired, attempting to create any new key sessions');\n this.createKeySessions_();\n }\n /**\n * If necessary and EME is available, sets up EME options and waits for key session\n * creation.\n *\n * This function also updates the source updater so taht it can be used, as for some\n * browsers, EME must be configured before content is appended (if appending unencrypted\n * content before encrypted content).\n */\n\n setupEme_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n const didSetupEmeOptions = setupEmeOptions({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n media: this.playlists.media(),\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n });\n this.player_.tech_.on('keystatuschange', e => {\n if (e.status !== 'output-restricted') {\n return;\n }\n const mainPlaylist = this.playlistController_.main();\n if (!mainPlaylist || !mainPlaylist.playlists) {\n return;\n }\n const excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection\n\n mainPlaylist.playlists.forEach(playlist => {\n if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) {\n if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {\n playlist.excludeUntil = Infinity;\n excludedHDPlaylists.push(playlist);\n }\n }\n });\n if (excludedHDPlaylists.length) {\n videojs.log.warn('DRM keystatus changed to \"output-restricted.\" Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.', ...excludedHDPlaylists); // Clear the buffer before switching playlists, since it may already contain unplayable segments\n\n this.playlistController_.mainSegmentLoader_.resetEverything();\n this.playlistController_.fastQualityChange_();\n }\n });\n this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n if (!didSetupEmeOptions) {\n // If EME options were not set up, we've done all we could to initialize EME.\n this.playlistController_.sourceUpdater_.initializedEme();\n return;\n }\n this.createKeySessions_();\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n\n setupQualityLevels_() {\n const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n // or qualityLevels_ listeners have already been setup, do nothing.\n\n if (!player || !player.qualityLevels || this.qualityLevels_) {\n return;\n }\n this.qualityLevels_ = player.qualityLevels();\n this.playlistController_.on('selectedinitialmedia', () => {\n handleVhsLoadedMetadata(this.qualityLevels_, this);\n });\n this.playlists.on('mediachange', () => {\n handleVhsMediaChange(this.qualityLevels_, this.playlists);\n });\n }\n /**\n * return the version\n */\n\n static version() {\n return {\n '@videojs/http-streaming': version$4,\n 'mux.js': version$3,\n 'mpd-parser': version$2,\n 'm3u8-parser': version$1,\n 'aes-decrypter': version\n };\n }\n /**\n * return the version\n */\n\n version() {\n return this.constructor.version();\n }\n canChangeType() {\n return SourceUpdater.canChangeType();\n }\n /**\n * Begin playing the video.\n */\n\n play() {\n this.playlistController_.play();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n setCurrentTime(currentTime) {\n this.playlistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n duration() {\n return this.playlistController_.duration();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n seekable() {\n return this.playlistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n\n dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n if (this.playlistController_) {\n this.playlistController_.dispose();\n }\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n if (this.tech_ && this.tech_.vhs) {\n delete this.tech_.vhs;\n }\n if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n this.mediaSourceUrl_ = null;\n }\n if (this.tech_) {\n this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n }\n super.dispose();\n }\n convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.playlistController_.media(),\n time,\n callback\n });\n } // the player must be playing before calling this\n\n seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n return seekToProgramTime({\n programTime,\n playlist: this.playlistController_.media(),\n retryCount,\n pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback\n });\n }\n /**\n * Adds the onRequest, onResponse, offRequest and offResponse functions\n * to the VhsHandler xhr Object.\n */\n\n setupXhrHooks_() {\n /**\n * A player function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n this.xhr.onRequest = callback => {\n addOnRequestHook(this.xhr, callback);\n };\n /**\n * A player function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\n this.xhr.onResponse = callback => {\n addOnResponseHook(this.xhr, callback);\n };\n /**\n * Deletes a player onRequest callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offRequest = callback => {\n removeOnRequestHook(this.xhr, callback);\n };\n /**\n * Deletes a player onResponse callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offResponse = callback => {\n removeOnResponseHook(this.xhr, callback);\n }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n this.player_.trigger('xhr-hooks-ready');\n }\n}\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\nconst VhsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$4,\n canHandleSource(srcObj, options = {}) {\n const localOptions = merge(videojs.options, options);\n return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource(source, tech, options = {}) {\n const localOptions = merge(videojs.options, options);\n tech.vhs = new VhsHandler(source, tech, localOptions);\n tech.vhs.xhr = xhrFactory();\n tech.vhs.setupXhrHooks_();\n tech.vhs.src(source.src, source.type);\n return tech.vhs;\n },\n canPlayType(type, options) {\n const simpleType = simpleTypeFromSourceType(type);\n if (!simpleType) {\n return '';\n }\n const overrideNative = VhsSourceHandler.getOverrideNative(options);\n const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n return canUseMsePlayback ? 'maybe' : '';\n },\n getOverrideNative(options = {}) {\n const {\n vhs = {}\n } = options;\n const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n const {\n overrideNative = defaultOverrideNative\n } = vhs;\n return overrideNative;\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { videojs as default };\n","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n var acc = '';\n\n while (len--) {\n acc += str;\n }\n\n return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nexport var countBits = function countBits(x) {\n return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n if (str === void 0) {\n str = ' ';\n }\n\n return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n\n return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n if (bytes instanceof Uint8Array) {\n return bytes;\n }\n\n if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n // any non-number or NaN leads to empty uint8array\n // eslint-disable-next-line\n if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n bytes = 0;\n } else {\n bytes = [bytes];\n }\n }\n\n return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(16), 2, '0');\n }\n\n return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(2), 8, '0');\n }\n\n return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n if (b[0] === 0xFF) {\n return 'big';\n }\n\n if (b[0] === 0xCC) {\n return 'little';\n }\n\n return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$signed = _ref.signed,\n signed = _ref$signed === void 0 ? false : _ref$signed,\n _ref$le = _ref.le,\n le = _ref$le === void 0 ? false : _ref$le;\n\n bytes = toUint8(bytes);\n var fn = le ? 'reduce' : 'reduceRight';\n var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n var number = obj.call(bytes, function (total, byte, i) {\n var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n return total + BigInt(byte) * BYTE_TABLE[exponent];\n }, BigInt(0));\n\n if (signed) {\n var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n number = BigInt(number);\n\n if (number > max) {\n number -= max;\n number -= max;\n number -= BigInt(2);\n }\n }\n\n return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$le = _ref2.le,\n le = _ref2$le === void 0 ? false : _ref2$le;\n\n // eslint-disable-next-line\n if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n number = 0;\n }\n\n number = BigInt(number);\n var byteCount = countBytes(number);\n var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n for (var i = 0; i < byteCount; i++) {\n var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n if (number < 0) {\n bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n bytes[byteIndex] -= i === 0 ? 1 : 2;\n }\n }\n\n return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n if (!bytes) {\n return '';\n } // TODO: should toUint8 handle cases where we only have 8 bytes\n // but report more since this is a Uint16+ Array?\n\n\n bytes = Array.prototype.slice.call(bytes);\n var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n try {\n return decodeURIComponent(escape(string));\n } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n // or full non string data. Just return the potentially garbled string.\n }\n\n return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n string = string.toString();\n }\n\n if (typeof string !== 'string') {\n return new Uint8Array();\n } // If the string already is bytes, we don't have to do this\n // otherwise we do this so that we split multi length characters\n // into individual bytes\n\n\n if (!stringIsBytes) {\n string = unescape(encodeURIComponent(string));\n }\n\n var view = new Uint8Array(string.length);\n\n for (var i = 0; i < string.length; i++) {\n view[i] = string.charCodeAt(i);\n }\n\n return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n buffers[_key] = arguments[_key];\n }\n\n buffers = buffers.filter(function (b) {\n return b && (b.byteLength || b.length) && typeof b !== 'string';\n });\n\n if (buffers.length <= 1) {\n // for 0 length we will return empty uint8\n // for 1 length we return the first uint8\n return toUint8(buffers[0]);\n }\n\n var totalLen = buffers.reduce(function (total, buf, i) {\n return total + (buf.byteLength || buf.length);\n }, 0);\n var tempBuffer = new Uint8Array(totalLen);\n var offset = 0;\n buffers.forEach(function (buf) {\n buf = toUint8(buf);\n tempBuffer.set(buf, offset);\n offset += buf.byteLength;\n });\n return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n * Bytes to check in\n *\n * @param {Uint8Array|Array} b\n * Bytes to check for\n *\n * @param {Object} options\n * options\n *\n * @param {Array|Uint8Array} [offset=0]\n * offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n * mask to use on bytes before comparison.\n *\n * @return {boolean}\n * If all bytes in b are inside of a, taking into account\n * bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$offset = _ref3.offset,\n offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n _ref3$mask = _ref3.mask,\n mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n a = toUint8(a);\n b = toUint8(b); // ie 11 does not support uint8 every\n\n var fn = b.every ? b.every : Array.prototype.every;\n return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n fn.call(b, function (bByte, i) {\n var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n return bByte === aByte;\n });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n if (Uint8Array.prototype.slice) {\n return Uint8Array.prototype.slice.call(src, start, end);\n }\n\n return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n if (src.reverse) {\n return src.reverse();\n }\n\n return Array.prototype.reverse.call(src);\n};","import { padStart, toHexString, toBinaryString } from './byte-helpers.js'; // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax\n// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1\n\nexport var getAv1Codec = function getAv1Codec(bytes) {\n var codec = '';\n var profile = bytes[1] >>> 3;\n var level = bytes[1] & 0x1F;\n var tier = bytes[2] >>> 7;\n var highBitDepth = (bytes[2] & 0x40) >> 6;\n var twelveBit = (bytes[2] & 0x20) >> 5;\n var monochrome = (bytes[2] & 0x10) >> 4;\n var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;\n var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;\n var chromaSamplePosition = bytes[2] & 0x03;\n codec += profile + \".\" + padStart(level, 2, '0');\n\n if (tier === 0) {\n codec += 'M';\n } else if (tier === 1) {\n codec += 'H';\n }\n\n var bitDepth;\n\n if (profile === 2 && highBitDepth) {\n bitDepth = twelveBit ? 12 : 10;\n } else {\n bitDepth = highBitDepth ? 10 : 8;\n }\n\n codec += \".\" + padStart(bitDepth, 2, '0'); // TODO: can we parse color range??\n\n codec += \".\" + monochrome;\n codec += \".\" + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;\n return codec;\n};\nexport var getAvcCodec = function getAvcCodec(bytes) {\n var profileId = toHexString(bytes[1]);\n var constraintFlags = toHexString(bytes[2] & 0xFC);\n var levelId = toHexString(bytes[3]);\n return \"\" + profileId + constraintFlags + levelId;\n};\nexport var getHvcCodec = function getHvcCodec(bytes) {\n var codec = '';\n var profileSpace = bytes[1] >> 6;\n var profileId = bytes[1] & 0x1F;\n var tierFlag = (bytes[1] & 0x20) >> 5;\n var profileCompat = bytes.subarray(2, 6);\n var constraintIds = bytes.subarray(6, 12);\n var levelId = bytes[12];\n\n if (profileSpace === 1) {\n codec += 'A';\n } else if (profileSpace === 2) {\n codec += 'B';\n } else if (profileSpace === 3) {\n codec += 'C';\n }\n\n codec += profileId + \".\"; // ffmpeg does this in big endian\n\n var profileCompatVal = parseInt(toBinaryString(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...\n\n if (profileCompatVal > 255) {\n profileCompatVal = parseInt(toBinaryString(profileCompat), 2);\n }\n\n codec += profileCompatVal.toString(16) + \".\";\n\n if (tierFlag === 0) {\n codec += 'L';\n } else {\n codec += 'H';\n }\n\n codec += levelId;\n var constraints = '';\n\n for (var i = 0; i < constraintIds.length; i++) {\n var v = constraintIds[i];\n\n if (v) {\n if (constraints) {\n constraints += '.';\n }\n\n constraints += v.toString(16);\n }\n }\n\n if (constraints) {\n codec += \".\" + constraints;\n }\n\n return codec;\n};","import window from 'global/window';\nvar regexs = {\n // to determine mime types\n mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n // to determine if a codec is audio or video\n video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n text: /^(stpp.ttml.im1t)/,\n // mux.js support regex\n muxerVideo: /^(avc0?1)/,\n muxerAudio: /^(mp4a)/,\n // match nothing as muxer does not support text right now.\n // there cannot never be a character before the start of a string\n // so this matches nothing.\n muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {string} codec\n * Codec string to translate\n * @return {string}\n * The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n if (!codec) {\n return codec;\n }\n\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n};\n/**\n * Replace the old apple-style `avc1.
.
` codec strings with the standard\n * `avc1.`\n *\n * @param {string[]} codecs\n * An array of codec strings to translate\n * @return {string[]}\n * The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the\n * standard `avc1.`.\n *\n * @param {string} codecString\n * The codec string\n * @return {string}\n * The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n * Number of codecs parsed\n * @property {string} [videoCodec]\n * Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n * Video object type indicator (if found)\n * @property {string|null} audioProfile\n * Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n * The codec string to parse\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n var codecs = codecString.split(',');\n var result = [];\n codecs.forEach(function (codec) {\n codec = codec.trim();\n var codecType;\n mediaTypes.forEach(function (name) {\n var match = regexs[name].exec(codec.toLowerCase());\n\n if (!match || match.length <= 1) {\n return;\n }\n\n codecType = name; // maintain codec case\n\n var type = codec.substring(0, match[1].length);\n var details = codec.replace(type, '');\n result.push({\n type: type,\n details: details,\n mediaType: name\n });\n });\n\n if (!codecType) {\n result.push({\n type: codec,\n details: '',\n mediaType: 'unknown'\n });\n }\n });\n return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n * The master playlist\n * @param {string} audioGroupId\n * ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n if (!audioGroup) {\n return null;\n }\n\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n\n if (audioType.default && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS);\n }\n }\n\n return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n if (!codecString || typeof codecString !== 'string') {\n return;\n }\n\n var codecs = codecString.toLowerCase().split(',').map(function (c) {\n return translateLegacyCodec(c.trim());\n }); // default to video type\n\n var type = 'video'; // only change to audio type if the only codec we have is\n // audio\n\n if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n type = 'audio';\n } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n // text uses application/ for now\n type = 'application';\n } // default the container to mp4\n\n\n var container = 'mp4'; // every codec must be able to go into the container\n // for that container to be the correct one\n\n if (codecs.every(function (c) {\n return regexs.mp4.test(c);\n })) {\n container = 'mp4';\n } else if (codecs.every(function (c) {\n return regexs.webm.test(c);\n })) {\n container = 'webm';\n } else if (codecs.every(function (c) {\n return regexs.ogg.test(c);\n })) {\n container = 'ogg';\n }\n\n return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return codecString.toLowerCase().split(',').every(function (codec) {\n codec = codec.trim(); // any match is supported.\n\n for (var i = 0; i < upperMediaTypes.length; i++) {\n var type = upperMediaTypes[i];\n\n if (regexs[\"muxer\" + type].test(codec)) {\n return true;\n }\n }\n\n return false;\n });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","import { toUint8, bytesMatch } from './byte-helpers.js';\nimport { findBox } from './mp4-helpers.js';\nimport { findEbml, EBML_TAGS } from './ebml-helpers.js';\nimport { getId3Offset } from './id3-helpers.js';\nimport { findH264Nal, findH265Nal } from './nal-helpers.js';\nvar CONSTANTS = {\n // \"webm\" string literal in hex\n 'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n // \"matroska\" string literal in hex\n 'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n // \"fLaC\" string literal in hex\n 'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n // \"OggS\" string literal in hex\n 'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n // ac-3 sync byte, also works for ec-3 as that is simply a codec\n // of ac-3\n 'ac3': toUint8([0x0b, 0x77]),\n // \"RIFF\" string literal in hex used for wav and avi\n 'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n // \"AVI\" string literal in hex\n 'avi': toUint8([0x41, 0x56, 0x49]),\n // \"WAVE\" string literal in hex\n 'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n // \"ftyp3g\" string literal in hex\n '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n // \"ftyp\" string literal in hex\n 'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n // \"styp\" string literal in hex\n 'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n // \"ftypqt\" string literal in hex\n 'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n // moov string literal in hex\n 'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n // moof string literal in hex\n 'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n aac: function aac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x10], {\n offset: offset,\n mask: [0xFF, 0x16]\n });\n },\n mp3: function mp3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x02], {\n offset: offset,\n mask: [0xFF, 0x06]\n });\n },\n webm: function webm(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n return bytesMatch(docType, CONSTANTS.webm);\n },\n mkv: function mkv(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n return bytesMatch(docType, CONSTANTS.matroska);\n },\n mp4: function mp4(bytes) {\n // if this file is another base media file format, it is not mp4\n if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n return false;\n } // if this file starts with a ftyp or styp box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.mp4, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n offset: 4\n })) {\n return true;\n } // if this file starts with a moof/moov box its mp4\n\n\n if (bytesMatch(bytes, CONSTANTS.moof, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.moov, {\n offset: 4\n })) {\n return true;\n }\n },\n mov: function mov(bytes) {\n return bytesMatch(bytes, CONSTANTS.mov, {\n offset: 4\n });\n },\n '3gp': function gp(bytes) {\n return bytesMatch(bytes, CONSTANTS['3gp'], {\n offset: 4\n });\n },\n ac3: function ac3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.ac3, {\n offset: offset\n });\n },\n ts: function ts(bytes) {\n if (bytes.length < 189 && bytes.length >= 1) {\n return bytes[0] === 0x47;\n }\n\n var i = 0; // check the first 376 bytes for two matching sync bytes\n\n while (i + 188 < bytes.length && i < 188) {\n if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n flac: function flac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.flac, {\n offset: offset\n });\n },\n ogg: function ogg(bytes) {\n return bytesMatch(bytes, CONSTANTS.ogg);\n },\n avi: function avi(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n offset: 8\n });\n },\n wav: function wav(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n offset: 8\n });\n },\n 'h264': function h264(bytes) {\n // find seq_parameter_set_rbsp\n return findH264Nal(bytes, 7, 3).length;\n },\n 'h265': function h265(bytes) {\n // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n return findH265Nal(bytes, [32, 33], 3).length;\n }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n var isLikelyFn = _isLikely[type];\n\n _isLikely[type] = function (bytes) {\n return isLikelyFn(toUint8(bytes));\n };\n}); // export after wrapping\n\nexport var isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexport var detectContainerForBytes = function detectContainerForBytes(bytes) {\n bytes = toUint8(bytes);\n\n for (var i = 0; i < isLikelyTypes.length; i++) {\n var type = isLikelyTypes[i];\n\n if (isLikely[type](bytes)) {\n return type;\n }\n }\n\n return '';\n}; // fmp4 is not a container\n\nexport var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n return findBox(bytes, ['moof']).length > 0;\n};","import { toUint8, bytesToNumber, bytesMatch, bytesToString, numberToBytes, padStart } from './byte-helpers';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js'; // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nexport var EBML_TAGS = {\n EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n DocType: toUint8([0x42, 0x82]),\n Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n Track: toUint8([0xAE]),\n TrackNumber: toUint8([0xd7]),\n DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n TrackEntry: toUint8([0xAE]),\n TrackType: toUint8([0x83]),\n FlagDefault: toUint8([0x88]),\n CodecID: toUint8([0x86]),\n CodecPrivate: toUint8([0x63, 0xA2]),\n VideoTrack: toUint8([0xe0]),\n AudioTrack: toUint8([0xe1]),\n // Not used yet, but will be used for live webm/mkv\n // see https://www.matroska.org/technical/basics.html#block-structure\n // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n Timestamp: toUint8([0xE7]),\n TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n BlockGroup: toUint8([0xA0]),\n BlockDuration: toUint8([0x9B]),\n Block: toUint8([0xA1]),\n SimpleBlock: toUint8([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n var len = 1;\n\n for (var i = 0; i < LENGTH_TABLE.length; i++) {\n if (byte & LENGTH_TABLE[i]) {\n break;\n }\n\n len++;\n }\n\n return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n if (removeLength === void 0) {\n removeLength = true;\n }\n\n if (signed === void 0) {\n signed = false;\n }\n\n var length = getLength(bytes[offset]);\n var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n // as they will be modified below to remove the dataSizeLen bits and we do not\n // want to modify the original data. normally we could just call slice on\n // uint8array but ie 11 does not support that...\n\n if (removeLength) {\n valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n valueBytes[0] ^= LENGTH_TABLE[length - 1];\n }\n\n return {\n length: length,\n value: bytesToNumber(valueBytes, {\n signed: signed\n }),\n bytes: valueBytes\n };\n};\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return path.match(/.{1,2}/g).map(function (p) {\n return normalizePath(p);\n });\n }\n\n if (typeof path === 'number') {\n return numberToBytes(path);\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n if (offset >= bytes.length) {\n return bytes.length;\n }\n\n var innerid = getvint(bytes, offset, false);\n\n if (bytesMatch(id.bytes, innerid.bytes)) {\n return offset;\n }\n\n var dataHeader = getvint(bytes, offset + innerid.length);\n return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n * converting the byte to binary and counting the zeros\n * before a 1. Then you add 1 to that. Examples\n * 00011111 = length 4 because there are 3 zeros before a 1.\n * 00100000 = length 3 because there are 2 zeros before a 1.\n * 00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n * Then all the bytes are merged into a value. NOTE: this\n * is not the case for id ebml tags as there id includes\n * length bits.\n *\n */\n\n\nexport var findEbml = function findEbml(bytes, paths) {\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var id = getvint(bytes, i, false);\n var dataHeader = getvint(bytes, i + id.length);\n var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n if (dataHeader.value === 0x7f) {\n dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n\n if (dataHeader.value !== bytes.length) {\n dataHeader.value -= dataStart;\n }\n }\n\n var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n var data = bytes.subarray(dataStart, dataEnd);\n\n if (bytesMatch(paths[0], id.bytes)) {\n if (paths.length === 1) {\n // this is the end of the paths and we've found the tag we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next tag inside of the data\n // of this one\n results = results.concat(findEbml(data, paths.slice(1)));\n }\n }\n\n var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n i += totalLength;\n }\n\n return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nexport var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n var duration;\n\n if (type === 'group') {\n duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n if (duration) {\n duration = bytesToNumber(duration);\n duration = 1 / timestampScale * duration * timestampScale / 1000;\n }\n\n block = findEbml(block, [EBML_TAGS.Block])[0];\n type = 'block'; // treat data as a block after this point\n }\n\n var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n var trackNumber = getvint(block, 0);\n var timestamp = dv.getInt16(trackNumber.length, false);\n var flags = block[trackNumber.length + 2];\n var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n var parsed = {\n duration: duration,\n trackNumber: trackNumber.value,\n keyframe: type === 'simple' && flags >> 7 === 1,\n invisible: (flags & 0x08) >> 3 === 1,\n lacing: (flags & 0x06) >> 1,\n discardable: type === 'simple' && (flags & 0x01) === 1,\n frames: [],\n pts: ptsdts,\n dts: ptsdts,\n timestamp: timestamp\n };\n\n if (!parsed.lacing) {\n parsed.frames.push(data);\n return parsed;\n }\n\n var numberOfFrames = data[0] + 1;\n var frameSizes = [];\n var offset = 1; // Fixed\n\n if (parsed.lacing === 2) {\n var sizeOfFrame = (data.length - offset) / numberOfFrames;\n\n for (var i = 0; i < numberOfFrames; i++) {\n frameSizes.push(sizeOfFrame);\n }\n } // xiph\n\n\n if (parsed.lacing === 1) {\n for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n var size = 0;\n\n do {\n size += data[offset];\n offset++;\n } while (data[offset - 1] === 0xFF);\n\n frameSizes.push(size);\n }\n } // ebml\n\n\n if (parsed.lacing === 3) {\n // first vint is unsinged\n // after that vints are singed and\n // based on a compounding size\n var _size = 0;\n\n for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true);\n _size += vint.value;\n frameSizes.push(_size);\n offset += vint.length;\n }\n }\n\n frameSizes.forEach(function (size) {\n parsed.frames.push(data.subarray(offset, offset + size));\n offset += size;\n });\n return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n var i = 0;\n var params = {};\n\n while (i < bytes.length) {\n var id = bytes[i] & 0x7f;\n var len = bytes[i + 1];\n var val = void 0;\n\n if (len === 1) {\n val = bytes[i + 2];\n } else {\n val = bytes.subarray(i + 2, i + 2 + len);\n }\n\n if (id === 1) {\n params.profile = val;\n } else if (id === 2) {\n params.level = val;\n } else if (id === 3) {\n params.bitDepth = val;\n } else if (id === 4) {\n params.chromaSubsampling = val;\n } else {\n params[id] = val;\n }\n\n i += 2 + len;\n }\n\n return params;\n};\n\nexport var parseTracks = function parseTracks(bytes) {\n bytes = toUint8(bytes);\n var decodedTracks = [];\n var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Track]);\n }\n\n if (!tracks.length) {\n return decodedTracks;\n }\n\n tracks.forEach(function (track) {\n var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\n if (!trackType || !trackType.length) {\n return;\n } // 1 is video, 2 is audio, 17 is subtitle\n // other values are unimportant in this context\n\n\n if (trackType[0] === 1) {\n trackType = 'video';\n } else if (trackType[0] === 2) {\n trackType = 'audio';\n } else if (trackType[0] === 17) {\n trackType = 'subtitle';\n } else {\n return;\n } // todo parse language\n\n\n var decodedTrack = {\n rawCodec: bytesToString(findEbml(track, [EBML_TAGS.CodecID])[0]),\n type: trackType,\n codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n number: bytesToNumber(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n defaultDuration: bytesToNumber(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n default: findEbml(track, [EBML_TAGS.FlagDefault])[0],\n rawData: track\n };\n var codec = '';\n\n if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n codec = \"avc1.\" + getAvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n codec = \"hev1.\" + getHvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n } else {\n codec = 'mp4v.20.9';\n }\n } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n codec = 'theora';\n } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n codec = 'vp8';\n } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n profile = _parseVp9Private.profile,\n level = _parseVp9Private.level,\n bitDepth = _parseVp9Private.bitDepth,\n chromaSubsampling = _parseVp9Private.chromaSubsampling;\n\n codec = 'vp09.';\n codec += padStart(profile, 2, '0') + \".\";\n codec += padStart(level, 2, '0') + \".\";\n codec += padStart(bitDepth, 2, '0') + \".\";\n codec += \"\" + padStart(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n codec += \".\" + padStart(colourPrimaries[0], 2, '0');\n codec += \".\" + padStart(transferCharacteristics[0], 2, '0');\n codec += \".\" + padStart(matrixCoefficients[0], 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag[0], 2, '0');\n }\n } else {\n codec = 'vp9';\n }\n } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n codec = \"av01.\" + getAv1Codec(decodedTrack.codecPrivate);\n } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n codec = 'alac';\n } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n codec = 'mp2';\n } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n codec = 'mp3';\n } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n } else {\n codec = 'mp4a.40.2';\n }\n } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n codec = 'ac-3';\n } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n codec = 'pcm';\n } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n codec = 'speex';\n } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n codec = 'ec-3';\n } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n codec = 'vorbis';\n } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n codec = 'flac';\n } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n codec = 'opus';\n }\n\n decodedTrack.codec = codec;\n decodedTracks.push(decodedTrack);\n });\n return decodedTracks.sort(function (a, b) {\n return a.number - b.number;\n });\n};\nexport var parseData = function parseData(data, tracks) {\n var allBlocks = [];\n var segment = findEbml(data, [EBML_TAGS.Segment])[0];\n var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n if (timestampScale && timestampScale.length) {\n timestampScale = bytesToNumber(timestampScale);\n } else {\n timestampScale = 1000000;\n }\n\n var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n if (!tracks) {\n tracks = parseTracks(segment);\n }\n\n clusters.forEach(function (cluster, ci) {\n var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n return {\n type: 'simple',\n data: b\n };\n });\n var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n return {\n type: 'group',\n data: b\n };\n });\n var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n\n if (timestamp && timestamp.length) {\n timestamp = bytesToNumber(timestamp);\n } // get all blocks then sort them into the correct order\n\n\n var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n return a.data.byteOffset - b.data.byteOffset;\n });\n blocks.forEach(function (block, bi) {\n var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp);\n allBlocks.push(decoded);\n });\n });\n return {\n tracks: tracks,\n blocks: allBlocks\n };\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nvar ID3 = toUint8([0x49, 0x44, 0x33]);\nexport var getId3Size = function getId3Size(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n var flags = bytes[offset + 5];\n var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n var footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n\n return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n bytes = toUint8(bytes);\n\n if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n offset: offset\n })) {\n return offset;\n }\n\n offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n // have multiple ID3 tag sections even though\n // they should not.\n\n return getId3Offset(bytes, offset);\n};","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n * Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n * VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n if (MPEGURL_REGEX.test(type)) {\n return 'hls';\n }\n\n if (DASH_REGEX.test(type)) {\n return 'dash';\n } // Denotes the special case of a manifest object passed to http-streaming instead of a\n // source URL.\n //\n // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n //\n // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n // project, and the +json suffix identifies the structure of the media type.\n\n\n if (type === 'application/vnd.videojs.vhs+json') {\n return 'vhs-json';\n }\n\n return null;\n};","import { stringToBytes, toUint8, bytesMatch, bytesToString, toHexString, padStart, bytesToNumber } from './byte-helpers.js';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js';\nimport { parseOpusHead } from './opus-helpers.js';\n\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return stringToBytes(path);\n }\n\n if (typeof path === 'number') {\n return path;\n }\n\n return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n bytes = toUint8(bytes);\n var results = [];\n var i = 0;\n\n while (bytes.length > i) {\n var tag = bytes[i];\n var size = 0;\n var headerSize = 0; // tag\n\n headerSize++;\n var byte = bytes[headerSize]; // first byte\n\n headerSize++;\n\n while (byte & 0x80) {\n size = (byte & 0x7F) << 7;\n byte = bytes[headerSize];\n headerSize++;\n }\n\n size += byte & 0x7F;\n\n for (var z = 0; z < DESCRIPTORS.length; z++) {\n var _DESCRIPTORS$z = DESCRIPTORS[z],\n id = _DESCRIPTORS$z.id,\n parser = _DESCRIPTORS$z.parser;\n\n if (tag === id) {\n results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n break;\n }\n }\n\n i += size + headerSize;\n }\n\n return results;\n};\nDESCRIPTORS = [{\n id: 0x03,\n parser: function parser(bytes) {\n var desc = {\n tag: 0x03,\n id: bytes[0] << 8 | bytes[1],\n flags: bytes[2],\n size: 3,\n dependsOnEsId: 0,\n ocrEsId: 0,\n descriptors: [],\n url: ''\n }; // depends on es id\n\n if (desc.flags & 0x80) {\n desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n } // url\n\n\n if (desc.flags & 0x40) {\n var len = bytes[desc.size];\n desc.url = bytesToString(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n desc.size += len;\n } // ocr es id\n\n\n if (desc.flags & 0x20) {\n desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n }\n\n desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || [];\n return desc;\n }\n}, {\n id: 0x04,\n parser: function parser(bytes) {\n // DecoderConfigDescriptor\n var desc = {\n tag: 0x04,\n oti: bytes[0],\n streamType: bytes[1],\n bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n descriptors: parseDescriptors(bytes.subarray(13))\n };\n return desc;\n }\n}, {\n id: 0x05,\n parser: function parser(bytes) {\n // DecoderSpecificInfo\n return {\n tag: 0x05,\n bytes: bytes\n };\n }\n}, {\n id: 0x06,\n parser: function parser(bytes) {\n // SLConfigDescriptor\n return {\n tag: 0x06,\n bytes: bytes\n };\n }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n * An array of paths or a single path representing the name\n * of boxes to search through in bytes. Paths may be\n * uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n * Should we search only for complete boxes on the final path.\n * This is very useful when you do not want to get back partial boxes\n * in the case of streaming files.\n *\n * @return {Uint8Array[]}\n * An array of the end paths that we found.\n */\n\nexport var findBox = function findBox(bytes, paths, complete) {\n if (complete === void 0) {\n complete = false;\n }\n\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n\n if (!paths.length) {\n // short-circuit the search for empty paths\n return results;\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n if (size === 0) {\n break;\n }\n\n var end = i + size;\n\n if (end > bytes.length) {\n // this box is bigger than the number of bytes we have\n // and complete is set, we cannot find any more boxes.\n if (complete) {\n break;\n }\n\n end = bytes.length;\n }\n\n var data = bytes.subarray(i + 8, end);\n\n if (bytesMatch(type, paths[0])) {\n if (paths.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next box along the path\n results.push.apply(results, findBox(data, paths.slice(1), complete));\n }\n }\n\n i = end;\n } // we've finished searching all of bytes\n\n\n return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n * The name of the box to find.\n *\n * @return {Uint8Array[]}\n * a subarray of bytes representing the name boxed we found.\n */\n\nexport var findNamedBox = function findNamedBox(bytes, name) {\n name = normalizePath(name);\n\n if (!name.length) {\n // short-circuit the search for empty paths\n return bytes.subarray(bytes.length);\n }\n\n var i = 0;\n\n while (i < bytes.length) {\n if (bytesMatch(bytes.subarray(i, i + name.length), name)) {\n var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n var end = size > 1 ? i + size : bytes.byteLength;\n return bytes.subarray(i + 4, end);\n }\n\n i++;\n } // we've finished searching all of bytes\n\n\n return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n if (entrySize === void 0) {\n entrySize = 4;\n }\n\n if (parseEntry === void 0) {\n parseEntry = function parseEntry(d) {\n return bytesToNumber(d);\n };\n }\n\n var entries = [];\n\n if (!data || !data.length) {\n return entries;\n }\n\n var entryCount = bytesToNumber(data.subarray(4, 8));\n\n for (var i = 8; entryCount; i += entrySize, entryCount--) {\n entries.push(parseEntry(data.subarray(i, i + entrySize)));\n }\n\n return entries;\n};\n\nexport var buildFrameTable = function buildFrameTable(stbl, timescale) {\n var keySamples = parseSamples(findBox(stbl, ['stss'])[0]);\n var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]);\n var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) {\n return {\n sampleCount: bytesToNumber(entry.subarray(0, 4)),\n sampleDelta: bytesToNumber(entry.subarray(4, 8))\n };\n });\n var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n return {\n firstChunk: bytesToNumber(entry.subarray(0, 4)),\n samplesPerChunk: bytesToNumber(entry.subarray(4, 8)),\n sampleDescriptionIndex: bytesToNumber(entry.subarray(8, 12))\n };\n });\n var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n var frames = [];\n\n for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n var samplesInChunk = void 0;\n\n for (var i = 0; i < samplesToChunks.length; i++) {\n var sampleToChunk = samplesToChunks[i];\n var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n\n if (isThisOne) {\n samplesInChunk = sampleToChunk.samplesPerChunk;\n break;\n }\n }\n\n var chunkOffset = chunkOffsets[chunkIndex];\n\n for (var _i = 0; _i < samplesInChunk; _i++) {\n var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n var keyframe = !keySamples.length;\n\n if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n keyframe = true;\n }\n\n var frame = {\n keyframe: keyframe,\n start: chunkOffset,\n end: chunkOffset + frameEnd\n };\n\n for (var k = 0; k < timeToSamples.length; k++) {\n var _timeToSamples$k = timeToSamples[k],\n sampleCount = _timeToSamples$k.sampleCount,\n sampleDelta = _timeToSamples$k.sampleDelta;\n\n if (frames.length <= sampleCount) {\n // ms to ns\n var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n frame.duration = sampleDelta;\n break;\n }\n }\n\n frames.push(frame);\n chunkOffset += frameEnd;\n }\n }\n\n return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n var codec = bytesToString(bytes.subarray(0, 4));\n\n if (track.type === 'video') {\n track.info = track.info || {};\n track.info.width = bytes[28] << 8 | bytes[29];\n track.info.height = bytes[30] << 8 | bytes[31];\n } else if (track.type === 'audio') {\n track.info = track.info || {};\n track.info.channels = bytes[20] << 8 | bytes[21];\n track.info.bitDepth = bytes[22] << 8 | bytes[23];\n track.info.sampleRate = bytes[28] << 8 | bytes[29];\n }\n\n if (codec === 'avc1') {\n var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n codec += \".\" + getAvcCodec(avcC);\n track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n /* {\n configurationVersion: avcC[0],\n profile: avcC[1],\n profileCompatibility: avcC[2],\n level: avcC[3],\n lengthSizeMinusOne: avcC[4] & 0x3\n };\n let spsNalUnitCount = avcC[5] & 0x1F;\n const spsNalUnits = track.info.avc.spsNalUnits = [];\n // past spsNalUnitCount\n let offset = 6;\n while (spsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }\n let ppsNalUnitCount = avcC[offset];\n const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n // past ppsNalUnitCount\n offset += 1;\n while (ppsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }*/\n // HEVCDecoderConfigurationRecord\n } else if (codec === 'hvc1' || codec === 'hev1') {\n codec += \".\" + getHvcCodec(findNamedBox(bytes, 'hvcC'));\n } else if (codec === 'mp4a' || codec === 'mp4v') {\n var esds = findNamedBox(bytes, 'esds');\n var esDescriptor = parseDescriptors(esds.subarray(4))[0];\n var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n var tag = _ref.tag;\n return tag === 0x04;\n })[0];\n\n if (decoderConfig) {\n // most codecs do not have a further '.'\n // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n codec += '.' + toHexString(decoderConfig.oti);\n\n if (decoderConfig.oti === 0x40) {\n codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n } else if (decoderConfig.oti === 0x20) {\n codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n } else if (decoderConfig.oti === 0xdd) {\n codec = 'vorbis';\n }\n } else if (track.type === 'audio') {\n codec += '.40.2';\n } else {\n codec += '.20.9';\n }\n } else if (codec === 'av01') {\n // AV1DecoderConfigurationRecord\n codec += \".\" + getAv1Codec(findNamedBox(bytes, 'av1C'));\n } else if (codec === 'vp09') {\n // VPCodecConfigurationRecord\n var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n var profile = vpcC[0];\n var level = vpcC[1];\n var bitDepth = vpcC[2] >> 4;\n var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n var colourPrimaries = vpcC[3];\n var transferCharacteristics = vpcC[4];\n var matrixCoefficients = vpcC[5];\n codec += \".\" + padStart(profile, 2, '0');\n codec += \".\" + padStart(level, 2, '0');\n codec += \".\" + padStart(bitDepth, 2, '0');\n codec += \".\" + padStart(chromaSubsampling, 2, '0');\n codec += \".\" + padStart(colourPrimaries, 2, '0');\n codec += \".\" + padStart(transferCharacteristics, 2, '0');\n codec += \".\" + padStart(matrixCoefficients, 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag, 2, '0');\n } else if (codec === 'theo') {\n codec = 'theora';\n } else if (codec === 'spex') {\n codec = 'speex';\n } else if (codec === '.mp3') {\n codec = 'mp4a.40.34';\n } else if (codec === 'msVo') {\n codec = 'vorbis';\n } else if (codec === 'Opus') {\n codec = 'opus';\n var dOps = findNamedBox(bytes, 'dOps');\n track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n // Firefox requires a codecDelay for opus playback\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n track.info.codecDelay = 6500000;\n } else {\n codec = codec.toLowerCase();\n }\n /* eslint-enable */\n // flac, ac-3, ec-3, opus\n\n\n track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n if (frameTable === void 0) {\n frameTable = true;\n }\n\n bytes = toUint8(bytes);\n var traks = findBox(bytes, ['moov', 'trak'], true);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {\n bytes: trak\n };\n var mdia = findBox(trak, ['mdia'])[0];\n var hdlr = findBox(mdia, ['hdlr'])[0];\n var trakType = bytesToString(hdlr.subarray(8, 12));\n\n if (trakType === 'soun') {\n track.type = 'audio';\n } else if (trakType === 'vide') {\n track.type = 'video';\n } else {\n track.type = trakType;\n }\n\n var tkhd = findBox(trak, ['tkhd'])[0];\n\n if (tkhd) {\n var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n var tkhdVersion = view.getUint8(0);\n track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n\n var mdhd = findBox(mdia, ['mdhd'])[0];\n\n if (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n }\n\n var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n var stsd = findBox(stbl, ['stsd'])[0];\n var descriptionCount = bytesToNumber(stsd.subarray(4, 8));\n var offset = 8; // add codec and codec info\n\n while (descriptionCount--) {\n var len = bytesToNumber(stsd.subarray(offset, offset + 4));\n var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n addSampleDescription(track, sampleDescriptor);\n offset += 4 + len;\n }\n\n if (frameTable) {\n track.frameTable = buildFrameTable(stbl, track.timescale);\n } // codec has no sub parameters\n\n\n tracks.push(track);\n });\n return tracks;\n};\nexport var parseMediaInfo = function parseMediaInfo(bytes) {\n var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n if (!mvhd || !mvhd.length) {\n return;\n }\n\n var info = {}; // ms to ns\n // mvhd v1 has 8 byte duration and other fields too\n\n if (mvhd[0] === 1) {\n info.timestampScale = bytesToNumber(mvhd.subarray(20, 24));\n info.duration = bytesToNumber(mvhd.subarray(24, 32));\n } else {\n info.timestampScale = bytesToNumber(mvhd.subarray(12, 16));\n info.duration = bytesToNumber(mvhd.subarray(16, 20));\n }\n\n info.bytes = mvhd;\n return info;\n};","import { bytesMatch, toUint8 } from './byte-helpers.js';\nexport var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\nexport var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\nexport var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nexport var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n var positions = [];\n var i = 1; // Find all `Emulation Prevention Bytes`\n\n while (i < bytes.length - 2) {\n if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n positions.push(i + 2);\n i++;\n }\n\n i++;\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n\n if (positions.length === 0) {\n return bytes;\n } // Create a new array to hold the NAL unit data\n\n\n var newLength = bytes.length - positions.length;\n var newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === positions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n positions.shift();\n }\n\n newData[i] = bytes[sourceIndex];\n }\n\n return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n if (nalLimit === void 0) {\n nalLimit = Infinity;\n }\n\n bytes = toUint8(bytes);\n types = [].concat(types);\n var i = 0;\n var nalStart;\n var nalsFound = 0; // keep searching until:\n // we reach the end of bytes\n // we reach the maximum number of nals they want to seach\n // NOTE: that we disregard nalLimit when we have found the start\n // of the nal we want so that we can find the end of the nal we want.\n\n while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n var nalOffset = void 0;\n\n if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n nalOffset = 4;\n } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n nalOffset = 3;\n } // we are unsynced,\n // find the next nal unit\n\n\n if (!nalOffset) {\n i++;\n continue;\n }\n\n nalsFound++;\n\n if (nalStart) {\n return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n }\n\n var nalType = void 0;\n\n if (dataType === 'h264') {\n nalType = bytes[i + nalOffset] & 0x1f;\n } else if (dataType === 'h265') {\n nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n }\n\n if (types.indexOf(nalType) !== -1) {\n nalStart = i + nalOffset;\n } // nal header is 1 length for h264, and 2 for h265\n\n\n i += nalOffset + (dataType === 'h264' ? 1 : 2);\n }\n\n return bytes.subarray(0, 0);\n};\nexport var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h264', type, nalLimit);\n};\nexport var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h265', type, nalLimit);\n};","export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nexport var parseOpusHead = function parseOpusHead(bytes) {\n var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n var littleEndian = version !== 0;\n var config = {\n version: version,\n channels: view.getUint8(1),\n preSkip: view.getUint16(2, littleEndian),\n sampleRate: view.getUint32(4, littleEndian),\n outputGain: view.getUint16(8, littleEndian),\n channelMappingFamily: view.getUint8(10)\n };\n\n if (config.channelMappingFamily > 0 && bytes.length > 10) {\n config.streamCount = view.getUint8(11);\n config.twoChannelStreamCount = view.getUint8(12);\n config.channelMapping = [];\n\n for (var c = 0; c < config.channels; c++) {\n config.channelMapping.push(view.getUint8(13 + c));\n }\n }\n\n return config;\n};\nexport var setOpusHead = function setOpusHead(config) {\n var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n var view = new DataView(new ArrayBuffer(size));\n var littleEndian = config.version !== 0;\n view.setUint8(0, config.version);\n view.setUint8(1, config.channels);\n view.setUint16(2, config.preSkip, littleEndian);\n view.setUint32(4, config.sampleRate, littleEndian);\n view.setUint16(8, config.outputGain, littleEndian);\n view.setUint8(10, config.channelMappingFamily);\n\n if (config.channelMappingFamily > 0) {\n view.setUint8(11, config.streamCount);\n config.channelMapping.foreach(function (cm, i) {\n view.setUint8(12 + i, cm);\n });\n }\n\n return new Uint8Array(view.buffer);\n};","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n\n return newUrl.href;\n }\n\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n WebVTT: require(\"./vtt.js\"),\n VTTCue: require(\"./vttcue.js\"),\n VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n window.VTTCue = cueShim;\n window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n window.VTTCue = nativeVTTCue;\n window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n vttjs.shim();\n}\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\n\nvar _objCreate = Object.create || (function() {\n function F() {}\n return function(o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n\n var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function(k, v) {\n if (/^-?\\d+$/.test(v)) { // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function(k, v) {\n var m;\n if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n var kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n var k = kv[0].trim();\n var v = kv[1].trim();\n callback(k, v);\n }\n}\n\nfunction parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed timestamp: \" + oInput);\n }\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"size\":\n settings.percent(k, v);\n break;\n case \"align\":\n settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n try {\n cue.line = settings.get(\"line\", \"auto\");\n } catch (e) {}\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n // Safari still uses the old middle value and won't accept center\n try {\n cue.align = settings.get(\"align\", \"center\");\n } catch (e) {\n cue.align = settings.get(\"align\", \"middle\");\n }\n try {\n cue.position = settings.get(\"position\", \"auto\");\n } catch (e) {\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n center: 50,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n }\n\n\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n center: \"center\",\n middle: \"center\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== \"-->\") { // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n white: 'rgba(255,255,255,1)',\n lime: 'rgba(0,255,0,1)',\n cyan: 'rgba(0,255,255,1)',\n red: 'rgba(255,0,0,1)',\n yellow: 'rgba(255,255,0,1)',\n magenta: 'rgba(255,0,255,1)',\n blue: 'rgba(0,0,255,1)',\n black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n }\n\n // Consume 'n' characters from the input.\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n\n var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n // If there is some text before the next tag, return it, otherwise return\n // the tag.\n return consume(m[1] ? m[1] : m[2]);\n }\n\n function unescape(s) {\n TEXTAREA_ELEMENT.innerHTML = s;\n s = TEXTAREA_ELEMENT.textContent;\n TEXTAREA_ELEMENT.textContent = \"\";\n return s;\n }\n\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] ||\n NEEDS_PARENT[element.localName] === current.localName;\n }\n\n // Create an element for this tag.\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n if (!tagName) {\n return null;\n }\n var element = window.document.createElement(tagName);\n var name = TAG_ANNOTATION[type];\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n return element;\n }\n\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length &&\n tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n }\n // Otherwise just ignore the end tag.\n continue;\n }\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n // If we can't parse the tag, skip to the next tag.\n if (!m) {\n continue;\n }\n // Try to construct an element, and ignore the tag if we couldn't.\n node = createElement(m[1], m[3]);\n if (!node) {\n continue;\n }\n // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n if (!shouldAdd(current, node)) {\n continue;\n }\n // Set the class list (as a list of classes, separated by space).\n if (m[2]) {\n var classes = m[2].split('.');\n\n classes.forEach(function(cl) {\n var bgColor = /^bg_/.test(cl);\n // slice out `bg_` if it's a background color\n var colorName = bgColor ? cl.slice(3) : cl;\n\n if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n var propName = bgColor ? 'background-color' : 'color';\n var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n node.style[propName] = propValue;\n }\n });\n\n node.className = classes.join(' ');\n }\n // Append the node to the current node, and enter the scope of the new\n // node.\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n }\n\n // Text nodes are leaf nodes.\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n\n return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n for (var i = 0; i < strongRTLRanges.length; i++) {\n var currentRange = strongRTLRanges[i];\n if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n return text;\n }\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n\n pushNodes(nodeStack, cueDiv);\n while ((text = nextTextNode(nodeStack))) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n if (isStrongRTLChar(charCode)) {\n return \"rtl\";\n }\n }\n }\n return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n if (typeof cue.line === \"number\" &&\n (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n return cue.line;\n }\n if (!cue.track || !cue.track.textTrackList ||\n !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n div = div || this.div;\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n StyleBox.call(this);\n this.cue = cue;\n\n // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: \"rgba(255, 255, 255, 1)\",\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\",\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\"\n };\n\n this.applyStyles(styles, this.cueDiv);\n\n // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except middle instead of center on Safari.\n this.div = window.document.createElement(\"div\");\n styles = {\n direction: determineBidi(this.cueDiv),\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n : cue.vertical === \"lr\" ? \"vertical-lr\"\n : \"vertical-rl\",\n unicodeBidi: \"plaintext\",\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n\n this.applyStyles(styles);\n this.div.appendChild(this.cueDiv);\n\n // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n var textPos = 0;\n switch (cue.positionAlign) {\n case \"start\":\n case \"line-left\":\n textPos = cue.position;\n break;\n case \"center\":\n textPos = cue.position - (cue.size / 2);\n break;\n case \"end\":\n case \"line-right\":\n textPos = cue.position - cue.size;\n break;\n }\n\n // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\")\n });\n // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n\n this.move = function(box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\")\n });\n };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect();\n // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n : 0;\n\n }\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || (top + (obj.height || height));\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n return this.left < b2.right &&\n this.right > b2.left &&\n this.top < b2.bottom &&\n this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n return this.top >= container.top &&\n this.bottom <= container.bottom &&\n this.left >= container.left &&\n this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n case \"-x\":\n return this.right > container.right;\n case \"+y\":\n return this.top < container.top;\n case \"-y\":\n return this.bottom > container.bottom;\n }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n obj = obj.div ? obj.div.getBoundingClientRect() :\n obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || (top + (obj.height || height)),\n width: obj.width || width\n };\n return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n b.move(axis[i]);\n }\n // We found a spot where we aren't overlapping anything. This is our\n // best position.\n if (b.within(containerBox)) {\n return b;\n }\n var p = b.intersectPercentage(containerBox);\n // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n }\n // Reset the box position to the specified position.\n b = new BoxPosition(specifiedPosition);\n }\n return bestPosition || specifiedPosition;\n }\n\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = [];\n\n // If we have a line number to align the cue to.\n if (cue.snapToLines) {\n var size;\n switch (cue.vertical) {\n case \"\":\n axis = [ \"+y\", \"-y\" ];\n size = \"height\";\n break;\n case \"rl\":\n axis = [ \"+x\", \"-x\" ];\n size = \"width\";\n break;\n case \"lr\":\n axis = [ \"-x\", \"+x\" ];\n size = \"width\";\n break;\n }\n\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0];\n\n // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n }\n\n // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n }\n\n // Move the box to the specified position. This may not be its best\n // position.\n boxPosition.move(initialAxis, position);\n\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n switch (cue.lineAlign) {\n case \"center\":\n linePos -= (calculatedPercentage / 2);\n break;\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n }\n\n // Apply initial line position to the cue box.\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n\n axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n // Get the box position again after we've applied the specified positioning\n // to it.\n boxPosition = new BoxPosition(styleBox);\n }\n\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n return {\n decode: function(data) {\n if (!data) {\n return \"\";\n }\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n// and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n }\n\n // Remove all previous children.\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay);\n\n // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }\n\n // We don't need to recompute the cues' display states. Just reuse them.\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n return;\n }\n\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n\n (function() {\n var styleBox, cue;\n\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i];\n\n // Compute the intial position and styles of the cue div.\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div);\n\n // Move the cue div to it's correct line position.\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n cue.displayState = styleBox.div;\n\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n if (!vttjs) {\n vttjs = {};\n }\n\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function (data) {\n var self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {stream: true});\n }\n\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n var line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.4 WebVTT region and WebVTT region settings syntax\n function parseRegion(input) {\n var settings = new Settings();\n\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n case \"width\":\n settings.percent(k, v);\n break;\n case \"lines\":\n settings.integer(k, v);\n break;\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n if (xy.length !== 2) {\n break;\n }\n // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/);\n\n // Create the region, using default values for any values that were not\n // specified.\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\");\n // Register the region.\n self.onregion && self.onregion(region);\n // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n }\n\n // draft-pantos-http-live-streaming-20\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n // 3.5 WebVTT\n function parseTimestampMap(input) {\n var settings = new Settings();\n\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"MPEGT\":\n settings.integer(k + 'S', v);\n break;\n case \"LOCA\":\n settings.set(k + 'L', parseTimeStamp(v));\n break;\n }\n }, /[^\\d]:/, /,/);\n\n self.ontimestampmap && self.ontimestampmap({\n \"MPEGTS\": settings.get(\"MPEGTS\"),\n \"LOCAL\": settings.get(\"LOCAL\")\n });\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader(input) {\n if (input.match(/X-TIMESTAMP-MAP/)) {\n // This line contains HLS X-TIMESTAMP-MAP metadata\n parseOptions(input, function(k, v) {\n switch(k) {\n case \"X-TIMESTAMP-MAP\":\n parseTimestampMap(v);\n break;\n }\n }, /=/);\n } else {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n\n }\n\n // 5.1 WebVTT file parsing.\n try {\n var line;\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n line = collectNextLine();\n\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n\n self.state = \"HEADER\";\n }\n\n var alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n continue;\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n // Safari still uses the old middle value and won't accept center\n try {\n self.cue.align = \"center\";\n } catch (e) {\n self.cue.align = \"middle\";\n }\n self.state = \"CUE\";\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /*falls through*/\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e);\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n self.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n continue;\n case \"BADCUE\": // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e);\n\n // If we are currently parsing a cue, report what we have.\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n },\n flush: function () {\n var self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch(e) {\n self.reportOrThrowError(e);\n }\n self.onflush && self.onflush();\n return this;\n }\n};\n\nmodule.exports = WebVTT;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n \"\": 1,\n \"lr\": 1,\n \"rl\": 1\n};\nvar alignSetting = {\n \"start\": 1,\n \"center\": 1,\n \"end\": 1,\n \"left\": 1,\n \"right\": 1,\n \"auto\": 1,\n \"line-left\": 1,\n \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n this.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = \"auto\";\n var _positionAlign = \"auto\";\n var _size = 100;\n var _align = \"center\";\n\n Object.defineProperties(this, {\n \"id\": {\n enumerable: true,\n get: function() {\n return _id;\n },\n set: function(value) {\n _id = \"\" + value;\n }\n },\n\n \"pauseOnExit\": {\n enumerable: true,\n get: function() {\n return _pauseOnExit;\n },\n set: function(value) {\n _pauseOnExit = !!value;\n }\n },\n\n \"startTime\": {\n enumerable: true,\n get: function() {\n return _startTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n _startTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"endTime\": {\n enumerable: true,\n get: function() {\n return _endTime;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n _endTime = value;\n this.hasBeenReset = true;\n }\n },\n\n \"text\": {\n enumerable: true,\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n },\n\n \"region\": {\n enumerable: true,\n get: function() {\n return _region;\n },\n set: function(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n },\n\n \"vertical\": {\n enumerable: true,\n get: function() {\n return _vertical;\n },\n set: function(value) {\n var setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n }\n _vertical = setting;\n this.hasBeenReset = true;\n }\n },\n\n \"snapToLines\": {\n enumerable: true,\n get: function() {\n return _snapToLines;\n },\n set: function(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n },\n\n \"line\": {\n enumerable: true,\n get: function() {\n return _line;\n },\n set: function(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n }\n _line = value;\n this.hasBeenReset = true;\n }\n },\n\n \"lineAlign\": {\n enumerable: true,\n get: function() {\n return _lineAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n } else {\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"position\": {\n enumerable: true,\n get: function() {\n return _position;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n _position = value;\n this.hasBeenReset = true;\n }\n },\n\n \"positionAlign\": {\n enumerable: true,\n get: function() {\n return _positionAlign;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n } else {\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n\n \"size\": {\n enumerable: true,\n get: function() {\n return _size;\n },\n set: function(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n _size = value;\n this.hasBeenReset = true;\n }\n },\n\n \"align\": {\n enumerable: true,\n get: function() {\n return _align;\n },\n set: function(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n }\n _align = setting;\n this.hasBeenReset = true;\n }\n }\n });\n\n /**\n * Other spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n \"\": true,\n \"up\": true\n};\n\nfunction findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function() {\n return _lines;\n },\n set: function(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function() {\n return _regionAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function() {\n return _regionAnchorX;\n },\n set: function(value) {\n if(!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorY;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function() {\n return _viewportAnchorX;\n },\n set: function(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function() {\n return _scroll;\n },\n set: function(value) {\n var setting = findScrollSetting(value);\n // Have to check for false as an empty string is a legal value.\n if (setting === false) {\n console.warn(\"Scroll: an invalid or illegal string was specified.\");\n } else {\n _scroll = setting;\n }\n }\n }\n });\n}\n\nmodule.exports = VTTRegion;\n","/* (ignored) */","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * Dom7 4.0.6\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2023, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: February 2, 2023\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n if (typeof items === 'number') {\n super(items);\n } else {\n super(...(items || []));\n makeReactive(this);\n }\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionStart(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionstart', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionstart', fireCallBack);\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, transitionStart, trigger, val, value, width };\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","import { getWindow } from 'ssr-window';\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n\n return breakpoint || 'max';\n}","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\nexport default {\n setBreakpoint,\n getBreakpoint\n};","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const {\n activeIndex,\n initialized,\n loopedSlides = 0,\n params,\n $el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters\n\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n\n swiper.emitContainerClasses();\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}","function checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\n\nexport default {\n checkOverflow\n};","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n $el,\n device,\n support\n } = swiper; // prettier-ignore\n\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'pointer-events': !support.touch\n }, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\nexport default {\n addClasses,\n removeClasses\n};","export default function removeClasses() {\n const swiper = this;\n const {\n $el,\n classNames\n } = swiper;\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\nimport eventsEmitter from './events-emitter.js';\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images\n};\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n } // Swiper Instance\n\n\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n }); // Extend defaults with modules params\n\n const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params\n\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params); // add event listeners\n\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n } // Save Dom lib\n\n\n swiper.$ = $; // Extend Swiper\n\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEvents: function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3]\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2]\n };\n return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper'); // Init\n\n if (swiper.params.init) {\n swiper.init();\n } // Return app instance\n\n\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n let translated;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (!translated) {\n setTranslate();\n }\n }\n\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n\n swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.each(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true; // Find el\n\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items\n\n res.children = options => $el.children(options);\n\n return res;\n }\n\n return $el.children(getWrapperSelector());\n }; // Find Wrapper\n\n\n let $wrapperEl = getWrapper();\n\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each(slideEl => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box'\n });\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit'); // Set breakpoint\n\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n } // Add Classes\n\n\n swiper.addClasses(); // Create loop\n\n if (swiper.params.loop) {\n swiper.loopCreate();\n } // Update size\n\n\n swiper.updateSize(); // Update slides\n\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n } // Set Grab Cursor\n\n\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n } // Slide To Initial Slide\n\n\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n } // Attach events\n\n\n swiper.attachEvents(); // Init Flag\n\n swiper.initialized = true; // Emit\n\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n $el,\n $wrapperEl,\n slides\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy'); // Init Flag\n\n swiper.initialized = false; // Detach events\n\n swiper.detachEvents(); // Destroy loop\n\n if (params.loop) {\n swiper.loopDestroy();\n } // Cleanup styles\n\n\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n\n if (slides && slides.length) {\n slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy'); // Detach emitter events\n\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n\n swiper.destroyed = true;\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n\n Swiper.installModule(module);\n return Swiper;\n }\n\n}\n\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\nexport default Swiper;","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};","/* eslint-disable no-underscore-dangle */\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n\n function onceHandler(...args) {\n self.off(events, onceHandler);\n\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n\n handler.apply(self, args);\n }\n\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n};","import { getDocument } from 'ssr-window';\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\nlet dummyEventAttached = false;\n\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n touchEvents,\n el,\n wrapperEl,\n device,\n support\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method; // Touch Events\n\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? {\n passive: false,\n capture\n } : capture);\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n } // Prevent Links Clicks\n\n\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n } // Resize handler\n\n\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n support\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents\n};","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}","export default function onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return; // Breakpoints\n\n if (params.breakpoints) {\n swiper.setBreakpoint();\n } // Save locks\n\n\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper; // Disable locks on resize\n\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n } // Return locks after resize\n\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}","export default function onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n } // eslint-disable-next-line\n\n\n if (swiper.translate === -0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}","import { now, nextTick } from '../../shared/utils.js';\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n\n data.allowTouchCallbacks = false;\n\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n\n data.isMoved = false;\n data.startMoving = false;\n return;\n } // Return Grab Cursor\n\n\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n } // Time diff\n\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click\n\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);\n swiper.emit('tap click', e);\n\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n } // Find current slide\n\n\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n } // Find current slide size\n\n\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n return;\n }\n\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n\n return;\n }\n\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n\n if (!data.startMoving) {\n return;\n }\n\n swiper.allowClick = false;\n\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n\n data.allowMomentumBounce = false; // Grab Cursor\n\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n\n swiper.emit('sliderFirstMove', e);\n }\n\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n } // Directions locks\n\n\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n } // Threshold\n\n\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return; // Update active index in free mode\n\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n } // Update progress\n\n\n swiper.updateProgress(data.currentTranslate); // Update translate\n\n swiper.setTranslate(data.currentTranslate);\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js'; // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\n\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return; // change target el for shadow root component\n\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element\n\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n\n if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) {\n e.preventDefault();\n }\n }\n\n swiper.emit('touchStart', e);\n}","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\nexport default {\n setGrabCursor,\n unsetGrabCursor\n};","export default function setGrabCursor(moving) {\n const swiper = this;\n if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}","export default function unsetGrabCursor() {\n const swiper = this;\n\n if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\nexport default {\n loadImage,\n preloadImages\n};","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n\n function onReady() {\n if (callback) callback();\n }\n\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n\n if (sizes) {\n image.sizes = sizes;\n }\n\n if (srcset) {\n image.srcset = srcset;\n }\n\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady);\n }\n}","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\nexport default {\n loopCreate,\n loopFix,\n loopDestroy\n};","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const {\n params,\n $wrapperEl\n } = swiper; // Remove duplicated slides\n\n const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl;\n $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n let slides = $selector.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup;\n\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $selector.append(blankNode);\n }\n\n slides = $selector.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n\n slide.attr('data-swiper-slide-index', index);\n });\n\n for (let i = 0; i < appendSlides.length; i += 1) {\n $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}","export default function loopDestroy() {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n slides\n } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}","export default function loopFix() {\n const swiper = this;\n swiper.emit('beforeLoopFix');\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding\n\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n}","import { extend } from '../shared/utils.js';\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) {\n params[moduleParamName] = {\n auto: true\n };\n }\n\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}","import { getWindow } from 'ssr-window';\nexport default function Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n\n const init = () => {\n if (!swiper.params.observer) return;\n\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n } // Observe container\n\n\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren\n }); // Observe wrapper\n\n attach(swiper.$wrapperEl[0], {\n attributes: false\n });\n };\n\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}","import { getWindow } from 'ssr-window';\nexport default function Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n animating,\n enabled,\n params\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n animating,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n\n let prevIndex = 0;\n\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n\n if (params.rewind && swiper.isBeginning) {\n return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal);\n }\n\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`);\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`);\n } // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n\n\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex]; // Update progress\n\n swiper.updateProgress(translate); // Normalize slideIndex\n\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n } // Directions locks\n\n\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index\n\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex); // Update Height\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n swiper.updateSlidesClasses();\n\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n\n return false;\n }\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._swiperImmediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n\n return true;\n}","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nexport default function slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n $wrapperEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`).eq(0).index();\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}","export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\nexport default {\n setTransition,\n transitionStart,\n transitionEnd\n};","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}","export default function transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n\n swiper.emit(`slideChangeTransition${step}`);\n\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}","import transitionEmit from './transitionEmit.js';\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}","import { getTranslate } from '../../shared/utils.js';\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n $wrapperEl\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}","export default function minTranslate() {\n return -this.snapGrid[0];\n}","export default function setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n $wrapperEl,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}","import { animateCSSModeScroll } from '../../shared/utils.js';\nexport default function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress\n\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n\n if (!swiper.animating) {\n swiper.animating = true;\n\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n } // Normalize slideIndex\n\n\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n\n return;\n } // Get real index\n\n\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];\n }\n\n return swiper.slides.eq(index)[0];\n }; // Find slides currently in view\n\n\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n } // Find new height from highest slide in view\n\n\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n } // Update Height\n\n\n if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}","import $ from '../../shared/dom.js';\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}","export default function updateProgress(translate) {\n const swiper = this;\n\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line\n\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n } // Subtract paddings\n\n\n width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10);\n height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}","import { setCSSProperty } from '../../shared/utils.js';\nexport default function updateSlides() {\n const swiper = this;\n\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n } // prettier-ignore\n\n\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n const {\n $wrapperEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n\n if (typeof swiperSize === 'undefined') {\n return;\n }\n\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween; // reset margins\n\n if (rtl) slides.css({\n marginLeft: '',\n marginBottom: '',\n marginTop: ''\n });else slides.css({\n marginRight: '',\n marginBottom: '',\n marginTop: ''\n }); // reset cssMode offsets\n\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n } // Calc slides\n\n\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide[0];\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({\n width: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n } // Remove last grid elements depending on width\n\n\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n\n snapGrid = newSlidesGrid;\n\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n\n if (slideIndex === slides.length - 1) {\n return false;\n }\n\n return true;\n }).css({\n [key]: `${spaceBetween}px`\n });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}","export default function updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n $wrapperEl,\n activeIndex,\n realIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n let activeSlide;\n\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n } // Active classes\n\n\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`).addClass(params.slideDuplicateActiveClass);\n }\n } // Next Slide\n\n\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n } // Prev Slide\n\n\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicateNextClass);\n }\n\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`).addClass(params.slideDuplicatePrevClass);\n }\n }\n\n swiper.emitSlidesClasses();\n}","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}","import $ from '../../shared/dom.js';\nexport default function updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate; // Visible Slides\n\n slides.removeClass(params.slideVisibleClass);\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n\n swiper.visibleSlides = $(swiper.visibleSlides);\n}","import classesToSelector from '../../shared/classes-to-selector.js';\nimport $ from '../../shared/dom.js';\nexport default function A11y({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n a11y: {\n enabled: true,\n notificationClass: 'swiper-notification',\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n slideLabelMessage: '{{index}} / {{slidesLength}}',\n containerMessage: null,\n containerRoleDescriptionMessage: null,\n itemRoleDescriptionMessage: null,\n slideRole: 'group'\n }\n });\n let liveRegion = null;\n\n function notify(message) {\n const notification = liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n }\n\n function getRandomNumber(size = 16) {\n const randomChar = () => Math.round(16 * Math.random()).toString(16);\n\n return 'x'.repeat(size).replace(/x/g, randomChar);\n }\n\n function makeElFocusable($el) {\n $el.attr('tabIndex', '0');\n }\n\n function makeElNotFocusable($el) {\n $el.attr('tabIndex', '-1');\n }\n\n function addElRole($el, role) {\n $el.attr('role', role);\n }\n\n function addElRoleDescription($el, description) {\n $el.attr('aria-roledescription', description);\n }\n\n function addElControls($el, controls) {\n $el.attr('aria-controls', controls);\n }\n\n function addElLabel($el, label) {\n $el.attr('aria-label', label);\n }\n\n function addElId($el, id) {\n $el.attr('id', id);\n }\n\n function addElLive($el, live) {\n $el.attr('aria-live', live);\n }\n\n function disableEl($el) {\n $el.attr('aria-disabled', true);\n }\n\n function enableEl($el) {\n $el.attr('aria-disabled', false);\n }\n\n function onEnterOrSpaceKey(e) {\n if (e.keyCode !== 13 && e.keyCode !== 32) return;\n const params = swiper.params.a11y;\n const $targetEl = $(e.target);\n\n if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n if (!(swiper.isEnd && !swiper.params.loop)) {\n swiper.slideNext();\n }\n\n if (swiper.isEnd) {\n notify(params.lastSlideMessage);\n } else {\n notify(params.nextSlideMessage);\n }\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n if (!(swiper.isBeginning && !swiper.params.loop)) {\n swiper.slidePrev();\n }\n\n if (swiper.isBeginning) {\n notify(params.firstSlideMessage);\n } else {\n notify(params.prevSlideMessage);\n }\n }\n\n if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) {\n $targetEl[0].click();\n }\n }\n\n function updateNavigation() {\n if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($prevEl && $prevEl.length > 0) {\n if (swiper.isBeginning) {\n disableEl($prevEl);\n makeElNotFocusable($prevEl);\n } else {\n enableEl($prevEl);\n makeElFocusable($prevEl);\n }\n }\n\n if ($nextEl && $nextEl.length > 0) {\n if (swiper.isEnd) {\n disableEl($nextEl);\n makeElNotFocusable($nextEl);\n } else {\n enableEl($nextEl);\n makeElFocusable($nextEl);\n }\n }\n }\n\n function hasPagination() {\n return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;\n }\n\n function hasClickablePagination() {\n return hasPagination() && swiper.params.pagination.clickable;\n }\n\n function updatePagination() {\n const params = swiper.params.a11y;\n if (!hasPagination()) return;\n swiper.pagination.bullets.each(bulletEl => {\n const $bulletEl = $(bulletEl);\n\n if (swiper.params.pagination.clickable) {\n makeElFocusable($bulletEl);\n\n if (!swiper.params.pagination.renderBullet) {\n addElRole($bulletEl, 'button');\n addElLabel($bulletEl, params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1));\n }\n }\n\n if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {\n $bulletEl.attr('aria-current', 'true');\n } else {\n $bulletEl.removeAttr('aria-current');\n }\n });\n }\n\n const initNavEl = ($el, wrapperId, message) => {\n makeElFocusable($el);\n\n if ($el[0].tagName !== 'BUTTON') {\n addElRole($el, 'button');\n $el.on('keydown', onEnterOrSpaceKey);\n }\n\n addElLabel($el, message);\n addElControls($el, wrapperId);\n };\n\n function init() {\n const params = swiper.params.a11y;\n swiper.$el.append(liveRegion); // Container\n\n const $containerEl = swiper.$el;\n\n if (params.containerRoleDescriptionMessage) {\n addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);\n }\n\n if (params.containerMessage) {\n addElLabel($containerEl, params.containerMessage);\n } // Wrapper\n\n\n const $wrapperEl = swiper.$wrapperEl;\n const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;\n const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';\n addElId($wrapperEl, wrapperId);\n addElLive($wrapperEl, live); // Slide\n\n if (params.itemRoleDescriptionMessage) {\n addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);\n }\n\n addElRole($(swiper.slides), params.slideRole);\n const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length;\n swiper.slides.each((slideEl, index) => {\n const $slideEl = $(slideEl);\n const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index;\n const ariaLabelMessage = params.slideLabelMessage.replace(/\\{\\{index\\}\\}/, slideIndex + 1).replace(/\\{\\{slidesLength\\}\\}/, slidesLength);\n addElLabel($slideEl, ariaLabelMessage);\n }); // Navigation\n\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl && $nextEl.length) {\n initNavEl($nextEl, wrapperId, params.nextSlideMessage);\n }\n\n if ($prevEl && $prevEl.length) {\n initNavEl($prevEl, wrapperId, params.prevSlideMessage);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n function destroy() {\n if (liveRegion && liveRegion.length > 0) liveRegion.remove();\n let $nextEl;\n let $prevEl;\n\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl) {\n $nextEl.off('keydown', onEnterOrSpaceKey);\n }\n\n if ($prevEl) {\n $prevEl.off('keydown', onEnterOrSpaceKey);\n } // Pagination\n\n\n if (hasClickablePagination()) {\n swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);\n }\n }\n\n on('beforeInit', () => {\n liveRegion = $(``);\n });\n on('afterInit', () => {\n if (!swiper.params.a11y.enabled) return;\n init();\n updateNavigation();\n });\n on('toEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('fromEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('paginationUpdate', () => {\n if (!swiper.params.a11y.enabled) return;\n updatePagination();\n });\n on('destroy', () => {\n if (!swiper.params.a11y.enabled) return;\n destroy();\n });\n}","/* eslint no-underscore-dangle: \"off\" */\n\n/* eslint no-use-before-define: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport { nextTick } from '../../shared/utils.js';\nexport default function Autoplay({\n swiper,\n extendParams,\n on,\n emit\n}) {\n let timeout;\n swiper.autoplay = {\n running: false,\n paused: false\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n\n function run() {\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n\n clearTimeout(timeout);\n timeout = nextTick(() => {\n let autoplayResult;\n\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isBeginning) {\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isEnd) {\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n\n if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) {\n run();\n }\n }, delay);\n }\n\n function start() {\n if (typeof timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n emit('autoplayStart');\n run();\n return true;\n }\n\n function stop() {\n if (!swiper.autoplay.running) return false;\n if (typeof timeout === 'undefined') return false;\n\n if (timeout) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n\n swiper.autoplay.running = false;\n emit('autoplayStop');\n return true;\n }\n\n function pause(speed) {\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (timeout) clearTimeout(timeout);\n swiper.autoplay.paused = true;\n\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n run();\n } else {\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd);\n });\n }\n }\n\n function onVisibilityChange() {\n const document = getDocument();\n\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n pause();\n }\n\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n run();\n swiper.autoplay.paused = false;\n }\n }\n\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== swiper.$wrapperEl[0]) return;\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n swiper.autoplay.paused = false;\n\n if (!swiper.autoplay.running) {\n stop();\n } else {\n run();\n }\n }\n\n function onMouseEnter() {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n\n ['transitionend', 'webkitTransitionEnd'].forEach(event => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n }\n\n function onMouseLeave() {\n if (swiper.params.autoplay.disableOnInteraction) {\n return;\n }\n\n swiper.autoplay.paused = false;\n run();\n }\n\n function attachMouseEvents() {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.$el.on('mouseenter', onMouseEnter);\n swiper.$el.on('mouseleave', onMouseLeave);\n }\n }\n\n function detachMouseEvents() {\n swiper.$el.off('mouseenter', onMouseEnter);\n swiper.$el.off('mouseleave', onMouseLeave);\n }\n\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n start();\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n attachMouseEvents();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n stop();\n }\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n }\n });\n on('touchEnd', () => {\n if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n run();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n\n if (swiper.autoplay.running) {\n stop();\n }\n\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n });\n Object.assign(swiper.autoplay, {\n pause,\n run,\n start,\n stop\n });\n}","/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\nimport { nextTick } from '../../shared/utils.js';\nexport default function Controller({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n controller: {\n control: undefined,\n inverse: false,\n by: 'slide' // or 'container'\n\n }\n });\n swiper.controller = {\n control: undefined\n };\n\n function LinearSpline(x, y) {\n const binarySearch = function search() {\n let maxIndex;\n let minIndex;\n let guess;\n return (array, val) => {\n minIndex = -1;\n maxIndex = array.length;\n\n while (maxIndex - minIndex > 1) {\n guess = maxIndex + minIndex >> 1;\n\n if (array[guess] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n }\n\n return maxIndex;\n };\n }();\n\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n\n let i1;\n let i3;\n\n this.interpolate = function interpolate(x2) {\n if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n\n return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n\n return this;\n } // xxx: for now i will just save one spline function to to\n\n\n function getInterpolateFunction(c) {\n if (!swiper.controller.spline) {\n swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);\n }\n }\n\n function setTranslate(_t, byController) {\n const controlled = swiper.controller.control;\n let multiplier;\n let controlledTranslate;\n const Swiper = swiper.constructor;\n\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n\n if (swiper.params.controller.by === 'slide') {\n getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n\n controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n }\n\n if (!controlledTranslate || swiper.params.controller.by === 'container') {\n multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n }\n\n if (swiper.params.controller.inverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n\n c.updateProgress(controlledTranslate);\n c.setTranslate(controlledTranslate, swiper);\n c.updateActiveIndex();\n c.updateSlidesClasses();\n }\n\n if (Array.isArray(controlled)) {\n for (let i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTranslate(controlled);\n }\n }\n\n function setTransition(duration, byController) {\n const Swiper = swiper.constructor;\n const controlled = swiper.controller.control;\n let i;\n\n function setControlledTransition(c) {\n c.setTransition(duration, swiper);\n\n if (duration !== 0) {\n c.transitionStart();\n\n if (c.params.autoHeight) {\n nextTick(() => {\n c.updateAutoHeight();\n });\n }\n\n c.$wrapperEl.transitionEnd(() => {\n if (!controlled) return;\n\n if (c.params.loop && swiper.params.controller.by === 'slide') {\n c.loopFix();\n }\n\n c.transitionEnd();\n });\n }\n }\n\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n\n function removeSpline() {\n if (!swiper.controller.control) return;\n\n if (swiper.controller.spline) {\n swiper.controller.spline = undefined;\n delete swiper.controller.spline;\n }\n }\n\n on('beforeInit', () => {\n swiper.controller.control = swiper.params.controller.control;\n });\n on('update', () => {\n removeSpline();\n });\n on('resize', () => {\n removeSpline();\n });\n on('observerUpdate', () => {\n removeSpline();\n });\n on('setTranslate', (_s, translate, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTranslate(translate, byController);\n });\n on('setTransition', (_s, duration, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTransition(duration, byController);\n });\n Object.assign(swiper.controller, {\n setTranslate,\n setTransition\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCards({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cardsEffect: {\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n activeIndex\n } = swiper;\n const params = swiper.params.cardsEffect;\n const {\n startTranslate,\n isTouched\n } = swiper.touchEventsData;\n const currentTranslate = swiper.translate;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max(slideProgress, -4), 4);\n let offset = $slideEl[0].swiperSlideOffset;\n\n if (swiper.params.centeredSlides && !swiper.params.cssMode) {\n swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`);\n }\n\n if (swiper.params.centeredSlides && swiper.params.cssMode) {\n offset -= slides[0].swiperSlideOffset;\n }\n\n let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let tY = 0;\n const tZ = -100 * Math.abs(progress);\n let scale = 1;\n let rotate = -2 * progress;\n let tXAdd = 8 - Math.abs(progress) * 0.75;\n const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;\n const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;\n\n if (isSwipeToNext || isSwipeToPrev) {\n const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;\n rotate += -28 * progress * subProgress;\n scale += -0.5 * subProgress;\n tXAdd += 96 * subProgress;\n tY = `${-25 * subProgress * Math.abs(progress)}%`;\n }\n\n if (progress < 0) {\n // next\n tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`;\n } else if (progress > 0) {\n // prev\n tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`;\n } else {\n tX = `${tX}px`;\n }\n\n if (!swiper.isHorizontal()) {\n const prevY = tY;\n tY = tX;\n tX = prevY;\n }\n\n const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;\n const transform = `\n translate3d(${tX}, ${tY}, ${tZ}px)\n rotateZ(${rotate}deg)\n scale(${scaleString})\n `;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowEl = $slideEl.find('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.cardsEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'cards',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nexport default function EffectCoverflow({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n scale: 1,\n modifier: 1,\n slideShadows: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n width: swiperWidth,\n height: swiperHeight,\n slides,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform = swiper.translate;\n const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth; // Each slide offset from center\n\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier;\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0\n\n let translateZ = -translate * Math.abs(offsetMultiplier);\n let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders\n\n if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n stretch = parseFloat(params.stretch) / 100 * slideSize;\n }\n\n let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n let translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values\n\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n if (Math.abs(scale) < 0.001) scale = 0;\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(slideTransform);\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top');\n }\n\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom');\n }\n\n if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.coverflowEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n };\n\n effectInit({\n effect: 'coverflow',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n watchSlidesProgress: true\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectCreative({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n creativeEffect: {\n transformEl: null,\n limitProgress: 1,\n shadowPerProgress: false,\n progressMultiplier: 1,\n perspective: true,\n prev: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n },\n next: {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n opacity: 1,\n scale: 1\n }\n }\n });\n\n const getTranslateValue = value => {\n if (typeof value === 'string') return value;\n return `${value}px`;\n };\n\n const setTranslate = () => {\n const {\n slides,\n $wrapperEl,\n slidesSizesGrid\n } = swiper;\n const params = swiper.params.creativeEffect;\n const {\n progressMultiplier: multiplier\n } = params;\n const isCenteredSlides = swiper.params.centeredSlides;\n\n if (isCenteredSlides) {\n const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;\n $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`);\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideProgress = $slideEl[0].progress;\n const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress);\n let originalProgress = progress;\n\n if (!isCenteredSlides) {\n originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];\n const r = [0, 0, 0];\n let custom = false;\n\n if (!swiper.isHorizontal()) {\n t[1] = t[0];\n t[0] = 0;\n }\n\n let data = {\n translate: [0, 0, 0],\n rotate: [0, 0, 0],\n scale: 1,\n opacity: 1\n };\n\n if (progress < 0) {\n data = params.next;\n custom = true;\n } else if (progress > 0) {\n data = params.prev;\n custom = true;\n } // set translate\n\n\n t.forEach((value, index) => {\n t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;\n }); // set rotates\n\n r.forEach((value, index) => {\n r[index] = data.rotate[index] * Math.abs(progress * multiplier);\n });\n $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;\n const translateString = t.join(', ');\n const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;\n const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;\n const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;\n const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows\n\n if (custom && data.shadow || !custom) {\n let $shadowEl = $slideEl.children('.swiper-slide-shadow');\n\n if ($shadowEl.length === 0 && data.shadow) {\n $shadowEl = createShadow(params, $slideEl);\n }\n\n if ($shadowEl.length) {\n const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;\n $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);\n }\n }\n\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform).css({\n opacity: opacityString\n });\n\n if (data.origin) {\n $targetEl.css('transform-origin', data.origin);\n }\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.creativeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'creative',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => swiper.params.creativeEffect.perspective,\n overwriteParams: () => ({\n watchSlidesProgress: true,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import $ from '../../shared/dom.js';\nimport effectInit from '../../shared/effect-init.js';\nexport default function EffectCube({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n cubeEffect: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n }\n });\n\n const setTranslate = () => {\n const {\n $el,\n $wrapperEl,\n slides,\n width: swiperWidth,\n height: swiperHeight,\n rtlTranslate: rtl,\n size: swiperSize,\n browser\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $wrapperEl.append($cubeShadowEl);\n }\n\n $cubeShadowEl.css({\n height: `${swiperWidth}px`\n });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + round * 4 * swiperSize;\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = 3 * swiperSize + swiperSize * 4 * round;\n }\n\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n\n if (progress <= 1 && progress > -1) {\n wrapperRotate = slideIndex * 90 + progress * 90;\n if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n }\n\n $slideEl.transform(transform);\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = $(`
`);\n $slideEl.append(shadowBefore);\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = $(`
`);\n $slideEl.append(shadowAfter);\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset = params.shadowOffset;\n $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);\n }\n }\n\n const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;\n $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);\n };\n\n const setTransition = duration => {\n const {\n $el,\n slides\n } = swiper;\n slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n };\n\n effectInit({\n effect: 'cube',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true\n })\n });\n}","import effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFade({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n fadeEffect: {\n crossFade: false,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides\n } = swiper;\n const params = swiper.params.fadeEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = swiper.slides.eq(i);\n const offset = $slideEl[0].swiperSlideOffset;\n let tx = -offset;\n if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n\n const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.css({\n opacity: slideOpacity\n }).transform(`translate3d(${tx}px, ${ty}px, 0px)`);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.fadeEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides: true\n });\n };\n\n effectInit({\n effect: 'fade',\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import createShadow from '../../shared/create-shadow.js';\nimport effectInit from '../../shared/effect-init.js';\nimport effectTarget from '../../shared/effect-target.js';\nimport effectVirtualTransitionEnd from '../../shared/effect-virtual-transition-end.js';\nexport default function EffectFlip({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n flipEffect: {\n slideShadows: true,\n limitRotation: true,\n transformEl: null\n }\n });\n\n const setTranslate = () => {\n const {\n slides,\n rtlTranslate: rtl\n } = swiper;\n const params = swiper.params.flipEffect;\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n\n const offset = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let ty = 0;\n\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n\n if (shadowBefore.length === 0) {\n shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top');\n }\n\n if (shadowAfter.length === 0) {\n shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom');\n }\n\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n\n const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n const $targetEl = effectTarget(params, $slideEl);\n $targetEl.transform(transform);\n }\n };\n\n const setTransition = duration => {\n const {\n transformEl\n } = swiper.params.flipEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl\n });\n };\n\n effectInit({\n effect: 'flip',\n swiper,\n on,\n setTranslate,\n setTransition,\n perspective: () => true,\n overwriteParams: () => ({\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode\n })\n });\n}","import { now } from '../../shared/utils.js';\nexport default function freeMode({\n swiper,\n extendParams,\n emit,\n once\n}) {\n extendParams({\n freeMode: {\n enabled: false,\n momentum: true,\n momentumRatio: 1,\n momentumBounce: true,\n momentumBounceRatio: 1,\n momentumVelocityRatio: 1,\n sticky: false,\n minimumVelocity: 0.02\n }\n });\n\n function onTouchMove() {\n const {\n touchEventsData: data,\n touches\n } = swiper; // Velocity\n\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime\n });\n }\n\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: now()\n });\n }\n\n function onTouchEnd({\n currentPos\n }) {\n const {\n params,\n $wrapperEl,\n rtlTranslate: rtl,\n snapGrid,\n touchEventsData: data\n } = swiper; // Time diff\n\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n\n return;\n }\n\n if (params.freeMode.momentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n\n if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {\n swiper.velocity = 0;\n } // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n\n\n if (time > 150 || now() - lastMoveEvent.time > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n\n swiper.velocity *= params.freeMode.momentumVelocityRatio;\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeMode.momentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;\n let needsLoopFix;\n\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeMode.sticky) {\n let nextSlide;\n\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n\n newPosition = -newPosition;\n }\n\n if (needsLoopFix) {\n once('transitionEnd', () => {\n swiper.loopFix();\n });\n } // Fix duration\n\n\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n\n if (params.freeMode.sticky) {\n // If freeMode.sticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeMode.momentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n emit('_freeModeNoMomentumRelease');\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n } else if (params.freeMode) {\n emit('_freeModeNoMomentumRelease');\n }\n\n if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n }\n\n Object.assign(swiper, {\n freeMode: {\n onTouchMove,\n onTouchEnd\n }\n });\n}","export default function Grid({\n swiper,\n extendParams\n}) {\n extendParams({\n grid: {\n rows: 1,\n fill: 'column'\n }\n });\n let slidesNumberEvenToRows;\n let slidesPerRow;\n let numFullColumns;\n\n const initSlides = slidesLength => {\n const {\n slidesPerView\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid;\n slidesPerRow = slidesNumberEvenToRows / rows;\n numFullColumns = Math.floor(slidesLength / rows);\n\n if (Math.floor(slidesLength / rows) === slidesLength / rows) {\n slidesNumberEvenToRows = slidesLength;\n } else {\n slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;\n }\n\n if (slidesPerView !== 'auto' && fill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);\n }\n };\n\n const updateSlide = (i, slide, slidesLength, getDirectionLabel) => {\n const {\n slidesPerGroup,\n spaceBetween\n } = swiper.params;\n const {\n rows,\n fill\n } = swiper.params.grid; // Set slides order\n\n let newSlideOrderIndex;\n let column;\n let row;\n\n if (fill === 'row' && slidesPerGroup > 1) {\n const groupIndex = Math.floor(i / (slidesPerGroup * rows));\n const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;\n const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup);\n row = Math.floor(slideIndexInGroup / columnsInGroup);\n column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows;\n slide.css({\n '-webkit-order': newSlideOrderIndex,\n order: newSlideOrderIndex\n });\n } else if (fill === 'column') {\n column = Math.floor(i / rows);\n row = i - column * rows;\n\n if (column > numFullColumns || column === numFullColumns && row === rows - 1) {\n row += 1;\n\n if (row >= rows) {\n row = 0;\n column += 1;\n }\n }\n } else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n\n slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : '');\n };\n\n const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => {\n const {\n spaceBetween,\n centeredSlides,\n roundLengths\n } = swiper.params;\n const {\n rows\n } = swiper.params.grid;\n swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;\n swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;\n swiper.$wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px`\n });\n\n if (centeredSlides) {\n snapGrid.splice(0, snapGrid.length);\n const newSlidesGrid = [];\n\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n }\n\n snapGrid.push(...newSlidesGrid);\n }\n };\n\n swiper.grid = {\n initSlides,\n updateSlide,\n updateWrapperSize\n };\n}","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function HashNavigation({\n swiper,\n extendParams,\n emit,\n on\n}) {\n let initialized = false;\n const document = getDocument();\n const window = getWindow();\n extendParams({\n hashNavigation: {\n enabled: false,\n replaceState: false,\n watchState: false\n }\n });\n\n const onHashChange = () => {\n emit('hashChange');\n const newHash = document.location.hash.replace('#', '');\n const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n\n if (newHash !== activeSlideHash) {\n const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash=\"${newHash}\"]`).index();\n if (typeof newIndex === 'undefined') return;\n swiper.slideTo(newIndex);\n }\n };\n\n const setHash = () => {\n if (!initialized || !swiper.params.hashNavigation.enabled) return;\n\n if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {\n window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '');\n emit('hashSet');\n } else {\n const slide = swiper.slides.eq(swiper.activeIndex);\n const hash = slide.attr('data-hash') || slide.attr('data-history');\n document.location.hash = hash || '';\n emit('hashSet');\n }\n };\n\n const init = () => {\n if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;\n initialized = true;\n const hash = document.location.hash.replace('#', '');\n\n if (hash) {\n const speed = 0;\n\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHash = slide.attr('data-hash') || slide.attr('data-history');\n\n if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n }\n }\n }\n\n if (swiper.params.hashNavigation.watchState) {\n $(window).on('hashchange', onHashChange);\n }\n };\n\n const destroy = () => {\n if (swiper.params.hashNavigation.watchState) {\n $(window).off('hashchange', onHashChange);\n }\n };\n\n on('init', () => {\n if (swiper.params.hashNavigation.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.hashNavigation.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHash();\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHash();\n }\n });\n}","import { getWindow } from 'ssr-window';\nexport default function History({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n history: {\n enabled: false,\n root: '',\n replaceState: false,\n key: 'slides'\n }\n });\n let initialized = false;\n let paths = {};\n\n const slugify = text => {\n return text.toString().replace(/\\s+/g, '-').replace(/[^\\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');\n };\n\n const getPathValues = urlOverride => {\n const window = getWindow();\n let location;\n\n if (urlOverride) {\n location = new URL(urlOverride);\n } else {\n location = window.location;\n }\n\n const pathArray = location.pathname.slice(1).split('/').filter(part => part !== '');\n const total = pathArray.length;\n const key = pathArray[total - 2];\n const value = pathArray[total - 1];\n return {\n key,\n value\n };\n };\n\n const setHistory = (key, index) => {\n const window = getWindow();\n if (!initialized || !swiper.params.history.enabled) return;\n let location;\n\n if (swiper.params.url) {\n location = new URL(swiper.params.url);\n } else {\n location = window.location;\n }\n\n const slide = swiper.slides.eq(index);\n let value = slugify(slide.attr('data-history'));\n\n if (swiper.params.history.root.length > 0) {\n let root = swiper.params.history.root;\n if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);\n value = `${root}/${key}/${value}`;\n } else if (!location.pathname.includes(key)) {\n value = `${key}/${value}`;\n }\n\n const currentState = window.history.state;\n\n if (currentState && currentState.value === value) {\n return;\n }\n\n if (swiper.params.history.replaceState) {\n window.history.replaceState({\n value\n }, null, value);\n } else {\n window.history.pushState({\n value\n }, null, value);\n }\n };\n\n const scrollToSlide = (speed, value, runCallbacks) => {\n if (value) {\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHistory = slugify(slide.attr('data-history'));\n\n if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, runCallbacks);\n }\n }\n } else {\n swiper.slideTo(0, speed, runCallbacks);\n }\n };\n\n const setHistoryPopState = () => {\n paths = getPathValues(swiper.params.url);\n scrollToSlide(swiper.params.speed, swiper.paths.value, false);\n };\n\n const init = () => {\n const window = getWindow();\n if (!swiper.params.history) return;\n\n if (!window.history || !window.history.pushState) {\n swiper.params.history.enabled = false;\n swiper.params.hashNavigation.enabled = true;\n return;\n }\n\n initialized = true;\n paths = getPathValues(swiper.params.url);\n if (!paths.key && !paths.value) return;\n scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);\n\n if (!swiper.params.history.replaceState) {\n window.addEventListener('popstate', setHistoryPopState);\n }\n };\n\n const destroy = () => {\n const window = getWindow();\n\n if (!swiper.params.history.replaceState) {\n window.removeEventListener('popstate', setHistoryPopState);\n }\n };\n\n on('init', () => {\n if (swiper.params.history.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.history.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n}","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Keyboard({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: false\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true\n }\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n const {\n rtlTranslate: rtl\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40; // Directions locks\n\n if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {\n return false;\n }\n\n if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) {\n return false;\n }\n\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n\n if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n\n if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {\n let inView = false; // Check that swiper should be inside of visible area of window\n\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n if (!inView) return undefined;\n }\n\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();\n if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n\n emit('keyPress', kc);\n return undefined;\n }\n\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n Object.assign(swiper.keyboard, {\n enable,\n disable\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nexport default function Lazy({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n lazy: {\n checkInView: false,\n enabled: false,\n loadPrevNext: false,\n loadPrevNextAmount: 1,\n loadOnTransitionStart: false,\n scrollingElement: '',\n elementClass: 'swiper-lazy',\n loadingClass: 'swiper-lazy-loading',\n loadedClass: 'swiper-lazy-loaded',\n preloaderClass: 'swiper-lazy-preloader'\n }\n });\n swiper.lazy = {};\n let scrollHandlerAttached = false;\n let initialImageLoaded = false;\n\n function loadInSlide(index, loadInDuplicate = true) {\n const params = swiper.params.lazy;\n if (typeof index === 'undefined') return;\n if (swiper.slides.length === 0) return;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${index}\"]`) : swiper.slides.eq(index);\n const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);\n\n if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {\n $images.push($slideEl[0]);\n }\n\n if ($images.length === 0) return;\n $images.each(imageEl => {\n const $imageEl = $(imageEl);\n $imageEl.addClass(params.loadingClass);\n const background = $imageEl.attr('data-background');\n const src = $imageEl.attr('data-src');\n const srcset = $imageEl.attr('data-srcset');\n const sizes = $imageEl.attr('data-sizes');\n const $pictureEl = $imageEl.parent('picture');\n swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return;\n\n if (background) {\n $imageEl.css('background-image', `url(\"${background}\")`);\n $imageEl.removeAttr('data-background');\n } else {\n if (srcset) {\n $imageEl.attr('srcset', srcset);\n $imageEl.removeAttr('data-srcset');\n }\n\n if (sizes) {\n $imageEl.attr('sizes', sizes);\n $imageEl.removeAttr('data-sizes');\n }\n\n if ($pictureEl.length) {\n $pictureEl.children('source').each(sourceEl => {\n const $source = $(sourceEl);\n\n if ($source.attr('data-srcset')) {\n $source.attr('srcset', $source.attr('data-srcset'));\n $source.removeAttr('data-srcset');\n }\n });\n }\n\n if (src) {\n $imageEl.attr('src', src);\n $imageEl.removeAttr('data-src');\n }\n }\n\n $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n $slideEl.find(`.${params.preloaderClass}`).remove();\n\n if (swiper.params.loop && loadInDuplicate) {\n const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n\n if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index=\"${slideOriginalIndex}\"]:not(.${swiper.params.slideDuplicateClass})`);\n loadInSlide(originalSlide.index(), false);\n } else {\n const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index=\"${slideOriginalIndex}\"]`);\n loadInSlide(duplicatedSlide.index(), false);\n }\n }\n\n emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n });\n emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n });\n }\n\n function load() {\n const {\n $wrapperEl,\n params: swiperParams,\n slides,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n const params = swiperParams.lazy;\n let slidesPerView = swiperParams.slidesPerView;\n\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n\n function slideExist(index) {\n if (isVirtual) {\n if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index=\"${index}\"]`).length) {\n return true;\n }\n } else if (slides[index]) return true;\n\n return false;\n }\n\n function slideIndex(slideEl) {\n if (isVirtual) {\n return $(slideEl).attr('data-swiper-slide-index');\n }\n\n return $(slideEl).index();\n }\n\n if (!initialImageLoaded) initialImageLoaded = true;\n\n if (swiper.params.watchSlidesProgress) {\n $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => {\n const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();\n loadInSlide(index);\n });\n } else if (slidesPerView > 1) {\n for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n loadInSlide(activeIndex);\n }\n\n if (params.loadPrevNext) {\n if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) {\n const amount = params.loadPrevNextAmount;\n const spv = slidesPerView;\n const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides\n\n for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n } // Prev Slides\n\n\n for (let i = minIndex; i < activeIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);\n if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide));\n const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);\n if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide));\n }\n }\n }\n\n function checkInViewOnLoad() {\n const window = getWindow();\n if (!swiper || swiper.destroyed) return;\n const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window);\n const isWindow = $scrollElement[0] === window;\n const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth;\n const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight;\n const swiperOffset = swiper.$el.offset();\n const {\n rtlTranslate: rtl\n } = swiper;\n let inView = false;\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]];\n\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n\n if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n\n inView = true;\n }\n }\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n\n if (inView) {\n load();\n $scrollElement.off('scroll', checkInViewOnLoad, passiveListener);\n } else if (!scrollHandlerAttached) {\n scrollHandlerAttached = true;\n $scrollElement.on('scroll', checkInViewOnLoad, passiveListener);\n }\n }\n\n on('beforeInit', () => {\n if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n swiper.params.preloadImages = false;\n }\n });\n on('init', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('scroll', () => {\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) {\n load();\n }\n });\n on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('transitionStart', () => {\n if (swiper.params.lazy.enabled) {\n if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n }\n });\n on('transitionEnd', () => {\n if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('slideChange', () => {\n const {\n lazy,\n cssMode,\n watchSlidesProgress,\n touchReleaseOnEdges,\n resistanceRatio\n } = swiper.params;\n\n if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) {\n load();\n }\n });\n Object.assign(swiper.lazy, {\n load,\n loadInSlide\n });\n}","import appendSlide from './methods/appendSlide.js';\nimport prependSlide from './methods/prependSlide.js';\nimport addSlide from './methods/addSlide.js';\nimport removeSlide from './methods/removeSlide.js';\nimport removeAllSlides from './methods/removeAllSlides.js';\nexport default function Manipulation({\n swiper\n}) {\n Object.assign(swiper, {\n appendSlide: appendSlide.bind(swiper),\n prependSlide: prependSlide.bind(swiper),\n addSlide: addSlide.bind(swiper),\n removeSlide: removeSlide.bind(swiper),\n removeAllSlides: removeAllSlides.bind(swiper)\n });\n}","export default function addSlide(index, slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n const baseLength = swiper.slides.length;\n\n if (index <= 0) {\n swiper.prependSlide(slides);\n return;\n }\n\n if (index >= baseLength) {\n swiper.appendSlide(slides);\n return;\n }\n\n let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n const slidesBuffer = [];\n\n for (let i = baseLength - 1; i >= index; i -= 1) {\n const currentSlide = swiper.slides.eq(i);\n currentSlide.remove();\n slidesBuffer.unshift(currentSlide);\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n\n newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n } else {\n $wrapperEl.append(slides);\n }\n\n for (let i = 0; i < slidesBuffer.length; i += 1) {\n $wrapperEl.append(slidesBuffer[i]);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","export default function appendSlide(slides) {\n const swiper = this;\n const {\n $wrapperEl,\n params\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n } else {\n $wrapperEl.append(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n}","export default function prependSlide(slides) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n let newActiveIndex = activeIndex + 1;\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.prepend(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n } else {\n $wrapperEl.prepend(slides);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n swiper.slideTo(newActiveIndex, 0, false);\n}","export default function removeAllSlides() {\n const swiper = this;\n const slidesIndexes = [];\n\n for (let i = 0; i < swiper.slides.length; i += 1) {\n slidesIndexes.push(i);\n }\n\n swiper.removeSlide(slidesIndexes);\n}","export default function removeSlide(slidesIndexes) {\n const swiper = this;\n const {\n params,\n $wrapperEl,\n activeIndex\n } = swiper;\n let activeIndexBuffer = activeIndex;\n\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n\n let newActiveIndex = activeIndexBuffer;\n let indexToRemove;\n\n if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {\n for (let i = 0; i < slidesIndexes.length; i += 1) {\n indexToRemove = slidesIndexes[i];\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n }\n\n newActiveIndex = Math.max(newActiveIndex, 0);\n } else {\n indexToRemove = slidesIndexes;\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}","/* eslint-disable consistent-return */\nimport { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now, nextTick } from '../../shared/utils.js';\nexport default function Mousewheel({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n mousewheel: {\n enabled: false,\n releaseOnEdges: false,\n invert: false,\n forceToAxis: false,\n sensitivity: 1,\n eventsTarget: 'container',\n thresholdDelta: null,\n thresholdTime: null\n }\n });\n swiper.mousewheel = {\n enabled: false\n };\n let timeout;\n let lastScrollTime = now();\n let lastEventBeforeSnap;\n const recentWheelEvents = [];\n\n function normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n let sX = 0;\n let sY = 0; // spinX, spinY\n\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n // Legacy\n\n if ('detail' in e) {\n sY = e.detail;\n }\n\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n } // side scrolling on FF with DOMMouseScroll\n\n\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) {\n // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n } // Fall-back if spin cannot be determined\n\n\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n }\n\n function handleMouseEnter() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = true;\n }\n\n function handleMouseLeave() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = false;\n }\n\n function animateSlider(newEvent) {\n if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) {\n // Prevent if delta of wheel scroll delta is below configured threshold\n return false;\n }\n\n if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {\n // Prevent if time between scrolls is below configured threshold\n return false;\n } // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n\n\n if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {\n // Return false as a default\n return true;\n } // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n\n\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n emit('scroll', newEvent.raw);\n } // If you got here is because an animation has been triggered so store the current time\n\n\n lastScrollTime = new window.Date().getTime(); // Return false as a default\n\n return false;\n }\n\n function releaseScroll(newEvent) {\n const params = swiper.params.mousewheel;\n\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n\n return false;\n }\n\n function handle(event) {\n let e = event;\n let disableParentSwiper = true;\n if (!swiper.enabled) return;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n const data = normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true;\n } else {\n delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n if (params.invert) delta = -delta; // Get the scroll positions\n\n let positions = swiper.getTranslate() + delta * params.sensitivity;\n if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();\n if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true:\n // the disableParentSwiper will be true.\n // When loop is false:\n // if the scroll positions is not on edge,\n // then the disableParentSwiper will be true.\n // if the scroll on edge positions,\n // then the disableParentSwiper will be false.\n\n disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());\n if (disableParentSwiper && swiper.params.nested) e.stopPropagation();\n\n if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event\n }; // Keep the most recent events\n\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n recentWheelEvents.push(newEvent); // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n\n if (prevEvent) {\n if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n animateSlider(newEvent);\n }\n } else {\n animateSlider(newEvent);\n } // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n\n\n if (releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta)\n };\n const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;\n\n if (!ignoreWheelEvents) {\n lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n\n let position = swiper.getTranslate() + delta * params.sensitivity;\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode.sticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momentum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(timeout);\n timeout = undefined;\n\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n\n if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n timeout = nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n\n if (!timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n timeout = nextTick(() => {\n const snapToThreshold = 0.5;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n } // Emit event\n\n\n if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay\n\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions\n\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n return false;\n }\n\n function events(method) {\n let target = swiper.$el;\n\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n\n target[method]('mouseenter', handleMouseEnter);\n target[method]('mouseleave', handleMouseLeave);\n target[method]('wheel', handle);\n }\n\n function enable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener('wheel', handle);\n return true;\n }\n\n if (swiper.mousewheel.enabled) return false;\n events('on');\n swiper.mousewheel.enabled = true;\n return true;\n }\n\n function disable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, handle);\n return true;\n }\n\n if (!swiper.mousewheel.enabled) return false;\n events('off');\n swiper.mousewheel.enabled = false;\n return true;\n }\n\n on('init', () => {\n if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n disable();\n }\n\n if (swiper.params.mousewheel.enabled) enable();\n });\n on('destroy', () => {\n if (swiper.params.cssMode) {\n enable();\n }\n\n if (swiper.mousewheel.enabled) disable();\n });\n Object.assign(swiper.mousewheel, {\n enable,\n disable\n });\n}","import createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nimport $ from '../../shared/dom.js';\nexport default function Navigation({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock'\n }\n });\n swiper.navigation = {\n nextEl: null,\n $nextEl: null,\n prevEl: null,\n $prevEl: null\n };\n\n function getEl(el) {\n let $el;\n\n if (el) {\n $el = $(el);\n\n if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) {\n $el = swiper.$el.find(el);\n }\n }\n\n return $el;\n }\n\n function toggleEl($el, disabled) {\n const params = swiper.params.navigation;\n\n if ($el && $el.length > 0) {\n $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass);\n if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled;\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n }\n\n function update() {\n // Update Navigation Buttons\n if (swiper.params.loop) return;\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n }\n\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n }\n\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n const $nextEl = getEl(params.nextEl);\n const $prevEl = getEl(params.prevEl);\n\n if ($nextEl && $nextEl.length > 0) {\n $nextEl.on('click', onNextClick);\n }\n\n if ($prevEl && $prevEl.length > 0) {\n $prevEl.on('click', onPrevClick);\n }\n\n Object.assign(swiper.navigation, {\n $nextEl,\n nextEl: $nextEl && $nextEl[0],\n $prevEl,\n prevEl: $prevEl && $prevEl[0]\n });\n\n if (!swiper.enabled) {\n if ($nextEl) $nextEl.addClass(params.lockClass);\n if ($prevEl) $prevEl.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl && $nextEl.length) {\n $nextEl.off('click', onNextClick);\n $nextEl.removeClass(swiper.params.navigation.disabledClass);\n }\n\n if ($prevEl && $prevEl.length) {\n $prevEl.off('click', onPrevClick);\n $prevEl.removeClass(swiper.params.navigation.disabledClass);\n }\n }\n\n on('init', () => {\n init();\n update();\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n\n if ($nextEl) {\n $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n\n if ($prevEl) {\n $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n });\n on('click', (_s, e) => {\n const {\n $nextEl,\n $prevEl\n } = swiper.navigation;\n const targetEl = e.target;\n\n if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n\n if ($nextEl) {\n isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n } else if ($prevEl) {\n isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n }\n\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n\n if ($nextEl) {\n $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n\n if ($prevEl) {\n $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n }\n });\n Object.assign(swiper.navigation, {\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nimport classesToSelector from '../../shared/classes-to-selector.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Pagination({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`\n }\n });\n swiper.pagination = {\n el: null,\n $el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0;\n }\n\n function setSideBullets($bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`);\n }\n\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el; // Current/Total\n\n let current;\n const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.loop) {\n current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n\n if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n current -= slidesLength - swiper.loopedSlides * 2;\n }\n\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n } // Types\n\n\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n\n if (params.dynamicBullets) {\n bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`);\n\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0);\n\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n\n bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' '));\n\n if ($el.length > 1) {\n bullets.each(bullet => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (bulletIndex === firstIndex) {\n setSideBullets($bullet, 'prev');\n }\n\n if (bulletIndex === lastIndex) {\n setSideBullets($bullet, 'next');\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n\n bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n }\n }\n\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n\n if (params.type === 'fraction') {\n $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1));\n $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total));\n }\n\n if (params.type === 'progressbar') {\n let progressbarDirection;\n\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n\n $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);\n }\n\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n emit('paginationRender', $el[0]);\n } else {\n emit('paginationUpdate', $el[0]);\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\">`;\n }\n }\n\n $el.html(paginationHTML);\n swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass));\n }\n\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n\n $el.html(paginationHTML);\n }\n\n if (params.type !== 'custom') {\n emit('paginationRender', swiper.pagination.$el[0]);\n }\n }\n\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) {\n $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper\n\n if ($el.length > 1) {\n $el = $el.filter(el => {\n if ($(el).parents('.swiper')[0] !== swiper.el) return false;\n return true;\n });\n }\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n $el.addClass(params.modifierClass + swiper.params.direction);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', classesToSelector(params.bulletClass), function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Object.assign(swiper.pagination, {\n $el,\n el: $el[0]\n });\n\n if (!swiper.enabled) {\n $el.addClass(params.lockClass);\n }\n }\n\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const $el = swiper.pagination.$el;\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n $el.removeClass(params.modifierClass + swiper.params.direction);\n if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n\n if (params.clickable) {\n $el.off('click', classesToSelector(params.bulletClass));\n }\n }\n\n on('init', () => {\n init();\n render();\n update();\n });\n on('activeIndexChange', () => {\n if (swiper.params.loop) {\n update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n if (!swiper.params.loop) {\n update();\n }\n });\n on('slidesLengthChange', () => {\n if (swiper.params.loop) {\n render();\n update();\n }\n });\n on('snapGridLengthChange', () => {\n if (!swiper.params.loop) {\n render();\n update();\n }\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.pagination;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass);\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const {\n $el\n } = swiper.pagination;\n\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass);\n\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n\n $el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n });\n Object.assign(swiper.pagination, {\n render,\n update,\n init,\n destroy\n });\n}","import $ from '../../shared/dom.js';\nexport default function Parallax({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n parallax: {\n enabled: false\n }\n });\n\n const setTransform = (el, progress) => {\n const {\n rtl\n } = swiper;\n const $el = $(el);\n const rtlFactor = rtl ? -1 : 1;\n const p = $el.attr('data-swiper-parallax') || '0';\n let x = $el.attr('data-swiper-parallax-x');\n let y = $el.attr('data-swiper-parallax-y');\n const scale = $el.attr('data-swiper-parallax-scale');\n const opacity = $el.attr('data-swiper-parallax-opacity');\n\n if (x || y) {\n x = x || '0';\n y = y || '0';\n } else if (swiper.isHorizontal()) {\n x = p;\n y = '0';\n } else {\n y = p;\n x = '0';\n }\n\n if (x.indexOf('%') >= 0) {\n x = `${parseInt(x, 10) * progress * rtlFactor}%`;\n } else {\n x = `${x * progress * rtlFactor}px`;\n }\n\n if (y.indexOf('%') >= 0) {\n y = `${parseInt(y, 10) * progress}%`;\n } else {\n y = `${y * progress}px`;\n }\n\n if (typeof opacity !== 'undefined' && opacity !== null) {\n const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n $el[0].style.opacity = currentOpacity;\n }\n\n if (typeof scale === 'undefined' || scale === null) {\n $el.transform(`translate3d(${x}, ${y}, 0px)`);\n } else {\n const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);\n }\n };\n\n const setTranslate = () => {\n const {\n $el,\n slides,\n progress,\n snapGrid\n } = swiper;\n $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, progress);\n });\n slides.each((slideEl, slideIndex) => {\n let slideProgress = slideEl.progress;\n\n if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n }\n\n slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => {\n setTransform(el, slideProgress);\n });\n });\n };\n\n const setTransition = (duration = swiper.params.speed) => {\n const {\n $el\n } = swiper;\n $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => {\n const $parallaxEl = $(parallaxEl);\n let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n $parallaxEl.transition(parallaxDuration);\n });\n };\n\n on('beforeInit', () => {\n if (!swiper.params.parallax.enabled) return;\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('init', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTranslate', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTransition', (_swiper, duration) => {\n if (!swiper.params.parallax.enabled) return;\n setTransition(duration);\n });\n}","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Scrollbar({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag'\n }\n });\n swiper.scrollbar = {\n el: null,\n dragEl: null,\n $el: null,\n $dragEl: null\n };\n\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar,\n rtlTranslate: rtl,\n progress\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n const params = swiper.params.scrollbar;\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n\n if (rtl) {\n newPos = -newPos;\n\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n\n if (params.hide) {\n clearTimeout(timeout);\n $el[0].style.opacity = 1;\n timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n }\n\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n }\n\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar\n } = swiper;\n const {\n $dragEl,\n $el\n } = scrollbar;\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));\n\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function getPointerPosition(e) {\n if (swiper.isHorizontal()) {\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX;\n }\n\n return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY;\n }\n\n function setDragPosition(e) {\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n $el\n } = scrollbar;\n let positionRatio;\n positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n isTouched = true;\n dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n setDragPosition(e);\n clearTimeout(dragTimeout);\n $el.transition(0);\n\n if (params.hide) {\n $el.css('opacity', 1);\n }\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n\n emit('scrollbarDragStart', e);\n }\n\n function onDragMove(e) {\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el,\n $dragEl\n } = scrollbar;\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n emit('scrollbarDragMove', e);\n }\n\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n $wrapperEl\n } = swiper;\n const {\n $el\n } = scrollbar;\n if (!isTouched) return;\n isTouched = false;\n\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n\n emit('scrollbarDragEnd', e);\n\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n\n function events(method) {\n const {\n scrollbar,\n touchEventsTouch,\n touchEventsDesktop,\n params,\n support\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = support.passiveListener && params.passiveListeners ? {\n passive: false,\n capture: false\n } : false;\n const passiveListener = support.passiveListener && params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n\n if (!support.touch) {\n target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener);\n document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener);\n document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener);\n } else {\n target[eventMethod](touchEventsTouch.start, onDragStart, activeListener);\n target[eventMethod](touchEventsTouch.move, onDragMove, activeListener);\n target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener);\n }\n }\n\n function enableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('on');\n }\n\n function disableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('off');\n }\n\n function init() {\n const {\n scrollbar,\n $el: $swiperEl\n } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {\n el: 'swiper-scrollbar'\n });\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n let $el = $(params.el);\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n\n if ($dragEl.length === 0) {\n $dragEl = $(`
`);\n $el.append($dragEl);\n }\n\n Object.assign(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0]\n });\n\n if (params.draggable) {\n enableDraggable();\n }\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n }\n\n function destroy() {\n disableDraggable();\n }\n\n on('init', () => {\n init();\n updateSize();\n setTranslate();\n });\n on('update resize observerUpdate lock unlock', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const {\n $el\n } = swiper.scrollbar;\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n Object.assign(swiper.scrollbar, {\n updateSize,\n setTranslate,\n init,\n destroy\n });\n}","import { isObject } from '../../shared/utils.js';\nimport $ from '../../shared/dom.js';\nexport default function Thumb({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-thumbs'\n }\n });\n let initialized = false;\n let swiperCreated = false;\n swiper.thumbs = {\n swiper: null\n };\n\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n\n if (swiper.params.loop) {\n let currentIndex = swiper.activeIndex;\n\n if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n swiper.loopFix(); // eslint-disable-next-line\n\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n currentIndex = swiper.activeIndex;\n }\n\n const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`).eq(0).index();\n if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex;\n }\n\n swiper.slideTo(slideToIndex);\n }\n\n function init() {\n const {\n thumbs: thumbsParams\n } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n\n swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n let currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n\n if (thumbsSwiper.params.loop) {\n if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {\n thumbsSwiper.loopFix(); // eslint-disable-next-line\n\n thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n currentThumbsIndex = thumbsSwiper.activeIndex;\n } // Find actual thumbs index to slide to\n\n\n const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`).eq(0).index();\n\n if (typeof prevThumbsIndex === 'undefined') {\n newThumbsIndex = nextThumbsIndex;\n } else if (typeof nextThumbsIndex === 'undefined') {\n newThumbsIndex = prevThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = nextThumbsIndex;\n } else {\n newThumbsIndex = prevThumbsIndex;\n }\n\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n\n if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n }\n\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n } // Activate thumbs\n\n\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n\n thumbsToActivate = Math.floor(thumbsToActivate);\n thumbsSwiper.slides.removeClass(thumbActiveClass);\n\n if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`).addClass(thumbActiveClass);\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);\n }\n }\n }\n\n on('beforeInit', () => {\n const {\n thumbs\n } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n init();\n update(true);\n });\n on('slideChange update resize observerUpdate', () => {\n if (!swiper.thumbs.swiper) return;\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n\n if (swiperCreated && thumbsSwiper) {\n thumbsSwiper.destroy();\n }\n });\n Object.assign(swiper.thumbs, {\n init,\n update\n });\n}","import $ from '../../shared/dom.js';\nimport { setCSSProperty } from '../../shared/utils.js';\nexport default function Virtual({\n swiper,\n extendParams,\n on\n}) {\n extendParams({\n virtual: {\n enabled: false,\n slides: [],\n cache: true,\n renderSlide: null,\n renderExternal: null,\n renderExternalUpdate: true,\n addSlidesBefore: 0,\n addSlidesAfter: 0\n }\n });\n let cssModeTimeout;\n swiper.virtual = {\n cache: {},\n from: undefined,\n to: undefined,\n slides: [],\n offset: 0,\n slidesGrid: []\n };\n\n function renderSlide(slide, index) {\n const params = swiper.params.virtual;\n\n if (params.cache && swiper.virtual.cache[index]) {\n return swiper.virtual.cache[index];\n }\n\n const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
${slide}
`);\n if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n if (params.cache) swiper.virtual.cache[index] = $slideEl;\n return $slideEl;\n }\n\n function update(force) {\n const {\n slidesPerView,\n slidesPerGroup,\n centeredSlides\n } = swiper.params;\n const {\n addSlidesBefore,\n addSlidesAfter\n } = swiper.params.virtual;\n const {\n from: previousFrom,\n to: previousTo,\n slides,\n slidesGrid: previousSlidesGrid,\n offset: previousOffset\n } = swiper.virtual;\n\n if (!swiper.params.cssMode) {\n swiper.updateActiveIndex();\n }\n\n const activeIndex = swiper.activeIndex || 0;\n let offsetProp;\n if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n let slidesAfter;\n let slidesBefore;\n\n if (centeredSlides) {\n slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n } else {\n slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;\n slidesBefore = slidesPerGroup + addSlidesBefore;\n }\n\n const from = Math.max((activeIndex || 0) - slidesBefore, 0);\n const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n Object.assign(swiper.virtual, {\n from,\n to,\n offset,\n slidesGrid: swiper.slidesGrid\n });\n\n function onRendered() {\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n if (swiper.lazy && swiper.params.lazy.enabled) {\n swiper.lazy.load();\n }\n }\n\n if (previousFrom === from && previousTo === to && !force) {\n if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n swiper.slides.css(offsetProp, `${offset}px`);\n }\n\n swiper.updateProgress();\n return;\n }\n\n if (swiper.params.virtual.renderExternal) {\n swiper.params.virtual.renderExternal.call(swiper, {\n offset,\n from,\n to,\n slides: function getSlides() {\n const slidesToRender = [];\n\n for (let i = from; i <= to; i += 1) {\n slidesToRender.push(slides[i]);\n }\n\n return slidesToRender;\n }()\n });\n\n if (swiper.params.virtual.renderExternalUpdate) {\n onRendered();\n }\n\n return;\n }\n\n const prependIndexes = [];\n const appendIndexes = [];\n\n if (force) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();\n } else {\n for (let i = previousFrom; i <= previousTo; i += 1) {\n if (i < from || i > to) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${i}\"]`).remove();\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n if (i >= from && i <= to) {\n if (typeof previousTo === 'undefined' || force) {\n appendIndexes.push(i);\n } else {\n if (i > previousTo) appendIndexes.push(i);\n if (i < previousFrom) prependIndexes.push(i);\n }\n }\n }\n\n appendIndexes.forEach(index => {\n swiper.$wrapperEl.append(renderSlide(slides[index], index));\n });\n prependIndexes.sort((a, b) => b - a).forEach(index => {\n swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n });\n swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);\n onRendered();\n }\n\n function appendSlide(slides) {\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.push(slides[i]);\n }\n } else {\n swiper.virtual.slides.push(slides);\n }\n\n update(true);\n }\n\n function prependSlide(slides) {\n const activeIndex = swiper.activeIndex;\n let newActiveIndex = activeIndex + 1;\n let numberOfNewSlides = 1;\n\n if (Array.isArray(slides)) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n }\n\n newActiveIndex = activeIndex + slides.length;\n numberOfNewSlides = slides.length;\n } else {\n swiper.virtual.slides.unshift(slides);\n }\n\n if (swiper.params.virtual.cache) {\n const cache = swiper.virtual.cache;\n const newCache = {};\n Object.keys(cache).forEach(cachedIndex => {\n const $cachedEl = cache[cachedIndex];\n const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n\n if (cachedElIndex) {\n $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides);\n }\n\n newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n });\n swiper.virtual.cache = newCache;\n }\n\n update(true);\n swiper.slideTo(newActiveIndex, 0);\n }\n\n function removeSlide(slidesIndexes) {\n if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n let activeIndex = swiper.activeIndex;\n\n if (Array.isArray(slidesIndexes)) {\n for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n swiper.virtual.slides.splice(slidesIndexes[i], 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes[i]];\n }\n\n if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n } else {\n swiper.virtual.slides.splice(slidesIndexes, 1);\n\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes];\n }\n\n if (slidesIndexes < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n\n update(true);\n swiper.slideTo(activeIndex, 0);\n }\n\n function removeAllSlides() {\n swiper.virtual.slides = [];\n\n if (swiper.params.virtual.cache) {\n swiper.virtual.cache = {};\n }\n\n update(true);\n swiper.slideTo(0, 0);\n }\n\n on('beforeInit', () => {\n if (!swiper.params.virtual.enabled) return;\n swiper.virtual.slides = swiper.params.virtual.slides;\n swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n\n if (!swiper.params.initialSlide) {\n update();\n }\n });\n on('setTranslate', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode && !swiper._immediateVirtual) {\n clearTimeout(cssModeTimeout);\n cssModeTimeout = setTimeout(() => {\n update();\n }, 100);\n } else {\n update();\n }\n });\n on('init update resize', () => {\n if (!swiper.params.virtual.enabled) return;\n\n if (swiper.params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`);\n }\n });\n Object.assign(swiper.virtual, {\n appendSlide,\n prependSlide,\n removeSlide,\n removeAllSlides,\n update\n });\n}","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { getTranslate } from '../../shared/utils.js';\nexport default function Zoom({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const window = getWindow();\n extendParams({\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed'\n }\n });\n swiper.zoom = {\n enabled: false\n };\n let currentScale = 1;\n let isScaling = false;\n let gesturesEnabled;\n let fakeGestureTouched;\n let fakeGestureMoved;\n const gesture = {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3\n };\n const image = {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n };\n const velocity = {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n };\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n\n set(value) {\n if (scale !== value) {\n const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined;\n const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined;\n emit('zoomChange', value, imageEl, slideEl);\n }\n\n scale = value;\n }\n\n });\n\n function getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n return distance;\n } // Events\n\n\n function onGestureStart(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n\n if (!support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureTouched = true;\n gesture.scaleStart = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n\n isScaling = true;\n }\n\n function onGestureChange(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n\n fakeGestureMoved = true;\n gesture.scaleMove = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) {\n if (e.type === 'gesturechange') onGestureStart(e);\n return;\n }\n\n if (support.gestures) {\n zoom.scale = e.scale * currentScale;\n } else {\n zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale;\n }\n\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;\n }\n\n if (zoom.scale < params.minRatio) {\n zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;\n }\n\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function onGestureEnd(e) {\n const device = swiper.device;\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n\n if (!support.gestures) {\n if (!fakeGestureTouched || !fakeGestureMoved) {\n return;\n }\n\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) {\n return;\n }\n\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n currentScale = zoom.scale;\n isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n }\n\n function onTouchStart(e) {\n const device = swiper.device;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n }\n\n function onTouchMove(e) {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n } // Define if we need image drag\n\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !isScaling) {\n if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) {\n image.isTouched = false;\n return;\n }\n\n if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) {\n image.isTouched = false;\n return;\n }\n }\n\n if (e.cancelable) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n image.isMoved = true;\n image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;\n }\n\n if (image.currentX > image.maxX) {\n image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;\n }\n\n if (image.currentY < image.minY) {\n image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;\n }\n\n if (image.currentY > image.maxY) {\n image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;\n } // Velocity\n\n\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTouchEnd() {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY; // Fix duration\n\n if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n image.currentX = newPositionX;\n image.currentY = newPositionY; // Define if we need image drag\n\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n\n function onTransitionEnd() {\n const zoom = swiper.zoom;\n\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n }\n\n function zoomIn(e) {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (e && e.target) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n }\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.touchAction = 'none';\n }\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left + window.scrollX;\n offsetY = gesture.$slideEl.offset().top + window.scrollY;\n diffX = offsetX + slideWidth / 2 - touchX;\n diffY = offsetY + slideHeight / 2 - touchY;\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n\n gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n\n function zoomOut() {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n\n gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0);\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return;\n\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.style.touchAction = '';\n }\n\n zoom.scale = 1;\n currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n } // Toggle Zoom\n\n\n function zoomToggle(e) {\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoomOut();\n } else {\n // Zoom In\n zoomIn(e);\n }\n }\n\n function getListeners() {\n const support = swiper.support;\n const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n const activeListenerWithCapture = support.passiveListener ? {\n passive: false,\n capture: true\n } : true;\n return {\n passiveListener,\n activeListenerWithCapture\n };\n }\n\n function getSlideSelector() {\n return `.${swiper.params.slideClass}`;\n }\n\n function toggleGestures(method) {\n const {\n passiveListener\n } = getListeners();\n const slideSelector = getSlideSelector();\n swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener);\n swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener);\n }\n\n function enableGestures() {\n if (gesturesEnabled) return;\n gesturesEnabled = true;\n toggleGestures('on');\n }\n\n function disableGestures() {\n if (!gesturesEnabled) return;\n gesturesEnabled = false;\n toggleGestures('off');\n } // Attach/Detach Events\n\n\n function enable() {\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n const support = swiper.support;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n function disable() {\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n const support = swiper.support;\n zoom.enabled = false;\n const {\n passiveListener,\n activeListenerWithCapture\n } = getListeners();\n const slideSelector = getSlideSelector(); // Scale image\n\n if (support.gestures) {\n swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener);\n }\n } // Move image\n\n\n swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture);\n }\n\n on('init', () => {\n if (swiper.params.zoom.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n disable();\n });\n on('touchStart', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchStart(e);\n });\n on('touchEnd', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchEnd(e);\n });\n on('doubleTap', (_s, e) => {\n if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n zoomToggle(e);\n }\n });\n on('transitionEnd', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n onTransitionEnd();\n }\n });\n on('slideChange', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n onTransitionEnd();\n }\n });\n Object.assign(swiper.zoom, {\n enable,\n disable,\n in: zoomIn,\n out: zoomOut,\n toggle: zoomToggle\n });\n}","export default function classesToSelector(classes = '') {\n return `.${classes.trim().replace(/([\\.:!\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}","import { getDocument } from 'ssr-window';\nexport default function createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n const document = getDocument();\n\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = swiper.$el.children(`.${checkProps[key]}`)[0];\n\n if (!element) {\n element = document.createElement('div');\n element.className = checkProps[key];\n swiper.$el.append(element);\n }\n\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n\n return params;\n}","import $ from './dom.js';\nexport default function createShadow(params, $slideEl, side) {\n const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`;\n const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;\n let $shadowEl = $shadowContainer.children(`.${shadowClass}`);\n\n if (!$shadowEl.length) {\n $shadowEl = $(`
`);\n $shadowContainer.append($shadowEl);\n }\n\n return $shadowEl;\n}","import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, styles, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove } from 'dom7';\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove\n};\nObject.keys(Methods).forEach(methodName => {\n Object.defineProperty($.fn, methodName, {\n value: Methods[methodName],\n writable: true\n });\n});\nexport default $;","export default function effectInit(params) {\n const {\n effect,\n swiper,\n on,\n setTranslate,\n setTransition,\n overwriteParams,\n perspective\n } = params;\n on('beforeInit', () => {\n if (swiper.params.effect !== effect) return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`);\n\n if (perspective && perspective()) {\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n }\n\n const overwriteParamsResult = overwriteParams ? overwriteParams() : {};\n Object.assign(swiper.params, overwriteParamsResult);\n Object.assign(swiper.originalParams, overwriteParamsResult);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== effect) return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== effect) return;\n setTransition(duration);\n });\n}","export default function effectTarget(effectParams, $slideEl) {\n if (effectParams.transformEl) {\n return $slideEl.find(effectParams.transformEl).css({\n 'backface-visibility': 'hidden',\n '-webkit-backface-visibility': 'hidden'\n });\n }\n\n return $slideEl;\n}","export default function effectVirtualTransitionEnd({\n swiper,\n duration,\n transformEl,\n allSlides\n}) {\n const {\n slides,\n activeIndex,\n $wrapperEl\n } = swiper;\n\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n let $transitionEndTarget;\n\n if (allSlides) {\n $transitionEndTarget = transformEl ? slides.find(transformEl) : slides;\n } else {\n $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex);\n }\n\n $transitionEndTarget.transitionEnd(() => {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n}","import { getWindow } from 'ssr-window';\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n\n return browser;\n}\n\nexport { getBrowser };","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\nlet deviceCached;\n\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel'; // iPadOs 13 fix\n\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n } // Android\n\n\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n } // Export object\n\n\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n\n return deviceCached;\n}\n\nexport { getDevice };","import { getWindow, getDocument } from 'ssr-window';\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),\n passiveListener: function checkPassiveListener() {\n let supportsPassive = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n }\n\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {// No support\n }\n\n return supportsPassive;\n }(),\n gestures: function checkGestures() {\n return 'ongesturestart' in window;\n }()\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n\n return support;\n}\n\nexport { getSupport };","import { getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {// no getter for object\n }\n\n try {\n delete object[key];\n } catch (e) {// something got wrong\n }\n });\n}\n\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\n\nfunction now() {\n return Date.now();\n}\n\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\n\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n } // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n\n\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n\n return curTransform || 0;\n}\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\n\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\n\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n\n return to;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n\n const animate = () => {\n time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n\n animate();\n}\n\nexport { animateCSSModeScroll, deleteProps, nextTick, now, getTranslate, isObject, extend, getComputedStyle, setCSSProperty };","/**\n * Swiper 7.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: December 24, 2021\n */\n\nexport { default as Swiper, default } from './core/core.js';\nexport { default as Virtual } from './modules/virtual/virtual.js';\nexport { default as Keyboard } from './modules/keyboard/keyboard.js';\nexport { default as Mousewheel } from './modules/mousewheel/mousewheel.js';\nexport { default as Navigation } from './modules/navigation/navigation.js';\nexport { default as Pagination } from './modules/pagination/pagination.js';\nexport { default as Scrollbar } from './modules/scrollbar/scrollbar.js';\nexport { default as Parallax } from './modules/parallax/parallax.js';\nexport { default as Zoom } from './modules/zoom/zoom.js';\nexport { default as Lazy } from './modules/lazy/lazy.js';\nexport { default as Controller } from './modules/controller/controller.js';\nexport { default as A11y } from './modules/a11y/a11y.js';\nexport { default as History } from './modules/history/history.js';\nexport { default as HashNavigation } from './modules/hash-navigation/hash-navigation.js';\nexport { default as Autoplay } from './modules/autoplay/autoplay.js';\nexport { default as Thumbs } from './modules/thumbs/thumbs.js';\nexport { default as FreeMode } from './modules/free-mode/free-mode.js';\nexport { default as Grid } from './modules/grid/grid.js';\nexport { default as Manipulation } from './modules/manipulation/manipulation.js';\nexport { default as EffectFade } from './modules/effect-fade/effect-fade.js';\nexport { default as EffectCube } from './modules/effect-cube/effect-cube.js';\nexport { default as EffectFlip } from './modules/effect-flip/effect-flip.js';\nexport { default as EffectCoverflow } from './modules/effect-coverflow/effect-coverflow.js';\nexport { default as EffectCreative } from './modules/effect-creative/effect-creative.js';\nexport { default as EffectCards } from './modules/effect-cards/effect-cards.js';","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Fancybox } from '@fancyapps/ui'\r\n\r\nimport { changeMenu } from './components/burger-menu'\r\nimport { addSmoothScroll } from '../js/components/scroll-smooth'\r\nimport { initializationSliders } from '../js/components/sliders'\r\nimport { toggleAccordion } from '../js/components/accordion'\r\nimport { addVideoPlayer } from '../js/components/video-player'\r\nimport { paintBtn } from '../js/components/paint-btn'\r\n\r\nchangeMenu()\r\naddVideoPlayer()\r\ninitializationSliders()\r\naddSmoothScroll()\r\ntoggleAccordion()\r\npaintBtn()\r\n"],"names":["items","document","querySelectorAll","title","toggleAccordion","forEach","question","addEventListener","thisItem","parentNode","item","classList","toggle","remove","burger","querySelector","menu","menuLinks","changeMenu","contains","body","style","overflowY","el","btnNext","paintBtn","scrollToTop","top","window","scrollY","add","e","console","log","SmoothScroll","header","btnUpWrapper","addSmoothScroll","scroll","speed","Swiper","Navigation","Pagination","Autoplay","use","initializationSliders","recomendationsSlider","slidesPerView","navigation","nextEl","prevEl","loop","goodsSlider","pagination","clickable","breakpoints","professionalSlider","paginationClickable","initialSlide","centeredSlides","zoom","maxRatio","spaceBetween","allowTouchMove","interviewSlider","partnersSlider","freeMode","grabCursor","autoplay","enabled","delay","disableOnInteraction","freeModeMomentum","stop","start","running","error","videojs","playBtn","videoTitle","videoText","videoLink","videoGradient","videoIntro","videoMask","videoJsTech","addVideoPlayer","isPreviewVideo","videoPlayer","getElementById","muted","controls","playToggle","loadMainVideo","desktopUrl","mobileUrl","screen","width","src","type","volume","changePlayerStatus","play","addClass","on","played","removeClass","pause","fluid","objectFit","currentTime","Fancybox"],"sourceRoot":""} \ No newline at end of file -- GitLab