14 lines
134 KiB
JavaScript
Vendored
14 lines
134 KiB
JavaScript
Vendored
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5818],{60562:function(t,e,r){"use strict";r.d(e,{Au:function(){return s},G3:function(){return m},Ki:function(){return u},d3:function(){return p},hL:function(){return h},lx:function(){return g},qX:function(){return d},tm:function(){return f}});var n,i,a=r(58908),o=r.n(a),s=function(t){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},u=function(t){return t instanceof Uint8Array?t:(Array.isArray(t)||s(t)||t instanceof ArrayBuffer||(t="number"!=typeof t||"number"==typeof t&&t!=t?0:[t]),new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0))},c=o().BigInt||Number,l=[c("0x1"),c("0x100"),c("0x10000"),c("0x1000000"),c("0x100000000"),c("0x10000000000"),c("0x1000000000000"),c("0x100000000000000"),c("0x10000000000000000")];n=new Uint16Array([65484]),255===(i=new Uint8Array(n.buffer,n.byteOffset,n.byteLength))[0]||i[0];var f=function(t,e){var r=void 0===e?{}:e,n=r.signed,i=r.le,a=void 0!==i&&i;t=u(t);var o=a?"reduce":"reduceRight",s=(t[o]?t[o]:Array.prototype[o]).call(t,function(e,r,n){var i=a?n:Math.abs(n+1-t.length);return e+c(r)*l[i]},c(0));if(void 0!==n&&n){var f=l[t.length]/c(2)-c(1);(s=c(s))>f&&(s-=f,s-=f,s-=c(2))}return Number(s)},h=function(t,e){var r=(void 0===e?{}:e).le,n=void 0!==r&&r;("bigint"!=typeof t&&"number"!=typeof t||"number"==typeof t&&t!=t)&&(t=0);for(var i=Math.ceil((t=c(t)).toString(2).length/8),a=new Uint8Array(new ArrayBuffer(i)),o=0;o<i;o++){var s=n?o:Math.abs(o+1-a.length);a[s]=Number(t/l[o]&c(255)),t<0&&(a[s]=Math.abs(~a[s]),a[s]-=0===o?1:2)}return a},p=function(t){if(!t)return"";t=Array.prototype.slice.call(t);var e=String.fromCharCode.apply(null,u(t));try{return decodeURIComponent(escape(e))}catch(t){}return e},d=function(t,e){if("string"!=typeof t&&t&&"function"==typeof t.toString&&(t=t.toString()),"string"!=typeof t)return new Uint8Array;e||(t=unescape(encodeURIComponent(t)));for(var r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r},g=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];if((e=e.filter(function(t){return t&&(t.byteLength||t.length)&&"string"!=typeof t})).length<=1)return u(e[0]);var n=e.reduce(function(t,e,r){return t+(e.byteLength||e.length)},0),i=new Uint8Array(n),a=0;return e.forEach(function(t){t=u(t),i.set(t,a),a+=t.byteLength}),i},m=function(t,e,r){var n=void 0===r?{}:r,i=n.offset,a=void 0===i?0:i,o=n.mask,s=void 0===o?[]:o;t=u(t);var c=(e=u(e)).every?e.every:Array.prototype.every;return e.length&&t.length-a>=e.length&&c.call(e,function(e,r){return e===(s[r]?s[r]&t[a+r]:t[a+r])})}},92260:function(t,e,r){"use strict";r.d(e,{Hi:function(){return d},Jg:function(){return l},KL:function(){return f},_5:function(){return h},kS:function(){return c},lA:function(){return g},p7:function(){return p},ws:function(){return u},xz:function(){return m}});var n=r(58908),i=r.n(n),a={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)/,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)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},o=["video","audio","text"],s=["Video","Audio","Text"],u=function(t){return t?t.replace(/avc1\.(\d+)\.(\d+)/i,function(t,e,r){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(r).toString(16)).slice(-2)}):t},c=function(t){void 0===t&&(t="");var e=t.split(","),r=[];return e.forEach(function(t){var e;t=t.trim(),o.forEach(function(n){var i=a[n].exec(t.toLowerCase());if(i&&!(i.length<=1)){e=n;var o=t.substring(0,i[1].length),s=t.replace(o,"");r.push({type:o,details:s,mediaType:n})}}),e||r.push({type:t,details:"",mediaType:"unknown"})}),r},l=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var r=t.mediaGroups.AUDIO[e];if(!r)return null;for(var n in r){var i=r[n];if(i.default&&i.playlists)return c(i.playlists[0].attributes.CODECS)}return null},f=function(t){return void 0===t&&(t=""),a.audio.test(t.trim().toLowerCase())},h=function(t){if(t&&"string"==typeof t){var e,r=t.toLowerCase().split(",").map(function(t){return u(t.trim())}),n="video";1===r.length&&f(r[0])?n="audio":1===r.length&&(void 0===(e=r[0])&&(e=""),a.text.test(e.trim().toLowerCase()))&&(n="application");var i="mp4";return r.every(function(t){return a.mp4.test(t)})?i="mp4":r.every(function(t){return a.webm.test(t)})?i="webm":r.every(function(t){return a.ogg.test(t)})&&(i="ogg"),n+"/"+i+';codecs="'+t+'"'}},p=function(t){return void 0===t&&(t=""),i().MediaSource&&i().MediaSource.isTypeSupported&&i().MediaSource.isTypeSupported(h(t))||!1},d=function(t){return void 0===t&&(t=""),t.toLowerCase().split(",").every(function(t){t=t.trim();for(var e=0;e<s.length;e++)if(a["muxer"+s[e]].test(t))return!0;return!1})},g="mp4a.40.2",m="avc1.4d400d"},86185:function(t,e,r){"use strict";r.d(e,{Xm:function(){return A},cz:function(){return S}});var n,i=r(60562);new Uint8Array([79,112,117,115,72,101,97,100]);var a=function(t){return"string"==typeof t?(0,i.qX)(t):t},o=function(t){t=(0,i.Ki)(t);for(var e=[],r=0;t.length>r;){var a=t[r],o=0,s=0,u=t[++s];for(s++;128&u;)o=(127&u)<<7,u=t[s],s++;o+=127&u;for(var c=0;c<n.length;c++){var l=n[c],f=l.id,h=l.parser;if(a===f){e.push(h(t.subarray(s,s+o)));break}}r+=o+s}return e};n=[{id:3,parser:function(t){var e={tag:3,id:t[0]<<8|t[1],flags:t[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&e.flags&&(e.dependsOnEsId=t[e.size]<<8|t[e.size+1],e.size+=2),64&e.flags){var r=t[e.size];e.url=(0,i.d3)(t.subarray(e.size+1,e.size+1+r)),e.size+=r}return 32&e.flags&&(e.ocrEsId=t[e.size]<<8|t[e.size+1],e.size+=2),e.descriptors=o(t.subarray(e.size))||[],e}},{id:4,parser:function(t){return{tag:4,oti:t[0],streamType:t[1],bufferSize:t[2]<<16|t[3]<<8|t[4],maxBitrate:t[5]<<24|t[6]<<16|t[7]<<8|t[8],avgBitrate:t[9]<<24|t[10]<<16|t[11]<<8|t[12],descriptors:o(t.subarray(13))}}},{id:5,parser:function(t){return{tag:5,bytes:t}}},{id:6,parser:function(t){return{tag:6,bytes:t}}}];var s=function t(e,r,n){void 0===n&&(n=!1),r=Array.isArray(o=r)?o.map(function(t){return a(t)}):[a(o)],e=(0,i.Ki)(e);var o,s=[];if(!r.length)return s;for(var u=0;u<e.length;){var c=(e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3])>>>0,l=e.subarray(u+4,u+8);if(0===c)break;var f=u+c;if(f>e.length){if(n)break;f=e.length}var h=e.subarray(u+8,f);(0,i.G3)(l,r[0])&&(1===r.length?s.push(h):s.push.apply(s,t(h,r.slice(1),n))),u=f}return s},u={EBML:(0,i.Ki)([26,69,223,163]),DocType:(0,i.Ki)([66,130]),Segment:(0,i.Ki)([24,83,128,103]),SegmentInfo:(0,i.Ki)([21,73,169,102]),Tracks:(0,i.Ki)([22,84,174,107]),Track:(0,i.Ki)([174]),TrackNumber:(0,i.Ki)([215]),DefaultDuration:(0,i.Ki)([35,227,131]),TrackEntry:(0,i.Ki)([174]),TrackType:(0,i.Ki)([131]),FlagDefault:(0,i.Ki)([136]),CodecID:(0,i.Ki)([134]),CodecPrivate:(0,i.Ki)([99,162]),VideoTrack:(0,i.Ki)([224]),AudioTrack:(0,i.Ki)([225]),Cluster:(0,i.Ki)([31,67,182,117]),Timestamp:(0,i.Ki)([231]),TimestampScale:(0,i.Ki)([42,215,177]),BlockGroup:(0,i.Ki)([160]),BlockDuration:(0,i.Ki)([155]),Block:(0,i.Ki)([161]),SimpleBlock:(0,i.Ki)([163])},c=[128,64,32,16,8,4,2,1],l=function(t){for(var e=1,r=0;r<c.length&&!(t&c[r]);r++)e++;return e},f=function(t,e,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var a=l(t[e]),o=t.subarray(e,e+a);return r&&(o=Array.prototype.slice.call(t,e,e+a),o[0]^=c[a-1]),{length:a,value:(0,i.tm)(o,{signed:n}),bytes:o}},h=function t(e){return"string"==typeof e?e.match(/.{1,2}/g).map(function(e){return t(e)}):"number"==typeof e?(0,i.hL)(e):e},p=function t(e,r,n){if(n>=r.length)return r.length;var a=f(r,n,!1);if((0,i.G3)(e.bytes,a.bytes))return n;var o=f(r,n+a.length);return t(e,r,n+o.length+o.value+a.length)},d=function t(e,r){r=Array.isArray(n=r)?n.map(function(t){return h(t)}):[h(n)],e=(0,i.Ki)(e);var n,a=[];if(!r.length)return a;for(var o=0;o<e.length;){var s=f(e,o,!1),u=f(e,o+s.length),c=o+s.length+u.length;127===u.value&&(u.value=p(s,e,c),u.value!==e.length&&(u.value-=c));var l=c+u.value>e.length?e.length:c+u.value,d=e.subarray(c,l);(0,i.G3)(r[0],s.bytes)&&(1===r.length?a.push(d):a=a.concat(t(d,r.slice(1))));var g=s.length+u.length+d.length;o+=g}return a},g=r(68925),m=(0,i.Ki)([0,0,0,1]),y=(0,i.Ki)([0,0,1]),b=(0,i.Ki)([0,0,3]),v=function(t){for(var e=[],r=1;r<t.length-2;)(0,i.G3)(t.subarray(r,r+3),b)&&(e.push(r+2),r++),r++;if(0===e.length)return t;var n=t.length-e.length,a=new Uint8Array(n),o=0;for(r=0;r<n;o++,r++)o===e[0]&&(o++,e.shift()),a[r]=t[o];return a},E=function(t,e,r,n){void 0===n&&(n=1/0),t=(0,i.Ki)(t),r=[].concat(r);for(var a,o=0,s=0;o<t.length&&(s<n||a);){var u=void 0;if((0,i.G3)(t.subarray(o),m)?u=4:(0,i.G3)(t.subarray(o),y)&&(u=3),!u){o++;continue}if(s++,a)return v(t.subarray(a,o));var c=void 0;"h264"===e?c=31&t[o+u]:"h265"===e&&(c=t[o+u]>>1&63),-1!==r.indexOf(c)&&(a=o+u),o+=u+("h264"===e?1:2)}return t.subarray(0,0)},T={webm:(0,i.Ki)([119,101,98,109]),matroska:(0,i.Ki)([109,97,116,114,111,115,107,97]),flac:(0,i.Ki)([102,76,97,67]),ogg:(0,i.Ki)([79,103,103,83]),ac3:(0,i.Ki)([11,119]),riff:(0,i.Ki)([82,73,70,70]),avi:(0,i.Ki)([65,86,73]),wav:(0,i.Ki)([87,65,86,69]),"3gp":(0,i.Ki)([102,116,121,112,51,103]),mp4:(0,i.Ki)([102,116,121,112]),fmp4:(0,i.Ki)([115,116,121,112]),mov:(0,i.Ki)([102,116,121,112,113,116]),moov:(0,i.Ki)([109,111,111,118]),moof:(0,i.Ki)([109,111,111,102])},w={aac:function(t){var e=(0,g.c)(t);return(0,i.G3)(t,[255,16],{offset:e,mask:[255,22]})},mp3:function(t){var e=(0,g.c)(t);return(0,i.G3)(t,[255,2],{offset:e,mask:[255,6]})},webm:function(t){var e=d(t,[u.EBML,u.DocType])[0];return(0,i.G3)(e,T.webm)},mkv:function(t){var e=d(t,[u.EBML,u.DocType])[0];return(0,i.G3)(e,T.matroska)},mp4:function(t){return!(w["3gp"](t)||w.mov(t))&&(!!((0,i.G3)(t,T.mp4,{offset:4})||(0,i.G3)(t,T.fmp4,{offset:4})||(0,i.G3)(t,T.moof,{offset:4})||(0,i.G3)(t,T.moov,{offset:4}))||void 0)},mov:function(t){return(0,i.G3)(t,T.mov,{offset:4})},"3gp":function(t){return(0,i.G3)(t,T["3gp"],{offset:4})},ac3:function(t){var e=(0,g.c)(t);return(0,i.G3)(t,T.ac3,{offset:e})},ts:function(t){if(t.length<189&&t.length>=1)return 71===t[0];for(var e=0;e+188<t.length&&e<188;){if(71===t[e]&&71===t[e+188])return!0;e+=1}return!1},flac:function(t){var e=(0,g.c)(t);return(0,i.G3)(t,T.flac,{offset:e})},ogg:function(t){return(0,i.G3)(t,T.ogg)},avi:function(t){return(0,i.G3)(t,T.riff)&&(0,i.G3)(t,T.avi,{offset:8})},wav:function(t){return(0,i.G3)(t,T.riff)&&(0,i.G3)(t,T.wav,{offset:8})},h264:function(t){return E(t,"h264",7,3).length},h265:function(t){return E(t,"h265",[32,33],3).length}},N=Object.keys(w).filter(function(t){return"ts"!==t&&"h264"!==t&&"h265"!==t}).concat(["ts","h264","h265"]);N.forEach(function(t){var e=w[t];w[t]=function(t){return e((0,i.Ki)(t))}});var A=function(t){t=(0,i.Ki)(t);for(var e=0;e<N.length;e++){var r=N[e];if(w[r](t))return r}return""},S=function(t){return s(t,["moof"]).length>0}},68925:function(t,e,r){"use strict";r.d(e,{c:function(){return o}});var n=r(60562),i=(0,n.Ki)([73,68,51]),a=function(t,e){void 0===e&&(e=0);var r=(t=(0,n.Ki)(t))[e+5],i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&r)>>4?i+20:i+10},o=function t(e,r){return(void 0===r&&(r=0),(e=(0,n.Ki)(e)).length-r<10||!(0,n.G3)(e,i,{offset:r}))?r:(r+=a(e,r),t(e,r))}},8485:function(t,e,r){"use strict";r.d(e,{t:function(){return a}});var n=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i,a=function(t){return n.test(t)?"hls":i.test(t)?"dash":"application/vnd.videojs.vhs+json"===t?"vhs-json":null}},80779:function(t,e,r){"use strict";var n=r(49945),i=r.n(n),a=r(58908),o=r.n(a),s="http://example.com";e.Z=function(t,e){if(/^[a-z]+:/i.test(e))return e;/^data:/.test(t)&&(t=o().location&&o().location.href||"");var r="function"==typeof o().URL,n=/^\/\//.test(t),a=!o().location&&!/\/\//i.test(t);if(r?t=new(o()).URL(t,o().location||s):/\/\//i.test(t)||(t=i().buildAbsoluteURL(o().location&&o().location.href||"",t)),r){var u=new URL(e,t);return a?u.href.slice(s.length):n?u.href.slice(u.protocol.length):u.href}return i().buildAbsoluteURL(t,e)}},13490:function(t,e,r){"use strict";var n=r(58908);t.exports=function(t,e){return void 0===e&&(e=!1),function(r,i,a){if(r){t(r);return}if(i.statusCode>=400&&i.statusCode<=599){var o=a;if(e){if(n.TextDecoder){var s,u=(void 0===(s=i.headers&&i.headers["content-type"])&&(s=""),s.toLowerCase().split(";").reduce(function(t,e){var r=e.split("="),n=r[0],i=r[1];return"charset"===n.trim()?i.trim():t},"utf-8"));try{o=new TextDecoder(u).decode(a)}catch(t){}}else o=String.fromCharCode.apply(null,new Uint8Array(a))}t({cause:o});return}t(null,a)}}},9603:function(t,e,r){"use strict";var n=r(58908),i=r(10434),a=r(27376);u.httpHandler=r(13490);/**
|
||
* @license
|
||
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
|
||
* Copyright (c) 2014 David Björklund
|
||
* Available under the MIT license
|
||
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
|
||
*/var o=function(t){var e={};return t&&t.trim().split("\n").forEach(function(t){var r=t.indexOf(":"),n=t.slice(0,r).trim().toLowerCase(),i=t.slice(r+1).trim();void 0===e[n]?e[n]=i:Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]}),e};function s(t,e,r){var n=t;return a(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=i({},e,{uri:t}),n.callback=r,n}function u(t,e,r){return c(e=s(t,e,r))}function c(t){if(void 0===t.callback)throw Error("callback argument missing");var e,r,n,i=!1,a=function(e,r,n){i||(i=!0,t.callback(e,r,n))};function s(t){return clearTimeout(n),t instanceof Error||(t=Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,a(t,y)}function c(){if(!r){clearTimeout(n);var e,i=y,s=null;return 0!==(e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status)?(i={body:function(){var t=void 0;if(t=l.response?l.response:l.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(l),m)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=o(l.getAllResponseHeaders()))):s=Error("Internal XMLHttpRequest Error"),a(s,i,i.body)}}var l=t.xhr||null;l||(l=t.cors||t.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f=l.url=t.uri||t.url,h=l.method=t.method||"GET",p=t.body||t.data,d=l.headers=t.headers||{},g=!!t.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in t&&!1!==t.json&&(m=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(c,0)},l.onload=c,l.onerror=s,l.onprogress=function(){},l.onabort=function(){r=!0},l.ontimeout=s,l.open(h,f,!g,t.username,t.password),g||(l.withCredentials=!!t.withCredentials),!g&&t.timeout>0&&(n=setTimeout(function(){if(!r){r=!0,l.abort("timeout");var t=Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)}},t.timeout)),l.setRequestHeader)for(e in d)d.hasOwnProperty(e)&&l.setRequestHeader(e,d[e]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p||null),l}t.exports=u,t.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var r=0;r<t.length;r++)e(t[r])}(["get","put","post","patch","head","delete"],function(t){u["delete"===t?"del":t]=function(e,r,n){return(r=s(e,r,n)).method=t.toUpperCase(),c(r)}})},72167:function(t,e){"use strict";function r(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.freeze?e.freeze(t):t}var n=r({HTML:"text/html",isHTML:function(t){return t===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.assign=function(t,e){if(null===t||"object"!=typeof t)throw TypeError("target is not an object");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},e.find=function(t,e,r){if(void 0===r&&(r=Array.prototype),t&&"function"==typeof r.find)return r.find.call(t,e);for(var n=0;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];if(e.call(void 0,i,n,t))return i}},e.freeze=r,e.MIME_TYPE=n,e.NAMESPACE=i},86129:function(t,e,r){var n=r(72167),i=r(41146),a=r(31045),o=r(76925),s=i.DOMImplementation,u=n.NAMESPACE,c=o.ParseError,l=o.XMLReader;function f(t){return t.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(t){this.options=t||{locator:{}}}function p(){this.cdata=!1}function d(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function g(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function m(t,e,r){return"string"==typeof t?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}function y(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}h.prototype.parseFromString=function(t,e){var r=this.options,n=new l,i=r.domBuilder||new p,o=r.errorHandler,s=r.locator,c=r.xmlns||{},h=/\/x?html?$/.test(e),d=h?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),n.errorHandler=function(t,e,r){if(!t){if(e instanceof p)return e;t=e}var n={},i=t instanceof Function;function a(e){var a=t[e];!a&&i&&(a=2==t.length?function(r){t(e,r)}:t),n[e]=a&&function(t){a("[xmldom "+e+"] "+t+g(r))}||function(){}}return r=r||{},a("warning"),a("error"),a("fatalError"),n}(o,i,s),n.domBuilder=r.domBuilder||i,h&&(c[""]=u.HTML),c.xml=c.xml||u.XML;var m=r.normalizeLineEndings||f;return t&&"string"==typeof t?n.parse(m(t),c,d):n.errorHandler.error("invalid doc source"),i.doc},p.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,n){var i=this.doc,a=i.createElementNS(t,r||e),o=n.length;y(this,a),this.currentElement=a,this.locator&&d(this.locator,a);for(var s=0;s<o;s++){var t=n.getURI(s),u=n.getValue(s),r=n.getQName(s),c=i.createAttributeNS(t,r);this.locator&&d(n.getLocator(s),c),c.value=c.nodeValue=u,a.setAttributeNode(c)}},endElement:function(t,e,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&d(this.locator,r),y(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=m.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else var n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&d(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,r){t=m.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&d(this.locator,n),y(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var i=n.createDocumentType(t,e,r);this.locator&&d(this.locator,i),y(this,i),this.doc.doctype=i}},warning:function(t){console.warn("[xmldom warning] "+t,g(this.locator))},error:function(t){console.error("[xmldom error] "+t,g(this.locator))},fatalError:function(t){throw new c(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){p.prototype[t]=function(){return null}}),e.DOMParser=h},41146:function(t,e,r){var n=r(72167),i=n.find,a=n.NAMESPACE;function o(t){return""!==t}function s(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function u(t){return t?Object.keys((t?t.split(/[\t\n\f\r ]+/).filter(o):[]).reduce(s,{})):[]}function c(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function l(t,e){var r=t.prototype;if(!(r instanceof e)){function n(){}n.prototype=e.prototype,c(r,n=new n),t.prototype=r=n}r.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),r.constructor=t)}var f={},h=f.ELEMENT_NODE=1,p=f.ATTRIBUTE_NODE=2,d=f.TEXT_NODE=3,g=f.CDATA_SECTION_NODE=4,m=f.ENTITY_REFERENCE_NODE=5,y=f.ENTITY_NODE=6,b=f.PROCESSING_INSTRUCTION_NODE=7,v=f.COMMENT_NODE=8,E=f.DOCUMENT_NODE=9,T=f.DOCUMENT_TYPE_NODE=10,w=f.DOCUMENT_FRAGMENT_NODE=11,N=f.NOTATION_NODE=12,A={},S={};A.INDEX_SIZE_ERR=(S[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2);var I=A.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3);A.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7);var x=A.NOT_FOUND_ERR=(S[8]="Not found",8);A.NOT_SUPPORTED_ERR=(S[9]="Not supported",9);var D=A.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10);function O(t,e){if(e instanceof Error)var r=e;else r=this,Error.call(this,S[t]),this.message=S[t],Error.captureStackTrace&&Error.captureStackTrace(this,O);return r.code=t,e&&(this.message=this.message+": "+e),r}function R(){}function C(t,e){this._node=t,this._refresh=e,U(this)}function U(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);tm(t,"length",r.length),c(r,t),t._inc=e}}function L(){}function M(t,e){for(var r=t.length;r--;)if(t[r]===e)return r}function P(t,e,r,n){if(n?e[M(e,n)]=r:e[e.length++]=r,t){r.ownerElement=t;var i,o,s=t.ownerDocument;s&&(n&&H(s,t,n),i=t,o=r,s&&s._inc++,o.namespaceURI===a.XMLNS&&(i._nsMap[o.prefix?o.localName:""]=o.value))}}function B(t,e,r){var n=M(e,r);if(n>=0){for(var i=e.length-1;n<i;)e[n]=e[++n];if(e.length=i,t){var a=t.ownerDocument;a&&(H(a,t,r),r.ownerElement=null)}}else throw new O(x,Error(t.tagName+"@"+r))}function _(){}function k(){}function X(t){return"<"==t&&"<"||">"==t&&">"||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function G(t,e){if(e(t))return!0;if(t=t.firstChild)do if(G(t,e))return!0;while(t=t.nextSibling)}function F(){this.ownerDocument=this}function H(t,e,r,n){t&&t._inc++,r.namespaceURI===a.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function V(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r)n[n.length++]=r;else{for(var i=e.firstChild,a=0;i;)n[a++]=i,i=i.nextSibling;n.length=a,delete n[n.length]}}}function $(t,e){var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,V(t.ownerDocument,t),e}function j(t){return t&&t.nodeType===k.DOCUMENT_TYPE_NODE}function q(t){return t&&t.nodeType===k.ELEMENT_NODE}function z(t){return t&&t.nodeType===k.TEXT_NODE}function K(t,e){var r=t.childNodes||[];if(i(r,q)||j(e))return!1;var n=i(r,j);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function Y(t,e){var r=t.childNodes||[];if(i(r,function(t){return q(t)&&t!==e}))return!1;var n=i(r,j);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function W(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===k.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||i(a,z))throw new O(I,"More than one element or text in fragment");if(1===o.length&&!K(t,r))throw new O(I,"Element in fragment can not be inserted before doctype")}if(q(e)&&!K(t,r))throw new O(I,"Only one element can be added and only after doctype");if(j(e)){if(i(n,j))throw new O(I,"Only one doctype is allowed");var s=i(n,q);if(r&&n.indexOf(s)<n.indexOf(r))throw new O(I,"Doctype can only be inserted before an element");if(!r&&s)throw new O(I,"Doctype can not be appended since element is present")}}function Z(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===k.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||i(a,z))throw new O(I,"More than one element or text in fragment");if(1===o.length&&!Y(t,r))throw new O(I,"Element in fragment can not be inserted before doctype")}if(q(e)&&!Y(t,r))throw new O(I,"Only one element can be added and only after doctype");if(j(e)){if(i(n,function(t){return j(t)&&t!==r}))throw new O(I,"Only one doctype is allowed");var s=i(n,q);if(r&&n.indexOf(s)<n.indexOf(r))throw new O(I,"Doctype can only be inserted before an element")}}function Q(t,e,r,n){!function(t,e,r){if(!(t&&(t.nodeType===k.DOCUMENT_NODE||t.nodeType===k.DOCUMENT_FRAGMENT_NODE||t.nodeType===k.ELEMENT_NODE)))throw new O(I,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new O(x,"child not in parent");if(!(e&&(q(e)||z(e)||j(e)||e.nodeType===k.DOCUMENT_FRAGMENT_NODE||e.nodeType===k.COMMENT_NODE||e.nodeType===k.PROCESSING_INSTRUCTION_NODE))||j(e)&&t.nodeType!==k.DOCUMENT_NODE)throw new O(I,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}(t,e,r),t.nodeType===k.DOCUMENT_NODE&&(n||W)(t,e,r);var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===w){var a=e.firstChild;if(null==a)return e;var o=e.lastChild}else a=o=e;var s=r?r.previousSibling:t.lastChild;a.previousSibling=s,o.nextSibling=r,s?s.nextSibling=a:t.firstChild=a,null==r?t.lastChild=o:r.previousSibling=o;do a.parentNode=t;while(a!==o&&(a=a.nextSibling));return V(t.ownerDocument||t,t),e.nodeType==w&&(e.firstChild=e.lastChild=null),e}function J(){this._nsMap={}}function tt(){}function te(){}function tr(){}function tn(){}function ti(){}function ta(){}function to(){}function ts(){}function tu(){}function tc(){}function tl(){}function tf(){}function th(t,e){var r=[],n=9==this.nodeType&&this.documentElement||this,i=n.prefix,a=n.namespaceURI;if(a&&null==i){var i=n.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return tg(this,r,t,e,o),r.join("")}function tp(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!i||"xml"===n&&i===a.XML||i===a.XMLNS)return!1;for(var o=r.length;o--;){var s=r[o];if(s.prefix===n)return s.namespace!==i}return!0}function td(t,e,r){t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,X),'"')}function tg(t,e,r,n,i){if(i||(i=[]),n){if(!(t=n(t)))return;if("string"==typeof t){e.push(t);return}}switch(t.nodeType){case h:var o,s=t.attributes,u=s.length,c=t.firstChild,l=t.tagName;r=a.isHTML(t.namespaceURI)||r;var f=l;if(!r&&!t.prefix&&t.namespaceURI){for(var y=0;y<s.length;y++)if("xmlns"===s.item(y).name){o=s.item(y).value;break}if(!o)for(var N=i.length-1;N>=0;N--){var A=i[N];if(""===A.prefix&&A.namespace===t.namespaceURI){o=A.namespace;break}}if(o!==t.namespaceURI)for(var N=i.length-1;N>=0;N--){var A=i[N];if(A.namespace===t.namespaceURI){A.prefix&&(f=A.prefix+":"+l);break}}}e.push("<",f);for(var S=0;S<u;S++){var I=s.item(S);"xmlns"==I.prefix?i.push({prefix:I.localName,namespace:I.value}):"xmlns"==I.nodeName&&i.push({prefix:"",namespace:I.value})}for(var S=0;S<u;S++){var I=s.item(S);if(tp(I,r,i)){var x=I.prefix||"",D=I.namespaceURI;td(e,x?"xmlns:"+x:"xmlns",D),i.push({prefix:x,namespace:D})}tg(I,e,r,n,i)}if(l===f&&tp(t,r,i)){var x=t.prefix||"",D=t.namespaceURI;td(e,x?"xmlns:"+x:"xmlns",D),i.push({prefix:x,namespace:D})}if(c||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(e.push(">"),r&&/^script$/i.test(l))for(;c;)c.data?e.push(c.data):tg(c,e,r,n,i.slice()),c=c.nextSibling;else for(;c;)tg(c,e,r,n,i.slice()),c=c.nextSibling;e.push("</",f,">")}else e.push("/>");return;case E:case w:for(var c=t.firstChild;c;)tg(c,e,r,n,i.slice()),c=c.nextSibling;return;case p:return td(e,t.name,t.value);case d:return e.push(t.data.replace(/[<&>]/g,X));case g:return e.push("<![CDATA[",t.data,"]]>");case v:return e.push("<!--",t.data,"-->");case T:var O=t.publicId,R=t.systemId;if(e.push("<!DOCTYPE ",t.name),O)e.push(" PUBLIC ",O),R&&"."!=R&&e.push(" ",R),e.push(">");else if(R&&"."!=R)e.push(" SYSTEM ",R,">");else{var C=t.internalSubset;C&&e.push(" [",C,"]"),e.push(">")}return;case b:return e.push("<?",t.target," ",t.data,"?>");case m:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function tm(t,e,r){t[e]=r}A.INVALID_STATE_ERR=(S[11]="Invalid state",11),A.SYNTAX_ERR=(S[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),A.NAMESPACE_ERR=(S[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(S[15]="Invalid access",15),O.prototype=Error.prototype,c(A,O),R.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var r=[],n=0;n<this.length;n++)tg(this[n],r,t,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}},C.prototype.item=function(t){return U(this),this[t]},l(C,R),L.prototype={length:0,item:R.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var r=this[e];if(r.nodeName==t)return r}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new O(D);var r=this.getNamedItem(t.nodeName);return P(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var e,r=t.ownerElement;if(r&&r!=this._ownerElement)throw new O(D);return e=this.getNamedItemNS(t.namespaceURI,t.localName),P(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return B(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);return B(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){for(var r=this.length;r--;){var n=this[r];if(n.localName==e&&n.namespaceURI==t)return n}return null}},_.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=new F;if(n.implementation=this,n.childNodes=new R,n.doctype=r||null,r&&n.appendChild(r),e){var i=n.createElementNS(t,e);n.appendChild(i)}return n},createDocumentType:function(t,e,r){var n=new ta;return n.name=t,n.nodeName=t,n.publicId=e||"",n.systemId=r||"",n}},k.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,insertBefore:function(t,e){return Q(this,t,e)},replaceChild:function(t,e){Q(this,t,e,Z),e&&this.removeChild(e)},removeChild:function(t){return $(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,r,n){var i=new r.constructor;for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a)){var o=r[a];"object"!=typeof o&&o!=i[a]&&(i[a]=o)}switch(r.childNodes&&(i.childNodes=new R),i.ownerDocument=e,i.nodeType){case h:var s=r.attributes,u=i.attributes=new L,c=s.length;u._ownerElement=i;for(var l=0;l<c;l++)i.setAttributeNode(t(e,s.item(l),!0));break;case p:n=!0}if(n)for(var f=r.firstChild;f;)i.appendChild(t(e,f,n)),f=f.nextSibling;return i}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==d&&t.nodeType==d?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===t)return n}e=e.nodeType==p?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];e=e.nodeType==p?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},c(f,k),c(f,k.prototype),F.prototype={nodeName:"#document",nodeType:E,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==w){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return Q(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===h&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),$(this,t)},replaceChild:function(t,e){Q(this,t,e,Z),t.ownerDocument=this,e&&this.removeChild(e),q(t)&&(this.documentElement=t)},importNode:function(t,e){return function t(e,r,n){var i;switch(r.nodeType){case h:(i=r.cloneNode(!1)).ownerDocument=e;case w:break;case p:n=!0}if(i||(i=r.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var a=r.firstChild;a;)i.appendChild(t(e,a,n)),a=a.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return G(this.documentElement,function(r){if(r.nodeType==h&&r.getAttribute("id")==t)return e=r,!0}),e},getElementsByClassName:function(t){var e=u(t);return new C(this,function(r){var n=[];return e.length>0&&G(r.documentElement,function(i){if(i!==r&&i.nodeType===h){var a=i.getAttribute("class");if(a){var o=t===a;if(!o){var s=u(a);o=e.every(function(t){return s&&-1!==s.indexOf(t)})}o&&n.push(i)}}}),n})},createElement:function(t){var e=new J;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new R,(e.attributes=new L)._ownerElement=e,e},createDocumentFragment:function(){var t=new tc;return t.ownerDocument=this,t.childNodes=new R,t},createTextNode:function(t){var e=new tr;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new tn;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new ti;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new tl;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new tt;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new tu;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new J,n=e.split(":"),i=r.attributes=new L;return r.childNodes=new R,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,i._ownerElement=r,r},createAttributeNS:function(t,e){var r=new tt,n=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,r}},l(F,k),J.prototype={nodeType:h,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){var e,r;return t.nodeType===w?this.insertBefore(t,null):(e=this,(r=t).parentNode&&r.parentNode.removeChild(r),r.parentNode=e,r.previousSibling=e.lastChild,r.nextSibling=null,r.previousSibling?r.previousSibling.nextSibling=r:e.firstChild=r,e.lastChild=r,V(e.ownerDocument,e,r),r)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new C(this,function(e){var r=[];return G(e,function(n){n!==e&&n.nodeType==h&&("*"===t||n.tagName==t)&&r.push(n)}),r})},getElementsByTagNameNS:function(t,e){return new C(this,function(r){var n=[];return G(r,function(i){i!==r&&i.nodeType===h&&("*"===t||i.namespaceURI===t)&&("*"===e||i.localName==e)&&n.push(i)}),n})}},F.prototype.getElementsByTagName=J.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,l(J,k),tt.prototype.nodeType=p,l(tt,k),te.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw Error(S[I])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){r=this.data.substring(0,t)+r+this.data.substring(t+e),this.nodeValue=this.data=r,this.length=r.length}},l(te,k),tr.prototype={nodeName:"#text",nodeType:d,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(tr,te),tn.prototype={nodeName:"#comment",nodeType:v},l(tn,te),ti.prototype={nodeName:"#cdata-section",nodeType:g},l(ti,te),ta.prototype.nodeType=T,l(ta,k),to.prototype.nodeType=N,l(to,k),ts.prototype.nodeType=y,l(ts,k),tu.prototype.nodeType=m,l(tu,k),tc.prototype.nodeName="#document-fragment",tc.prototype.nodeType=w,l(tc,k),tl.prototype.nodeType=b,l(tl,k),tf.prototype.serializeToString=function(t,e,r){return th.call(t,e,r)},k.prototype.toString=th;try{Object.defineProperty&&(Object.defineProperty(C.prototype,"length",{get:function(){return U(this),this.$$length}}),Object.defineProperty(k.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case h:case w:var r=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&r.push(t(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case h:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),tm=function(t,e,r){t["$$"+e]=r})}catch(t){}e.DocumentType=ta,e.DOMException=O,e.DOMImplementation=_,e.Element=J,e.Node=k,e.NodeList=R,e.XMLSerializer=tf},31045:function(t,e,r){var n=r(72167).freeze;e.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=n({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES},3969:function(t,e,r){var n=r(41146);n.DOMImplementation,n.XMLSerializer,e.DOMParser=r(86129).DOMParser},76925:function(t,e,r){var n=r(72167).NAMESPACE,i=/[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]/,a=RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function s(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function u(){}function c(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function l(t,e,r){for(var i=t.tagName,a=null,o=t.length;o--;){var s=t[o],u=s.qName,c=s.value,l=u.indexOf(":");if(l>0)var h=s.prefix=u.slice(0,l),p=u.slice(l+1),d="xmlns"===h&&p;else p=u,h=null,d="xmlns"===u&&"";s.localName=p,!1!==d&&(null==a&&(a={},f(r,r={})),r[d]=a[d]=c,s.uri=n.XMLNS,e.startPrefixMapping(d,c))}for(var o=t.length;o--;){var h=(s=t[o]).prefix;h&&("xml"===h&&(s.uri=n.XML),"xmlns"!==h&&(s.uri=r[h||""]))}var l=i.indexOf(":");l>0?(h=t.prefix=i.slice(0,l),p=t.localName=i.slice(l+1)):(h=null,p=t.localName=i);var g=t.uri=r[h||""];if(e.startElement(g,p,i,t),!t.closed)return t.currentNSMap=r,t.localNSMap=a,!0;if(e.endElement(g,p,i),a)for(h in a)Object.prototype.hasOwnProperty.call(a,h)&&e.endPrefixMapping(h)}function f(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function h(){this.attributeNames={}}s.prototype=Error(),s.prototype.name=s.name,u.prototype={parse:function(t,e,r){var i=this.domBuilder;i.startDocument(),f(e,e={}),function(t,e,r,i,a){function o(t){var e,n=t.slice(1,-1);return Object.hasOwnProperty.call(r,n)?r[n]:"#"!==n.charAt(0)?(a.error("entity not found:"+t),t):(e=parseInt(n.substr(1).replace("x","0x")))>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}function u(e){if(e>v){var r=t.substring(v,e).replace(/&#?\w+;/g,o);m&&f(v),i.characters(r,0,e-v),v=e}}function f(e,r){for(;e>=d&&(r=g.exec(t));)d=(p=r.index)+r[0].length,m.lineNumber++;m.columnNumber=e-p+1}for(var p=0,d=0,g=/.*(?:\r\n?|\n)|.*$/g,m=i.locator,y=[{currentNSMap:e}],b={},v=0;;){try{var E=t.indexOf("<",v);if(E<0){if(!t.substr(v).match(/^\s*$/)){var T=i.doc,w=T.createTextNode(t.substr(v));T.appendChild(w),i.currentElement=w}return}switch(E>v&&u(E),t.charAt(E+1)){case"/":var N=t.indexOf(">",E+3),A=t.substring(E+2,N).replace(/[ \t\n\r]+$/g,""),S=y.pop();N<0?(A=t.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+A+" is not complete:"+S.tagName),N=E+1+A.length):A.match(/\s</)&&(A=A.replace(/[\s<].*/,""),a.error("end tag name: "+A+" maybe not complete"),N=E+1+A.length);var I=S.localNSMap,x=S.tagName==A;if(x||S.tagName&&S.tagName.toLowerCase()==A.toLowerCase()){if(i.endElement(S.uri,S.localName,A),I)for(var D in I)Object.prototype.hasOwnProperty.call(I,D)&&i.endPrefixMapping(D);x||a.fatalError("end tag name: "+A+" is not match the current start tagName:"+S.tagName)}else y.push(S);N++;break;case"?":m&&f(E),N=function(t,e,r){var n=t.indexOf("?>",e);if(n){var i=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i)return i[0].length,r.processingInstruction(i[1],i[2]),n+2}return -1}(t,E,i);break;case"!":m&&f(E),N=function(t,e,r,n){if("-"===t.charAt(e+2)){if("-"===t.charAt(e+3)){var i=t.indexOf("-->",e+4);if(i>e)return r.comment(t,e+4,i-e-4),i+3;n.error("Unclosed comment")}}else{if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,i-e-9),r.endCDATA(),i+3}var a=function(t,e){var r,n=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=e,i.exec(t);r=i.exec(t);)if(n.push(r),r[1])return n}(t,e),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],u=!1,c=!1;o>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],c=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var l=a[o-1];return r.startDTD(s,u,c),r.endDTD(),l.index+l[0].length}}return -1}(t,E,i,a);break;default:m&&f(E);var O=new h,R=y[y.length-1].currentNSMap,N=function(t,e,r,i,a,o){function s(t,e,n){r.attributeNames.hasOwnProperty(t)&&o.fatalError("Attribute "+t+" redefined"),r.addValue(t,e.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),n)}for(var u,c,l=++e,f=0;;){var h=t.charAt(l);switch(h){case"=":if(1===f)u=t.slice(e,l),f=3;else if(2===f)f=3;else throw Error("attribute equal must after attrName");break;case"'":case'"':if(3===f||1===f){if(1===f&&(o.warning('attribute value must after "="'),u=t.slice(e,l)),e=l+1,(l=t.indexOf(h,e))>0)s(u,c=t.slice(e,l),e-1),f=5;else throw Error("attribute value no end '"+h+"' match")}else if(4==f)s(u,c=t.slice(e,l),e),o.warning('attribute "'+u+'" missed start quot('+h+")!!"),e=l+1,f=5;else throw Error('attribute value must after "="');break;case"/":switch(f){case 0:r.setTagName(t.slice(e,l));case 5:case 6:case 7:f=7,r.closed=!0;case 4:case 1:break;case 2:r.closed=!0;break;default:throw Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==f&&r.setTagName(t.slice(e,l)),l;case">":switch(f){case 0:r.setTagName(t.slice(e,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=t.slice(e,l)).slice(-1)&&(r.closed=!0,c=c.slice(0,-1));case 2:2===f&&(c=u),4==f?(o.warning('attribute "'+c+'" missed quot(")!'),s(u,c,e)):(n.isHTML(i[""])&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),s(c,c,e));break;case 3:throw Error("attribute value missed!!")}return l;case"\x80":h=" ";default:if(h<=" ")switch(f){case 0:r.setTagName(t.slice(e,l)),f=6;break;case 1:u=t.slice(e,l),f=2;break;case 4:var c=t.slice(e,l);o.warning('attribute "'+c+'" missed quot(")!!'),s(u,c,e);case 5:f=6}else switch(f){case 2:r.tagName,n.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),s(u,u,e),e=l,f=1;break;case 5:o.warning('attribute space is required"'+u+'"!!');case 6:f=1,e=l;break;case 3:f=4,e=l;break;case 7:throw Error("elements closed character '/' and '>' must be connected to")}}l++}}(t,E,O,R,o,a),C=O.length;if(!O.closed&&function(t,e,r,n){var i=n[r];return null==i&&((i=t.lastIndexOf("</"+r+">"))<e&&(i=t.lastIndexOf("</"+r)),n[r]=i),i<e}(t,N,O.tagName,b)&&(O.closed=!0,r.nbsp||a.warning("unclosed xml attribute")),m&&C){for(var U=c(m,{}),L=0;L<C;L++){var M=O[L];f(M.offset),M.locator=c(m,{})}i.locator=U,l(O,i,R)&&y.push(O),i.locator=m}else l(O,i,R)&&y.push(O);n.isHTML(O.uri)&&!O.closed?N=function(t,e,r,n,i){if(/^(?:script|textarea)$/i.test(r)){var a=t.indexOf("</"+r+">",e),o=t.substring(e+1,a);if(/[&<]/.test(o))return/^script$/i.test(r)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,n),i.characters(o,0,o.length),a)}return e+1}(t,N,O.tagName,o,i):N++}}catch(t){if(t instanceof s)throw t;a.error("element parse error: "+t),N=-1}N>v?v=N:u(Math.max(E,v)+1)}}(t,e,r,i,this.errorHandler),i.endDocument()}},h.prototype={setTagName:function(t){if(!o.test(t))throw Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!o.test(t))throw Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=u,e.ParseError=s},79742:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,a=u(t),o=a[0],s=a[1],c=new i((o+s)*3/4-s),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(function(t,e,n){for(var i,a=[],o=e;o<n;o+=3)a.push(r[(i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(t,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&a.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(t,e,r){"use strict";/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/var n=r(79742),i=r(80645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|d(t,e),n=o(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(O(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(O(t,ArrayBuffer)||t&&O(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(t,SharedArrayBuffer)||t&&O(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e,r=0|p(t.length),n=o(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),o(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),s.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(t).length;default:if(i)return n?-1:I(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var i,a,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a<r;++a)i+=R[t[a]];return i}(this,e,r);case"utf8":case"utf-8":return v(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=e,a=r,0===i&&a===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}(this,e,r);default:if(o)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){var a;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var a,o=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,s/=2,u/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var l=-1;for(a=r;a<s;a++)if(c(t,a)===c(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else -1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return -1}function v(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:(192&(a=t[i+1]))==128&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=t[i+1],o=t[i+2],(192&a)==128&&(192&o)==128&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function E(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,i,a){if(!s.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function w(t,e,r,n,i,a){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function N(t,e,r,n,a){return e=+e,r>>>=0,a||w(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function A(t,e,r,n,a){return e=+e,r>>>=0,a||w(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.lW=s,e.h2=50,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return(c(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},s.allocUnsafe=function(t){return l(t)},s.allocUnsafeSlow=function(t){return l(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(O(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),O(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(O(a,Uint8Array))i+a.length>n.length?s.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else if(s.isBuffer(a))a.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=a.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?v(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(O(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,o=r-e,u=Math.min(a,o),c=this.slice(n,i),l=t.slice(e,r),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],o=l[f];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,o,s,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(s!=s)break;t[r+o]=s}return o}(this,t,e,r);case"utf8":case"utf-8":return i=e,a=r,D(I(t,this.length-i),this,i,a);case"ascii":case"latin1":case"binary":return o=e,s=r,D(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,o,s);case"base64":return u=e,c=r,D(x(t),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,f=r,D(function(t,e){for(var r,n,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return(t>>>=0,e||E(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;T(this,t,e,r,i,0)}var a=1,o=0;for(this[e]=255&t;++o<r&&(a*=256);)this[e+o]=t/a&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;T(this,t,e,r,i,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return A(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return A(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,a=t.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(t=a)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),u=o.length;if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%u]}return this};var S=/[^+/0-9A-Za-z-_]/g;function I(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function x(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function O(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var R=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},89144:function(t,e,r){var n,i=void 0!==r.g?r.g:"undefined"!=typeof window?window:{},a=r(25893);"undefined"!=typeof document?n=document:(n=i["__GLOBAL_DOCUMENT_CACHE@4"])||(n=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),t.exports=n},58908:function(t,e,r){var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},t.exports=n},80645:function(t,e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+t[e+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+t[e+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:(p?-1:1)*(1/0);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?5960464477539062e-23:0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*u-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},27376:function(t){t.exports=function(t){if(!t)return!1;var r=e.call(t);return"[object Function]"===r||"function"==typeof t&&"[object RegExp]"!==r||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var e=Object.prototype.toString},27537:function(t,e){function r(t){if(t&&"object"==typeof t){var e=t.which||t.keyCode||t.charCode;e&&(t=e)}if("number"==typeof t)return o[t];var r=String(t),a=n[r.toLowerCase()];if(a)return a;var a=i[r.toLowerCase()];return a||(1===r.length?r.charCodeAt(0):void 0)}r.isEventKey=function(t,e){if(t&&"object"==typeof t){var r=t.which||t.keyCode||t.charCode;if(null==r)return!1;if("string"==typeof e){var a=n[e.toLowerCase()];if(a)return a===r;var a=i[e.toLowerCase()];if(a)return a===r}else if("number"==typeof e)return e===r;return!1}};var n=(e=t.exports=r).code=e.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},i=e.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
|
||
*/for(a=97;a<123;a++)n[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)n[a-48]=a;for(a=1;a<13;a++)n["f"+a]=a+111;for(a=0;a<10;a++)n["numpad "+a]=a+96;var o=e.names=e.title={};for(a in n)o[n[a]]=a;for(var s in i)n[s]=i[s]},42570:function(t,e,r){"use strict";r.d(e,{_b:function(){return g}});var n=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e){if(2==arguments.length)for(var r=e.length,n=0;n<r;++n)e[n].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=e.length,o=0;o<a;++o)e[o].apply(this,i)}},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),i=r(87462),a=r(58908),o=r.n(a),s=r(48764).lW;/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */class u extends n{constructor(){super(),this.buffer=""}push(t){let e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}let c=function(t){let e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},l=function(t){let e;let r={};if(!t)return r;let n=t.split(RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i=n.length;for(;i--;)""!==n[i]&&((e=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),r[e[0]]=e[1]);return r};class f extends n{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,r;if(0===(t=t.trim()).length)return;if("#"!==t[0]){this.trigger("data",{type:"uri",uri:t});return}let n=this.tagMappers.reduce((e,r)=>{let n=r(t);return n===t?e:e.concat([n])},[t]);n.forEach(t=>{for(let e=0;e<this.customParsers.length;e++)if(this.customParsers[e].call(this,t))return;if(0!==t.indexOf("#EXT")){this.trigger("data",{type:"comment",text:t.slice(1)});return}if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t)){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(e=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(t)){r={type:"tag",tagType:"inf"},e[1]&&(r.duration=parseFloat(e[1])),e[2]&&(r.title=e[2]),this.trigger("data",r);return}if(e=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(t)){r={type:"tag",tagType:"targetduration"},e[1]&&(r.duration=parseInt(e[1],10)),this.trigger("data",r);return}if(e=/^#EXT-X-VERSION:([0-9.]*)?/.exec(t)){r={type:"tag",tagType:"version"},e[1]&&(r.version=parseInt(e[1],10)),this.trigger("data",r);return}if(e=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(t)){r={type:"tag",tagType:"media-sequence"},e[1]&&(r.number=parseInt(e[1],10)),this.trigger("data",r);return}if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(t)){r={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(r.number=parseInt(e[1],10)),this.trigger("data",r);return}if(e=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(t)){r={type:"tag",tagType:"playlist-type"},e[1]&&(r.playlistType=e[1]),this.trigger("data",r);return}if(e=/^#EXT-X-BYTERANGE:(.*)?$/.exec(t)){r=(0,i.Z)(c(e[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(e=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(t)){r={type:"tag",tagType:"allow-cache"},e[1]&&(r.allowed=!/NO/.test(e[1])),this.trigger("data",r);return}if(e=/^#EXT-X-MAP:(.*)$/.exec(t)){if(r={type:"tag",tagType:"map"},e[1]){let t=l(e[1]);t.URI&&(r.uri=t.URI),t.BYTERANGE&&(r.byterange=c(t.BYTERANGE))}this.trigger("data",r);return}if(e=/^#EXT-X-STREAM-INF:(.*)$/.exec(t)){if(r={type:"tag",tagType:"stream-inf"},e[1]){if(r.attributes=l(e[1]),r.attributes.RESOLUTION){let t=r.attributes.RESOLUTION.split("x"),e={};t[0]&&(e.width=parseInt(t[0],10)),t[1]&&(e.height=parseInt(t[1],10)),r.attributes.RESOLUTION=e}r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),r.attributes["PROGRAM-ID"]&&(r.attributes["PROGRAM-ID"]=parseInt(r.attributes["PROGRAM-ID"],10))}this.trigger("data",r);return}if(e=/^#EXT-X-MEDIA:(.*)$/.exec(t)){r={type:"tag",tagType:"media"},e[1]&&(r.attributes=l(e[1])),this.trigger("data",r);return}if(e=/^#EXT-X-ENDLIST/.exec(t)){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(e=/^#EXT-X-DISCONTINUITY/.exec(t)){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(e=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(t)){r={type:"tag",tagType:"program-date-time"},e[1]&&(r.dateTimeString=e[1],r.dateTimeObject=new Date(e[1])),this.trigger("data",r);return}if(e=/^#EXT-X-KEY:(.*)$/.exec(t)){r={type:"tag",tagType:"key"},e[1]&&(r.attributes=l(e[1]),r.attributes.IV&&("0x"===r.attributes.IV.substring(0,2).toLowerCase()&&(r.attributes.IV=r.attributes.IV.substring(2)),r.attributes.IV=r.attributes.IV.match(/.{8}/g),r.attributes.IV[0]=parseInt(r.attributes.IV[0],16),r.attributes.IV[1]=parseInt(r.attributes.IV[1],16),r.attributes.IV[2]=parseInt(r.attributes.IV[2],16),r.attributes.IV[3]=parseInt(r.attributes.IV[3],16),r.attributes.IV=new Uint32Array(r.attributes.IV))),this.trigger("data",r);return}if(e=/^#EXT-X-START:(.*)$/.exec(t)){r={type:"tag",tagType:"start"},e[1]&&(r.attributes=l(e[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),this.trigger("data",r);return}if(e=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(t)){r={type:"tag",tagType:"cue-out-cont"},e[1]?r.data=e[1]:r.data="",this.trigger("data",r);return}if(e=/^#EXT-X-CUE-OUT:(.*)?$/.exec(t)){r={type:"tag",tagType:"cue-out"},e[1]?r.data=e[1]:r.data="",this.trigger("data",r);return}if(e=/^#EXT-X-CUE-IN:(.*)?$/.exec(t)){r={type:"tag",tagType:"cue-in"},e[1]?r.data=e[1]:r.data="",this.trigger("data",r);return}if((e=/^#EXT-X-SKIP:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"skip"}).attributes=l(e[1]),r.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(r.attributes["SKIPPED-SEGMENTS"]=parseInt(r.attributes["SKIPPED-SEGMENTS"],10)),r.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(r.attributes["RECENTLY-REMOVED-DATERANGES"]=r.attributes["RECENTLY-REMOVED-DATERANGES"].split(" ")),this.trigger("data",r);return}if((e=/^#EXT-X-PART:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"part"}).attributes=l(e[1]),["DURATION"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["INDEPENDENT","GAP"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/.test(r.attributes[t]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=c(r.attributes.BYTERANGE)),this.trigger("data",r);return}if((e=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"server-control"}).attributes=l(e[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/.test(r.attributes[t]))}),this.trigger("data",r);return}if((e=/^#EXT-X-PART-INF:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"part-inf"}).attributes=l(e[1]),["PART-TARGET"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),this.trigger("data",r);return}if((e=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"preload-hint"}).attributes=l(e[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseInt(r.attributes[t],10),r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange["BYTERANGE-LENGTH"===t?"length":"offset"]=r.attributes[t],delete r.attributes[t])}),this.trigger("data",r);return}if((e=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"rendition-report"}).attributes=l(e[1]),["LAST-MSN","LAST-PART"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseInt(r.attributes[t],10))}),this.trigger("data",r);return}if((e=/^#EXT-X-DATERANGE:(.*)$/.exec(t))&&e[1]){(r={type:"tag",tagType:"daterange"}).attributes=l(e[1]),["ID","CLASS"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=String(r.attributes[t]))}),["START-DATE","END-DATE"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=new Date(r.attributes[t]))}),["DURATION","PLANNED-DURATION"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=parseFloat(r.attributes[t]))}),["END-ON-NEXT"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=/YES/i.test(r.attributes[t]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(t){r.attributes.hasOwnProperty(t)&&(r.attributes[t]=r.attributes[t].toString(16))});let t=/^X-([A-Z]+-)+[A-Z]+$/;for(let e in r.attributes){if(!t.test(e))continue;let n=/[0-9A-Fa-f]{6}/g.test(r.attributes[e]),i=/^\d+(\.\d+)?$/.test(r.attributes[e]);r.attributes[e]=n?r.attributes[e].toString(16):i?parseFloat(r.attributes[e]):String(r.attributes[e])}this.trigger("data",r);return}if(e=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(t)){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}this.trigger("data",{type:"tag",data:t.slice(4)})})}addParser({expression:t,customType:e,dataParser:r,segment:n}){"function"!=typeof r&&(r=t=>t),this.customParsers.push(i=>{let a=t.exec(i);if(a)return this.trigger("data",{type:"custom",data:r(i),customType:e,segment:n}),!0})}addTagMapper({expression:t,map:e}){let r=r=>t.test(r)?e(r):r;this.tagMappers.push(r)}}let h=t=>t.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),p=function(t){let e={};return Object.keys(t).forEach(function(r){e[h(r)]=t[r]}),e},d=function(t){let{serverControl:e,targetDuration:r,partTargetDuration:n}=t;if(!e)return;let i="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",s=r&&3*r,u=n&&2*n;r&&!e.hasOwnProperty(a)&&(e[a]=s,this.trigger("info",{message:`${i} defaulting HOLD-BACK to targetDuration * 3 (${s}).`})),s&&e[a]<s&&(this.trigger("warn",{message:`${i} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${s})`}),e[a]=s),n&&!e.hasOwnProperty(o)&&(e[o]=3*n,this.trigger("info",{message:`${i} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),n&&e[o]<u&&(this.trigger("warn",{message:`${i} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${u}).`}),e[o]=u)};class g extends n{constructor(){let t,e;super(),this.lineStream=new u,this.parseStream=new f,this.lineStream.pipe(this.parseStream);let r=this,n=[],a={},c=!1,l=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},g=0;this.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};let m=0,y=0,b={};this.on("end",()=>{!a.uri&&(a.parts||a.preloadHints)&&(!a.map&&t&&(a.map=t),!a.key&&e&&(a.key=e),a.timeline||"number"!=typeof g||(a.timeline=g),this.manifest.preloadSegment=a)}),this.parseStream.on("data",function(u){let f,v;({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(){let t={};"length"in u&&(a.byterange=t,t.length=u.length,"offset"in u||(u.offset=m)),"offset"in u&&(a.byterange=t,t.offset=u.offset),m=t.offset+t.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&&(a.duration=u.duration),0===u.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!u.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if("NONE"===u.attributes.METHOD){e=null;return}if(!u.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if("com.apple.streamingkeydelivery"===u.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:u.attributes};return}if("com.microsoft.playready"===u.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:u.attributes.URI};return}if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===u.attributes.KEYFORMAT){if(-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(u.attributes.METHOD)){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if("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)){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(u.attributes.KEYID&&"0x"===u.attributes.KEYID.substring(0,2))){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:u.attributes.KEYFORMAT,keyId:u.attributes.KEYID.substring(2)},pssh:function(t){for(var e=o().atob?o().atob(t):s.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}(u.attributes.URI.split(",")[1])};return}u.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),e={method:u.attributes.METHOD||"AES-128",uri:u.attributes.URI},void 0!==u.attributes.IV&&(e.iv=u.attributes.IV)},"media-sequence"(){if(!isFinite(u.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+u.number});return}this.manifest.mediaSequence=u.number},"discontinuity-sequence"(){if(!isFinite(u.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+u.number});return}this.manifest.discontinuitySequence=u.number,g=u.number},"playlist-type"(){if(!/VOD|EVENT/.test(u.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+u.playlist});return}this.manifest.playlistType=u.playlistType},map(){t={},u.uri&&(t.uri=u.uri),u.byterange&&(t.byterange=u.byterange),e&&(t.key=e)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!u.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}a.attributes||(a.attributes={}),(0,i.Z)(a.attributes,u.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(u.attributes&&u.attributes.TYPE&&u.attributes["GROUP-ID"]&&u.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let t=this.manifest.mediaGroups[u.attributes.TYPE];t[u.attributes["GROUP-ID"]]=t[u.attributes["GROUP-ID"]]||{},f=t[u.attributes["GROUP-ID"]],(v={default:/yes/i.test(u.attributes.DEFAULT)}).default?v.autoselect=!0:v.autoselect=/yes/i.test(u.attributes.AUTOSELECT),u.attributes.LANGUAGE&&(v.language=u.attributes.LANGUAGE),u.attributes.URI&&(v.uri=u.attributes.URI),u.attributes["INSTREAM-ID"]&&(v.instreamId=u.attributes["INSTREAM-ID"]),u.attributes.CHARACTERISTICS&&(v.characteristics=u.attributes.CHARACTERISTICS),u.attributes.FORCED&&(v.forced=/yes/i.test(u.attributes.FORCED)),f[u.attributes.NAME]=v},discontinuity(){g+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=u.dateTimeString,this.manifest.dateTimeObject=u.dateTimeObject),a.dateTimeString=u.dateTimeString,a.dateTimeObject=u.dateTimeObject},targetduration(){if(!isFinite(u.duration)||u.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+u.duration});return}this.manifest.targetDuration=u.duration,d.call(this,this.manifest)},start(){if(!u.attributes||isNaN(u.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:u.attributes["TIME-OFFSET"],precise:u.attributes.PRECISE}},"cue-out"(){a.cueOut=u.data},"cue-out-cont"(){a.cueOutCont=u.data},"cue-in"(){a.cueIn=u.data},skip(){this.manifest.skip=p(u.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",u.attributes,["SKIPPED-SEGMENTS"])},part(){c=!0;let t=this.manifest.segments.length,e=p(u.attributes);a.parts=a.parts||[],a.parts.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=y),y=e.byterange.offset+e.byterange.length);let r=a.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${r} for segment #${t}`,u.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((t,e)=>{t.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${e} lacks required attribute(s): LAST-PART`})})},"server-control"(){let t=this.manifest.serverControl=p(u.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),d.call(this,this.manifest),t.canSkipDateranges&&!t.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"(){let t=this.manifest.segments.length,e=p(u.attributes),r=e.type&&"PART"===e.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(e),e.byterange&&!e.byterange.hasOwnProperty("offset")&&(e.byterange.offset=r?y:0,r&&(y=e.byterange.offset+e.byterange.length));let n=a.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,u.attributes,["TYPE","URI"]),e.type)for(let r=0;r<a.preloadHints.length-1;r++){let i=a.preloadHints[r];i.type&&i.type===e.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${n} for segment #${t} has the same TYPE ${e.type} as preload hint #${r}`})}},"rendition-report"(){let t=p(u.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);let e=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];c&&r.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${e}`,u.attributes,r)},"part-inf"(){this.manifest.partInf=p(u.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",u.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),d.call(this,this.manifest)},daterange(){this.manifest.daterange=this.manifest.daterange||[],this.manifest.daterange.push(p(u.attributes));let t=this.manifest.daterange.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,u.attributes,["ID","START-DATE"]);let e=this.manifest.daterange[t];e.endDate&&e.startDate&&new Date(e.endDate)<new Date(e.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),e.duration&&e.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),e.plannedDuration&&e.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});let r=!!e.endOnNext;if(r&&!e.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),r&&(e.duration||e.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),e.duration&&e.endDate){let r=e.startDate,n=r.setSeconds(r.getSeconds()+e.duration);this.manifest.daterange[t].endDate=new Date(n)}if(e&&!this.manifest.dateTimeString&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),b[e.id]){for(let t in b[e.id])if(b[e.id][t]!==e[t]){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}}else b[e.id]=e},"independent-segments"(){this.manifest.independentSegments=!0}})[u.tagType]||l).call(r)},uri(){a.uri=u.uri,n.push(a),!this.manifest.targetDuration||"duration"in a||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),e&&(a.key=e),a.timeline=g,t&&(a.map=t),y=0,a={}},comment(){},custom(){u.segment?(a.custom=a.custom||{},a.custom[u.customType]=u.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[u.customType]=u.data)}})[u.type].call(r)})}warnOnMissingAttributes_(t,e,r){let n=[];r.forEach(function(t){e.hasOwnProperty(t)||n.push(t)}),n.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${n.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push("\n"),this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}},6728:function(t,e,r){"use strict";r.d(e,{jp:function(){return D},mm:function(){return _},Qc:function(){return tR},LG:function(){return tC}});var n=r(49945),i=r.n(n),a=r(58908),o=r.n(a),s="http://example.com",u=function(t,e){if(/^[a-z]+:/i.test(e))return e;/^data:/.test(t)&&(t=o().location&&o().location.href||"");var r="function"==typeof o().URL,n=/^\/\//.test(t),a=!o().location&&!/\/\//i.test(t);if(r?t=new(o()).URL(t,o().location||s):/\/\//i.test(t)||(t=i().buildAbsoluteURL(o().location&&o().location.href||"",t)),r){var u=new URL(e,t);return a?u.href.slice(s.length):n?u.href.slice(u.protocol.length):u.href}return i().buildAbsoluteURL(t,e)},c=function(t,e,r){e.forEach(function(e){for(var n in t.mediaGroups[e])for(var i in t.mediaGroups[e][n])r(t.mediaGroups[e][n][i],e,n,i)})},l=r(48764).lW,f=r(3969);let h=t=>!!t&&"object"==typeof t,p=(...t)=>t.reduce((t,e)=>("object"!=typeof e||Object.keys(e).forEach(r=>{Array.isArray(t[r])&&Array.isArray(e[r])?t[r]=t[r].concat(e[r]):h(t[r])&&h(e[r])?t[r]=p(t[r],e[r]):t[r]=e[r]}),t),{}),d=t=>Object.keys(t).map(e=>t[e]),g=(t,e)=>{let r=[];for(let n=t;n<e;n++)r.push(n);return r},m=t=>t.reduce((t,e)=>t.concat(e),[]),y=t=>{if(!t.length)return[];let e=[];for(let r=0;r<t.length;r++)e.push(t[r]);return e},b=(t,e)=>t.reduce((t,r,n)=>(r[e]&&t.push(n),t),[]),v=(t,e)=>d(t.reduce((t,r)=>(r.forEach(r=>{t[e(r)]=r}),t),{}));var E={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",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"};let T=({baseUrl:t="",source:e="",range:r="",indexRange:n=""})=>{let i={uri:e,resolvedUri:u(t||"",e)};if(r||n){let t;let e=(r||n).split("-"),a=o().BigInt?o().BigInt(e[0]):parseInt(e[0],10),s=o().BigInt?o().BigInt(e[1]):parseInt(e[1],10);a<Number.MAX_SAFE_INTEGER&&"bigint"==typeof a&&(a=Number(a)),s<Number.MAX_SAFE_INTEGER&&"bigint"==typeof s&&(s=Number(s)),"bigint"==typeof(t="bigint"==typeof s||"bigint"==typeof a?o().BigInt(s)-o().BigInt(a)+o().BigInt(1):s-a+1)&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),i.byterange={length:t,offset:a}}return i},w=t=>`${t.offset}-${"bigint"==typeof t.offset||"bigint"==typeof t.length?o().BigInt(t.offset)+o().BigInt(t.length)-o().BigInt(1):t.offset+t.length-1}`,N=t=>(t&&"number"!=typeof t&&(t=parseInt(t,10)),isNaN(t))?null:t,A={static(t){let{duration:e,timescale:r=1,sourceDuration:n,periodDuration:i}=t,a=N(t.endNumber),o=e/r;return"number"==typeof a?{start:0,end:a}:"number"==typeof i?{start:0,end:i/o}:{start:0,end:n/o}},dynamic(t){let{NOW:e,clientOffset:r,availabilityStartTime:n,timescale:i=1,duration:a,periodStart:o=0,minimumUpdatePeriod:s=0,timeShiftBufferDepth:u=1/0}=t,c=N(t.endNumber),l=(e+r)/1e3,f=n+o;return{start:Math.max(0,Math.floor((l-f-u)*i/a)),end:"number"==typeof c?c:Math.min(Math.ceil((l+s-f)*i/a),Math.floor((l-f)*i/a))}}},S=t=>e=>{let{duration:r,timescale:n=1,periodStart:i,startNumber:a=1}=t;return{number:a+e,duration:r/n,timeline:i,time:e*r}},I=t=>{let{type:e,duration:r,timescale:n=1,periodDuration:i,sourceDuration:a}=t,{start:o,end:s}=A[e](t),u=g(o,s).map(S(t));if("static"===e){let t=u.length-1;u[t].duration=("number"==typeof i?i:a)-r/n*t}return u},x=t=>{let{baseUrl:e,initialization:r={},sourceDuration:n,indexRange:i="",periodStart:a,presentationTime:o,number:s=0,duration:u}=t;if(!e)throw Error(E.NO_BASE_URL);let c=T({baseUrl:e,source:r.sourceURL,range:r.range}),l=T({baseUrl:e,source:e,indexRange:i});if(l.map=c,u){let e=I(t);e.length&&(l.duration=e[0].duration,l.timeline=e[0].timeline)}else n&&(l.duration=n,l.timeline=a);return l.presentationTime=o||a,l.number=s,[l]},D=(t,e,r)=>{let n;let i=t.sidx.map?t.sidx.map:null,a=t.sidx.duration,s=t.timeline||0,u=t.sidx.byterange,c=u.offset+u.length,l=e.timescale,f=e.references.filter(t=>1!==t.referenceType),h=[],p=t.endList?"static":"dynamic",d=t.sidx.timeline,g=d,m=t.mediaSequence||0;n="bigint"==typeof e.firstOffset?o().BigInt(c)+e.firstOffset:c+e.firstOffset;for(let t=0;t<f.length;t++){let u;let c=e.references[t],f=c.referencedSize,y=c.subsegmentDuration;u="bigint"==typeof n?n+o().BigInt(f)-o().BigInt(1):n+f-1;let b=`${n}-${u}`,v={baseUrl:r,timescale:l,timeline:s,periodStart:d,presentationTime:g,number:m,duration:y,sourceDuration:a,indexRange:b,type:p},E=x(v)[0];i&&(E.map=i),h.push(E),"bigint"==typeof n?n+=o().BigInt(f):n+=f,g+=y/l,m++}return t.segments=h,t},O=["AUDIO","SUBTITLES"],R=1/60,C=t=>v(t,({timeline:t})=>t).sort((t,e)=>t.timeline>e.timeline?1:-1),U=(t,e)=>{for(let r=0;r<t.length;r++)if(t[r].attributes.NAME===e)return t[r];return null},L=t=>{let e=[];return c(t,O,(t,r,n,i)=>{e=e.concat(t.playlists||[])}),e},M=({playlist:t,mediaSequence:e})=>{t.mediaSequence=e,t.segments.forEach((e,r)=>{e.number=t.mediaSequence+r})},P=({oldPlaylists:t,newPlaylists:e,timelineStarts:r})=>{e.forEach(e=>{e.discontinuitySequence=r.findIndex(function({timeline:t}){return t===e.timeline});let n=U(t,e.attributes.NAME);if(!n||e.sidx)return;let i=e.segments[0],a=n.segments.findIndex(function(t){return Math.abs(t.presentationTime-i.presentationTime)<R});if(-1===a){M({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),(!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--;return}let o=n.segments[a];o.discontinuity&&!i.discontinuity&&(i.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),M({playlist:e,mediaSequence:n.segments[a].number})})},B=({oldManifest:t,newManifest:e})=>{let r=t.playlists.concat(L(t)),n=e.playlists.concat(L(e));return e.timelineStarts=C([t.timelineStarts,e.timelineStarts]),P({oldPlaylists:r,newPlaylists:n,timelineStarts:e.timelineStarts}),e},_=t=>t&&t.uri+"-"+w(t.byterange),k=t=>{let e=d(t.reduce((t,e)=>{let r=e.attributes.id+(e.attributes.lang||"");return t[r]?(e.segments&&(e.segments[0]&&(e.segments[0].discontinuity=!0),t[r].segments.push(...e.segments)),e.attributes.contentProtection&&(t[r].attributes.contentProtection=e.attributes.contentProtection)):(t[r]=e,t[r].attributes.timelineStarts=[]),t[r].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),t},{}));return e.map(t=>(t.discontinuityStarts=b(t.segments||[],"discontinuity"),t))},X=(t,e)=>{let r=_(t.sidx),n=r&&e[r]&&e[r].sidx;return n&&D(t,n,t.sidx.resolvedUri),t},G=(t,e={})=>{if(!Object.keys(e).length)return t;for(let r in t)t[r]=X(t[r],e);return t},F=({attributes:t,segments:e,sidx:r,mediaSequence:n,discontinuitySequence:i,discontinuityStarts:a},o)=>{let s={attributes:{NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:"",targetDuration:t.duration,discontinuitySequence:i,discontinuityStarts:a,timelineStarts:t.timelineStarts,mediaSequence:n,segments:e};return t.contentProtection&&(s.contentProtection=t.contentProtection),r&&(s.sidx=r),o&&(s.attributes.AUDIO="audio",s.attributes.SUBTITLES="subs"),s},H=({attributes:t,segments:e,mediaSequence:r,discontinuityStarts:n,discontinuitySequence:i})=>{void 0===e&&(e=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);let a={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};return t.codecs&&(a.CODECS=t.codecs),{attributes:a,uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:n,discontinuitySequence:i,mediaSequence:r,segments:e}},V=(t,e={},r=!1)=>{let n;let i=t.reduce((t,i)=>{let a=i.attributes.role&&i.attributes.role.value||"",o=i.attributes.lang||"",s=i.attributes.label||"main";if(o&&!i.attributes.label){let t=a?` (${a})`:"";s=`${i.attributes.lang}${t}`}t[s]||(t[s]={language:o,autoselect:!0,default:"main"===a,playlists:[],uri:""});let u=X(F(i,r),e);return t[s].playlists.push(u),void 0===n&&"main"===a&&((n=i).default=!0),t},{});if(!n){let t=Object.keys(i)[0];i[t].default=!0}return i},$=(t,e={})=>t.reduce((t,r)=>{let n=r.attributes.label||r.attributes.lang||"text";return t[n]||(t[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),t[n].playlists.push(X(H(r),e)),t},{}),j=t=>t.reduce((t,e)=>(e&&e.forEach(e=>{let{channel:r,language:n}=e;t[n]={autoselect:!1,default:!1,instreamId:r,language:n},e.hasOwnProperty("aspectRatio")&&(t[n].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(t[n].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(t[n]["3D"]=e["3D"])}),t),{}),q=({attributes:t,segments:e,sidx:r,discontinuityStarts:n})=>{let i={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===t.type,timeline:t.periodStart,resolvedUri:"",targetDuration:t.duration,discontinuityStarts:n,timelineStarts:t.timelineStarts,segments:e};return t.frameRate&&(i.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(i.contentProtection=t.contentProtection),r&&(i.sidx=r),i},z=({attributes:t})=>"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType,K=({attributes:t})=>"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType,Y=({attributes:t})=>"text/vtt"===t.mimeType||"text"===t.contentType,W=(t,e)=>{t.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:e}){return e===t.timeline}),t.segments&&t.segments.forEach((t,e)=>{t.number=e})})},Z=t=>t?Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(n.playlists)},[]):[],Q=({dashPlaylists:t,locations:e,sidxMapping:r={},previousManifest:n,eventStream:i})=>{if(!t.length)return{};let{sourceDuration:a,type:o,suggestedPresentationDelay:s,minimumUpdatePeriod:u}=t[0].attributes,c=k(t.filter(z)).map(q),l=k(t.filter(K)),f=k(t.filter(Y)),h=t.map(t=>t.attributes.captionServices).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:G(c,r)};u>=0&&(p.minimumUpdatePeriod=1e3*u),e&&(p.locations=e),"dynamic"===o&&(p.suggestedPresentationDelay=s),i&&i.length>0&&(p.eventStream=i);let d=0===p.playlists.length,g=l.length?V(l,r,d):null,m=f.length?$(f,r):null,y=c.concat(Z(g),Z(m)),b=y.map(({timelineStarts:t})=>t);return(p.timelineStarts=C(b),W(y,p.timelineStarts),g&&(p.mediaGroups.AUDIO.audio=g),m&&(p.mediaGroups.SUBTITLES.subs=m),h.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=j(h)),n)?B({oldManifest:n,newManifest:p}):p},J=(t,e,r)=>{let{NOW:n,clientOffset:i,availabilityStartTime:a,timescale:o=1,periodStart:s=0,minimumUpdatePeriod:u=0}=t;return Math.ceil((((n+i)/1e3+u-(a+s))*o-e)/r)},tt=(t,e)=>{let{type:r,minimumUpdatePeriod:n=0,media:i="",sourceDuration:a,timescale:o=1,startNumber:s=1,periodStart:u}=t,c=[],l=-1;for(let f=0;f<e.length;f++){let h;let p=e[f],d=p.d,g=p.r||0,m=p.t||0;if(l<0&&(l=m),m&&m>l&&(l=m),g<0){let s=f+1;h=s===e.length?"dynamic"===r&&n>0&&i.indexOf("$Number$")>0?J(t,l,d):(a*o-l)/d:(e[s].t-l)/d}else h=g+1;let y=s+c.length+h,b=s+c.length;for(;b<y;)c.push({number:b,duration:d/o,time:l,timeline:u}),l+=d,b++}return c},te=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,tr=t=>(e,r,n,i)=>{if("$$"===e)return"$";if(void 0===t[r])return e;let a=""+t[r];return"RepresentationID"===r?a:(i=n?parseInt(i,10):1,a.length>=i)?a:`${Array(i-a.length+1).join("0")}${a}`},tn=(t,e)=>t.replace(te,tr(e)),ti=(t,e)=>t.duration||e?t.duration?I(t):tt(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}],ta=(t,e)=>{let r={RepresentationID:t.id,Bandwidth:t.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=t,i=T({baseUrl:t.baseUrl,source:tn(n.sourceURL,r),range:n.range}),a=ti(t,e);return a.map(e=>{r.Number=e.number,r.Time=e.time;let n=tn(t.media||"",r),a=t.timescale||1,o=t.presentationTimeOffset||0,s=t.periodStart+(e.time-o)/a,c={uri:n,timeline:e.timeline,duration:e.duration,resolvedUri:u(t.baseUrl||"",n),map:i,number:e.number,presentationTime:s};return c})},to=(t,e)=>{let{baseUrl:r,initialization:n={}}=t,i=T({baseUrl:r,source:n.sourceURL,range:n.range}),a=T({baseUrl:r,source:e.media,range:e.mediaRange});return a.map=i,a},ts=(t,e)=>{let r;let{duration:n,segmentUrls:i=[],periodStart:a}=t;if(!n&&!e||n&&e)throw Error(E.SEGMENT_TIME_UNSPECIFIED);let o=i.map(e=>to(t,e));n&&(r=I(t)),e&&(r=tt(t,e));let s=r.map((e,r)=>{if(o[r]){let n=o[r],i=t.timescale||1,s=t.presentationTimeOffset||0;return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n.presentationTime=a+(e.time-s)/i,n}}).filter(t=>t);return s},tu=({attributes:t,segmentInfo:e})=>{let r,n;e.template?(n=ta,r=p(t,e.template)):e.base?(n=x,r=p(t,e.base)):e.list&&(n=ts,r=p(t,e.list));let i={attributes:t};if(!n)return i;let a=n(r,e.segmentTimeline);if(r.duration){let{duration:t,timescale:e=1}=r;r.duration=t/e}else a.length?r.duration=a.reduce((t,e)=>Math.max(t,Math.ceil(e.duration)),0):r.duration=0;return i.attributes=r,i.segments=a,e.base&&r.indexRange&&(i.sidx=a[0],i.segments=[]),i},tc=t=>t.map(tu),tl=(t,e)=>y(t.childNodes).filter(({tagName:t})=>t===e),tf=t=>t.textContent.trim(),th=t=>parseFloat(t.split("/").reduce((t,e)=>t/e)),tp=t=>{let e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;let[r,n,i,a,o,s]=e.slice(1);return 31536e3*parseFloat(r||0)+2592e3*parseFloat(n||0)+86400*parseFloat(i||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(s||0)},td=t=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)),tg={mediaPresentationDuration:t=>tp(t),availabilityStartTime:t=>td(t)/1e3,minimumUpdatePeriod:t=>tp(t),suggestedPresentationDelay:t=>tp(t),type:t=>t,timeShiftBufferDepth:t=>tp(t),start:t=>tp(t),width:t=>parseInt(t,10),height:t=>parseInt(t,10),bandwidth:t=>parseInt(t,10),frameRate:t=>th(t),startNumber:t=>parseInt(t,10),timescale:t=>parseInt(t,10),presentationTimeOffset:t=>parseInt(t,10),duration(t){let e=parseInt(t,10);return isNaN(e)?tp(t):e},d:t=>parseInt(t,10),t:t=>parseInt(t,10),r:t=>parseInt(t,10),presentationTime:t=>parseInt(t,10),DEFAULT:t=>t},tm=t=>t&&t.attributes?y(t.attributes).reduce((t,e)=>{let r=tg[e.name]||tg.DEFAULT;return t[e.name]=r(e.value),t},{}):{},ty={"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"},tb=(t,e)=>e.length?m(t.map(function(t){return e.map(function(e){return u(t,tf(e))})})):t,tv=t=>{let e=tl(t,"SegmentTemplate")[0],r=tl(t,"SegmentList")[0],n=r&&tl(r,"SegmentURL").map(t=>p({tag:"SegmentURL"},tm(t))),i=tl(t,"SegmentBase")[0],a=r||e,o=a&&tl(a,"SegmentTimeline")[0],s=r||i||e,u=s&&tl(s,"Initialization")[0],c=e&&tm(e);c&&u?c.initialization=u&&tm(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});let l={template:c,segmentTimeline:o&&tl(o,"S").map(t=>tm(t)),list:r&&p(tm(r),{segmentUrls:n,initialization:tm(u)}),base:i&&p(tm(i),{initialization:tm(u)})};return Object.keys(l).forEach(t=>{l[t]||delete l[t]}),l},tE=(t,e,r)=>n=>{let i=tl(n,"BaseURL"),a=tb(e,i),o=p(t,tm(n)),s=tv(n);return a.map(t=>({segmentInfo:p(r,s),attributes:p(o,{baseUrl:t})}))},tT=t=>t.reduce((t,e)=>{let r=tm(e);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());let n=ty[r.schemeIdUri];if(n){t[n]={attributes:r};let i=tl(e,"cenc:pssh")[0];if(i){let e=tf(i);t[n].pssh=e&&function(t){for(var e=o().atob?o().atob(t):l.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}(e)}}return t},{}),tw=t=>{if("urn:scte:dash:cc:cea-608:2015"===t.schemeIdUri){let e="string"!=typeof t.value?[]:t.value.split(";");return e.map(t=>{let e,r;return r=t,/^CC\d=/.test(t)?[e,r]=t.split("="):/^CC\d$/.test(t)&&(e=t),{channel:e,language:r}})}if("urn:scte:dash:cc:cea-708:2015"===t.schemeIdUri){let e="string"!=typeof t.value?[]:t.value.split(";");return e.map(t=>{let e={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){let[r,n=""]=t.split("=");e.channel=r,e.language=t,n.split(",").forEach(t=>{let[r,n]=t.split(":");"lang"===r?e.language=n:"er"===r?e.easyReader=Number(n):"war"===r?e.aspectRatio=Number(n):"3D"===r&&(e["3D"]=Number(n))})}else e.language=t;return e.channel&&(e.channel="SERVICE"+e.channel),e})}},tN=t=>m(tl(t.node,"EventStream").map(e=>{let r=tm(e),n=r.schemeIdUri;return tl(e,"Event").map(e=>{let i=tm(e),a=i.presentationTime||0,o=r.timescale||1,s=i.duration||0,u=a/o+t.attributes.start;return{schemeIdUri:n,value:r.value,id:i.id,start:u,end:u+s/o,messageData:tf(e)||i.messageData,contentEncoding:r.contentEncoding,presentationTimeOffset:r.presentationTimeOffset||0}})})),tA=(t,e,r)=>n=>{let i=tm(n),a=tb(e,tl(n,"BaseURL")),o=tl(n,"Role")[0],s={role:tm(o)},u=p(t,i,s),c=tl(n,"Accessibility")[0],l=tw(tm(c));l&&(u=p(u,{captionServices:l}));let f=tl(n,"Label")[0];if(f&&f.childNodes.length){let t=f.childNodes[0].nodeValue.trim();u=p(u,{label:t})}let h=tT(tl(n,"ContentProtection"));Object.keys(h).length&&(u=p(u,{contentProtection:h}));let d=tv(n),g=tl(n,"Representation"),y=p(r,d);return m(g.map(tE(u,a,y)))},tS=(t,e)=>(r,n)=>{let i=tb(e,tl(r.node,"BaseURL")),a=p(t,{periodStart:r.attributes.start});"number"==typeof r.attributes.duration&&(a.periodDuration=r.attributes.duration);let o=tl(r.node,"AdaptationSet"),s=tv(r.node);return m(o.map(tA(a,i,s)))},tI=({attributes:t,priorPeriodAttributes:e,mpdType:r})=>"number"==typeof t.start?t.start:e&&"number"==typeof e.start&&"number"==typeof e.duration?e.start+e.duration:e||"static"!==r?null:0,tx=(t,e={})=>{let{manifestUri:r="",NOW:n=Date.now(),clientOffset:i=0}=e,a=tl(t,"Period");if(!a.length)throw Error(E.INVALID_NUMBER_OF_PERIOD);let o=tl(t,"Location"),s=tm(t),u=tb([r],tl(t,"BaseURL"));s.type=s.type||"static",s.sourceDuration=s.mediaPresentationDuration||0,s.NOW=n,s.clientOffset=i,o.length&&(s.locations=o.map(tf));let c=[];return a.forEach((t,e)=>{let r=tm(t),n=c[e-1];r.start=tI({attributes:r,priorPeriodAttributes:n?n.attributes:null,mpdType:s.type}),c.push({node:t,attributes:r})}),{locations:s.locations,representationInfo:m(c.map(tS(s,u))),eventStream:m(c.map(tN))}},tD=t=>{let e,r;if(""===t)throw Error(E.DASH_EMPTY_MANIFEST);let n=new f.DOMParser;try{r=(e=n.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw Error(E.DASH_INVALID_XML);return r},tO=t=>{let e=tl(t,"UTCTiming")[0];if(!e)return null;let r=tm(e);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.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":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT",r.value=Date.parse(r.value);break;default:throw Error(E.UNSUPPORTED_UTC_TIMING_SCHEME)}return r},tR=(t,e={})=>{let r=tx(tD(t),e),n=tc(r.representationInfo);return Q({dashPlaylists:n,locations:r.locations,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:r.eventStream})},tC=t=>tO(tD(t))},84221:function(t,e,r){var n=r(46894).getUint64;t.exports=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=e.getUint32(i),r.firstOffset=e.getUint32(i+4),i+=8):(r.earliestPresentationTime=n(t.subarray(i)),r.firstOffset=n(t.subarray(i+8)),i+=16),i+=2;var a=e.getUint16(i);for(i+=2;a>0;i+=12,a--)r.references.push({referenceType:(128&t[i])>>>7,referencedSize:2147483647&e.getUint32(i),subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(128&t[i+8]),sapType:(112&t[i+8])>>>4,sapDeltaTime:268435455&e.getUint32(i+8)});return r}},51489:function(t){var e,r,n,i;e=function(t){return 9e4*t},r=function(t,e){return t*e},n=function(t){return t/9e4},i=function(t,e){return t/e},t.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:e,secondsToAudioTs:r,videoTsToSeconds:n,audioTsToSeconds:i,audioTsToVideoTs:function(t,r){return e(i(t,r))},videoTsToAudioTs:function(t,e){return r(n(t),e)},metadataTsToSeconds:function(t,e,r){return n(r?t:t-e)}}},46894:function(t){t.exports={getUint64:function(t){var e,r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getBigUint64?(e=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(e):e:4294967296*r.getUint32(0)+r.getUint32(4)},MAX_UINT32:4294967296}},51403:function(){},75974:function(t){t.exports=function(t,e){var r,n=null;try{r=JSON.parse(t,e)}catch(t){n=t}return[n,r]}},49945:function(t){var e,r,n,i,a;e=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var i=a.parseURL(t);if(!i)throw Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(e);if(!o)throw Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):e;var s=a.parseURL(t);if(!s)throw Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var c={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=s.netLoc,"/"!==o.path[0])){if(o.path){var l=s.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;c.path=a.normalizePath(f)}else c.path=s.path,o.params||(c.params=s.params,o.query||(c.query=s.query))}return null===c.path&&(c.path=n.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(c)},parseURL:function(t){var r=e.exec(t);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(i,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=a},13407:function(t,e,r){var n=r(58908),i=t.exports={WebVTT:r(63706),VTTCue:r(22230),VTTRegion:r(13710)};n.vttjs=i,n.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=n.VTTCue,u=n.VTTRegion;i.shim=function(){n.VTTCue=a,n.VTTRegion=o},i.restore=function(){n.VTTCue=s,n.VTTRegion=u},n.VTTCue||i.shim()},63706:function(t,e,r){var n=r(89144),i=Object.create||function(){function t(){}return function(e){if(1!=arguments.length)throw Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function a(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function o(t){function e(t,e,r,n){return(0|t)*3600+(0|e)*60+(0|r)+(0|n)/1e3}var r=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function s(){this.values=i(null)}function u(t,e,r,n){var i=n?t.split(n):[t];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(r);2===o.length&&e(o[0].trim(),o[1].trim())}}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var n=0;n<r.length;++n)if(e===r[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var c=n.createElement&&n.createElement("textarea"),l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={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)"},h={v:"title",lang:"lang"},p={rt:"ruby"};function d(t,e){for(var r,n=t.document.createElement("div"),i=n,a=[];null!==(r=function(){if(!e)return null;var t,r=e.match(/^([^<]*)(<[^>]*>?)?/);return t=r[1]?r[1]:r[2],e=e.substr(t.length),t}());){if("<"===r[0]){if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),i=i.parentNode);continue}var s,u,d,g,m=o(r.substr(1,r.length-2));if(m){g=t.document.createProcessingInstruction("timestamp",m),i.appendChild(g);continue}var y=r.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y||!(g=function(e,r){var n=l[e];if(!n)return null;var i=t.document.createElement(n),a=h[e];return a&&r&&(i[a]=r.trim()),i}(y[1],y[3]))||(u=i,p[(d=g).localName]&&p[d.localName]!==u.localName))continue;if(y[2]){var b=y[2].split(".");b.forEach(function(t){var e=/^bg_/.test(t),r=e?t.slice(3):t;if(f.hasOwnProperty(r)){var n=e?"background-color":"color",i=f[r];g.style[n]=i}}),g.className=b.join(" ")}a.push(y[1]),i.appendChild(g),i=g;continue}i.appendChild(t.document.createTextNode((s=r,c.innerHTML=s,s=c.textContent,c.textContent="",s)))}return n}var g=[[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 m(){}function y(t,e,r){m.call(this),this.cue=e,this.cueDiv=d(t,e.text);var n={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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:function(t){var e=[],r="";if(!t||!t.childNodes)return"ltr";function n(t,e){for(var r=e.childNodes.length-1;r>=0;r--)t.push(e.childNodes[r])}for(n(e,t);r=function t(e){if(!e||!e.length)return null;var r=e.pop(),i=r.textContent||r.innerText;if(i){var a=i.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):i}return"ruby"===r.tagName?t(e):r.childNodes?(n(e,r),t(e)):void 0}(e);)for(var i=0;i<r.length;i++)if(function(t){for(var e=0;e<g.length;e++){var r=g[e];if(t>=r[0]&&t<=r[1])return!0}return!1}(r.charCodeAt(i)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var i=0;switch(e.positionAlign){case"start":i=e.position;break;case"center":i=e.position-e.size/2;break;case"end":i=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function b(t){var e,r,n,i;if(t.div){r=t.div.offsetHeight,n=t.div.offsetWidth,i=t.div.offsetTop;var a=(a=t.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();t=t.div.getBoundingClientRect(),e=a?Math.max(a[0]&&a[0].height||0,t.height/a.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||r,this.bottom=t.bottom||i+(t.height||r),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight}function v(){}m.prototype.applyStyles=function(t,e){for(var r in e=e||this.div,t)t.hasOwnProperty(r)&&(e.style[r]=t[r])},m.prototype.formatStyle=function(t,e){return 0===t?0:t+e},y.prototype=i(m.prototype),y.prototype.constructor=y,b.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},b.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},b.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},b.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},b.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},b.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},b.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,r=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||r}},v.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},v.convertCueToDOMTree=function(t,e){return t&&e?d(t,e):null},v.processCues=function(t,e,r){if(!t||!e||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);var n=t.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",r.appendChild(n),!function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){for(var i=0;i<e.length;i++)n.appendChild(e[i].displayState);return}var a=[],o=b.getSimpleBoxPosition(n),s={font:Math.round(5*o.height)/100+"px sans-serif"};!function(){for(var r,i,u=0;u<e.length;u++)i=e[u],r=new y(t,i,s),n.appendChild(r.div),function(t,e,r,n){var i=new b(e),a=e.cue,o=function(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return -1;for(var e=t.track,r=e.textTrackList,n=0,i=0;i<r.length&&r[i]!==e;i++)"showing"===r[i].mode&&n++;return -1*++n}(a),s=[];if(a.snapToLines){switch(a.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var u,c=i.lineHeight,l=c*Math.round(o),f=r[u]+c,h=s[0];Math.abs(l)>f&&(l=(l<0?-1:1)*(Math.ceil(f/c)*c)),o<0&&(l+=""===a.vertical?r.height:r.width,s=s.reverse()),i.move(h,l)}else{var p=i.lineHeight/r.height*100;switch(a.lineAlign){case"center":o-=p/2;break;case"end":o-=p}switch(a.vertical){case"":e.applyStyles({top:e.formatStyle(o,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(o,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new b(e)}var d=function(t,e){for(var i,a=new b(t),o=1,s=0;s<e.length;s++){for(;t.overlapsOppositeAxis(r,e[s])||t.within(r)&&t.overlapsAny(n);)t.move(e[s]);if(t.within(r))return t;var u=t.intersectPercentage(r);o>u&&(i=new b(t),o=u),t=new b(a)}return i||a}(i,s);e.move(d.toCSSCompatValues(r))}(0,r,o,a),i.displayState=r.div,a.push(b.getSimpleBoxPosition(r))}()},v.Parser=function(t,e,r){r||(r=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=r||new TextDecoder("utf8"),this.regionList=[]},v.Parser.prototype={reportOrThrowError:function(t){if(t instanceof a)this.onparsingerror&&this.onparsingerror(t);else throw t},parse:function(t){var e=this;function r(){for(var t=e.buffer,r=0;r<t.length&&"\r"!==t[r]&&"\n"!==t[r];)++r;var n=t.substr(0,r);return"\r"===t[r]&&++r,"\n"===t[r]&&++r,e.buffer=t.substr(r),n}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var n,i,c=(i=r()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);e.state="HEADER"}for(var l=!1;e.buffer&&/\r\n|\n/.test(e.buffer);)switch(l?l=!1:i=r(),e.state){case"HEADER":/:/.test(i)?(n=i).match(/X-TIMESTAMP-MAP/)?u(n,function(t,r){if("X-TIMESTAMP-MAP"===t){var n;n=new s,u(r,function(t,e){switch(t){case"MPEGT":n.integer(t+"S",e);break;case"LOCA":n.set(t+"L",o(e))}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}},/=/):u(n,function(t,r){"Region"===t&&function(t){var r=new s;if(u(t,function(t,e){switch(t){case"id":r.set(t,e);break;case"width":r.percent(t,e);break;case"lines":r.integer(t,e);break;case"regionanchor":case"viewportanchor":var n=e.split(",");if(2!==n.length)break;var i=new s;if(i.percent("x",n[0]),i.percent("y",n[1]),!i.has("x")||!i.has("y"))break;r.set(t+"X",i.get("x")),r.set(t+"Y",i.get("y"));break;case"scroll":r.alt(t,e,["up"])}},/=/,/\s/),r.has("id")){var n=new(e.vttjs.VTTRegion||e.window.VTTRegion);n.width=r.get("width",100),n.lines=r.get("lines",3),n.regionAnchorX=r.get("regionanchorX",0),n.regionAnchorY=r.get("regionanchorY",100),n.viewportAnchorX=r.get("viewportanchorX",0),n.viewportAnchorY=r.get("viewportanchorY",100),n.scroll=r.get("scroll",""),e.onregion&&e.onregion(n),e.regionList.push({id:r.get("id"),region:n})}}(r)},/:/):i||(e.state="ID");continue;case"NOTE":i||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){e.state="NOTE";break}if(!i)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch(t){e.cue.align="middle"}if(e.state="CUE",-1===i.indexOf("-->")){e.cue.id=i;continue}case"CUE":try{!function(t,e,r){var n=t;function i(){var e=o(t);if(null===e)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function c(){t=t.replace(/^\s+/,"")}if(c(),e.startTime=i(),c(),"-->"!==t.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+n);t=t.substr(3),c(),e.endTime=i(),c(),function(t,e){var n=new s;u(t,function(t,e){switch(t){case"region":for(var i=r.length-1;i>=0;i--)if(r[i].id===e){n.set(t,r[i].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var a=e.split(","),o=a[0];n.integer(t,o),n.percent(t,o)&&n.set("snapToLines",!1),n.alt(t,o,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=e.split(","),n.percent(t,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start","center","end"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start","center","end","left","right"])}},/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");try{e.line=n.get("line","auto")}catch(t){}e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100);try{e.align=n.get("align","center")}catch(t){e.align=n.get("align","middle")}try{e.position=n.get("position","auto")}catch(t){e.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},e.align)}e.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},e.align)}(t,e)}(i,e.cue,e.regionList)}catch(t){e.reportOrThrowError(t),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var f=-1!==i.indexOf("-->");if(!i||f&&(l=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(e.state="ID");continue}}catch(t){e.reportOrThrowError(t),"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new a(a.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}},t.exports=v},22230:function(t){var e={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(t){return"string"==typeof t&&!!r[t.toLowerCase()]&&t.toLowerCase()}function i(t,r,i){this.hasBeenReset=!1;var a="",o=!1,s=t,u=r,c=i,l=null,f="",h=!0,p="auto",d="start",g="auto",m="auto",y=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(t){a=""+t}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(t){o=!!t}},startTime:{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t)throw TypeError("Start time must be set to a number.");s=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t)throw TypeError("End time must be set to a number.");u=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(t){c=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(t){l=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(t){var r="string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase();if(!1===r)throw SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=r,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(t){h=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(t){if("number"!=typeof t&&"auto"!==t)throw SyntaxError("Line: an invalid number or illegal string was specified.");p=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(t){var e=n(t);e?(d=e,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(t){if(t<0||t>100)throw Error("Position must be between 0 and 100.");g=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(t){var e=n(t);e?(m=e,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(t){if(t<0||t>100)throw Error("Size must be between 0 and 100.");y=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(t){var e=n(t);if(!e)throw SyntaxError("align: an invalid or illegal alignment string was specified.");b=e,this.hasBeenReset=!0}}}),this.displayState=void 0}i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=i},13710:function(t){var e={"":!0,up:!0};function r(t){return"number"==typeof t&&t>=0&&t<=100}t.exports=function(){var t=100,n=3,i=0,a=100,o=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!r(e))throw Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return n},set:function(t){if("number"!=typeof t)throw TypeError("Lines must be set to a number.");n=t}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!r(t))throw Error("RegionAnchorX must be between 0 and 100.");a=t}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!r(t))throw Error("RegionAnchorY must be between 0 and 100.");i=t}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!r(t))throw Error("ViewportAnchorY must be between 0 and 100.");s=t}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(t){if(!r(t))throw Error("ViewportAnchorX must be between 0 and 100.");o=t}},scroll:{enumerable:!0,get:function(){return u},set:function(t){var r="string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase();!1===r?console.warn("Scroll: an invalid or illegal string was specified."):u=r}}})}}}]); |